congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ExecutionConfig.getRestartStrategy
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: apache/flink

/**
 * Returns the specified restart strategy configuration.
 *
 * @return The restart strategy configuration to be used
 */
@PublicEvolving
public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() {
  return config.getRestartStrategy();
}
origin: apache/flink

/**
 * Returns the specified restart strategy configuration.
 *
 * @return The restart strategy configuration to be used
 */
@PublicEvolving
public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() {
  return config.getRestartStrategy();
}
origin: apache/flink

public ArchivedExecutionConfig(ExecutionConfig ec) {
  executionMode = ec.getExecutionMode().name();
  if (ec.getRestartStrategy() != null) {
    restartStrategyDescription = ec.getRestartStrategy().getDescription();
  } else {
    restartStrategyDescription = "default";
  }
  parallelism = ec.getParallelism();
  objectReuseEnabled = ec.isObjectReuseEnabled();
  if (ec.getGlobalJobParameters() != null
      && ec.getGlobalJobParameters().toMap() != null) {
    globalJobParameters = ec.getGlobalJobParameters().toMap();
  } else {
    globalJobParameters = Collections.emptyMap();
  }
}
origin: apache/flink

/**
 * Tests that in a streaming use case where checkpointing is enabled, there is no default strategy set on the
 * client side.
 */
@Test
public void testFallbackStrategyOnClientSideWhenCheckpointingEnabled() throws Exception {
  StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
  env.enableCheckpointing(500);
  env.fromElements(1).print();
  StreamGraph graph = env.getStreamGraph();
  JobGraph jobGraph = graph.getJobGraph();
  RestartStrategies.RestartStrategyConfiguration restartStrategy =
    jobGraph.getSerializedExecutionConfig().deserializeValue(getClass().getClassLoader()).getRestartStrategy();
  Assert.assertNotNull(restartStrategy);
  Assert.assertTrue(restartStrategy instanceof RestartStrategies.FallbackRestartStrategyConfiguration);
}
origin: apache/flink

/**
 * Checks that in a streaming use case where checkpointing is enabled and the number
 * of execution retries is set to 0, restarting is deactivated.
 */
@Test
public void testNoRestartingWhenCheckpointingAndExplicitExecutionRetriesZero() throws Exception {
  StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
  env.enableCheckpointing(500);
  env.setNumberOfExecutionRetries(0);
  env.fromElements(1).print();
  StreamGraph graph = env.getStreamGraph();
  JobGraph jobGraph = graph.getJobGraph();
  RestartStrategies.RestartStrategyConfiguration restartStrategy =
    jobGraph.getSerializedExecutionConfig().deserializeValue(getClass().getClassLoader()).getRestartStrategy();
  Assert.assertNotNull(restartStrategy);
  Assert.assertTrue(restartStrategy instanceof RestartStrategies.NoRestartStrategyConfiguration);
}
origin: apache/flink

  /**
   * Checks that in a streaming use case where checkpointing is enabled and the number
   * of execution retries is set to 42 and the delay to 1337, fixed delay restarting is used.
   */
  @Test
  public void testFixedRestartingWhenCheckpointingAndExplicitExecutionRetriesNonZero() throws Exception {
    StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
    env.enableCheckpointing(500);
    env.setNumberOfExecutionRetries(42);
    env.getConfig().setExecutionRetryDelay(1337);

    env.fromElements(1).print();

    StreamGraph graph = env.getStreamGraph();
    JobGraph jobGraph = graph.getJobGraph();

    RestartStrategies.RestartStrategyConfiguration restartStrategy =
      jobGraph.getSerializedExecutionConfig().deserializeValue(getClass().getClassLoader()).getRestartStrategy();

    Assert.assertNotNull(restartStrategy);
    Assert.assertTrue(restartStrategy instanceof RestartStrategies.FixedDelayRestartStrategyConfiguration);
    Assert.assertEquals(42, ((RestartStrategies.FixedDelayRestartStrategyConfiguration) restartStrategy).getRestartAttempts());
    Assert.assertEquals(1337, ((RestartStrategies.FixedDelayRestartStrategyConfiguration) restartStrategy).getDelayBetweenAttemptsInterval().toMilliseconds());
  }
}
origin: org.apache.flink/flink-streaming-java_2.11

/**
 * Returns the specified restart strategy configuration.
 *
 * @return The restart strategy configuration to be used
 */
@PublicEvolving
public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() {
  return config.getRestartStrategy();
}
origin: DTStack/flinkx

/**
 * Returns the specified restart strategy configuration.
 *
 * @return The restart strategy configuration to be used
 */
@PublicEvolving
public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() {
  return config.getRestartStrategy();
}
origin: org.apache.flink/flink-streaming-java

/**
 * Returns the specified restart strategy configuration.
 *
 * @return The restart strategy configuration to be used
 */
@PublicEvolving
public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() {
  return config.getRestartStrategy();
}
origin: DTStack/flinkx

/**
 * Returns the specified restart strategy configuration.
 *
 * @return The restart strategy configuration to be used
 */
@PublicEvolving
public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() {
  return config.getRestartStrategy();
}
origin: com.alibaba.blink/flink-java

/**
 * Returns the specified restart strategy configuration.
 *
 * @return The restart strategy configuration to be used
 */
@PublicEvolving
public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() {
  return config.getRestartStrategy();
}
origin: org.apache.flink/flink-streaming-java_2.10

/**
 * Returns the specified restart strategy configuration.
 *
 * @return The restart strategy configuration to be used
 */
@PublicEvolving
public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() {
  return config.getRestartStrategy();
}
origin: org.apache.flink/flink-java

/**
 * Returns the specified restart strategy configuration.
 *
 * @return The restart strategy configuration to be used
 */
@PublicEvolving
public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() {
  return config.getRestartStrategy();
}
origin: org.apache.flink/flink-core

public ArchivedExecutionConfig(ExecutionConfig ec) {
  executionMode = ec.getExecutionMode().name();
  if (ec.getRestartStrategy() != null) {
    restartStrategyDescription = ec.getRestartStrategy().getDescription();
  } else {
    restartStrategyDescription = "default";
  }
  parallelism = ec.getParallelism();
  objectReuseEnabled = ec.isObjectReuseEnabled();
  if (ec.getGlobalJobParameters() != null
      && ec.getGlobalJobParameters().toMap() != null) {
    globalJobParameters = ec.getGlobalJobParameters().toMap();
  } else {
    globalJobParameters = Collections.emptyMap();
  }
}
origin: com.alibaba.blink/flink-core

public ArchivedExecutionConfig(ExecutionConfig ec) {
  executionMode = ec.getExecutionMode().name();
  if (ec.getRestartStrategy() != null) {
    restartStrategyDescription = ec.getRestartStrategy().getDescription();
  } else {
    restartStrategyDescription = "default";
  }
  parallelism = ec.getParallelism();
  objectReuseEnabled = ec.isObjectReuseEnabled();
  if (ec.getGlobalJobParameters() != null
      && ec.getGlobalJobParameters().toMap() != null) {
    globalJobParameters = ec.getGlobalJobParameters().toMap();
  } else {
    globalJobParameters = Collections.emptyMap();
  }
}
origin: org.apache.flink/flink-streaming-java_2.10

if (interval > 0) {
  if (streamGraph.getExecutionConfig().getRestartStrategy() == null) {
origin: org.apache.flink/flink-runtime_2.10

jobGraph.getSerializedExecutionConfig()
    .deserializeValue(userCodeLoader)
    .getRestartStrategy();
origin: org.apache.flink/flink-runtime

jobGraph.getSerializedExecutionConfig()
    .deserializeValue(userCodeLoader)
    .getRestartStrategy();
origin: org.apache.flink/flink-runtime_2.11

jobGraph.getSerializedExecutionConfig()
    .deserializeValue(userCodeLoader)
    .getRestartStrategy();
origin: com.alibaba.blink/flink-runtime

executionConfig.getRestartStrategy();
org.apache.flink.api.commonExecutionConfiggetRestartStrategy

Javadoc

Returns the restart strategy which has been set for the current job.

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
  • 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
  • setRestartStrategy
    Sets the restart strategy to be used for recovery. ExecutionConfig config = env.getConfig();
  • registerTypeWithKryoSerializer,
  • setRestartStrategy,
  • getParallelism,
  • addDefaultKryoSerializer,
  • getGlobalJobParameters,
  • getNumberOfExecutionRetries,
  • getRegisteredKryoTypes,
  • setParallelism,
  • getDefaultKryoSerializerClasses

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getExternalFilesDir (Context)
  • getContentResolver (Context)
  • scheduleAtFixedRate (Timer)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Path (java.nio.file)
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top Vim 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