Starting Java actors in different namespaces than the Ray driver

Can we start actors in a different namespace than the Ray driver in Ray’s Java API?

For context, in Python, we can set an actor’s namespace in the @remote decorator:


class ExampleActor:

# Starts ExampleActor in the
# "actor-namespace" namespace

or the .options() call:


# Starts ExampleActor in the
# "actor-namespace" namespace

From my understanding, in Java, the ActorCreatorOptions class lists all the potential actor options we can set. I don’t see a namespace option there:

  public final String name;
  public ActorLifetime lifetime;
  public final int maxRestarts;
  public final List<String> jvmOptions;
  public final int maxConcurrency;
  public final PlacementGroup group;
  public final int bundleIndex;
  public final List<ConcurrencyGroup> concurrencyGroups;
  public final String serializedRuntimeEnv;
  public final int maxPendingCalls;

Does this mean all Java Ray actors must start in the driver’s namespace?

How severe does this issue affect your experience of using Ray?
Medium: It contributes to significant difficulty to complete my task, but I can work around it.

@raulchen do we have this feature in ray java? Could you help someone on this question?

Just checked. This is not yet supported. Could you open an issue on GitHub? We will add this feature in the next version.
BTW, you can Ray.getActor with a different namespace.

Thanks @yic and @raulchen. I’ve opened an issue here: [Java] Allow Ray actors to start in a different namespace than the driver in Java API · Issue #25665 · ray-project/ray · GitHub