public class StreamingRuntimeContext extends Object implements RuntimeContext
| Modifier and Type | Field and Description |
|---|---|
protected io.ray.streaming.state.backend.KeyStateBackend |
keyStateBackend
Backend for keyed state.
|
protected io.ray.streaming.state.backend.OperatorStateBackend |
operatorStateBackend
Backend for operator state.
|
| Constructor and Description |
|---|
StreamingRuntimeContext(ExecutionVertex executionVertex,
Map<String,String> config,
int parallelism) |
| Modifier and Type | Method and Description |
|---|---|
Long |
getCheckpointId() |
Map<String,String> |
getConfig() |
Map<String,String> |
getJobConfig() |
io.ray.streaming.state.backend.KeyStateBackend |
getKeyStateBackend() |
<T> io.ray.streaming.state.keystate.state.ListState<T> |
getListState(io.ray.streaming.state.keystate.desc.ListStateDescriptor<T> stateDescriptor) |
<S,T> io.ray.streaming.state.keystate.state.MapState<S,T> |
getMapState(io.ray.streaming.state.keystate.desc.MapStateDescriptor<S,T> stateDescriptor) |
int |
getParallelism() |
int |
getTaskId() |
int |
getTaskIndex() |
<T> io.ray.streaming.state.keystate.state.ValueState<T> |
getValueState(io.ray.streaming.state.keystate.desc.ValueStateDescriptor<T> stateDescriptor) |
void |
setCheckpointId(long checkpointId) |
void |
setCurrentKey(Object key) |
void |
setKeyStateBackend(io.ray.streaming.state.backend.KeyStateBackend keyStateBackend) |
protected void |
stateSanityCheck(io.ray.streaming.state.keystate.desc.AbstractStateDescriptor stateDescriptor,
io.ray.streaming.state.backend.AbstractKeyStateBackend backend) |
protected transient io.ray.streaming.state.backend.KeyStateBackend keyStateBackend
protected transient io.ray.streaming.state.backend.OperatorStateBackend operatorStateBackend
public StreamingRuntimeContext(ExecutionVertex executionVertex, Map<String,String> config, int parallelism)
public int getTaskId()
getTaskId in interface RuntimeContextpublic int getTaskIndex()
getTaskIndex in interface RuntimeContextpublic int getParallelism()
getParallelism in interface RuntimeContextpublic Map<String,String> getConfig()
getConfig in interface RuntimeContextpublic Map<String,String> getJobConfig()
getJobConfig in interface RuntimeContextpublic Long getCheckpointId()
getCheckpointId in interface RuntimeContextpublic void setCheckpointId(long checkpointId)
setCheckpointId in interface RuntimeContextpublic void setCurrentKey(Object key)
setCurrentKey in interface RuntimeContextpublic io.ray.streaming.state.backend.KeyStateBackend getKeyStateBackend()
getKeyStateBackend in interface RuntimeContextpublic void setKeyStateBackend(io.ray.streaming.state.backend.KeyStateBackend keyStateBackend)
setKeyStateBackend in interface RuntimeContextpublic <T> io.ray.streaming.state.keystate.state.ValueState<T> getValueState(io.ray.streaming.state.keystate.desc.ValueStateDescriptor<T> stateDescriptor)
getValueState in interface RuntimeContextpublic <T> io.ray.streaming.state.keystate.state.ListState<T> getListState(io.ray.streaming.state.keystate.desc.ListStateDescriptor<T> stateDescriptor)
getListState in interface RuntimeContextpublic <S,T> io.ray.streaming.state.keystate.state.MapState<S,T> getMapState(io.ray.streaming.state.keystate.desc.MapStateDescriptor<S,T> stateDescriptor)
getMapState in interface RuntimeContextprotected void stateSanityCheck(io.ray.streaming.state.keystate.desc.AbstractStateDescriptor stateDescriptor,
io.ray.streaming.state.backend.AbstractKeyStateBackend backend)
Copyright © 2021. All rights reserved.