Tabnine Logo
org.apache.flink.api.common
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.flink.api.common

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

origin: apache/flink

/**
 * Registers the given Serializer via its class as a serializer for the given type at the KryoSerializer.
 *
 * @param type The class of the types serialized with the given serializer.
 * @param serializerClass The class of the serializer to use.
 */
public void registerTypeWithKryoSerializer(Class<?> type, Class<? extends Serializer<?>> serializerClass) {
  config.registerTypeWithKryoSerializer(type, serializerClass);
}
origin: apache/flink

/**
 * Gets the parallelism with which operation are executed by default.
 * Operations can individually override this value to use a specific
 * parallelism.
 *
 * @return The parallelism used by operations, unless they override that
 * value.
 */
public int getParallelism() {
  return config.getParallelism();
}
origin: apache/flink

/**
 * Gets the maximum degree of parallelism defined for the program.
 *
 * <p>The maximum degree of parallelism specifies the upper limit for dynamic scaling. It also
 * defines the number of key groups used for partitioned state.
 *
 * @return Maximum degree of parallelism
 */
public int getMaxParallelism() {
  return config.getMaxParallelism();
}
origin: apache/flink

public void setDetachedPlan(FlinkPlan plan) {
  if (detachedPlan == null) {
    detachedPlan = plan;
  } else {
    throw new InvalidProgramException(DetachedJobExecutionResult.DETACHED_MESSAGE +
        DetachedJobExecutionResult.EXECUTE_TWICE_MESSAGE);
  }
}
origin: apache/flink

public StreamMockEnvironment(
  Configuration jobConfig,
  Configuration taskConfig,
  long memorySize,
  MockInputSplitProvider inputSplitProvider,
  int bufferSize,
  TaskStateManager taskStateManager) {
  this(jobConfig, taskConfig, new ExecutionConfig(), memorySize, inputSplitProvider, bufferSize, taskStateManager);
}
origin: apache/flink

/**
 * Creates a new (statistically) random JobID.
 * 
 * @return A new random JobID.
 */
public static JobID generate() {
  return new JobID();
}
origin: apache/flink

public int getMaximumParallelism() {
  MaxDopVisitor visitor = new MaxDopVisitor();
  accept(visitor);
  return Math.max(visitor.maxDop, this.defaultParallelism);
}

origin: apache/flink

/**
 * Creates a new Execution Environment.
 */
protected ExecutionEnvironment() {
  jobID = JobID.generate();
}
origin: apache/flink

/**
 * Adds a new Kryo default serializer to the Runtime.
 *
 * <p>Note that the serializer instance must be serializable (as defined by java.io.Serializable),
 * because it may be distributed to the worker nodes by java serialization.
 *
 * @param type The class of the types serialized with the given serializer.
 * @param serializer The serializer to use.
 */
public <T extends Serializer<?> & Serializable>void addDefaultKryoSerializer(Class<?> type, T serializer) {
  config.addDefaultKryoSerializer(type, serializer);
}
origin: apache/flink

@Override
public String getTaskName() {
  return taskInfo.getTaskName();
}
origin: apache/flink

/**
 * Registers all files that were registered at this execution environment's cache registry of the
 * given plan's cache registry.
 *
 * @param p The plan to register files at.
 * @throws IOException Thrown if checks for existence and sanity fail.
 */
protected void registerCachedFilesWithPlan(Plan p) throws IOException {
  for (Tuple2<String, DistributedCacheEntry> entry : cacheFile) {
    p.registerCachedFile(entry.f0, entry.f1);
  }
}
origin: apache/flink

  @Override
  protected org.apache.flink.api.common.operators.SingleInputOperator<T, T, ?> translateToDataFlow(Operator<T> input) {
    // All the translation magic happens when the iteration end is encountered.
    throw new InvalidProgramException("A data set that is part of an iteration was used as a sink or action."
        + " Did you forget to close the iteration?");
  }
}
origin: apache/flink

@Override
public ExecutionConfig getExecutionConfig() {
  return new ExecutionConfig();
}
origin: apache/flink

/**
 * Creates a new JobID from the given byte sequence. The byte sequence must be
 * exactly 16 bytes long. The first eight bytes make up the lower part of the ID,
 * while the next 8 bytes make up the upper part of the ID.
 * 
 * @param bytes The byte sequence.
 *                 
 * @return A new JobID corresponding to the ID encoded in the bytes.
 */
public static JobID fromByteArray(byte[] bytes) {
  return new JobID(bytes);
}
origin: apache/flink

/**
 * Adds a new Kryo default serializer to the Runtime.
 *
 * @param type
 *         The class of the types serialized with the given serializer.
 * @param serializerClass
 *         The class of the serializer to use.
 */
public void addDefaultKryoSerializer(Class<?> type, Class<? extends Serializer<?>> serializerClass) {
  config.addDefaultKryoSerializer(type, serializerClass);
}
origin: apache/flink

/**
 * Registers the given type with a Kryo Serializer.
 *
 * <p>Note that the serializer instance must be serializable (as defined by java.io.Serializable),
 * because it may be distributed to the worker nodes by java serialization.
 *
 * @param type The class of the types serialized with the given serializer.
 * @param serializer The serializer to use.
 */
public <T extends Serializer<?> & Serializable>void registerTypeWithKryoSerializer(Class<?> type, T serializer) {
  config.registerTypeWithKryoSerializer(type, serializer);
}
origin: apache/flink

  @Override
  public JobID getJobID() {
    throw new InvalidProgramException(DETACHED_MESSAGE + JOB_RESULT_MESSAGE);
  }
}
origin: apache/flink

/**
 * Adds a new Kryo default serializer to the Runtime.
 *
 * @param type The class of the types serialized with the given serializer.
 * @param serializerClass The class of the serializer to use.
 */
public void addDefaultKryoSerializer(Class<?> type, Class<? extends Serializer<?>> serializerClass) {
  config.addDefaultKryoSerializer(type, serializerClass);
}
origin: apache/flink

@Override
public CrossOperator<I1, I2, OUT> withForwardedFieldsFirst(String... forwardedFieldsFirst) {
  throw new InvalidProgramException("The semantic properties (forwarded fields) are automatically calculated.");
}
origin: apache/flink

@Override
public Map<String, Object> getAllAccumulatorResults() {
  throw new InvalidProgramException(DETACHED_MESSAGE + JOB_RESULT_MESSAGE);
}
org.apache.flink.api.common

Most used classes

  • ExecutionConfig
    A config to define the behavior of the program execution. It allows to define (among other options)
  • RuntimeContext
    A RuntimeContext contains information about the context in which functions are executed. Each parall
  • TypeInformation
    TypeInformation is the core class of Flink's type system. Flink requires a type information for all
  • TypeSerializer
    This interface describes the methods that are required for a data type to be handled by the Flink ru
  • JobID
    Unique (at least statistically unique) identifier for a Flink Job. Jobs in Flink correspond do dataf
  • ListState,
  • Time,
  • ValueStateDescriptor,
  • JobExecutionResult,
  • MapStateDescriptor,
  • ValueState,
  • InvalidProgramException,
  • Accumulator,
  • OperatorStateStore,
  • MapState,
  • CompatibilityResult,
  • RestartStrategies,
  • ResourceSpec,
  • LongCounter
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