congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
ExecutionConfig.setParallelism
Code IndexAdd Tabnine to your IDE (free)

How to use
setParallelism
method
in
org.apache.flink.api.common.ExecutionConfig

Best Java code snippets using org.apache.flink.api.common.ExecutionConfig.setParallelism (Showing top 20 results out of 315)

origin: apache/flink

/**
 * Sets the parallelism for operations executed through this environment.
 * Setting a parallelism of x here will cause all operators (such as join, map, reduce) to run with
 * x parallel instances.
 *
 * <p>This method overrides the default parallelism for this environment.
 * The {@link LocalEnvironment} uses by default a value equal to the number of hardware
 * contexts (CPU cores / threads). When executing the program via the command line client
 * from a JAR file, the default parallelism is the one configured for that setup.
 *
 * @param parallelism The parallelism
 */
public void setParallelism(int parallelism) {
  config.setParallelism(parallelism);
}
origin: apache/flink

/**
 * Sets the parallelism for operations executed through this environment.
 * Setting a parallelism of x here will cause all operators (such as map,
 * batchReduce) to run with x parallel instances. This method overrides the
 * default parallelism for this environment. The
 * {@link LocalStreamEnvironment} uses by default a value equal to the
 * number of hardware contexts (CPU cores / threads). When executing the
 * program via the command line client from a JAR file, the default degree
 * of parallelism is the one configured for that setup.
 *
 * @param parallelism The parallelism
 */
public StreamExecutionEnvironment setParallelism(int parallelism) {
  config.setParallelism(parallelism);
  return this;
}
origin: apache/flink

@Test
public void testConfigurationOfParallelism() {
  ExecutionConfig config = new ExecutionConfig();
  // verify explicit change in parallelism
  int parallelism = 36;
  config.setParallelism(parallelism);
  assertEquals(parallelism, config.getParallelism());
  // verify that parallelism is reset to default flag value
  parallelism = ExecutionConfig.PARALLELISM_DEFAULT;
  config.setParallelism(parallelism);
  assertEquals(parallelism, config.getParallelism());
}
origin: apache/flink

execConf.setParallelism(42);
origin: apache/flink

execConf.setParallelism(42);
origin: apache/flink

execConf.setParallelism(42);
origin: apache/flink

@SuppressWarnings("unchecked")
@Test
public void testInternalSingleValueWindowFunction() throws Exception {
  WindowFunctionMock mock = mock(WindowFunctionMock.class);
  InternalSingleValueWindowFunction<Long, String, Long, TimeWindow> windowFunction =
    new InternalSingleValueWindowFunction<>(mock);
  // check setOutputType
  TypeInformation<String> stringType = BasicTypeInfo.STRING_TYPE_INFO;
  ExecutionConfig execConf = new ExecutionConfig();
  execConf.setParallelism(42);
  StreamingFunctionUtils.setOutputType(windowFunction, stringType, execConf);
  verify(mock).setOutputType(stringType, execConf);
  // check open
  Configuration config = new Configuration();
  windowFunction.open(config);
  verify(mock).open(config);
  // check setRuntimeContext
  RuntimeContext rCtx = mock(RuntimeContext.class);
  windowFunction.setRuntimeContext(rCtx);
  verify(mock).setRuntimeContext(rCtx);
  // check apply
  TimeWindow w = mock(TimeWindow.class);
  Collector<String> c = (Collector<String>) mock(Collector.class);
  InternalWindowFunction.InternalWindowContext ctx = mock(InternalWindowFunction.InternalWindowContext.class);
  windowFunction.process(42L, w, ctx, 23L, c);
  verify(mock).apply(eq(42L), eq(w), (Iterable<Long>) argThat(IsIterableContainingInOrder.contains(23L)), eq(c));
  // check close
  windowFunction.close();
  verify(mock).close();
}
origin: apache/flink

@SuppressWarnings("unchecked")
@Test
public void testInternalSingleValueProcessAllWindowFunction() throws Exception {
  ProcessAllWindowFunctionMock mock = mock(ProcessAllWindowFunctionMock.class);
  InternalSingleValueProcessAllWindowFunction<Long, String, TimeWindow> windowFunction =
    new InternalSingleValueProcessAllWindowFunction<>(mock);
  // check setOutputType
  TypeInformation<String> stringType = BasicTypeInfo.STRING_TYPE_INFO;
  ExecutionConfig execConf = new ExecutionConfig();
  execConf.setParallelism(42);
  StreamingFunctionUtils.setOutputType(windowFunction, stringType, execConf);
  verify(mock).setOutputType(stringType, execConf);
  // check open
  Configuration config = new Configuration();
  windowFunction.open(config);
  verify(mock).open(config);
  // check setRuntimeContext
  RuntimeContext rCtx = mock(RuntimeContext.class);
  windowFunction.setRuntimeContext(rCtx);
  verify(mock).setRuntimeContext(rCtx);
  // check apply
  TimeWindow w = mock(TimeWindow.class);
  Collector<String> c = (Collector<String>) mock(Collector.class);
  InternalWindowFunction.InternalWindowContext ctx = mock(InternalWindowFunction.InternalWindowContext.class);
  windowFunction.process(((byte) 0), w, ctx, 23L, c);
  verify(mock).process((ProcessAllWindowFunctionMock.Context) anyObject(), (Iterable<Long>) argThat(IsIterableContainingInOrder.contains(23L)), eq(c));
  // check close
  windowFunction.close();
  verify(mock).close();
}
origin: apache/flink

@SuppressWarnings("unchecked")
@Test
public void testInternalSingleValueAllWindowFunction() throws Exception {
  AllWindowFunctionMock mock = mock(AllWindowFunctionMock.class);
  InternalSingleValueAllWindowFunction<Long, String, TimeWindow> windowFunction =
    new InternalSingleValueAllWindowFunction<>(mock);
  // check setOutputType
  TypeInformation<String> stringType = BasicTypeInfo.STRING_TYPE_INFO;
  ExecutionConfig execConf = new ExecutionConfig();
  execConf.setParallelism(42);
  StreamingFunctionUtils.setOutputType(windowFunction, stringType, execConf);
  verify(mock).setOutputType(stringType, execConf);
  // check open
  Configuration config = new Configuration();
  windowFunction.open(config);
  verify(mock).open(config);
  // check setRuntimeContext
  RuntimeContext rCtx = mock(RuntimeContext.class);
  windowFunction.setRuntimeContext(rCtx);
  verify(mock).setRuntimeContext(rCtx);
  // check apply
  TimeWindow w = mock(TimeWindow.class);
  Collector<String> c = (Collector<String>) mock(Collector.class);
  InternalWindowFunction.InternalWindowContext ctx = mock(InternalWindowFunction.InternalWindowContext.class);
  windowFunction.process(((byte) 0), w, ctx, 23L, c);
  verify(mock).apply(eq(w), (Iterable<Long>) argThat(IsIterableContainingInOrder.contains(23L)), eq(c));
  // check close
  windowFunction.close();
  verify(mock).close();
}
origin: apache/flink

execConf.setParallelism(42);
origin: apache/flink

execConf.setParallelism(42);
origin: apache/flink

execConf.setParallelism(42);
origin: apache/flink

execConf.setParallelism(42);
origin: apache/flink

  config.disableSysoutLogging();
config.setParallelism(parallelism);
origin: DTStack/flinkx

/**
 * Sets the parallelism for operations executed through this environment.
 * Setting a parallelism of x here will cause all operators (such as join, map, reduce) to run with
 * x parallel instances.
 *
 * <p>This method overrides the default parallelism for this environment.
 * The {@link LocalEnvironment} uses by default a value equal to the number of hardware
 * contexts (CPU cores / threads). When executing the program via the command line client
 * from a JAR file, the default parallelism is the one configured for that setup.
 *
 * @param parallelism The parallelism
 */
public void setParallelism(int parallelism) {
  config.setParallelism(parallelism);
}
origin: DTStack/flinkx

/**
 * Sets the parallelism for operations executed through this environment.
 * Setting a parallelism of x here will cause all operators (such as map,
 * batchReduce) to run with x parallel instances. This method overrides the
 * default parallelism for this environment. The
 * {@link LocalStreamEnvironment} uses by default a value equal to the
 * number of hardware contexts (CPU cores / threads). When executing the
 * program via the command line client from a JAR file, the default degree
 * of parallelism is the one configured for that setup.
 *
 * @param parallelism The parallelism
 */
public StreamExecutionEnvironment setParallelism(int parallelism) {
  config.setParallelism(parallelism);
  return this;
}
origin: org.apache.flink/flink-java

/**
 * Sets the parallelism for operations executed through this environment.
 * Setting a parallelism of x here will cause all operators (such as join, map, reduce) to run with
 * x parallel instances.
 *
 * <p>This method overrides the default parallelism for this environment.
 * The {@link LocalEnvironment} uses by default a value equal to the number of hardware
 * contexts (CPU cores / threads). When executing the program via the command line client
 * from a JAR file, the default parallelism is the one configured for that setup.
 *
 * @param parallelism The parallelism
 */
public void setParallelism(int parallelism) {
  config.setParallelism(parallelism);
}
origin: com.alibaba.blink/flink-java

/**
 * Sets the parallelism for operations executed through this environment.
 * Setting a parallelism of x here will cause all operators (such as join, map, reduce) to run with
 * x parallel instances.
 *
 * <p>This method overrides the default parallelism for this environment.
 * The {@link LocalEnvironment} uses by default a value equal to the number of hardware
 * contexts (CPU cores / threads). When executing the program via the command line client
 * from a JAR file, the default parallelism is the one configured for that setup.
 *
 * @param parallelism The parallelism
 */
public void setParallelism(int parallelism) {
  config.setParallelism(parallelism);
}
origin: org.apache.flink/flink-streaming-java_2.11

/**
 * Sets the parallelism for operations executed through this environment.
 * Setting a parallelism of x here will cause all operators (such as map,
 * batchReduce) to run with x parallel instances. This method overrides the
 * default parallelism for this environment. The
 * {@link LocalStreamEnvironment} uses by default a value equal to the
 * number of hardware contexts (CPU cores / threads). When executing the
 * program via the command line client from a JAR file, the default degree
 * of parallelism is the one configured for that setup.
 *
 * @param parallelism The parallelism
 */
public StreamExecutionEnvironment setParallelism(int parallelism) {
  config.setParallelism(parallelism);
  return this;
}
origin: org.apache.flink/flink-streaming-java

/**
 * Sets the parallelism for operations executed through this environment.
 * Setting a parallelism of x here will cause all operators (such as map,
 * batchReduce) to run with x parallel instances. This method overrides the
 * default parallelism for this environment. The
 * {@link LocalStreamEnvironment} uses by default a value equal to the
 * number of hardware contexts (CPU cores / threads). When executing the
 * program via the command line client from a JAR file, the default degree
 * of parallelism is the one configured for that setup.
 *
 * @param parallelism The parallelism
 */
public StreamExecutionEnvironment setParallelism(int parallelism) {
  config.setParallelism(parallelism);
  return this;
}
org.apache.flink.api.commonExecutionConfigsetParallelism

Javadoc

Sets the parallelism for operations executed through this environment. Setting a parallelism of x here will cause all operators (such as join, map, reduce) to run with x parallel instances.

This method overrides the default parallelism for this environment. The local execution environment uses by default a value equal to the number of hardware contexts (CPU cores / threads). When executing the program via the command line client from a JAR file, the default parallelism is the one configured for that setup.

Popular methods of ExecutionConfig

  • <init>
  • isObjectReuseEnabled
    Returns whether object reuse has been enabled or disabled. @see #enableObjectReuse()
  • disableSysoutLogging
    Disables the printing of progress update messages to System.out
  • getAutoWatermarkInterval
    Returns the interval of the automatic watermark emission.
  • setGlobalJobParameters
    Register a custom, serializable user configuration object.
  • enableObjectReuse
    Enables reusing objects that Flink internally uses for deserialization and passing data to user-code
  • setAutoWatermarkInterval
    Sets the interval of the automatic watermark emission. Watermarks are used throughout the streaming
  • disableObjectReuse
    Disables reusing objects that Flink internally uses for deserialization and passing data to user-cod
  • getRestartStrategy
    Returns the restart strategy which has been set for the current job.
  • isSysoutLoggingEnabled
    Gets whether progress update messages should be printed to System.out
  • registerKryoType
    Registers the given type with the serialization stack. If the type is eventually serialized as a POJ
  • registerTypeWithKryoSerializer
    Registers the given Serializer via its class as a serializer for the given type at the KryoSerialize
  • registerKryoType,
  • registerTypeWithKryoSerializer,
  • setRestartStrategy,
  • getParallelism,
  • addDefaultKryoSerializer,
  • getGlobalJobParameters,
  • getNumberOfExecutionRetries,
  • getRegisteredKryoTypes,
  • getDefaultKryoSerializerClasses

Popular in Java

  • Making http post requests using okhttp
  • addToBackStack (FragmentTransaction)
  • getResourceAsStream (ClassLoader)
  • onCreateOptionsMenu (Activity)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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