本文整理了Java中org.apache.flink.runtime.execution.Environment.getBroadcastVariableManager()
方法的一些代码示例,展示了Environment.getBroadcastVariableManager()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Environment.getBroadcastVariableManager()
方法的具体详情如下:
包路径:org.apache.flink.runtime.execution.Environment
类名称:Environment
方法名:getBroadcastVariableManager
暂无
代码示例来源:origin: org.apache.flink/flink-runtime
protected <X> void readAndSetBroadcastInput(int inputNum, String bcVarName, DistributedRuntimeUDFContext context, int superstep) throws IOException {
if (LOG.isDebugEnabled()) {
LOG.debug(formatLogString("Setting broadcast variable '" + bcVarName + "'" +
(superstep > 1 ? ", superstep " + superstep : "")));
}
@SuppressWarnings("unchecked")
final TypeSerializerFactory<X> serializerFactory = (TypeSerializerFactory<X>) this.broadcastInputSerializers[inputNum];
final MutableReader<?> reader = this.broadcastInputReaders[inputNum];
BroadcastVariableMaterialization<X, ?> variable = getEnvironment().getBroadcastVariableManager().materializeBroadcastVariable(bcVarName, superstep, this, reader, serializerFactory);
context.setBroadcastVariable(bcVarName, variable);
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.10
protected <X> void readAndSetBroadcastInput(int inputNum, String bcVarName, DistributedRuntimeUDFContext context, int superstep) throws IOException {
if (LOG.isDebugEnabled()) {
LOG.debug(formatLogString("Setting broadcast variable '" + bcVarName + "'" +
(superstep > 1 ? ", superstep " + superstep : "")));
}
@SuppressWarnings("unchecked")
final TypeSerializerFactory<X> serializerFactory = (TypeSerializerFactory<X>) this.broadcastInputSerializers[inputNum];
final MutableReader<?> reader = this.broadcastInputReaders[inputNum];
BroadcastVariableMaterialization<X, ?> variable = getEnvironment().getBroadcastVariableManager().materializeBroadcastVariable(bcVarName, superstep, this, reader, serializerFactory);
context.setBroadcastVariable(bcVarName, variable);
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.11
protected void releaseBroadcastVariables(String bcVarName, int superstep, DistributedRuntimeUDFContext context) {
if (LOG.isDebugEnabled()) {
LOG.debug(formatLogString("Releasing broadcast variable '" + bcVarName + "'" +
(superstep > 1 ? ", superstep " + superstep : "")));
}
getEnvironment().getBroadcastVariableManager().releaseReference(bcVarName, superstep, this);
context.clearBroadcastVariable(bcVarName);
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.11
protected <X> void readAndSetBroadcastInput(int inputNum, String bcVarName, DistributedRuntimeUDFContext context, int superstep) throws IOException {
if (LOG.isDebugEnabled()) {
LOG.debug(formatLogString("Setting broadcast variable '" + bcVarName + "'" +
(superstep > 1 ? ", superstep " + superstep : "")));
}
@SuppressWarnings("unchecked")
final TypeSerializerFactory<X> serializerFactory = (TypeSerializerFactory<X>) this.broadcastInputSerializers[inputNum];
final MutableReader<?> reader = this.broadcastInputReaders[inputNum];
BroadcastVariableMaterialization<X, ?> variable = getEnvironment().getBroadcastVariableManager().materializeBroadcastVariable(bcVarName, superstep, this, reader, serializerFactory);
context.setBroadcastVariable(bcVarName, variable);
}
代码示例来源:origin: org.apache.flink/flink-runtime
protected void releaseBroadcastVariables(String bcVarName, int superstep, DistributedRuntimeUDFContext context) {
if (LOG.isDebugEnabled()) {
LOG.debug(formatLogString("Releasing broadcast variable '" + bcVarName + "'" +
(superstep > 1 ? ", superstep " + superstep : "")));
}
getEnvironment().getBroadcastVariableManager().releaseReference(bcVarName, superstep, this);
context.clearBroadcastVariable(bcVarName);
}
代码示例来源:origin: com.alibaba.blink/flink-runtime
protected <X> void readAndSetBroadcastInput(int inputNum, String bcVarName, DistributedRuntimeUDFContext context, int superstep) throws IOException {
if (LOG.isDebugEnabled()) {
LOG.debug(formatLogString("Setting broadcast variable '" + bcVarName + "'" +
(superstep > 1 ? ", superstep " + superstep : "")));
}
@SuppressWarnings("unchecked")
final TypeSerializerFactory<X> serializerFactory = (TypeSerializerFactory<X>) this.broadcastInputSerializers[inputNum];
final MutableReader<?> reader = this.broadcastInputReaders[inputNum];
BroadcastVariableMaterialization<X, ?> variable = getEnvironment().getBroadcastVariableManager().materializeBroadcastVariable(bcVarName, superstep, this, reader, serializerFactory);
context.setBroadcastVariable(bcVarName, variable);
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.10
protected void releaseBroadcastVariables(String bcVarName, int superstep, DistributedRuntimeUDFContext context) {
if (LOG.isDebugEnabled()) {
LOG.debug(formatLogString("Releasing broadcast variable '" + bcVarName + "'" +
(superstep > 1 ? ", superstep " + superstep : "")));
}
getEnvironment().getBroadcastVariableManager().releaseReference(bcVarName, superstep, this);
context.clearBroadcastVariable(bcVarName);
}
代码示例来源:origin: com.alibaba.blink/flink-runtime
protected void releaseBroadcastVariables(String bcVarName, int superstep, DistributedRuntimeUDFContext context) {
if (LOG.isDebugEnabled()) {
LOG.debug(formatLogString("Releasing broadcast variable '" + bcVarName + "'" +
(superstep > 1 ? ", superstep " + superstep : "")));
}
getEnvironment().getBroadcastVariableManager().releaseReference(bcVarName, superstep, this);
context.clearBroadcastVariable(bcVarName);
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.11
getEnvironment().getBroadcastVariableManager().releaseAllReferencesFromTask(this);
if (runtimeUdfContext != null) {
runtimeUdfContext.clearAllBroadcastVariables();
代码示例来源:origin: org.apache.flink/flink-runtime
getEnvironment().getBroadcastVariableManager().releaseAllReferencesFromTask(this);
if (runtimeUdfContext != null) {
runtimeUdfContext.clearAllBroadcastVariables();
代码示例来源:origin: org.apache.flink/flink-runtime_2.10
getEnvironment().getBroadcastVariableManager().releaseAllReferencesFromTask(this);
if (runtimeUdfContext != null) {
runtimeUdfContext.clearAllBroadcastVariables();
代码示例来源:origin: com.alibaba.blink/flink-runtime
getEnvironment().getBroadcastVariableManager().releaseAllReferencesFromTask(this);
if (runtimeUdfContext != null) {
runtimeUdfContext.clearAllBroadcastVariables();
内容来源于网络,如有侵权,请联系作者删除!