S
- Single value typeR
- Reduced value typepublic abstract class ShardedReducerHandle<S,R> extends Object implements ReducerHandle<S,R>
Modifier and Type | Class and Description |
---|---|
class |
ShardedReducerHandle.ShardedBroadcastHandle
Broadcast for ShardedReducerHandle
|
Modifier and Type | Field and Description |
---|---|
protected TransientRandom |
random |
protected static int |
REDUCER_COUNT |
protected ArrayOfHandles.ArrayOfReducers<S,KryoWritableWrapper<R>> |
reducers |
Constructor and Description |
---|
ShardedReducerHandle() |
Modifier and Type | Method and Description |
---|---|
BroadcastHandle<R> |
broadcastValue(BlockMasterApi masterApi)
Broadcast reduced value from master
|
BroadcastHandle<R> |
createBroadcastHandle(BroadcastArrayHandle<KryoWritableWrapper<R>> broadcasts) |
abstract ReduceOperation<S,KryoWritableWrapper<R>> |
createReduceOperation() |
R |
createReduceResult(MasterGlobalCommUsage master) |
R |
getReducedValue(MasterGlobalCommUsage master)
Get reduced value
|
void |
reduce(S value)
Reduce single value
|
void |
register(CreateReducersApi reduceApi) |
protected static final int REDUCER_COUNT
protected final TransientRandom random
protected ArrayOfHandles.ArrayOfReducers<S,KryoWritableWrapper<R>> reducers
public final void register(CreateReducersApi reduceApi)
public final void reduce(S value)
ReducerHandle
reduce
in interface ReducerHandle<S,R>
public final R getReducedValue(MasterGlobalCommUsage master)
ReducerHandle
getReducedValue
in interface ReducerHandle<S,R>
public abstract ReduceOperation<S,KryoWritableWrapper<R>> createReduceOperation()
public R createReduceResult(MasterGlobalCommUsage master)
public BroadcastHandle<R> createBroadcastHandle(BroadcastArrayHandle<KryoWritableWrapper<R>> broadcasts)
public final BroadcastHandle<R> broadcastValue(BlockMasterApi masterApi)
ReducerHandle
broadcastValue
in interface ReducerHandle<S,R>
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.