public abstract class HoodieEngineContext extends Object
| Modifier and Type | Field and Description |
|---|---|
protected TaskContextSupplier |
taskContextSupplier |
| Constructor and Description |
|---|
HoodieEngineContext(StorageConfiguration<?> storageConf,
TaskContextSupplier taskContextSupplier) |
| Modifier and Type | Method and Description |
|---|---|
abstract <I,O> O |
aggregate(HoodieData<I> data,
O zeroValue,
Functions.Function2<O,I,O> seqOp,
Functions.Function2<O,O,O> combOp)
Aggregate the elements of each partition, and then the results for all the partitions, using given combine functions and a neutral "zero value".
|
abstract void |
cancelAllJobs() |
abstract void |
cancelJob(String jobId) |
abstract <T> HoodieData<T> |
emptyHoodieData() |
abstract <I,O> List<O> |
flatMap(List<I> data,
SerializableFunction<I,Stream<O>> func,
int parallelism) |
abstract <I> void |
foreach(List<I> data,
SerializableConsumer<I> consumer,
int parallelism) |
abstract List<Integer> |
getCachedDataIds(HoodieData.HoodieDataCacheKey cacheKey) |
abstract Option<String> |
getProperty(EngineProperty key) |
StorageConfiguration<?> |
getStorageConf() |
TaskContextSupplier |
getTaskContextSupplier() |
abstract <I,O> List<O> |
map(List<I> data,
SerializableFunction<I,O> func,
int parallelism) |
abstract <I,K,V> Stream<ImmutablePair<K,V>> |
mapPartitionsToPairAndReduceByKey(Stream<I> data,
SerializablePairFlatMapFunction<Iterator<I>,K,V> flatMapToPairFunc,
SerializableBiFunction<V,V,V> reduceFunc,
int parallelism) |
abstract <I,K,V> Map<K,V> |
mapToPair(List<I> data,
SerializablePairFunction<I,K,V> func,
Integer parallelism) |
abstract <I,K,V> List<V> |
mapToPairAndReduceByKey(List<I> data,
SerializablePairFunction<I,K,V> mapToPairFunc,
SerializableBiFunction<V,V,V> reduceFunc,
int parallelism) |
abstract HoodieAccumulator |
newAccumulator() |
<T> HoodieData<T> |
parallelize(List<T> data) |
abstract <T> HoodieData<T> |
parallelize(List<T> data,
int parallelism) |
abstract void |
putCachedDataIds(HoodieData.HoodieDataCacheKey cacheKey,
int... ids) |
abstract <I,K,V> List<V> |
reduceByKey(List<Pair<K,V>> data,
SerializableBiFunction<V,V,V> reduceFunc,
int parallelism) |
abstract List<Integer> |
removeCachedDataIds(HoodieData.HoodieDataCacheKey cacheKey) |
abstract void |
setJobStatus(String activeModule,
String activityDescription) |
abstract void |
setProperty(EngineProperty key,
String value) |
protected TaskContextSupplier taskContextSupplier
public HoodieEngineContext(StorageConfiguration<?> storageConf, TaskContextSupplier taskContextSupplier)
public StorageConfiguration<?> getStorageConf()
public TaskContextSupplier getTaskContextSupplier()
public abstract HoodieAccumulator newAccumulator()
public abstract <T> HoodieData<T> emptyHoodieData()
public <T> HoodieData<T> parallelize(List<T> data)
public abstract <T> HoodieData<T> parallelize(List<T> data, int parallelism)
public abstract <I,O> List<O> map(List<I> data, SerializableFunction<I,O> func, int parallelism)
public abstract <I,K,V> List<V> mapToPairAndReduceByKey(List<I> data, SerializablePairFunction<I,K,V> mapToPairFunc, SerializableBiFunction<V,V,V> reduceFunc, int parallelism)
public abstract <I,K,V> Stream<ImmutablePair<K,V>> mapPartitionsToPairAndReduceByKey(Stream<I> data, SerializablePairFlatMapFunction<Iterator<I>,K,V> flatMapToPairFunc, SerializableBiFunction<V,V,V> reduceFunc, int parallelism)
public abstract <I,K,V> List<V> reduceByKey(List<Pair<K,V>> data, SerializableBiFunction<V,V,V> reduceFunc, int parallelism)
public abstract <I,O> List<O> flatMap(List<I> data, SerializableFunction<I,Stream<O>> func, int parallelism)
public abstract <I> void foreach(List<I> data, SerializableConsumer<I> consumer, int parallelism)
public abstract <I,K,V> Map<K,V> mapToPair(List<I> data, SerializablePairFunction<I,K,V> func, Integer parallelism)
public abstract void setProperty(EngineProperty key, String value)
public abstract Option<String> getProperty(EngineProperty key)
public abstract void putCachedDataIds(HoodieData.HoodieDataCacheKey cacheKey, int... ids)
public abstract List<Integer> getCachedDataIds(HoodieData.HoodieDataCacheKey cacheKey)
public abstract List<Integer> removeCachedDataIds(HoodieData.HoodieDataCacheKey cacheKey)
public abstract void cancelJob(String jobId)
public abstract void cancelAllJobs()
public abstract <I,O> O aggregate(HoodieData<I> data, O zeroValue, Functions.Function2<O,I,O> seqOp, Functions.Function2<O,O,O> combOp)
I - input object typeO - output object typedata - zeroValue - the initial value for the accumulated result of each partition for the seqOp operatorseqOp - function to aggregate the elements of each partitioncombOp - function to combine results from different partitionsCopyright © 2024 The Apache Software Foundation. All rights reserved.