public interface RuntimeContext
| 限定符和类型 | 方法和说明 |
|---|---|
List<NodeInfo> |
getAllNodeInfo()
Get all node information in Ray cluster.
|
<T extends BaseActorHandle> |
getCurrentActorHandle()
Get the handle to the current actor itself.
|
ActorId |
getCurrentActorId()
Get the current actor ID.
|
JobId |
getCurrentJobId()
Get the current Job ID.
|
TaskId |
getCurrentTaskId()
Get current task ID.
|
List<Long> |
getGpuIds()
Get available GPU(deviceIds) for this worker.
|
String |
getNamespace()
Get the namespace of this job.
|
boolean |
isSingleProcess()
Returns true if Ray is running in single-process mode, false if Ray is running in cluster mode.
|
boolean |
wasCurrentActorRestarted()
Returns true if the current actor was restarted, otherwise false.
|
JobId getCurrentJobId()
TaskId getCurrentTaskId()
ActorId getCurrentActorId()
Note, this can only be called in actors.
boolean wasCurrentActorRestarted()
boolean isSingleProcess()
<T extends BaseActorHandle> T getCurrentActorHandle()
String getNamespace()
Copyright © 2022. All rights reserved.