public class StreamingRuntimeContext extends Object implements io.ray.streaming.api.context.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 io.ray.streaming.api.context.RuntimeContextpublic int getTaskIndex()
getTaskIndex in interface io.ray.streaming.api.context.RuntimeContextpublic int getParallelism()
getParallelism in interface io.ray.streaming.api.context.RuntimeContextpublic Map<String,String> getConfig()
getConfig in interface io.ray.streaming.api.context.RuntimeContextpublic Map<String,String> getJobConfig()
getJobConfig in interface io.ray.streaming.api.context.RuntimeContextpublic Long getCheckpointId()
getCheckpointId in interface io.ray.streaming.api.context.RuntimeContextpublic void setCheckpointId(long checkpointId)
setCheckpointId in interface io.ray.streaming.api.context.RuntimeContextpublic void setCurrentKey(Object key)
setCurrentKey in interface io.ray.streaming.api.context.RuntimeContextpublic io.ray.streaming.state.backend.KeyStateBackend getKeyStateBackend()
getKeyStateBackend in interface io.ray.streaming.api.context.RuntimeContextpublic void setKeyStateBackend(io.ray.streaming.state.backend.KeyStateBackend keyStateBackend)
setKeyStateBackend in interface io.ray.streaming.api.context.RuntimeContextpublic <T> io.ray.streaming.state.keystate.state.ValueState<T> getValueState(io.ray.streaming.state.keystate.desc.ValueStateDescriptor<T> stateDescriptor)
getValueState in interface io.ray.streaming.api.context.RuntimeContextpublic <T> io.ray.streaming.state.keystate.state.ListState<T> getListState(io.ray.streaming.state.keystate.desc.ListStateDescriptor<T> stateDescriptor)
getListState in interface io.ray.streaming.api.context.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 io.ray.streaming.api.context.RuntimeContextprotected void stateSanityCheck(io.ray.streaming.state.keystate.desc.AbstractStateDescriptor stateDescriptor,
io.ray.streaming.state.backend.AbstractKeyStateBackend backend)
Copyright © 2020. All rights reserved.