Tabnine Logo
ImmutableList
Code IndexAdd Tabnine to your IDE (free)

How to use
ImmutableList
in
org.apache.beam.vendor.guava.v20_0.com.google.common.collect

Best Java code snippets using org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList (Showing top 20 results out of 315)

origin: org.apache.beam/beam-runners-flink_2.11

 @Override
 public Iterable<Class<? extends PipelineRunner<?>>> getPipelineRunners() {
  return ImmutableList.of(FlinkRunner.class, TestFlinkRunner.class);
 }
}
origin: org.apache.beam/beam-runners-flink_2.11

@Override
public Iterable<ValueT> read() {
 try {
  Iterable<ValueT> result =
    flinkStateBackend
      .getPartitionedState(
        namespace.stringKey(), StringSerializer.INSTANCE, flinkStateDescriptor)
      .values();
  return result != null ? ImmutableList.copyOf(result) : Collections.emptyList();
 } catch (Exception e) {
  throw new RuntimeException("Error get map state values.", e);
 }
}
origin: org.apache.beam/beam-runners-flink_2.11

@Test
public void shouldUseTransformOverrides() {
 boolean[] testParameters = {true, false};
 for (boolean streaming : testParameters) {
  FlinkPipelineOptions options = PipelineOptionsFactory.as(FlinkPipelineOptions.class);
  options.setStreaming(streaming);
  options.setRunner(FlinkRunner.class);
  FlinkPipelineExecutionEnvironment flinkEnv = new FlinkPipelineExecutionEnvironment(options);
  Pipeline p = Mockito.spy(Pipeline.create(options));
  flinkEnv.translate(p);
  ArgumentCaptor<ImmutableList> captor = ArgumentCaptor.forClass(ImmutableList.class);
  Mockito.verify(p).replaceAll(captor.capture());
  ImmutableList<PTransformOverride> overridesList = captor.getValue();
  assertThat(overridesList.isEmpty(), is(false));
  assertThat(
    overridesList.size(), is(FlinkTransformOverrides.getDefaultOverrides(options).size()));
 }
}
origin: org.apache.beam/beam-runners-flink_2.11

static List<PTransformOverride> getDefaultOverrides(FlinkPipelineOptions options) {
 ImmutableList.Builder<PTransformOverride> builder = ImmutableList.builder();
 builder
origin: org.apache.beam/beam-runners-flink_2.11

 @Override
 public Iterable<Class<? extends PipelineOptions>> getPipelineOptions() {
  return ImmutableList.of(FlinkPipelineOptions.class);
 }
}
origin: org.apache.beam/beam-runners-flink_2.11

@Override
public Iterable<KeyT> read() {
 try {
  Iterable<KeyT> result =
    flinkStateBackend
      .getPartitionedState(
        namespace.stringKey(), StringSerializer.INSTANCE, flinkStateDescriptor)
      .keys();
  return result != null ? ImmutableList.copyOf(result) : Collections.emptyList();
 } catch (Exception e) {
  throw new RuntimeException("Error get map state keys.", e);
 }
}
origin: org.apache.beam/beam-runners-flink_2.11

@Override
public List<? extends Coder<?>> getCoderArguments() {
 return ImmutableList.of(keyCoder, elemCoder, windowCoder);
}
origin: org.apache.beam/beam-runners-flink_2.11

@Override
public Iterable<T> read() {
 try {
  Iterable<T> result =
    flinkStateBackend
      .getPartitionedState(
        namespace.stringKey(), StringSerializer.INSTANCE, flinkStateDescriptor)
      .keys();
  return result != null ? ImmutableList.copyOf(result) : Collections.emptyList();
 } catch (Exception e) {
  throw new RuntimeException("Error read from state.", e);
 }
}
origin: org.apache.beam/beam-runners-flink_2.11

@Override
public AccumT addInput(
  K key,
  AccumT accumulator,
  AccumT value,
  PipelineOptions options,
  SideInputReader sideInputReader,
  Collection<? extends BoundedWindow> windows) {
 return combineFnRunner.mergeAccumulators(
   ImmutableList.of(accumulator, value), options, sideInputReader, windows);
}
origin: org.apache.beam/beam-runners-flink_2.11

  };
 return result != null ? ImmutableList.copyOf(result) : Collections.emptyList();
} catch (Exception e) {
 throw new RuntimeException("Error reading state.", e);
origin: org.apache.beam/beam-sdks-java-io-hadoop-format

@Override
public List<BoundedSource<KV<K, V>>> split(long desiredBundleSizeBytes, PipelineOptions options)
  throws Exception {
 // desiredBundleSizeBytes is not being considered as splitting based on this
 // value is not supported by inputFormat getSplits() method.
 if (inputSplit != null) {
  LOGGER.info("Not splitting source {} because source is already split.", this);
  return ImmutableList.of((BoundedSource<KV<K, V>>) this);
 }
 computeSplitsIfNecessary();
 LOGGER.info(
   "Generated {} splits. Size of first split is {} ",
   inputSplits.size(),
   inputSplits.get(0).getSplit().getLength());
 return inputSplits
   .stream()
   .map(
     serializableInputSplit -> {
      return new HadoopInputFormatBoundedSource<>(
        conf,
        keyCoder,
        valueCoder,
        keyTranslationFunction,
        valueTranslationFunction,
        serializableInputSplit);
     })
   .collect(Collectors.toList());
}
origin: org.apache.beam/beam-runners-flink_2.11

Collections.emptyMap(),
mainOutput,
ImmutableList.of(additionalOutput),
outputManagerFactory,
jobInfo,
FlinkExecutableStageContext.factory(options),
createOutputMap(mainOutput, ImmutableList.of(additionalOutput)),
WindowingStrategy.globalDefault(),
null,
origin: org.apache.beam/beam-runners-flink_2.11

WindowingStrategy.globalDefault(),
ImmutableList.of(view1, view2), /* side inputs */
PipelineOptionsFactory.as(FlinkPipelineOptions.class),
null,
origin: org.apache.beam/beam-runners-flink_2.11

WindowingStrategy.of(FixedWindows.of(Duration.millis(100))),
ImmutableList.of(view1, view2), /* side inputs */
PipelineOptionsFactory.as(FlinkPipelineOptions.class),
keyCoder,
origin: org.apache.beam/beam-runners-flink_2.11

WindowingStrategy.of(FixedWindows.of(Duration.millis(100))),
ImmutableList.of(view1, view2), /* side inputs */
PipelineOptionsFactory.as(FlinkPipelineOptions.class),
null,
origin: org.apache.beam/beam-runners-flink_2.11

WindowingStrategy.of(FixedWindows.of(Duration.millis(100))),
ImmutableList.of(view1, view2), /* side inputs */
PipelineOptionsFactory.as(FlinkPipelineOptions.class),
keyCoder,
origin: org.apache.beam/beam-runners-flink_2.11

    WindowingStrategy.of(FixedWindows.of(Duration.millis(100))),
    ImmutableList.of(view1, view2), /* side inputs */
    PipelineOptionsFactory.as(FlinkPipelineOptions.class),
    keyCoder,
    new RawUnionValue(
      1,
      valuesInWindow(ImmutableList.of("hello", "ciao"), new Instant(0), firstWindow))));
testHarness.processElement2(
  new StreamRecord<>(
    new RawUnionValue(
      2, valuesInWindow(ImmutableList.of("foo", "bar"), new Instant(0), secondWindow))));
      1,
      valuesInWindow(
        ImmutableList.of("hello", "ciao"), new Instant(1000), firstWindow))));
testHarness.processElement2(
  new StreamRecord<>(
    new RawUnionValue(
      2,
      valuesInWindow(ImmutableList.of("foo", "bar"), new Instant(1000), secondWindow))));
origin: org.apache.beam/beam-runners-flink_2.11

Collections.emptyMap(),
mainOutput,
ImmutableList.of(additionalOutput1, additionalOutput2),
new DoFnOperator.MultiOutputOutputManagerFactory(
  mainOutput, tagsToOutputTags, tagsToCoders, tagsToIds),
origin: org.apache.beam/beam-runners-flink_2.11

PAssert.that(result).containsInAnyOrder(KV.of("foo", ImmutableList.of(4L, 3L, 3L)));
origin: org.apache.beam/beam-runners-flink_2.11

1,
valuesInWindow(
  ImmutableList.of(KV.of((Void) null, "hello"), KV.of((Void) null, "ciao")),
  new Instant(0),
  firstWindow))));
2,
valuesInWindow(
  ImmutableList.of(KV.of((Void) null, "foo"), KV.of((Void) null, "bar")),
  new Instant(0),
  secondWindow))));
org.apache.beam.vendor.guava.v20_0.com.google.common.collectImmutableList

Most used methods

  • of
  • builder
  • copyOf
  • isEmpty
  • size

Popular in Java

  • Making http requests using okhttp
  • setScale (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JFrame (javax.swing)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now