org.apache.flink.annotation.Internal.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(96)

本文整理了Java中org.apache.flink.annotation.Internal.<init>()方法的一些代码示例,展示了Internal.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Internal.<init>()方法的具体详情如下:
包路径:org.apache.flink.annotation.Internal
类名称:Internal
方法名:<init>

Internal.<init>介绍

暂无

代码示例

代码示例来源:origin: apache/flink

/**
 * A {@link CassandraFailureHandler} that simply fails the sink on any failures.
 */
@Internal
public class NoOpCassandraFailureHandler implements CassandraFailureHandler {

  private static final long serialVersionUID = 737941343410827885L;

  @Override
  public void onFailure(Throwable failure) throws IOException {
    // simply fail the sink
    throw new IOException("Error while sending value.", failure);
  }

}

代码示例来源:origin: apache/flink

/**
 * Gets the custom partitioner from this partitioning.
 *
 * @return The custom partitioner.
 */
@Internal
public Partitioner<?> getCustomPartitioner() {
  return customPartitioner;
}

代码示例来源:origin: apache/flink

/**
 * Interface of factory for creating {@link AggregationFunction}.
 */
@Internal
public interface AggregationFunctionFactory extends java.io.Serializable {

  <T> AggregationFunction<T> createAggregationFunction(Class<T> type);

}

代码示例来源:origin: apache/flink

@Internal
  private static final class DistinctFunction<T> implements ReduceFunction<T> {

    private static final long serialVersionUID = 1L;

    @Override
    public T reduce(T value1, T value2) throws Exception {
      return value1;
    }
  }
}

代码示例来源:origin: apache/flink

/**
 * Returns the user code class loader.
 * Only relevant if this configuration instance was deserialized from binary form.
 *
 * @return the user code class loader
 */
@Internal
public final ClassLoader getUserCodeClassLoader() {
  return userCodeClassLoader;
}

代码示例来源:origin: apache/flink

/**
 * An {@link ActionRequestFailureHandler} that simply fails the sink on any failures.
 */
@Internal
public class NoOpFailureHandler implements ActionRequestFailureHandler {

  private static final long serialVersionUID = 737941343410827885L;

  @Override
  public void onFailure(ActionRequest action, Throwable failure, int restStatusCode, RequestIndexer indexer) throws Throwable {
    // simply fail the sink
    throw failure;
  }

}

代码示例来源:origin: apache/flink

/**
 * Validator for a descriptor. We put the validation methods and utilities in separate classes
 * to keep the descriptor interfaces clean.
 */
@Internal
public interface DescriptorValidator {

  /**
   * Performs basic validation such as completeness tests.
   */
  void validate(DescriptorProperties properties);
}

代码示例来源:origin: apache/flink

/**
 * @param <T> The type to be aggregated.
 */
@Internal
public abstract class AggregationFunction<T> implements java.io.Serializable {
  private static final long serialVersionUID = 1L;

  public abstract void initializeAggregate();

  public abstract void aggregate(T value);

  public abstract T getAggregate();
}

代码示例来源:origin: apache/flink

/**
 * An {@link AbstractRichFunction} that does nothing.
 */
@Internal
public class NoOpFunction extends AbstractRichFunction {
  private static final long serialVersionUID = 1L;
}

代码示例来源:origin: apache/flink

/**
 * Interface for {@link StreamOperator} actions.
 */
@Internal
public interface OperatorActions {

  /**
   * Fail the respective stream operator with the given throwable.
   *
   * @param throwable to fail the stream operator with
   */
  void failOperator(Throwable throwable);
}

代码示例来源:origin: apache/flink

/**
 * An {@link Iterator} that is also {@link Iterable} (often by returning itself).
 *
 * @param <E> The iterated elements' type.
 */
@Internal
public interface IterableIterator<E> extends Iterator<E>, Iterable<E> {
}

代码示例来源:origin: apache/flink

@Internal
  private static final class DefaultCrossFunction<T1, T2> implements CrossFunction<T1, T2, Tuple2<T1, T2>> {

    private static final long serialVersionUID = 1L;

    private final Tuple2<T1, T2> outTuple = new Tuple2<T1, T2>();

    @Override
    public Tuple2<T1, T2> cross(T1 first, T2 second) throws Exception {
      outTuple.f0 = first;
      outTuple.f1 = second;
      return outTuple;
    }
  }
}

代码示例来源:origin: apache/flink

/**
 * Gets the custom partitioner used by this join, or {@code null}, if none is set.
 *
 * @return The custom partitioner used by this join;
 */
@Internal
public Partitioner<?> getPartitioner() {
  return customPartitioner;
}

代码示例来源:origin: apache/flink

/**
 * This method is visible because of the way the configuration is currently forwarded from the checkpoint config to
 * the task. This should not be called by the user, please use CheckpointConfig.isFailTaskOnCheckpointError()
 * instead.
 */
@Internal
public boolean isFailTaskOnCheckpointError() {
  return failTaskOnCheckpointError;
}

代码示例来源:origin: apache/flink

/**
 * Ignores all kinds of failures and drops the affected {@link ActionRequest}.
 */
@Internal
public class IgnoringFailureHandler implements ActionRequestFailureHandler {

  private static final long serialVersionUID = 1662846593501L;

  @Override
  public void onFailure(ActionRequest action, Throwable failure, int restStatusCode, RequestIndexer indexer) {
    // ignore failure
  }
}

代码示例来源:origin: apache/flink

@Nonnull
@Internal
public StateTtlConfig getTtlConfig() {
  return ttlConfig;
}

代码示例来源:origin: apache/flink

@Override
@Internal
public Map<String, DataSet<?>> getBroadcastSets() {
  return this.broadcastVariables == null ?
      Collections.<String, DataSet<?>>emptyMap() :
      Collections.unmodifiableMap(this.broadcastVariables);
}

代码示例来源:origin: apache/flink

/**
 * Returns the ID of the {@link DataStream} in the current {@link StreamExecutionEnvironment}.
 *
 * @return ID of the DataStream
 */
@Internal
public int getId() {
  return transformation.getId();
}

代码示例来源:origin: apache/flink

/**
 * Getter of the {@link org.apache.flink.streaming.api.graph.StreamGraph} of the streaming job.
 *
 * @return The streamgraph representing the transformations
 */
@Internal
public StreamGraph getStreamGraph() {
  if (transformations.size() <= 0) {
    throw new IllegalStateException("No operators defined in streaming topology. Cannot execute.");
  }
  return StreamGraphGenerator.generate(this, transformations);
}

代码示例来源:origin: apache/flink

/**
 * Returns a "closure-cleaned" version of the given function. Cleans only if closure cleaning
 * is not disabled in the {@link org.apache.flink.api.common.ExecutionConfig}
 */
@Internal
public <F> F clean(F f) {
  if (getConfig().isClosureCleanerEnabled()) {
    ClosureCleaner.clean(f, true);
  }
  ClosureCleaner.ensureSerializable(f);
  return f;
}

相关文章

Internal类方法