public class HugeArrayUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <V extends org.apache.hadoop.io.Writable> |
broadcast(int count,
Int2ObjFunction<V> valueSupplier,
BlockMasterApi master)
Broadcast a huge array, by splitting into NUM_STRIPES number of parts.
|
static <V extends org.apache.hadoop.io.Writable> |
broadcast(int count,
Int2ObjFunction<V> valueSupplier,
PrimitiveTypeOps<V> typeOps,
BlockMasterApi master)
Broadcast a huge array, by splitting into NUM_STRIPES number of parts.
|
static <S,R extends org.apache.hadoop.io.Writable> |
createGlobalReducerArrayHandle(int fixedSize,
ReduceOperation<S,R> elementReduceOp,
CreateReducersApi reduceApi)
Create global array of reducers, by splitting the huge array
into NUM_STRIPES number of parts.
|
static <S,R extends org.apache.hadoop.io.Writable> |
createGlobalReducerArrayHandle(int fixedSize,
ReduceOperation<S,R> elementReduceOp,
CreateReducersApi reduceApi,
int maxNumStripes)
Create global array of reducers, by splitting the huge array
into
maxNumStripes number of parts. |
public static <S,R extends org.apache.hadoop.io.Writable> ReducerArrayHandle<S,R> createGlobalReducerArrayHandle(int fixedSize, ReduceOperation<S,R> elementReduceOp, CreateReducersApi reduceApi)
fixedSize
- Number of elementselementReduceOp
- ReduceOperation for individual elementsreduceApi
- Api for creating reducerspublic static <S,R extends org.apache.hadoop.io.Writable> ReducerArrayHandle<S,R> createGlobalReducerArrayHandle(int fixedSize, ReduceOperation<S,R> elementReduceOp, CreateReducersApi reduceApi, int maxNumStripes)
maxNumStripes
number of parts.fixedSize
- Number of elementselementReduceOp
- ReduceOperation for individual elementsreduceApi
- Api for creating reducersmaxNumStripes
- Maximal number of reducers to create.public static <V extends org.apache.hadoop.io.Writable> BroadcastArrayHandle<V> broadcast(int count, Int2ObjFunction<V> valueSupplier, BlockMasterApi master)
count
- Number of elementsvalueSupplier
- Supplier of value to be broadcasted for a given indexmaster
- Master APIpublic static <V extends org.apache.hadoop.io.Writable> BroadcastArrayHandle<V> broadcast(int count, Int2ObjFunction<V> valueSupplier, PrimitiveTypeOps<V> typeOps, BlockMasterApi master)
count
- Number of elementsvalueSupplier
- Supplier of value to be broadcasted for a given indextypeOps
- Element TypeOpsmaster
- Master APICopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.