org.apache.flink.runtime.execution.Environment.getBroadcastVariableManager()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(121)

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

Environment.getBroadcastVariableManager介绍

暂无

代码示例

代码示例来源:origin: org.apache.flink/flink-runtime

  1. protected <X> void readAndSetBroadcastInput(int inputNum, String bcVarName, DistributedRuntimeUDFContext context, int superstep) throws IOException {
  2. if (LOG.isDebugEnabled()) {
  3. LOG.debug(formatLogString("Setting broadcast variable '" + bcVarName + "'" +
  4. (superstep > 1 ? ", superstep " + superstep : "")));
  5. }
  6. @SuppressWarnings("unchecked")
  7. final TypeSerializerFactory<X> serializerFactory = (TypeSerializerFactory<X>) this.broadcastInputSerializers[inputNum];
  8. final MutableReader<?> reader = this.broadcastInputReaders[inputNum];
  9. BroadcastVariableMaterialization<X, ?> variable = getEnvironment().getBroadcastVariableManager().materializeBroadcastVariable(bcVarName, superstep, this, reader, serializerFactory);
  10. context.setBroadcastVariable(bcVarName, variable);
  11. }

代码示例来源:origin: org.apache.flink/flink-runtime_2.10

  1. protected <X> void readAndSetBroadcastInput(int inputNum, String bcVarName, DistributedRuntimeUDFContext context, int superstep) throws IOException {
  2. if (LOG.isDebugEnabled()) {
  3. LOG.debug(formatLogString("Setting broadcast variable '" + bcVarName + "'" +
  4. (superstep > 1 ? ", superstep " + superstep : "")));
  5. }
  6. @SuppressWarnings("unchecked")
  7. final TypeSerializerFactory<X> serializerFactory = (TypeSerializerFactory<X>) this.broadcastInputSerializers[inputNum];
  8. final MutableReader<?> reader = this.broadcastInputReaders[inputNum];
  9. BroadcastVariableMaterialization<X, ?> variable = getEnvironment().getBroadcastVariableManager().materializeBroadcastVariable(bcVarName, superstep, this, reader, serializerFactory);
  10. context.setBroadcastVariable(bcVarName, variable);
  11. }

代码示例来源:origin: org.apache.flink/flink-runtime_2.11

  1. protected void releaseBroadcastVariables(String bcVarName, int superstep, DistributedRuntimeUDFContext context) {
  2. if (LOG.isDebugEnabled()) {
  3. LOG.debug(formatLogString("Releasing broadcast variable '" + bcVarName + "'" +
  4. (superstep > 1 ? ", superstep " + superstep : "")));
  5. }
  6. getEnvironment().getBroadcastVariableManager().releaseReference(bcVarName, superstep, this);
  7. context.clearBroadcastVariable(bcVarName);
  8. }

代码示例来源:origin: org.apache.flink/flink-runtime_2.11

  1. protected <X> void readAndSetBroadcastInput(int inputNum, String bcVarName, DistributedRuntimeUDFContext context, int superstep) throws IOException {
  2. if (LOG.isDebugEnabled()) {
  3. LOG.debug(formatLogString("Setting broadcast variable '" + bcVarName + "'" +
  4. (superstep > 1 ? ", superstep " + superstep : "")));
  5. }
  6. @SuppressWarnings("unchecked")
  7. final TypeSerializerFactory<X> serializerFactory = (TypeSerializerFactory<X>) this.broadcastInputSerializers[inputNum];
  8. final MutableReader<?> reader = this.broadcastInputReaders[inputNum];
  9. BroadcastVariableMaterialization<X, ?> variable = getEnvironment().getBroadcastVariableManager().materializeBroadcastVariable(bcVarName, superstep, this, reader, serializerFactory);
  10. context.setBroadcastVariable(bcVarName, variable);
  11. }

代码示例来源:origin: org.apache.flink/flink-runtime

  1. protected void releaseBroadcastVariables(String bcVarName, int superstep, DistributedRuntimeUDFContext context) {
  2. if (LOG.isDebugEnabled()) {
  3. LOG.debug(formatLogString("Releasing broadcast variable '" + bcVarName + "'" +
  4. (superstep > 1 ? ", superstep " + superstep : "")));
  5. }
  6. getEnvironment().getBroadcastVariableManager().releaseReference(bcVarName, superstep, this);
  7. context.clearBroadcastVariable(bcVarName);
  8. }

代码示例来源:origin: com.alibaba.blink/flink-runtime

  1. protected <X> void readAndSetBroadcastInput(int inputNum, String bcVarName, DistributedRuntimeUDFContext context, int superstep) throws IOException {
  2. if (LOG.isDebugEnabled()) {
  3. LOG.debug(formatLogString("Setting broadcast variable '" + bcVarName + "'" +
  4. (superstep > 1 ? ", superstep " + superstep : "")));
  5. }
  6. @SuppressWarnings("unchecked")
  7. final TypeSerializerFactory<X> serializerFactory = (TypeSerializerFactory<X>) this.broadcastInputSerializers[inputNum];
  8. final MutableReader<?> reader = this.broadcastInputReaders[inputNum];
  9. BroadcastVariableMaterialization<X, ?> variable = getEnvironment().getBroadcastVariableManager().materializeBroadcastVariable(bcVarName, superstep, this, reader, serializerFactory);
  10. context.setBroadcastVariable(bcVarName, variable);
  11. }

代码示例来源:origin: org.apache.flink/flink-runtime_2.10

  1. protected void releaseBroadcastVariables(String bcVarName, int superstep, DistributedRuntimeUDFContext context) {
  2. if (LOG.isDebugEnabled()) {
  3. LOG.debug(formatLogString("Releasing broadcast variable '" + bcVarName + "'" +
  4. (superstep > 1 ? ", superstep " + superstep : "")));
  5. }
  6. getEnvironment().getBroadcastVariableManager().releaseReference(bcVarName, superstep, this);
  7. context.clearBroadcastVariable(bcVarName);
  8. }

代码示例来源:origin: com.alibaba.blink/flink-runtime

  1. protected void releaseBroadcastVariables(String bcVarName, int superstep, DistributedRuntimeUDFContext context) {
  2. if (LOG.isDebugEnabled()) {
  3. LOG.debug(formatLogString("Releasing broadcast variable '" + bcVarName + "'" +
  4. (superstep > 1 ? ", superstep " + superstep : "")));
  5. }
  6. getEnvironment().getBroadcastVariableManager().releaseReference(bcVarName, superstep, this);
  7. context.clearBroadcastVariable(bcVarName);
  8. }

代码示例来源:origin: org.apache.flink/flink-runtime_2.11

  1. getEnvironment().getBroadcastVariableManager().releaseAllReferencesFromTask(this);
  2. if (runtimeUdfContext != null) {
  3. runtimeUdfContext.clearAllBroadcastVariables();

代码示例来源:origin: org.apache.flink/flink-runtime

  1. getEnvironment().getBroadcastVariableManager().releaseAllReferencesFromTask(this);
  2. if (runtimeUdfContext != null) {
  3. runtimeUdfContext.clearAllBroadcastVariables();

代码示例来源:origin: org.apache.flink/flink-runtime_2.10

  1. getEnvironment().getBroadcastVariableManager().releaseAllReferencesFromTask(this);
  2. if (runtimeUdfContext != null) {
  3. runtimeUdfContext.clearAllBroadcastVariables();

代码示例来源:origin: com.alibaba.blink/flink-runtime

  1. getEnvironment().getBroadcastVariableManager().releaseAllReferencesFromTask(this);
  2. if (runtimeUdfContext != null) {
  3. runtimeUdfContext.clearAllBroadcastVariables();

相关文章