mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 22:38:16 +08:00
[Java] Do not expose GcsClient to normal users (#4675)
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
package org.ray.api;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.ray.api.gcs.GcsClient;
|
||||
import org.ray.api.id.UniqueId;
|
||||
import org.ray.api.runtime.RayRuntime;
|
||||
import org.ray.api.runtime.RayRuntimeFactory;
|
||||
import org.ray.api.runtimecontext.RuntimeContext;
|
||||
|
||||
/**
|
||||
* This class contains all public APIs of Ray.
|
||||
@@ -130,11 +129,4 @@ public final class Ray extends RayCall {
|
||||
public static RuntimeContext getRuntimeContext() {
|
||||
return runtime.getRuntimeContext();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get gcs client.
|
||||
*/
|
||||
public static GcsClient getGcsClient() {
|
||||
return runtime.getGcsClient();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package org.ray.api.gcs;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The client used to interface with the GCS.
|
||||
*/
|
||||
public interface GcsClient {
|
||||
|
||||
/**
|
||||
* Get all node information in Ray cluster.
|
||||
*/
|
||||
List<NodeInfo> getAllNodeInfo();
|
||||
|
||||
}
|
||||
@@ -4,13 +4,12 @@ import java.util.List;
|
||||
import org.ray.api.RayActor;
|
||||
import org.ray.api.RayObject;
|
||||
import org.ray.api.RayPyActor;
|
||||
import org.ray.api.RuntimeContext;
|
||||
import org.ray.api.WaitResult;
|
||||
import org.ray.api.function.RayFunc;
|
||||
import org.ray.api.gcs.GcsClient;
|
||||
import org.ray.api.id.UniqueId;
|
||||
import org.ray.api.options.ActorCreationOptions;
|
||||
import org.ray.api.options.CallOptions;
|
||||
import org.ray.api.runtimecontext.RuntimeContext;
|
||||
|
||||
/**
|
||||
* Base interface of a Ray runtime.
|
||||
@@ -132,6 +131,4 @@ public interface RayRuntime {
|
||||
*/
|
||||
RayPyActor createPyActor(String moduleName, String className, Object[] args,
|
||||
ActorCreationOptions options);
|
||||
|
||||
GcsClient getGcsClient();
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.ray.api.gcs;
|
||||
package org.ray.api.runtimecontext;
|
||||
|
||||
import java.util.Map;
|
||||
import org.ray.api.id.UniqueId;
|
||||
+7
-1
@@ -1,5 +1,6 @@
|
||||
package org.ray.api;
|
||||
package org.ray.api.runtimecontext;
|
||||
|
||||
import java.util.List;
|
||||
import org.ray.api.id.UniqueId;
|
||||
|
||||
/**
|
||||
@@ -43,4 +44,9 @@ public interface RuntimeContext {
|
||||
* Return true if Ray is running in single-process mode, false if Ray is running in cluster mode.
|
||||
*/
|
||||
boolean isSingleProcess();
|
||||
|
||||
/**
|
||||
* Get all node information in Ray cluster.
|
||||
*/
|
||||
List<NodeInfo> getAllNodeInfo();
|
||||
}
|
||||
Reference in New Issue
Block a user