org.apache.flink.api.common.functions.IterationRuntimeContext Java Examples

The following examples show how to use org.apache.flink.api.common.functions.IterationRuntimeContext. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RichAsyncFunction.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public void setRuntimeContext(RuntimeContext runtimeContext) {
	Preconditions.checkNotNull(runtimeContext);

	if (runtimeContext instanceof IterationRuntimeContext) {
		super.setRuntimeContext(
			new RichAsyncFunctionIterationRuntimeContext(
				(IterationRuntimeContext) runtimeContext));
	} else {
		super.setRuntimeContext(new RichAsyncFunctionRuntimeContext(runtimeContext));
	}
}
 
Example #2
Source File: RichAsyncFunction.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public void setRuntimeContext(RuntimeContext runtimeContext) {
	Preconditions.checkNotNull(runtimeContext);

	if (runtimeContext instanceof IterationRuntimeContext) {
		super.setRuntimeContext(
			new RichAsyncFunctionIterationRuntimeContext(
				(IterationRuntimeContext) runtimeContext));
	} else {
		super.setRuntimeContext(new RichAsyncFunctionRuntimeContext(runtimeContext));
	}
}
 
Example #3
Source File: RichAsyncFunction.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Override
public void setRuntimeContext(RuntimeContext runtimeContext) {
	Preconditions.checkNotNull(runtimeContext);

	if (runtimeContext instanceof IterationRuntimeContext) {
		super.setRuntimeContext(
			new RichAsyncFunctionIterationRuntimeContext(
				(IterationRuntimeContext) runtimeContext));
	} else {
		super.setRuntimeContext(new RichAsyncFunctionRuntimeContext(runtimeContext));
	}
}
 
Example #4
Source File: ScatterFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
void init(IterationRuntimeContext context) {
	this.runtimeContext = context;
	this.outValue = new Tuple2<>();
	this.edgeIterator = new EdgesIterator<>();
}
 
Example #5
Source File: GatherFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
public void init(IterationRuntimeContext iterationRuntimeContext) {
	this.runtimeContext = iterationRuntimeContext;
}
 
Example #6
Source File: GatherFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
void init(IterationRuntimeContext context) {
	this.runtimeContext = context;
}
 
Example #7
Source File: ComputeFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
void init(IterationRuntimeContext context) {
	this.runtimeContext = context;
	this.outVertex = new Vertex<>();
	this.outMsg = new Tuple2<>();
	this.edgeIterator = new EdgesIterator<>();
}
 
Example #8
Source File: RichIterativeCondition.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public IterationRuntimeContext getIterationRuntimeContext() {
	throw new UnsupportedOperationException("Not support to get the IterationRuntimeContext in IterativeCondition.");
}
 
Example #9
Source File: ComContext.java    From Alink with Apache License 2.0 4 votes vote down vote up
public ComContext(int sessionId, IterationRuntimeContext runtimeContext) {
	this.sessionId = sessionId;
	this.numTask = runtimeContext.getNumberOfParallelSubtasks();
	this.taskId = runtimeContext.getIndexOfThisSubtask();
	this.stepNo = runtimeContext.getSuperstepNumber();
}
 
Example #10
Source File: InternalSingleValueProcessAllWindowFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public IterationRuntimeContext getIterationRuntimeContext() {
	throw new RuntimeException("This should never be called.");
}
 
Example #11
Source File: InternalSingleValueWindowFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public IterationRuntimeContext getIterationRuntimeContext() {
	throw new RuntimeException("This should never be called.");

}
 
Example #12
Source File: InternalIterableAllWindowFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public IterationRuntimeContext getIterationRuntimeContext() {
	throw new RuntimeException("This should never be called.");

}
 
Example #13
Source File: InternalIterableProcessWindowFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public IterationRuntimeContext getIterationRuntimeContext() {
	throw new RuntimeException("This should never be called.");
}
 
Example #14
Source File: InternalAggregateProcessAllWindowFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public IterationRuntimeContext getIterationRuntimeContext() {
	throw new RuntimeException("This should never be called.");
}
 
Example #15
Source File: InternalSingleValueAllWindowFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public IterationRuntimeContext getIterationRuntimeContext() {
	throw new RuntimeException("This should never be called.");
}
 
Example #16
Source File: InternalSingleValueProcessWindowFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public IterationRuntimeContext getIterationRuntimeContext() {
	throw new RuntimeException("This should never be called.");
}
 
Example #17
Source File: InternalIterableWindowFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public IterationRuntimeContext getIterationRuntimeContext() {
	throw new RuntimeException("This should never be called.");
}
 
Example #18
Source File: ApplyFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
public void init(IterationRuntimeContext iterationRuntimeContext) {
	this.runtimeContext = iterationRuntimeContext;
}
 
Example #19
Source File: InternalIterableProcessAllWindowFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public IterationRuntimeContext getIterationRuntimeContext() {
	throw new RuntimeException("This should never be called.");
}
 
Example #20
Source File: SumFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
public void init(IterationRuntimeContext iterationRuntimeContext) {
	this.runtimeContext = iterationRuntimeContext;
}
 
Example #21
Source File: ChainedTerminationCriterionDriver.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public void setup(AbstractInvokable parent) {
	agg = ((IterationRuntimeContext) getUdfRuntimeContext()).getIterationAggregator(BulkIterationBase.TERMINATION_CRITERION_AGGREGATOR_NAME);
}
 
Example #22
Source File: RichAsyncFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
RichAsyncFunctionIterationRuntimeContext(IterationRuntimeContext iterationRuntimeContext) {
	super(iterationRuntimeContext);

	this.iterationRuntimeContext = Preconditions.checkNotNull(iterationRuntimeContext);
}
 
Example #23
Source File: InternalIterableProcessAllWindowFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public IterationRuntimeContext getIterationRuntimeContext() {
	throw new RuntimeException("This should never be called.");
}
 
Example #24
Source File: InternalAggregateProcessWindowFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public IterationRuntimeContext getIterationRuntimeContext() {
	throw new RuntimeException("This should never be called.");
}
 
Example #25
Source File: InternalIterableWindowFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public IterationRuntimeContext getIterationRuntimeContext() {
	throw new RuntimeException("This should never be called.");
}
 
Example #26
Source File: InternalSingleValueProcessWindowFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public IterationRuntimeContext getIterationRuntimeContext() {
	throw new RuntimeException("This should never be called.");
}
 
Example #27
Source File: InternalSingleValueAllWindowFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public IterationRuntimeContext getIterationRuntimeContext() {
	throw new RuntimeException("This should never be called.");
}
 
Example #28
Source File: InternalAggregateProcessAllWindowFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public IterationRuntimeContext getIterationRuntimeContext() {
	throw new RuntimeException("This should never be called.");
}
 
Example #29
Source File: InternalIterableProcessWindowFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public IterationRuntimeContext getIterationRuntimeContext() {
	throw new RuntimeException("This should never be called.");
}
 
Example #30
Source File: InternalIterableAllWindowFunction.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public IterationRuntimeContext getIterationRuntimeContext() {
	throw new RuntimeException("This should never be called.");

}