From 98bfcd53bc80419a2020cc81d3b38c9f7497f648 Mon Sep 17 00:00:00 2001 From: Qing Wang Date: Sun, 12 Apr 2020 17:59:34 +0800 Subject: [PATCH] [Java] Rename group id and package name. (#7864) * Initial * Change streaming's * Fix * Fix * Fix org_ray * Fix cpp file name * Fix streaming * Fix * Fix * Fix testlistening * Fix missing sth in python * Fix * Fix * Fix SPI * Fix * Fix complation * Fix * Fix CI * Fix checkstyle Fix checkstyle * Fix streaming tests * Fix streaming CI * Fix streaming checkstyle. * Fix build * Fix bazel dep * Fix * Fix ray checkstyle * Fix streaming checkstyle * Fix bazel checkstyle --- .gitignore | 4 +- bazel/ray.bzl | 14 ++-- java/BUILD.bazel | 49 ++++++------- java/api/pom.xml | 2 +- java/api/pom_template.xml | 2 +- .../java/{org => io}/ray/api/ActorCall.java | 26 +++---- .../java/{org => io}/ray/api/BaseActor.java | 4 +- .../{org => io}/ray/api/Checkpointable.java | 7 +- .../java/{org => io}/ray/api/PyActorCall.java | 4 +- .../main/java/{org => io}/ray/api/Ray.java | 14 ++-- .../java/{org => io}/ray/api/RayActor.java | 2 +- .../java/{org => io}/ray/api/RayCall.java | 38 +++++----- .../java/{org => io}/ray/api/RayObject.java | 4 +- .../java/{org => io}/ray/api/RayPyActor.java | 2 +- .../java/{org => io}/ray/api/WaitResult.java | 2 +- .../ray/api/exception/RayActorException.java | 2 +- .../ray/api/exception/RayException.java | 2 +- .../ray/api/exception/RayTaskException.java | 2 +- .../ray/api/exception/RayWorkerException.java | 2 +- .../exception/UnreconstructableException.java | 4 +- .../ray/api/function/PyActorClass.java | 2 +- .../ray/api/function/PyActorMethod.java | 2 +- .../ray/api/function/PyRemoteFunction.java | 2 +- .../{org => io}/ray/api/function/RayFunc.java | 2 +- .../ray/api/function/RayFunc0.java | 2 +- .../ray/api/function/RayFunc1.java | 2 +- .../ray/api/function/RayFunc2.java | 2 +- .../ray/api/function/RayFunc3.java | 2 +- .../ray/api/function/RayFunc4.java | 2 +- .../ray/api/function/RayFunc5.java | 2 +- .../ray/api/function/RayFunc6.java | 2 +- .../ray/api/function/RayFuncVoid.java | 2 +- .../ray/api/function/RayFuncVoid0.java | 2 +- .../ray/api/function/RayFuncVoid1.java | 2 +- .../ray/api/function/RayFuncVoid2.java | 2 +- .../ray/api/function/RayFuncVoid3.java | 2 +- .../ray/api/function/RayFuncVoid4.java | 2 +- .../ray/api/function/RayFuncVoid5.java | 2 +- .../ray/api/function/RayFuncVoid6.java | 2 +- .../java/{org => io}/ray/api/id/ActorId.java | 2 +- .../java/{org => io}/ray/api/id/BaseId.java | 2 +- .../java/{org => io}/ray/api/id/JobId.java | 2 +- .../java/{org => io}/ray/api/id/ObjectId.java | 2 +- .../java/{org => io}/ray/api/id/TaskId.java | 2 +- .../java/{org => io}/ray/api/id/UniqueId.java | 2 +- .../ray/api/options/ActorCreationOptions.java | 2 +- .../ray/api/options/BaseTaskOptions.java | 2 +- .../ray/api/options/CallOptions.java | 2 +- .../ray/api/runtime/RayRuntime.java | 30 ++++---- .../ray/api/runtime/RayRuntimeFactory.java | 2 +- .../ray/api/runtimecontext/NodeInfo.java | 4 +- .../api/runtimecontext/RuntimeContext.java | 6 +- java/checkstyle-suppressions.xml | 2 +- ...modify_generated_java_flatbuffers_files.py | 4 +- java/pom.xml | 2 +- java/runtime/pom.xml | 4 +- java/runtime/pom_template.xml | 4 +- .../ray/runtime/AbstractRayRuntime.java | 64 ++++++++--------- .../ray/runtime/DefaultRayRuntimeFactory.java | 10 +-- .../ray/runtime/RayDevRuntime.java | 18 ++--- .../ray/runtime/RayNativeRuntime.java | 32 ++++----- .../ray/runtime/RayRuntimeInternal.java | 14 ++-- .../ray/runtime/RayRuntimeProxy.java | 8 +-- .../ray/runtime/actor/LocalModeRayActor.java | 8 +-- .../ray/runtime/actor/NativeRayActor.java | 8 +-- .../actor/NativeRayActorSerializer.java | 2 +- .../ray/runtime/actor/NativeRayJavaActor.java | 6 +- .../ray/runtime/actor/NativeRayPyActor.java | 6 +- .../ray/runtime/config/RayConfig.java | 10 +-- .../ray/runtime/config/RunMode.java | 2 +- .../context/LocalModeWorkerContext.java | 16 ++--- .../runtime/context/NativeWorkerContext.java | 12 ++-- .../runtime/context/RuntimeContextImpl.java | 16 ++--- .../ray/runtime/context/WorkerContext.java | 13 ++-- .../functionmanager/FunctionDescriptor.java | 4 +- .../functionmanager/FunctionManager.java | 8 +-- .../JavaFunctionDescriptor.java | 4 +- .../functionmanager/PyFunctionDescriptor.java | 4 +- .../runtime/functionmanager/RayFunction.java | 2 +- .../ray/runtime/gcs/GcsClient.java | 26 +++---- .../ray/runtime/gcs/GcsClientOptions.java | 4 +- .../ray/runtime/gcs/RedisClient.java | 2 +- .../runtime/object/LocalModeObjectStore.java | 6 +- .../ray/runtime/object/NativeObjectStore.java | 8 +-- .../ray/runtime/object/NativeRayObject.java | 2 +- .../ray/runtime/object/ObjectSerializer.java | 17 +++-- .../ray/runtime/object/ObjectStore.java | 12 ++-- .../ray/runtime/object/RayObjectImpl.java | 9 ++- .../ray/runtime/runner/RunManager.java | 10 +-- .../runtime/runner/worker/DefaultDriver.java | 4 +- .../runtime/runner/worker/DefaultWorker.java | 6 +- .../ray/runtime/serializer/FstSerializer.java | 6 +- .../serializer/MessagePackSerializer.java | 2 +- .../ray/runtime/serializer/Serializer.java | 2 +- .../ray/runtime/task/ArgumentsBuilder.java | 16 ++--- .../ray/runtime/task/FunctionArg.java | 6 +- .../runtime/task/LocalModeTaskExecutor.java | 11 ++- .../runtime/task/LocalModeTaskSubmitter.java | 55 +++++++------- .../ray/runtime/task/NativeTaskExecutor.java | 17 +++-- .../ray/runtime/task/NativeTaskSubmitter.java | 14 ++-- .../ray/runtime/task/TaskExecutor.java | 28 ++++---- .../ray/runtime/task/TaskSubmitter.java | 12 ++-- .../ray/runtime/util/BinaryFileUtil.java | 2 +- .../{org => io}/ray/runtime/util/IdUtil.java | 4 +- .../ray/runtime/util/JniExceptionUtil.java | 2 +- .../ray/runtime/util/JniUtils.java | 4 +- .../ray/runtime/util/LambdaUtils.java | 2 +- .../ray/runtime/util/NetworkUtil.java | 2 +- .../ray/runtime/util/ResourceUtil.java | 2 +- .../io}/ray/runtime/util/SerializerTest.java | 8 +-- .../ray/runtime/util/SystemUtil.java | 2 +- .../runtime/util/generator/BaseGenerator.java | 2 +- .../util/generator/RayCallGenerator.java | 32 ++++----- .../util/generator/RayFuncGenerator.java | 8 +-- .../functionmanager/FunctionManagerTest.java | 10 +-- java/test/pom.xml | 6 +- java/test/pom_template.xml | 6 +- .../ray/api/TestProgressListener.java | 2 +- .../java/{org => io}/ray/api/TestUtils.java | 8 +-- .../ray/api/benchmark/ActorPressTest.java | 10 +-- .../ray/api/benchmark/MaxPressureTest.java | 8 +-- .../ray/api/benchmark/MicroBenchmarks.java | 4 +- .../api/benchmark/PressureTestParameter.java | 4 +- .../ray/api/benchmark/PressureTestType.java | 2 +- .../benchmark/RateLimiterPressureTest.java | 8 +-- .../ray/api/benchmark/RayBenchmarkTest.java | 12 ++-- .../ray/api/benchmark/RemoteResult.java | 2 +- .../api/benchmark/RemoteResultWrapper.java | 4 +- .../ray/api/benchmark/SingleLatencyTest.java | 8 +-- .../ray/api/test/ActorConcurrentCallTest.java | 12 ++-- .../ray/api/test/ActorReconstructionTest.java | 23 +++--- .../{org => io}/ray/api/test/ActorTest.java | 23 +++--- .../ray/api/test/BaseMultiLanguageTest.java | 8 +-- .../{org => io}/ray/api/test/BaseTest.java | 4 +- .../ray/api/test/ClassLoaderTest.java | 20 +++--- .../ray/api/test/ClientExceptionTest.java | 18 ++--- .../api/test/CrossLanguageInvocationTest.java | 20 +++--- .../ray/api/test/DynamicResourceTest.java | 14 ++-- .../{org => io}/ray/api/test/FailureTest.java | 20 +++--- .../ray/api/test/GcsClientTest.java | 12 ++-- .../ray/api/test/HelloWorldTest.java | 6 +- .../ray/api/test/KillActorTest.java | 14 ++-- .../api/test/MultiLanguageClusterTest.java | 6 +- .../ray/api/test/MultiThreadingTest.java | 16 ++--- .../ray/api/test/ObjectStoreTest.java | 8 +-- .../ray/api/test/PlasmaFreeTest.java | 10 +-- .../ray/api/test/PlasmaStoreTest.java | 10 +-- .../{org => io}/ray/api/test/RayCallTest.java | 13 ++-- .../ray/api/test/RayConfigTest.java | 6 +- .../ray/api/test/RayMethodsTest.java | 8 +-- .../ray/api/test/RaySerializerTest.java | 12 ++-- .../ray/api/test/RayletConfigTest.java | 8 +-- .../ray/api/test/RedisPasswordTest.java | 6 +- .../ray/api/test/ResourcesManagementTest.java | 16 ++--- .../ray/api/test/RuntimeContextTest.java | 10 +-- .../ray/api/test/SingleProcessModeTest.java | 12 ++-- .../{org => io}/ray/api/test/StressTest.java | 12 ++-- .../ray/api/test/UniqueIdTest.java | 6 +- .../{org => io}/ray/api/test/WaitTest.java | 10 +-- .../ray/api/test/WorkerJvmOptionsTest.java | 12 ++-- .../test_cross_language_invocation.py | 18 ++--- java/testng.xml | 6 +- java/tutorial/README.rst | 14 ++-- java/tutorial/pom.xml | 6 +- java/tutorial/pom_template.xml | 6 +- .../{org => io}/ray/exercise/Exercise01.java | 6 +- .../{org => io}/ray/exercise/Exercise02.java | 6 +- .../{org => io}/ray/exercise/Exercise03.java | 6 +- .../{org => io}/ray/exercise/Exercise04.java | 8 +-- .../{org => io}/ray/exercise/Exercise05.java | 8 +-- python/ray/scripts/scripts.py | 2 +- python/ray/services.py | 2 +- ....cc => io_ray_runtime_RayNativeRuntime.cc} | 15 ++-- ...me.h => io_ray_runtime_RayNativeRuntime.h} | 30 ++++---- ...=> io_ray_runtime_actor_NativeRayActor.cc} | 10 +-- ... => io_ray_runtime_actor_NativeRayActor.h} | 22 +++--- ...ay_runtime_context_NativeWorkerContext.cc} | 12 ++-- ...ray_runtime_context_NativeWorkerContext.h} | 26 +++---- ...o_ray_runtime_object_NativeObjectStore.cc} | 12 ++-- ...io_ray_runtime_object_NativeObjectStore.h} | 26 +++---- ...io_ray_runtime_task_NativeTaskExecutor.cc} | 6 +- ... io_ray_runtime_task_NativeTaskExecutor.h} | 18 ++--- ...o_ray_runtime_task_NativeTaskSubmitter.cc} | 8 +-- ...io_ray_runtime_task_NativeTaskSubmitter.h} | 18 ++--- src/ray/core_worker/lib/java/jni_init.cc | 29 ++++---- src/ray/protobuf/common.proto | 2 +- src/ray/protobuf/gcs.proto | 2 +- streaming/java/BUILD.bazel | 42 +++++------ streaming/java/checkstyle-suppressions.xml | 2 +- streaming/java/pom.xml | 2 +- streaming/java/streaming-api/pom.xml | 4 +- streaming/java/streaming-api/pom_template.xml | 4 +- .../ray/streaming/api/Language.java | 2 +- .../api/collector/CollectionCollector.java | 4 +- .../streaming/api/collector/Collector.java | 2 +- .../streaming/api/context/RuntimeContext.java | 2 +- .../api/context/StreamingContext.java | 10 +-- .../ray/streaming/api/function/Function.java | 2 +- .../api/function/impl/AggregateFunction.java | 4 +- .../api/function/impl/FilterFunction.java | 4 +- .../api/function/impl/FlatMapFunction.java | 6 +- .../api/function/impl/JoinFunction.java | 4 +- .../api/function/impl/KeyFunction.java | 4 +- .../api/function/impl/MapFunction.java | 4 +- .../api/function/impl/ProcessFunction.java | 4 +- .../api/function/impl/ReduceFunction.java | 4 +- .../api/function/impl/SinkFunction.java | 4 +- .../api/function/impl/SourceFunction.java | 4 +- .../internal/CollectionSourceFunction.java | 4 +- .../streaming/api/partition/Partition.java | 4 +- .../partition/impl/BroadcastPartition.java | 4 +- .../api/partition/impl/KeyPartition.java | 6 +- .../partition/impl/RoundRobinPartition.java | 4 +- .../ray/streaming/api/stream/DataStream.java | 30 ++++---- .../streaming/api/stream/DataStreamSink.java | 4 +- .../api/stream/DataStreamSource.java | 12 ++-- .../ray/streaming/api/stream/JoinStream.java | 6 +- .../streaming/api/stream/KeyDataStream.java | 12 ++-- .../ray/streaming/api/stream/Stream.java | 16 ++--- .../ray/streaming/api/stream/StreamSink.java | 4 +- .../streaming/api/stream/StreamSource.java | 2 +- .../ray/streaming/api/stream/UnionStream.java | 4 +- .../ray/streaming/jobgraph/JobEdge.java | 4 +- .../ray/streaming/jobgraph/JobGraph.java | 2 +- .../streaming/jobgraph/JobGraphBuilder.java | 14 ++-- .../ray/streaming/jobgraph/JobVertex.java | 6 +- .../ray/streaming/jobgraph/VertexType.java | 2 +- .../ray/streaming/message/KeyRecord.java | 2 +- .../ray/streaming/message/Message.java | 2 +- .../ray/streaming/message/Record.java | 2 +- .../streaming/operator/OneInputOperator.java | 4 +- .../ray/streaming/operator/Operator.java | 10 +-- .../ray/streaming/operator/OperatorType.java | 2 +- .../streaming/operator/StreamOperator.java | 14 ++-- .../streaming/operator/TwoInputOperator.java | 4 +- .../operator/impl/FilterOperator.java | 10 +-- .../operator/impl/FlatMapOperator.java | 16 ++--- .../operator/impl/KeyByOperator.java | 12 ++-- .../streaming/operator/impl/MapOperator.java | 10 +-- .../operator/impl/ReduceOperator.java | 16 ++--- .../streaming/operator/impl/SinkOperator.java | 10 +-- .../operator/impl/SourceOperator.java | 16 ++--- .../ray/streaming/python/PythonFunction.java | 4 +- .../ray/streaming/python/PythonOperator.java | 10 +-- .../ray/streaming/python/PythonPartition.java | 4 +- .../python/stream/PythonDataStream.java | 14 ++-- .../python/stream/PythonKeyDataStream.java | 10 +-- .../streaming/python/stream/PythonStream.java | 2 +- .../python/stream/PythonStreamSink.java | 6 +- .../python/stream/PythonStreamSource.java | 14 ++-- .../ray/streaming/schedule/JobScheduler.java | 4 +- .../ray/streaming/util/Config.java | 2 +- .../jobgraph/JobGraphBuilderTest.java | 14 ++-- streaming/java/streaming-runtime/pom.xml | 8 +-- .../java/streaming-runtime/pom_template.xml | 8 +-- .../ray/streaming/runtime/config/Config.java | 2 +- .../runtime/config/StreamingConfig.java | 2 +- .../runtime/config/StreamingGlobalConfig.java | 4 +- .../runtime/config/StreamingMasterConfig.java | 4 +- .../runtime/config/StreamingWorkerConfig.java | 2 +- .../runtime/config/global/CommonConfig.java | 4 +- .../runtime/config/master/ResourceConfig.java | 4 +- .../config/types/SlotAssignStrategyType.java | 2 +- .../core/collector/OutputCollector.java | 14 ++-- .../runtime/core/command/BatchInfo.java | 2 +- .../runtime/core/common/AbstractID.java | 4 +- .../runtime/core/graph/ExecutionEdge.java | 4 +- .../runtime/core/graph/ExecutionGraph.java | 6 +- .../runtime/core/graph/ExecutionNode.java | 8 +-- .../runtime/core/graph/ExecutionTask.java | 4 +- .../graph/executiongraph/ExecutionEdge.java | 4 +- .../graph/executiongraph/ExecutionGraph.java | 2 +- .../executiongraph/ExecutionJobEdge.java | 6 +- .../executiongraph/ExecutionJobVertex.java | 16 ++--- .../graph/executiongraph/ExecutionVertex.java | 20 +++--- .../executiongraph/ExecutionVertexState.java | 2 +- .../core/processor/OneInputProcessor.java | 6 +- .../core/processor/ProcessBuilder.java | 12 ++-- .../runtime/core/processor/Processor.java | 6 +- .../core/processor/SourceProcessor.java | 6 +- .../core/processor/StreamProcessor.java | 8 +-- .../core/processor/TwoInputProcessor.java | 6 +- .../runtime/core/resource/Container.java | 4 +- .../runtime/core/resource/ContainerID.java | 9 +++ .../runtime/core/resource/ResourceType.java | 2 +- .../runtime/core/resource/Resources.java | 6 +- .../streaming/runtime/core/resource/Slot.java | 2 +- .../runtime/master/JobRuntimeContext.java | 8 +-- .../master/graphmanager/GraphManager.java | 6 +- .../master/graphmanager/GraphManagerImpl.java | 16 ++--- .../resourcemanager/ResourceManager.java | 8 +-- .../resourcemanager/ResourceManagerImpl.java | 22 +++--- .../strategy/SlotAssignStrategy.java | 12 ++-- .../strategy/SlotAssignStrategyFactory.java | 6 +- .../strategy/impl/PipelineFirstStrategy.java | 20 +++--- .../runtime/python/GraphPbBuilder.java | 24 +++---- .../runtime/python/MsgPackSerializer.java | 2 +- .../runtime/python/PythonGateway.java | 12 ++-- .../runtime/schedule/JobSchedulerImpl.java | 34 ++++----- .../runtime/schedule/TaskAssigner.java | 6 +- .../runtime/schedule/TaskAssignerImpl.java | 24 +++---- .../streaming/runtime/transfer/ChannelID.java | 2 +- .../transfer/ChannelInitException.java | 2 +- .../transfer/ChannelInterruptException.java | 2 +- .../runtime/transfer/ChannelUtils.java | 6 +- .../runtime/transfer/DataMessage.java | 2 +- .../runtime/transfer/DataReader.java | 8 +-- .../runtime/transfer/DataWriter.java | 8 +-- .../streaming/runtime/transfer/Message.java | 2 +- .../runtime/transfer/TransferHandler.java | 10 +-- .../ray/streaming/runtime/util/EnvUtil.java | 6 +- .../ray/streaming/runtime/util/Platform.java | 2 +- .../runtime/util/ReflectionUtils.java | 2 +- .../streaming/runtime/worker/JobWorker.java | 34 ++++----- .../worker/context/RayRuntimeContext.java | 8 +-- .../runtime/worker/context/WorkerContext.java | 4 +- .../runtime/worker/tasks/InputStreamTask.java | 12 ++-- .../worker/tasks/OneInputStreamTask.java | 6 +- .../worker/tasks/SourceStreamTask.java | 8 +-- .../runtime/worker/tasks/StreamTask.java | 36 +++++----- .../runtime/core/resource/ContainerID.java | 9 --- .../io.ray.streaming.schedule.JobScheduler | 1 + .../org.ray.streaming.schedule.JobScheduler | 1 - .../ray/streaming/runtime/BaseUnitTest.java | 2 +- .../ray/streaming/runtime/TestHelper.java | 2 +- .../streaming/runtime/config/ConfigTest.java | 6 +- .../streaming/runtime/demo/WordCountTest.java | 16 ++--- .../runtime/graph/ExecutionGraphTest.java | 36 +++++----- .../runtime/python/MsgPackSerializerTest.java | 7 +- .../runtime/python/PythonGatewayTest.java | 11 ++- .../resourcemanager/ResourceManagerTest.java | 43 ++++++----- .../schedule/TaskAssignerImplTest.java | 28 ++++---- .../strategy/PipelineFirstStrategyTest.java | 38 +++++----- .../streamingqueue/StreamingQueueTest.java | 28 ++++---- .../runtime/streamingqueue/Worker.java | 23 +++--- .../runtime/transfer/ChannelIDTest.java | 9 ++- .../runtime/util/ReflectionUtilsTest.java | 5 +- streaming/java/testng.xml | 2 +- streaming/python/context.py | 2 +- streaming/python/datastream.py | 8 +-- streaming/python/function.py | 2 +- streaming/python/partition.py | 2 +- streaming/python/runtime/gateway_client.py | 2 +- ...y_streaming_runtime_transfer_ChannelID.cc} | 6 +- ...ray_streaming_runtime_transfer_ChannelID.h | 31 ++++++++ ..._streaming_runtime_transfer_DataReader.cc} | 10 +-- ...ay_streaming_runtime_transfer_DataReader.h | 45 ++++++++++++ ..._streaming_runtime_transfer_DataWriter.cc} | 10 +-- ...ay_streaming_runtime_transfer_DataWriter.h | 45 ++++++++++++ ...aming_runtime_transfer_TransferHandler.cc} | 14 ++-- ...reaming_runtime_transfer_TransferHandler.h | 71 +++++++++++++++++++ ...ray_streaming_runtime_transfer_ChannelID.h | 31 -------- ...ay_streaming_runtime_transfer_DataReader.h | 45 ------------ ...ay_streaming_runtime_transfer_DataWriter.h | 45 ------------ ...reaming_runtime_transfer_TransferHandler.h | 71 ------------------- .../src/lib/java/streaming_jni_common.cc | 10 +-- streaming/src/protobuf/remote_call.proto | 2 +- streaming/src/protobuf/streaming.proto | 2 +- 358 files changed, 1717 insertions(+), 1740 deletions(-) rename java/api/src/main/java/{org => io}/ray/api/ActorCall.java (98%) rename java/api/src/main/java/{org => io}/ray/api/BaseActor.java (91%) rename java/api/src/main/java/{org => io}/ray/api/Checkpointable.java (97%) rename java/api/src/main/java/{org => io}/ray/api/PyActorCall.java (96%) rename java/api/src/main/java/{org => io}/ray/api/Ray.java (95%) rename java/api/src/main/java/{org => io}/ray/api/RayActor.java (97%) rename java/api/src/main/java/{org => io}/ray/api/RayCall.java (99%) rename java/api/src/main/java/{org => io}/ray/api/RayObject.java (87%) rename java/api/src/main/java/{org => io}/ray/api/RayPyActor.java (92%) rename java/api/src/main/java/{org => io}/ray/api/WaitResult.java (96%) rename java/api/src/main/java/{org => io}/ray/api/exception/RayActorException.java (92%) rename java/api/src/main/java/{org => io}/ray/api/exception/RayException.java (89%) rename java/api/src/main/java/{org => io}/ray/api/exception/RayTaskException.java (93%) rename java/api/src/main/java/{org => io}/ray/api/exception/RayWorkerException.java (88%) rename java/api/src/main/java/{org => io}/ray/api/exception/UnreconstructableException.java (90%) rename java/api/src/main/java/{org => io}/ray/api/function/PyActorClass.java (96%) rename java/api/src/main/java/{org => io}/ray/api/function/PyActorMethod.java (97%) rename java/api/src/main/java/{org => io}/ray/api/function/PyRemoteFunction.java (97%) rename java/api/src/main/java/{org => io}/ray/api/function/RayFunc.java (81%) rename java/api/src/main/java/{org => io}/ray/api/function/RayFunc0.java (88%) rename java/api/src/main/java/{org => io}/ray/api/function/RayFunc1.java (88%) rename java/api/src/main/java/{org => io}/ray/api/function/RayFunc2.java (89%) rename java/api/src/main/java/{org => io}/ray/api/function/RayFunc3.java (89%) rename java/api/src/main/java/{org => io}/ray/api/function/RayFunc4.java (89%) rename java/api/src/main/java/{org => io}/ray/api/function/RayFunc5.java (90%) rename java/api/src/main/java/{org => io}/ray/api/function/RayFunc6.java (90%) rename java/api/src/main/java/{org => io}/ray/api/function/RayFuncVoid.java (77%) rename java/api/src/main/java/{org => io}/ray/api/function/RayFuncVoid0.java (88%) rename java/api/src/main/java/{org => io}/ray/api/function/RayFuncVoid1.java (88%) rename java/api/src/main/java/{org => io}/ray/api/function/RayFuncVoid2.java (89%) rename java/api/src/main/java/{org => io}/ray/api/function/RayFuncVoid3.java (89%) rename java/api/src/main/java/{org => io}/ray/api/function/RayFuncVoid4.java (90%) rename java/api/src/main/java/{org => io}/ray/api/function/RayFuncVoid5.java (90%) rename java/api/src/main/java/{org => io}/ray/api/function/RayFuncVoid6.java (90%) rename java/api/src/main/java/{org => io}/ray/api/id/ActorId.java (97%) rename java/api/src/main/java/{org => io}/ray/api/id/BaseId.java (98%) rename java/api/src/main/java/{org => io}/ray/api/id/JobId.java (98%) rename java/api/src/main/java/{org => io}/ray/api/id/ObjectId.java (97%) rename java/api/src/main/java/{org => io}/ray/api/id/TaskId.java (97%) rename java/api/src/main/java/{org => io}/ray/api/id/UniqueId.java (97%) rename java/api/src/main/java/{org => io}/ray/api/options/ActorCreationOptions.java (98%) rename java/api/src/main/java/{org => io}/ray/api/options/BaseTaskOptions.java (95%) rename java/api/src/main/java/{org => io}/ray/api/options/CallOptions.java (95%) rename java/api/src/main/java/{org => io}/ray/api/runtime/RayRuntime.java (90%) rename java/api/src/main/java/{org => io}/ray/api/runtime/RayRuntimeFactory.java (81%) rename java/api/src/main/java/{org => io}/ray/api/runtimecontext/NodeInfo.java (92%) rename java/api/src/main/java/{org => io}/ray/api/runtimecontext/RuntimeContext.java (90%) rename java/runtime/src/main/java/{org => io}/ray/runtime/AbstractRayRuntime.java (85%) rename java/runtime/src/main/java/{org => io}/ray/runtime/DefaultRayRuntimeFactory.java (83%) rename java/runtime/src/main/java/{org => io}/ray/runtime/RayDevRuntime.java (84%) rename java/runtime/src/main/java/{org => io}/ray/runtime/RayNativeRuntime.java (89%) rename java/runtime/src/main/java/{org => io}/ray/runtime/RayRuntimeInternal.java (59%) rename java/runtime/src/main/java/{org => io}/ray/runtime/RayRuntimeProxy.java (94%) rename java/runtime/src/main/java/{org => io}/ray/runtime/actor/LocalModeRayActor.java (91%) rename java/runtime/src/main/java/{org => io}/ray/runtime/actor/NativeRayActor.java (94%) rename java/runtime/src/main/java/{org => io}/ray/runtime/actor/NativeRayActorSerializer.java (96%) rename java/runtime/src/main/java/{org => io}/ray/runtime/actor/NativeRayJavaActor.java (84%) rename java/runtime/src/main/java/{org => io}/ray/runtime/actor/NativeRayPyActor.java (88%) rename java/runtime/src/main/java/{org => io}/ray/runtime/config/RayConfig.java (98%) rename java/runtime/src/main/java/{org => io}/ray/runtime/config/RunMode.java (89%) rename java/runtime/src/main/java/{org => io}/ray/runtime/context/LocalModeWorkerContext.java (83%) rename java/runtime/src/main/java/{org => io}/ray/runtime/context/NativeWorkerContext.java (87%) rename java/runtime/src/main/java/{org => io}/ray/runtime/context/RuntimeContextImpl.java (82%) rename java/runtime/src/main/java/{org => io}/ray/runtime/context/WorkerContext.java (75%) rename java/runtime/src/main/java/{org => io}/ray/runtime/functionmanager/FunctionDescriptor.java (82%) rename java/runtime/src/main/java/{org => io}/ray/runtime/functionmanager/FunctionManager.java (98%) rename java/runtime/src/main/java/{org => io}/ray/runtime/functionmanager/JavaFunctionDescriptor.java (93%) rename java/runtime/src/main/java/{org => io}/ray/runtime/functionmanager/PyFunctionDescriptor.java (89%) rename java/runtime/src/main/java/{org => io}/ray/runtime/functionmanager/RayFunction.java (97%) rename java/runtime/src/main/java/{org => io}/ray/runtime/gcs/GcsClient.java (92%) rename java/runtime/src/main/java/{org => io}/ray/runtime/gcs/GcsClientOptions.java (81%) rename java/runtime/src/main/java/{org => io}/ray/runtime/gcs/RedisClient.java (99%) rename java/runtime/src/main/java/{org => io}/ray/runtime/object/LocalModeObjectStore.java (96%) rename java/runtime/src/main/java/{org => io}/ray/runtime/object/NativeObjectStore.java (92%) rename java/runtime/src/main/java/{org => io}/ray/runtime/object/NativeRayObject.java (95%) rename java/runtime/src/main/java/{org => io}/ray/runtime/object/ObjectSerializer.java (91%) rename java/runtime/src/main/java/{org => io}/ray/runtime/object/ObjectStore.java (96%) rename java/runtime/src/main/java/{org => io}/ray/runtime/object/RayObjectImpl.java (89%) rename java/runtime/src/main/java/{org => io}/ray/runtime/runner/RunManager.java (98%) rename java/runtime/src/main/java/{org => io}/ray/runtime/runner/worker/DefaultDriver.java (91%) rename java/runtime/src/main/java/{org => io}/ray/runtime/runner/worker/DefaultWorker.java (89%) rename java/runtime/src/main/java/{org => io}/ray/runtime/serializer/FstSerializer.java (86%) rename java/runtime/src/main/java/{org => io}/ray/runtime/serializer/MessagePackSerializer.java (99%) rename java/runtime/src/main/java/{org => io}/ray/runtime/serializer/Serializer.java (90%) rename java/runtime/src/main/java/{org => io}/ray/runtime/task/ArgumentsBuilder.java (88%) rename java/runtime/src/main/java/{org => io}/ray/runtime/task/FunctionArg.java (91%) rename java/runtime/src/main/java/{org => io}/ray/runtime/task/LocalModeTaskExecutor.java (73%) rename java/runtime/src/main/java/{org => io}/ray/runtime/task/LocalModeTaskSubmitter.java (89%) rename java/runtime/src/main/java/{org => io}/ray/runtime/task/NativeTaskExecutor.java (88%) rename java/runtime/src/main/java/{org => io}/ray/runtime/task/NativeTaskSubmitter.java (87%) rename java/runtime/src/main/java/{org => io}/ray/runtime/task/TaskExecutor.java (89%) rename java/runtime/src/main/java/{org => io}/ray/runtime/task/TaskSubmitter.java (85%) rename java/runtime/src/main/java/{org => io}/ray/runtime/util/BinaryFileUtil.java (98%) rename java/runtime/src/main/java/{org => io}/ray/runtime/util/IdUtil.java (96%) rename java/runtime/src/main/java/{org => io}/ray/runtime/util/JniExceptionUtil.java (95%) rename java/runtime/src/main/java/{org => io}/ray/runtime/util/JniUtils.java (97%) rename java/runtime/src/main/java/{org => io}/ray/runtime/util/LambdaUtils.java (96%) rename java/runtime/src/main/java/{org => io}/ray/runtime/util/NetworkUtil.java (98%) rename java/runtime/src/main/java/{org => io}/ray/runtime/util/ResourceUtil.java (98%) rename java/runtime/src/{test/java/org => main/java/io}/ray/runtime/util/SerializerTest.java (93%) rename java/runtime/src/main/java/{org => io}/ray/runtime/util/SystemUtil.java (98%) rename java/runtime/src/main/java/{org => io}/ray/runtime/util/generator/BaseGenerator.java (91%) rename java/runtime/src/main/java/{org => io}/ray/runtime/util/generator/RayCallGenerator.java (92%) rename java/runtime/src/main/java/{org => io}/ray/runtime/util/generator/RayFuncGenerator.java (90%) rename java/runtime/src/test/java/{org => io}/ray/runtime/functionmanager/FunctionManagerTest.java (96%) rename java/test/src/main/java/{org => io}/ray/api/TestProgressListener.java (98%) rename java/test/src/main/java/{org => io}/ray/api/TestUtils.java (94%) rename java/test/src/main/java/{org => io}/ray/api/benchmark/ActorPressTest.java (90%) rename java/test/src/main/java/{org => io}/ray/api/benchmark/MaxPressureTest.java (89%) rename java/test/src/main/java/{org => io}/ray/api/benchmark/MicroBenchmarks.java (96%) rename java/test/src/main/java/{org => io}/ray/api/benchmark/PressureTestParameter.java (96%) rename java/test/src/main/java/{org => io}/ray/api/benchmark/PressureTestType.java (70%) rename java/test/src/main/java/{org => io}/ray/api/benchmark/RateLimiterPressureTest.java (90%) rename java/test/src/main/java/{org => io}/ray/api/benchmark/RayBenchmarkTest.java (96%) rename java/test/src/main/java/{org => io}/ray/api/benchmark/RemoteResult.java (93%) rename java/test/src/main/java/{org => io}/ray/api/benchmark/RemoteResultWrapper.java (87%) rename java/test/src/main/java/{org => io}/ray/api/benchmark/SingleLatencyTest.java (85%) rename java/test/src/main/java/{org => io}/ray/api/test/ActorConcurrentCallTest.java (87%) rename java/test/src/main/java/{org => io}/ray/api/test/ActorReconstructionTest.java (92%) rename java/test/src/main/java/{org => io}/ray/api/test/ActorTest.java (91%) rename java/test/src/main/java/{org => io}/ray/api/test/BaseMultiLanguageTest.java (97%) rename java/test/src/main/java/{org => io}/ray/api/test/BaseTest.java (96%) rename java/test/src/main/java/{org => io}/ray/api/test/ClassLoaderTest.java (94%) rename java/test/src/main/java/{org => io}/ray/api/test/ClientExceptionTest.java (82%) rename java/test/src/main/java/{org => io}/ray/api/test/CrossLanguageInvocationTest.java (95%) rename java/test/src/main/java/{org => io}/ray/api/test/DynamicResourceTest.java (85%) rename java/test/src/main/java/{org => io}/ray/api/test/FailureTest.java (92%) rename java/test/src/main/java/{org => io}/ray/api/test/GcsClientTest.java (87%) rename java/test/src/main/java/{org => io}/ray/api/test/HelloWorldTest.java (89%) rename java/test/src/main/java/{org => io}/ray/api/test/KillActorTest.java (92%) rename java/test/src/main/java/{org => io}/ray/api/test/MultiLanguageClusterTest.java (82%) rename java/test/src/main/java/{org => io}/ray/api/test/MultiThreadingTest.java (97%) rename java/test/src/main/java/{org => io}/ray/api/test/ObjectStoreTest.java (89%) rename java/test/src/main/java/{org => io}/ray/api/test/PlasmaFreeTest.java (91%) rename java/test/src/main/java/{org => io}/ray/api/test/PlasmaStoreTest.java (79%) rename java/test/src/main/java/{org => io}/ray/api/test/RayCallTest.java (93%) rename java/test/src/main/java/{org => io}/ray/api/test/RayConfigTest.java (91%) rename java/test/src/main/java/{org => io}/ray/api/test/RayMethodsTest.java (89%) rename java/test/src/main/java/{org => io}/ray/api/test/RaySerializerTest.java (74%) rename java/test/src/main/java/{org => io}/ray/api/test/RayletConfigTest.java (90%) rename java/test/src/main/java/{org => io}/ray/api/test/RedisPasswordTest.java (90%) rename java/test/src/main/java/{org => io}/ray/api/test/ResourcesManagementTest.java (92%) rename java/test/src/main/java/{org => io}/ray/api/test/RuntimeContextTest.java (94%) rename java/test/src/main/java/{org => io}/ray/api/test/SingleProcessModeTest.java (90%) rename java/test/src/main/java/{org => io}/ray/api/test/StressTest.java (93%) rename java/test/src/main/java/{org => io}/ray/api/test/UniqueIdTest.java (95%) rename java/test/src/main/java/{org => io}/ray/api/test/WaitTest.java (92%) rename java/test/src/main/java/{org => io}/ray/api/test/WorkerJvmOptionsTest.java (81%) rename java/tutorial/src/main/java/{org => io}/ray/exercise/Exercise01.java (92%) rename java/tutorial/src/main/java/{org => io}/ray/exercise/Exercise02.java (93%) rename java/tutorial/src/main/java/{org => io}/ray/exercise/Exercise03.java (91%) rename java/tutorial/src/main/java/{org => io}/ray/exercise/Exercise04.java (93%) rename java/tutorial/src/main/java/{org => io}/ray/exercise/Exercise05.java (88%) rename src/ray/core_worker/lib/java/{org_ray_runtime_RayNativeRuntime.cc => io_ray_runtime_RayNativeRuntime.cc} (92%) rename src/ray/core_worker/lib/java/{org_ray_runtime_RayNativeRuntime.h => io_ray_runtime_RayNativeRuntime.h} (66%) rename src/ray/core_worker/lib/java/{org_ray_runtime_actor_NativeRayActor.cc => io_ray_runtime_actor_NativeRayActor.cc} (86%) rename src/ray/core_worker/lib/java/{org_ray_runtime_actor_NativeRayActor.h => io_ray_runtime_actor_NativeRayActor.h} (61%) rename src/ray/core_worker/lib/java/{org_ray_runtime_context_NativeWorkerContext.cc => io_ray_runtime_context_NativeWorkerContext.cc} (81%) rename src/ray/core_worker/lib/java/{org_ray_runtime_context_NativeWorkerContext.h => io_ray_runtime_context_NativeWorkerContext.h} (62%) rename src/ray/core_worker/lib/java/{org_ray_runtime_object_NativeObjectStore.cc => io_ray_runtime_object_NativeObjectStore.cc} (87%) rename src/ray/core_worker/lib/java/{org_ray_runtime_object_NativeObjectStore.h => io_ray_runtime_object_NativeObjectStore.h} (60%) rename src/ray/core_worker/lib/java/{org_ray_runtime_task_NativeTaskExecutor.cc => io_ray_runtime_task_NativeTaskExecutor.cc} (89%) rename src/ray/core_worker/lib/java/{org_ray_runtime_task_NativeTaskExecutor.h => io_ray_runtime_task_NativeTaskExecutor.h} (61%) rename src/ray/core_worker/lib/java/{org_ray_runtime_task_NativeTaskSubmitter.cc => io_ray_runtime_task_NativeTaskSubmitter.cc} (95%) rename src/ray/core_worker/lib/java/{org_ray_runtime_task_NativeTaskSubmitter.h => io_ray_runtime_task_NativeTaskSubmitter.h} (73%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/Language.java (58%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/collector/CollectionCollector.java (85%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/collector/Collector.java (84%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/context/RuntimeContext.java (84%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/context/StreamingContext.java (89%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/function/Function.java (76%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/function/impl/AggregateFunction.java (80%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/function/impl/FilterFunction.java (84%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/function/impl/FlatMapFunction.java (64%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/function/impl/JoinFunction.java (75%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/function/impl/KeyFunction.java (70%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/function/impl/MapFunction.java (70%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/function/impl/ProcessFunction.java (67%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/function/impl/ReduceFunction.java (68%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/function/impl/SinkFunction.java (65%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/function/impl/SourceFunction.java (78%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/function/internal/CollectionSourceFunction.java (86%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/partition/Partition.java (84%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/partition/impl/BroadcastPartition.java (82%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/partition/impl/KeyPartition.java (75%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/partition/impl/RoundRobinPartition.java (82%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/stream/DataStream.java (80%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/stream/DataStreamSink.java (82%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/stream/DataStreamSource.java (74%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/stream/JoinStream.java (93%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/stream/KeyDataStream.java (77%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/stream/Stream.java (83%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/stream/StreamSink.java (75%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/stream/StreamSource.java (80%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/api/stream/UnionStream.java (85%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/jobgraph/JobEdge.java (92%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/jobgraph/JobGraph.java (98%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/jobgraph/JobGraphBuilder.java (87%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/jobgraph/JobVertex.java (91%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/jobgraph/VertexType.java (74%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/message/KeyRecord.java (87%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/message/Message.java (97%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/message/Record.java (93%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/operator/OneInputOperator.java (71%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/operator/Operator.java (56%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/operator/OperatorType.java (64%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/operator/StreamOperator.java (78%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/operator/TwoInputOperator.java (72%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/operator/impl/FilterOperator.java (60%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/operator/impl/FlatMapOperator.java (62%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/operator/impl/KeyByOperator.java (57%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/operator/impl/MapOperator.java (59%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/operator/impl/ReduceOperator.java (71%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/operator/impl/SinkOperator.java (57%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/operator/impl/SourceOperator.java (73%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/python/PythonFunction.java (97%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/python/PythonOperator.java (83%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/python/PythonPartition.java (95%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/python/stream/PythonDataStream.java (89%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/python/stream/PythonKeyDataStream.java (75%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/python/stream/PythonStream.java (71%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/python/stream/PythonStreamSink.java (74%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/python/stream/PythonStreamSource.java (68%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/schedule/JobScheduler.java (78%) rename streaming/java/streaming-api/src/main/java/{org => io}/ray/streaming/util/Config.java (98%) rename streaming/java/streaming-api/src/test/java/{org => io}/ray/streaming/jobgraph/JobGraphBuilderTest.java (89%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/config/Config.java (82%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/config/StreamingConfig.java (93%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/config/StreamingGlobalConfig.java (96%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/config/StreamingMasterConfig.java (83%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/config/StreamingWorkerConfig.java (90%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/config/global/CommonConfig.java (84%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/config/master/ResourceConfig.java (95%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/config/types/SlotAssignStrategyType.java (89%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/collector/OutputCollector.java (76%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/command/BatchInfo.java (86%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/common/AbstractID.java (96%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/graph/ExecutionEdge.java (90%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/graph/ExecutionGraph.java (95%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/graph/ExecutionNode.java (93%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/graph/ExecutionTask.java (91%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/graph/executiongraph/ExecutionEdge.java (94%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/graph/executiongraph/ExecutionGraph.java (98%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/graph/executiongraph/ExecutionJobEdge.java (90%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/graph/executiongraph/ExecutionJobVertex.java (92%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/graph/executiongraph/ExecutionVertex.java (90%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/graph/executiongraph/ExecutionVertexState.java (89%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/processor/OneInputProcessor.java (80%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/processor/ProcessBuilder.java (73%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/processor/Processor.java (59%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/processor/SourceProcessor.java (78%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/processor/StreamProcessor.java (83%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/processor/TwoInputProcessor.java (88%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/resource/Container.java (95%) create mode 100644 streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/resource/ContainerID.java rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/resource/ResourceType.java (88%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/resource/Resources.java (96%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/core/resource/Slot.java (96%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/master/JobRuntimeContext.java (83%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/master/graphmanager/GraphManager.java (81%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/master/graphmanager/GraphManagerImpl.java (84%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/master/resourcemanager/ResourceManager.java (82%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/master/resourcemanager/ResourceManagerImpl.java (90%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/master/scheduler/strategy/SlotAssignStrategy.java (68%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/master/scheduler/strategy/SlotAssignStrategyFactory.java (74%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/master/scheduler/strategy/impl/PipelineFirstStrategy.java (91%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/python/GraphPbBuilder.java (84%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/python/MsgPackSerializer.java (98%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/python/PythonGateway.java (94%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/schedule/JobSchedulerImpl.java (78%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/schedule/TaskAssigner.java (62%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/schedule/TaskAssignerImpl.java (79%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/transfer/ChannelID.java (99%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/transfer/ChannelInitException.java (92%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/transfer/ChannelInterruptException.java (82%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/transfer/ChannelUtils.java (93%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/transfer/DataMessage.java (95%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/transfer/DataReader.java (98%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/transfer/DataWriter.java (96%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/transfer/Message.java (91%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/transfer/TransferHandler.java (88%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/util/EnvUtil.java (82%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/util/Platform.java (98%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/util/ReflectionUtils.java (98%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/worker/JobWorker.java (79%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/worker/context/RayRuntimeContext.java (83%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/worker/context/WorkerContext.java (88%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/worker/tasks/InputStreamTask.java (80%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/worker/tasks/OneInputStreamTask.java (56%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/worker/tasks/SourceStreamTask.java (72%) rename streaming/java/streaming-runtime/src/main/java/{org => io}/ray/streaming/runtime/worker/tasks/StreamTask.java (82%) delete mode 100644 streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/resource/ContainerID.java create mode 100644 streaming/java/streaming-runtime/src/main/resources/META-INF/services/io.ray.streaming.schedule.JobScheduler delete mode 100644 streaming/java/streaming-runtime/src/main/resources/META-INF/services/org.ray.streaming.schedule.JobScheduler rename streaming/java/streaming-runtime/src/test/java/{org => io}/ray/streaming/runtime/BaseUnitTest.java (96%) rename streaming/java/streaming-runtime/src/test/java/{org => io}/ray/streaming/runtime/TestHelper.java (88%) rename streaming/java/streaming-runtime/src/test/java/{org => io}/ray/streaming/runtime/config/ConfigTest.java (93%) rename streaming/java/streaming-runtime/src/test/java/{org => io}/ray/streaming/runtime/demo/WordCountTest.java (85%) rename streaming/java/streaming-runtime/src/test/java/{org => io}/ray/streaming/runtime/graph/ExecutionGraphTest.java (77%) rename streaming/java/streaming-runtime/src/test/java/{org => io}/ray/streaming/runtime/python/MsgPackSerializerTest.java (95%) rename streaming/java/streaming-runtime/src/test/java/{org => io}/ray/streaming/runtime/python/PythonGatewayTest.java (90%) rename streaming/java/streaming-runtime/src/test/java/{org => io}/ray/streaming/runtime/resourcemanager/ResourceManagerTest.java (73%) rename streaming/java/streaming-runtime/src/test/java/{org => io}/ray/streaming/runtime/schedule/TaskAssignerImplTest.java (72%) rename streaming/java/streaming-runtime/src/test/java/{org => io}/ray/streaming/runtime/schedule/strategy/PipelineFirstStrategyTest.java (72%) rename streaming/java/streaming-runtime/src/test/java/{org => io}/ray/streaming/runtime/streamingqueue/StreamingQueueTest.java (91%) rename streaming/java/streaming-runtime/src/test/java/{org => io}/ray/streaming/runtime/streamingqueue/Worker.java (92%) rename streaming/java/streaming-runtime/src/test/java/{org => io}/ray/streaming/runtime/transfer/ChannelIDTest.java (75%) rename streaming/java/streaming-runtime/src/test/java/{org => io}/ray/streaming/runtime/util/ReflectionUtilsTest.java (95%) rename streaming/src/lib/java/{org_ray_streaming_runtime_transfer_ChannelID.cc => io_ray_streaming_runtime_transfer_ChannelID.cc} (66%) create mode 100644 streaming/src/lib/java/io_ray_streaming_runtime_transfer_ChannelID.h rename streaming/src/lib/java/{org_ray_streaming_runtime_transfer_DataReader.cc => io_ray_streaming_runtime_transfer_DataReader.cc} (90%) create mode 100644 streaming/src/lib/java/io_ray_streaming_runtime_transfer_DataReader.h rename streaming/src/lib/java/{org_ray_streaming_runtime_transfer_DataWriter.cc => io_ray_streaming_runtime_transfer_DataWriter.cc} (90%) create mode 100644 streaming/src/lib/java/io_ray_streaming_runtime_transfer_DataWriter.h rename streaming/src/lib/java/{org_ray_streaming_runtime_transfer_TransferHandler.cc => io_ray_streaming_runtime_transfer_TransferHandler.cc} (82%) create mode 100644 streaming/src/lib/java/io_ray_streaming_runtime_transfer_TransferHandler.h delete mode 100644 streaming/src/lib/java/org_ray_streaming_runtime_transfer_ChannelID.h delete mode 100644 streaming/src/lib/java/org_ray_streaming_runtime_transfer_DataReader.h delete mode 100644 streaming/src/lib/java/org_ray_streaming_runtime_transfer_DataWriter.h delete mode 100644 streaming/src/lib/java/org_ray_streaming_runtime_transfer_TransferHandler.h diff --git a/.gitignore b/.gitignore index 696f59f4a..547aaaa92 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,7 @@ /src/ray/gcs/format/*_generated.h /src/ray/object_manager/format/*_generated.h /src/ray/raylet/format/*_generated.h -/java/runtime/src/main/java/org/ray/runtime/generated/* +/java/runtime/src/main/java/io/ray/runtime/generated/* # Redis temporary files *dump.rdb @@ -152,7 +152,7 @@ java/runtime/native_dependencies/ # streaming/python streaming/python/generated/ -streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/generated/ +streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/generated/ streaming/build/java .clwb streaming/**/.settings diff --git a/bazel/ray.bzl b/bazel/ray.bzl index 0ac26177f..0d88bdfe0 100644 --- a/bazel/ray.bzl +++ b/bazel/ray.bzl @@ -32,7 +32,7 @@ def define_java_module( define_test_lib = False, test_deps = [], **kwargs): - lib_name = "org_ray_ray_" + name + lib_name = "io_ray_ray_" + name pom_file_targets = [lib_name] native.java_library( name = lib_name, @@ -44,15 +44,15 @@ def define_java_module( **kwargs ) checkstyle_test( - name = "org_ray_ray_" + name + "-checkstyle", - target = ":org_ray_ray_" + name, + name = "io_ray_ray_" + name + "-checkstyle", + target = ":io_ray_ray_" + name, config = "//java:checkstyle.xml", suppressions = "//java:checkstyle-suppressions.xml", size = "small", tags = ["checkstyle"], ) if define_test_lib: - test_lib_name = "org_ray_ray_" + name + "_test" + test_lib_name = "io_ray_ray_" + name + "_test" pom_file_targets.append(test_lib_name) native.java_library( name = test_lib_name, @@ -60,15 +60,15 @@ def define_java_module( deps = test_deps, ) checkstyle_test( - name = "org_ray_ray_" + name + "_test-checkstyle", - target = ":org_ray_ray_" + name + "_test", + name = "io_ray_ray_" + name + "_test-checkstyle", + target = ":io_ray_ray_" + name + "_test", config = "//java:checkstyle.xml", suppressions = "//java:checkstyle-suppressions.xml", size = "small", tags = ["checkstyle"], ) pom_file( - name = "org_ray_ray_" + name + "_pom", + name = "io_ray_ray_" + name + "_pom", targets = pom_file_targets, template_file = name + "/pom_template.xml", substitutions = { diff --git a/java/BUILD.bazel b/java/BUILD.bazel index 7cebc02d4..446160d4d 100644 --- a/java/BUILD.bazel +++ b/java/BUILD.bazel @@ -17,17 +17,17 @@ all_modules = [ java_import( name = "all_modules", jars = [ - "liborg_ray_ray_" + module + ".jar" + "libio_ray_ray_" + module + ".jar" for module in all_modules ] + [ - "liborg_ray_ray_" + module + "-src.jar" + "libio_ray_ray_" + module + "-src.jar" for module in all_modules ] + [ "all_tests_deploy.jar", "all_tests_deploy-src.jar", ], deps = [ - ":org_ray_ray_" + module + ":io_ray_ray_" + module for module in all_modules ] + [ ":all_tests", @@ -56,11 +56,11 @@ define_java_module( ], define_test_lib = True, exclude_srcs = [ - "runtime/src/main/java/org/ray/runtime/generated/*.java", + "runtime/src/main/java/io/ray/runtime/generated/*.java", ], test_deps = [ - ":org_ray_ray_api", - ":org_ray_ray_runtime", + ":io_ray_ray_api", + ":io_ray_ray_runtime", "@maven//:org_apache_commons_commons_lang3", "@maven//:com_beust_jcommander", "@maven//:org_testng_testng", @@ -68,7 +68,7 @@ define_java_module( ], visibility = ["//visibility:public"], deps = [ - ":org_ray_ray_api", + ":io_ray_ray_api", "@maven//:com_google_guava_guava", "@maven//:com_google_protobuf_protobuf_java", "@maven//:com_typesafe_config", @@ -80,6 +80,7 @@ define_java_module( "@maven//:org_ow2_asm_asm", "@maven//:org_slf4j_slf4j_api", "@maven//:org_slf4j_slf4j_log4j12", + "@maven//:org_testng_testng", "@maven//:redis_clients_jedis", ], ) @@ -87,8 +88,8 @@ define_java_module( define_java_module( name = "tutorial", deps = [ - ":org_ray_ray_api", - ":org_ray_ray_runtime", + ":io_ray_ray_api", + ":io_ray_ray_runtime", "@maven//:com_google_guava_guava", ], ) @@ -96,8 +97,8 @@ define_java_module( define_java_module( name = "test", deps = [ - ":org_ray_ray_api", - ":org_ray_ray_runtime", + ":io_ray_ray_api", + ":io_ray_ray_runtime", "@maven//:com_google_code_gson_gson", "@maven//:com_google_guava_guava", "@maven//:com_sun_xml_bind_jaxb_core", @@ -116,8 +117,8 @@ java_binary( data = ["testng.xml"], main_class = "org.testng.TestNG", runtime_deps = [ - ":org_ray_ray_runtime_test", - ":org_ray_ray_test", + ":io_ray_ray_runtime_test", + ":io_ray_ray_test", ], ) @@ -164,7 +165,7 @@ filegroup( ], ) -# Generates the depedencies needed by maven. +# Generates the dependencies needed by maven. genrule( name = "gen_maven_deps", srcs = [ @@ -177,7 +178,7 @@ genrule( set -x WORK_DIR="$$(pwd)" # Copy protobuf-generated files. - rm -rf "$$WORK_DIR/java/runtime/src/main/java/org/ray/runtime/generated" + rm -rf "$$WORK_DIR/java/runtime/src/main/java/io/ray/runtime/generated" for f in $(locations //java:all_java_proto); do unzip "$$f" -x META-INF/MANIFEST.MF -d "$$WORK_DIR/java/runtime/src/main/java" done @@ -198,17 +199,17 @@ genrule( genrule( name = "copy_pom_file", srcs = [ - "//java:org_ray_ray_" + module + "_pom" + "//java:io_ray_ray_" + module + "_pom" for module in all_modules ], outs = ["copy_pom_file.out"], cmd = """ set -x WORK_DIR="$$(pwd)" - cp -f $(location //java:org_ray_ray_api_pom) "$$WORK_DIR/java/api/pom.xml" - cp -f $(location //java:org_ray_ray_runtime_pom) "$$WORK_DIR/java/runtime/pom.xml" - cp -f $(location //java:org_ray_ray_tutorial_pom) "$$WORK_DIR/java/tutorial/pom.xml" - cp -f $(location //java:org_ray_ray_test_pom) "$$WORK_DIR/java/test/pom.xml" + cp -f $(location //java:io_ray_ray_api_pom) "$$WORK_DIR/java/api/pom.xml" + cp -f $(location //java:io_ray_ray_runtime_pom) "$$WORK_DIR/java/runtime/pom.xml" + cp -f $(location //java:io_ray_ray_tutorial_pom) "$$WORK_DIR/java/tutorial/pom.xml" + cp -f $(location //java:io_ray_ray_test_pom) "$$WORK_DIR/java/test/pom.xml" date > $@ """, local = 1, @@ -221,10 +222,10 @@ java_binary( # fat jar file. It's not really an executable jar. So we set its `main_class` to empty. main_class = "", runtime_deps = [ - "//java:org_ray_ray_api", - "//java:org_ray_ray_runtime", - "//streaming/java:org_ray_ray_streaming-api", - "//streaming/java:org_ray_ray_streaming-runtime", + "//java:io_ray_ray_api", + "//java:io_ray_ray_runtime", + "//streaming/java:io_ray_ray_streaming-api", + "//streaming/java:io_ray_ray_streaming-runtime", ], ) diff --git a/java/api/pom.xml b/java/api/pom.xml index 792e54f6c..91bbedc51 100644 --- a/java/api/pom.xml +++ b/java/api/pom.xml @@ -4,7 +4,7 @@ xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - org.ray + io.ray ray-superpom 0.1-SNAPSHOT diff --git a/java/api/pom_template.xml b/java/api/pom_template.xml index 67088f958..02e03205f 100644 --- a/java/api/pom_template.xml +++ b/java/api/pom_template.xml @@ -4,7 +4,7 @@ xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - org.ray + io.ray ray-superpom 0.1-SNAPSHOT diff --git a/java/api/src/main/java/org/ray/api/ActorCall.java b/java/api/src/main/java/io/ray/api/ActorCall.java similarity index 98% rename from java/api/src/main/java/org/ray/api/ActorCall.java rename to java/api/src/main/java/io/ray/api/ActorCall.java index 5fbbcc515..a2300dfd7 100644 --- a/java/api/src/main/java/org/ray/api/ActorCall.java +++ b/java/api/src/main/java/io/ray/api/ActorCall.java @@ -1,19 +1,19 @@ // Generated by `RayCallGenerator.java`. DO NOT EDIT. -package org.ray.api; +package io.ray.api; -import org.ray.api.function.RayFunc1; -import org.ray.api.function.RayFunc2; -import org.ray.api.function.RayFunc3; -import org.ray.api.function.RayFunc4; -import org.ray.api.function.RayFunc5; -import org.ray.api.function.RayFunc6; -import org.ray.api.function.RayFuncVoid1; -import org.ray.api.function.RayFuncVoid2; -import org.ray.api.function.RayFuncVoid3; -import org.ray.api.function.RayFuncVoid4; -import org.ray.api.function.RayFuncVoid5; -import org.ray.api.function.RayFuncVoid6; +import io.ray.api.function.RayFunc1; +import io.ray.api.function.RayFunc2; +import io.ray.api.function.RayFunc3; +import io.ray.api.function.RayFunc4; +import io.ray.api.function.RayFunc5; +import io.ray.api.function.RayFunc6; +import io.ray.api.function.RayFuncVoid1; +import io.ray.api.function.RayFuncVoid2; +import io.ray.api.function.RayFuncVoid3; +import io.ray.api.function.RayFuncVoid4; +import io.ray.api.function.RayFuncVoid5; +import io.ray.api.function.RayFuncVoid6; /** * This class provides type-safe interfaces for remote actor calls. diff --git a/java/api/src/main/java/org/ray/api/BaseActor.java b/java/api/src/main/java/io/ray/api/BaseActor.java similarity index 91% rename from java/api/src/main/java/org/ray/api/BaseActor.java rename to java/api/src/main/java/io/ray/api/BaseActor.java index e175388d9..ef223bfb6 100644 --- a/java/api/src/main/java/org/ray/api/BaseActor.java +++ b/java/api/src/main/java/io/ray/api/BaseActor.java @@ -1,6 +1,6 @@ -package org.ray.api; +package io.ray.api; -import org.ray.api.id.ActorId; +import io.ray.api.id.ActorId; /** * A handle to an actor.

diff --git a/java/api/src/main/java/org/ray/api/Checkpointable.java b/java/api/src/main/java/io/ray/api/Checkpointable.java similarity index 97% rename from java/api/src/main/java/org/ray/api/Checkpointable.java rename to java/api/src/main/java/io/ray/api/Checkpointable.java index e40641fda..9fa238b1a 100644 --- a/java/api/src/main/java/org/ray/api/Checkpointable.java +++ b/java/api/src/main/java/io/ray/api/Checkpointable.java @@ -1,10 +1,9 @@ -package org.ray.api; +package io.ray.api; +import io.ray.api.id.ActorId; +import io.ray.api.id.UniqueId; import java.util.List; -import org.ray.api.id.ActorId; -import org.ray.api.id.UniqueId; - public interface Checkpointable { class CheckpointContext { diff --git a/java/api/src/main/java/org/ray/api/PyActorCall.java b/java/api/src/main/java/io/ray/api/PyActorCall.java similarity index 96% rename from java/api/src/main/java/org/ray/api/PyActorCall.java rename to java/api/src/main/java/io/ray/api/PyActorCall.java index c2aaecbf4..30665f411 100644 --- a/java/api/src/main/java/org/ray/api/PyActorCall.java +++ b/java/api/src/main/java/io/ray/api/PyActorCall.java @@ -1,8 +1,8 @@ // Generated by `RayCallGenerator.java`. DO NOT EDIT. -package org.ray.api; +package io.ray.api; -import org.ray.api.function.PyActorMethod; +import io.ray.api.function.PyActorMethod; /** * This class provides type-safe interfaces for remote actor calls. diff --git a/java/api/src/main/java/org/ray/api/Ray.java b/java/api/src/main/java/io/ray/api/Ray.java similarity index 95% rename from java/api/src/main/java/org/ray/api/Ray.java rename to java/api/src/main/java/io/ray/api/Ray.java index 0f758f7b0..8786ead5d 100644 --- a/java/api/src/main/java/org/ray/api/Ray.java +++ b/java/api/src/main/java/io/ray/api/Ray.java @@ -1,13 +1,13 @@ -package org.ray.api; +package io.ray.api; +import io.ray.api.id.ObjectId; +import io.ray.api.id.UniqueId; +import io.ray.api.runtime.RayRuntime; +import io.ray.api.runtime.RayRuntimeFactory; +import io.ray.api.runtimecontext.RuntimeContext; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable; -import org.ray.api.id.ObjectId; -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. @@ -21,7 +21,7 @@ public final class Ray extends RayCall { */ public static void init() { try { - Class clz = Class.forName("org.ray.runtime.DefaultRayRuntimeFactory"); + Class clz = Class.forName("io.ray.runtime.DefaultRayRuntimeFactory"); RayRuntimeFactory factory = (RayRuntimeFactory) clz.newInstance(); init(factory); } catch (Exception e) { diff --git a/java/api/src/main/java/org/ray/api/RayActor.java b/java/api/src/main/java/io/ray/api/RayActor.java similarity index 97% rename from java/api/src/main/java/org/ray/api/RayActor.java rename to java/api/src/main/java/io/ray/api/RayActor.java index d56d442cd..926a6688c 100644 --- a/java/api/src/main/java/org/ray/api/RayActor.java +++ b/java/api/src/main/java/io/ray/api/RayActor.java @@ -1,4 +1,4 @@ -package org.ray.api; +package io.ray.api; /** * A handle to a Java actor.

diff --git a/java/api/src/main/java/org/ray/api/RayCall.java b/java/api/src/main/java/io/ray/api/RayCall.java similarity index 99% rename from java/api/src/main/java/org/ray/api/RayCall.java rename to java/api/src/main/java/io/ray/api/RayCall.java index 3f7e387ce..674cbafda 100644 --- a/java/api/src/main/java/org/ray/api/RayCall.java +++ b/java/api/src/main/java/io/ray/api/RayCall.java @@ -1,25 +1,25 @@ // Generated by `RayCallGenerator.java`. DO NOT EDIT. -package org.ray.api; +package io.ray.api; -import org.ray.api.function.PyActorClass; -import org.ray.api.function.PyRemoteFunction; -import org.ray.api.function.RayFunc0; -import org.ray.api.function.RayFunc1; -import org.ray.api.function.RayFunc2; -import org.ray.api.function.RayFunc3; -import org.ray.api.function.RayFunc4; -import org.ray.api.function.RayFunc5; -import org.ray.api.function.RayFunc6; -import org.ray.api.function.RayFuncVoid0; -import org.ray.api.function.RayFuncVoid1; -import org.ray.api.function.RayFuncVoid2; -import org.ray.api.function.RayFuncVoid3; -import org.ray.api.function.RayFuncVoid4; -import org.ray.api.function.RayFuncVoid5; -import org.ray.api.function.RayFuncVoid6; -import org.ray.api.options.ActorCreationOptions; -import org.ray.api.options.CallOptions; +import io.ray.api.function.PyActorClass; +import io.ray.api.function.PyRemoteFunction; +import io.ray.api.function.RayFunc0; +import io.ray.api.function.RayFunc1; +import io.ray.api.function.RayFunc2; +import io.ray.api.function.RayFunc3; +import io.ray.api.function.RayFunc4; +import io.ray.api.function.RayFunc5; +import io.ray.api.function.RayFunc6; +import io.ray.api.function.RayFuncVoid0; +import io.ray.api.function.RayFuncVoid1; +import io.ray.api.function.RayFuncVoid2; +import io.ray.api.function.RayFuncVoid3; +import io.ray.api.function.RayFuncVoid4; +import io.ray.api.function.RayFuncVoid5; +import io.ray.api.function.RayFuncVoid6; +import io.ray.api.options.ActorCreationOptions; +import io.ray.api.options.CallOptions; /** * This class provides type-safe interfaces for `Ray.call` and `Ray.createActor`. diff --git a/java/api/src/main/java/org/ray/api/RayObject.java b/java/api/src/main/java/io/ray/api/RayObject.java similarity index 87% rename from java/api/src/main/java/org/ray/api/RayObject.java rename to java/api/src/main/java/io/ray/api/RayObject.java index e5d67e063..9e56f2a0e 100644 --- a/java/api/src/main/java/org/ray/api/RayObject.java +++ b/java/api/src/main/java/io/ray/api/RayObject.java @@ -1,6 +1,6 @@ -package org.ray.api; +package io.ray.api; -import org.ray.api.id.ObjectId; +import io.ray.api.id.ObjectId; /** * Represents an object in the object store. diff --git a/java/api/src/main/java/org/ray/api/RayPyActor.java b/java/api/src/main/java/io/ray/api/RayPyActor.java similarity index 92% rename from java/api/src/main/java/org/ray/api/RayPyActor.java rename to java/api/src/main/java/io/ray/api/RayPyActor.java index 3821c11f7..9a9ca053b 100644 --- a/java/api/src/main/java/org/ray/api/RayPyActor.java +++ b/java/api/src/main/java/io/ray/api/RayPyActor.java @@ -1,4 +1,4 @@ -package org.ray.api; +package io.ray.api; /** * Handle of a Python actor. diff --git a/java/api/src/main/java/org/ray/api/WaitResult.java b/java/api/src/main/java/io/ray/api/WaitResult.java similarity index 96% rename from java/api/src/main/java/org/ray/api/WaitResult.java rename to java/api/src/main/java/io/ray/api/WaitResult.java index 35721d777..ada235a0f 100644 --- a/java/api/src/main/java/org/ray/api/WaitResult.java +++ b/java/api/src/main/java/io/ray/api/WaitResult.java @@ -1,4 +1,4 @@ -package org.ray.api; +package io.ray.api; import java.util.List; diff --git a/java/api/src/main/java/org/ray/api/exception/RayActorException.java b/java/api/src/main/java/io/ray/api/exception/RayActorException.java similarity index 92% rename from java/api/src/main/java/org/ray/api/exception/RayActorException.java rename to java/api/src/main/java/io/ray/api/exception/RayActorException.java index 4137d03cf..81d9983e0 100644 --- a/java/api/src/main/java/org/ray/api/exception/RayActorException.java +++ b/java/api/src/main/java/io/ray/api/exception/RayActorException.java @@ -1,4 +1,4 @@ -package org.ray.api.exception; +package io.ray.api.exception; /** * Indicates that the actor died unexpectedly before finishing a task. diff --git a/java/api/src/main/java/org/ray/api/exception/RayException.java b/java/api/src/main/java/io/ray/api/exception/RayException.java similarity index 89% rename from java/api/src/main/java/org/ray/api/exception/RayException.java rename to java/api/src/main/java/io/ray/api/exception/RayException.java index 588899de7..50baab238 100644 --- a/java/api/src/main/java/org/ray/api/exception/RayException.java +++ b/java/api/src/main/java/io/ray/api/exception/RayException.java @@ -1,4 +1,4 @@ -package org.ray.api.exception; +package io.ray.api.exception; /** * Base class of all ray exceptions. diff --git a/java/api/src/main/java/org/ray/api/exception/RayTaskException.java b/java/api/src/main/java/io/ray/api/exception/RayTaskException.java similarity index 93% rename from java/api/src/main/java/org/ray/api/exception/RayTaskException.java rename to java/api/src/main/java/io/ray/api/exception/RayTaskException.java index d2ba9ac3a..f0a5ae2ea 100644 --- a/java/api/src/main/java/org/ray/api/exception/RayTaskException.java +++ b/java/api/src/main/java/io/ray/api/exception/RayTaskException.java @@ -1,4 +1,4 @@ -package org.ray.api.exception; +package io.ray.api.exception; /** * Indicates that a task threw an exception during execution. diff --git a/java/api/src/main/java/org/ray/api/exception/RayWorkerException.java b/java/api/src/main/java/io/ray/api/exception/RayWorkerException.java similarity index 88% rename from java/api/src/main/java/org/ray/api/exception/RayWorkerException.java rename to java/api/src/main/java/io/ray/api/exception/RayWorkerException.java index b089bd9f3..97826423c 100644 --- a/java/api/src/main/java/org/ray/api/exception/RayWorkerException.java +++ b/java/api/src/main/java/io/ray/api/exception/RayWorkerException.java @@ -1,4 +1,4 @@ -package org.ray.api.exception; +package io.ray.api.exception; /** * Indicates that the worker died unexpectedly while executing a task. diff --git a/java/api/src/main/java/org/ray/api/exception/UnreconstructableException.java b/java/api/src/main/java/io/ray/api/exception/UnreconstructableException.java similarity index 90% rename from java/api/src/main/java/org/ray/api/exception/UnreconstructableException.java rename to java/api/src/main/java/io/ray/api/exception/UnreconstructableException.java index 0eb2ed9e7..83d34a9f4 100644 --- a/java/api/src/main/java/org/ray/api/exception/UnreconstructableException.java +++ b/java/api/src/main/java/io/ray/api/exception/UnreconstructableException.java @@ -1,6 +1,6 @@ -package org.ray.api.exception; +package io.ray.api.exception; -import org.ray.api.id.ObjectId; +import io.ray.api.id.ObjectId; /** * Indicates that an object is lost (either evicted or explicitly deleted) and cannot be diff --git a/java/api/src/main/java/org/ray/api/function/PyActorClass.java b/java/api/src/main/java/io/ray/api/function/PyActorClass.java similarity index 96% rename from java/api/src/main/java/org/ray/api/function/PyActorClass.java rename to java/api/src/main/java/io/ray/api/function/PyActorClass.java index 83ae1b968..43982e21c 100644 --- a/java/api/src/main/java/org/ray/api/function/PyActorClass.java +++ b/java/api/src/main/java/io/ray/api/function/PyActorClass.java @@ -1,4 +1,4 @@ -package org.ray.api.function; +package io.ray.api.function; /** * A class that represents a Python actor class. diff --git a/java/api/src/main/java/org/ray/api/function/PyActorMethod.java b/java/api/src/main/java/io/ray/api/function/PyActorMethod.java similarity index 97% rename from java/api/src/main/java/org/ray/api/function/PyActorMethod.java rename to java/api/src/main/java/io/ray/api/function/PyActorMethod.java index c41267f6a..ad5f33b66 100644 --- a/java/api/src/main/java/org/ray/api/function/PyActorMethod.java +++ b/java/api/src/main/java/io/ray/api/function/PyActorMethod.java @@ -1,4 +1,4 @@ -package org.ray.api.function; +package io.ray.api.function; /** * A class that represents a method of a Python actor. diff --git a/java/api/src/main/java/org/ray/api/function/PyRemoteFunction.java b/java/api/src/main/java/io/ray/api/function/PyRemoteFunction.java similarity index 97% rename from java/api/src/main/java/org/ray/api/function/PyRemoteFunction.java rename to java/api/src/main/java/io/ray/api/function/PyRemoteFunction.java index 626c8e9bd..5fa2a62b7 100644 --- a/java/api/src/main/java/org/ray/api/function/PyRemoteFunction.java +++ b/java/api/src/main/java/io/ray/api/function/PyRemoteFunction.java @@ -1,4 +1,4 @@ -package org.ray.api.function; +package io.ray.api.function; /** * A class that represents a Python remote function. diff --git a/java/api/src/main/java/org/ray/api/function/RayFunc.java b/java/api/src/main/java/io/ray/api/function/RayFunc.java similarity index 81% rename from java/api/src/main/java/org/ray/api/function/RayFunc.java rename to java/api/src/main/java/io/ray/api/function/RayFunc.java index 35aa44694..c0f8d1f47 100644 --- a/java/api/src/main/java/org/ray/api/function/RayFunc.java +++ b/java/api/src/main/java/io/ray/api/function/RayFunc.java @@ -1,4 +1,4 @@ -package org.ray.api.function; +package io.ray.api.function; import java.io.Serializable; diff --git a/java/api/src/main/java/org/ray/api/function/RayFunc0.java b/java/api/src/main/java/io/ray/api/function/RayFunc0.java similarity index 88% rename from java/api/src/main/java/org/ray/api/function/RayFunc0.java rename to java/api/src/main/java/io/ray/api/function/RayFunc0.java index 5973a289a..52b4377ee 100644 --- a/java/api/src/main/java/org/ray/api/function/RayFunc0.java +++ b/java/api/src/main/java/io/ray/api/function/RayFunc0.java @@ -1,6 +1,6 @@ // generated automatically, do not modify. -package org.ray.api.function; +package io.ray.api.function; /** * Functional interface for a remote function that has 0 parameter. diff --git a/java/api/src/main/java/org/ray/api/function/RayFunc1.java b/java/api/src/main/java/io/ray/api/function/RayFunc1.java similarity index 88% rename from java/api/src/main/java/org/ray/api/function/RayFunc1.java rename to java/api/src/main/java/io/ray/api/function/RayFunc1.java index c975521ed..90e33a23e 100644 --- a/java/api/src/main/java/org/ray/api/function/RayFunc1.java +++ b/java/api/src/main/java/io/ray/api/function/RayFunc1.java @@ -1,6 +1,6 @@ // generated automatically, do not modify. -package org.ray.api.function; +package io.ray.api.function; /** * Functional interface for a remote function that has 1 parameter. diff --git a/java/api/src/main/java/org/ray/api/function/RayFunc2.java b/java/api/src/main/java/io/ray/api/function/RayFunc2.java similarity index 89% rename from java/api/src/main/java/org/ray/api/function/RayFunc2.java rename to java/api/src/main/java/io/ray/api/function/RayFunc2.java index 797ad8df9..a26027a5a 100644 --- a/java/api/src/main/java/org/ray/api/function/RayFunc2.java +++ b/java/api/src/main/java/io/ray/api/function/RayFunc2.java @@ -1,6 +1,6 @@ // generated automatically, do not modify. -package org.ray.api.function; +package io.ray.api.function; /** * Functional interface for a remote function that has 2 parameters. diff --git a/java/api/src/main/java/org/ray/api/function/RayFunc3.java b/java/api/src/main/java/io/ray/api/function/RayFunc3.java similarity index 89% rename from java/api/src/main/java/org/ray/api/function/RayFunc3.java rename to java/api/src/main/java/io/ray/api/function/RayFunc3.java index 351b68693..ce7146a41 100644 --- a/java/api/src/main/java/org/ray/api/function/RayFunc3.java +++ b/java/api/src/main/java/io/ray/api/function/RayFunc3.java @@ -1,6 +1,6 @@ // generated automatically, do not modify. -package org.ray.api.function; +package io.ray.api.function; /** * Functional interface for a remote function that has 3 parameters. diff --git a/java/api/src/main/java/org/ray/api/function/RayFunc4.java b/java/api/src/main/java/io/ray/api/function/RayFunc4.java similarity index 89% rename from java/api/src/main/java/org/ray/api/function/RayFunc4.java rename to java/api/src/main/java/io/ray/api/function/RayFunc4.java index 0f4601d12..eb0549a93 100644 --- a/java/api/src/main/java/org/ray/api/function/RayFunc4.java +++ b/java/api/src/main/java/io/ray/api/function/RayFunc4.java @@ -1,6 +1,6 @@ // generated automatically, do not modify. -package org.ray.api.function; +package io.ray.api.function; /** * Functional interface for a remote function that has 4 parameters. diff --git a/java/api/src/main/java/org/ray/api/function/RayFunc5.java b/java/api/src/main/java/io/ray/api/function/RayFunc5.java similarity index 90% rename from java/api/src/main/java/org/ray/api/function/RayFunc5.java rename to java/api/src/main/java/io/ray/api/function/RayFunc5.java index 17ee44356..bf95b003b 100644 --- a/java/api/src/main/java/org/ray/api/function/RayFunc5.java +++ b/java/api/src/main/java/io/ray/api/function/RayFunc5.java @@ -1,6 +1,6 @@ // generated automatically, do not modify. -package org.ray.api.function; +package io.ray.api.function; /** * Functional interface for a remote function that has 5 parameters. diff --git a/java/api/src/main/java/org/ray/api/function/RayFunc6.java b/java/api/src/main/java/io/ray/api/function/RayFunc6.java similarity index 90% rename from java/api/src/main/java/org/ray/api/function/RayFunc6.java rename to java/api/src/main/java/io/ray/api/function/RayFunc6.java index f512c0e24..08337a813 100644 --- a/java/api/src/main/java/org/ray/api/function/RayFunc6.java +++ b/java/api/src/main/java/io/ray/api/function/RayFunc6.java @@ -1,6 +1,6 @@ // generated automatically, do not modify. -package org.ray.api.function; +package io.ray.api.function; /** * Functional interface for a remote function that has 6 parameters. diff --git a/java/api/src/main/java/org/ray/api/function/RayFuncVoid.java b/java/api/src/main/java/io/ray/api/function/RayFuncVoid.java similarity index 77% rename from java/api/src/main/java/org/ray/api/function/RayFuncVoid.java rename to java/api/src/main/java/io/ray/api/function/RayFuncVoid.java index 1ed913ae5..74ec8182f 100644 --- a/java/api/src/main/java/org/ray/api/function/RayFuncVoid.java +++ b/java/api/src/main/java/io/ray/api/function/RayFuncVoid.java @@ -1,4 +1,4 @@ -package org.ray.api.function; +package io.ray.api.function; /** * Interface of all `RayFuncVoidX` classes. diff --git a/java/api/src/main/java/org/ray/api/function/RayFuncVoid0.java b/java/api/src/main/java/io/ray/api/function/RayFuncVoid0.java similarity index 88% rename from java/api/src/main/java/org/ray/api/function/RayFuncVoid0.java rename to java/api/src/main/java/io/ray/api/function/RayFuncVoid0.java index 73c8a76cf..5ecce5b72 100644 --- a/java/api/src/main/java/org/ray/api/function/RayFuncVoid0.java +++ b/java/api/src/main/java/io/ray/api/function/RayFuncVoid0.java @@ -1,6 +1,6 @@ // generated automatically, do not modify. -package org.ray.api.function; +package io.ray.api.function; /** * Functional interface for a remote function that has 0 parameter. diff --git a/java/api/src/main/java/org/ray/api/function/RayFuncVoid1.java b/java/api/src/main/java/io/ray/api/function/RayFuncVoid1.java similarity index 88% rename from java/api/src/main/java/org/ray/api/function/RayFuncVoid1.java rename to java/api/src/main/java/io/ray/api/function/RayFuncVoid1.java index 511eec939..dc4a4bb1c 100644 --- a/java/api/src/main/java/org/ray/api/function/RayFuncVoid1.java +++ b/java/api/src/main/java/io/ray/api/function/RayFuncVoid1.java @@ -1,6 +1,6 @@ // generated automatically, do not modify. -package org.ray.api.function; +package io.ray.api.function; /** * Functional interface for a remote function that has 1 parameter. diff --git a/java/api/src/main/java/org/ray/api/function/RayFuncVoid2.java b/java/api/src/main/java/io/ray/api/function/RayFuncVoid2.java similarity index 89% rename from java/api/src/main/java/org/ray/api/function/RayFuncVoid2.java rename to java/api/src/main/java/io/ray/api/function/RayFuncVoid2.java index 2ba8d8084..42f4c102b 100644 --- a/java/api/src/main/java/org/ray/api/function/RayFuncVoid2.java +++ b/java/api/src/main/java/io/ray/api/function/RayFuncVoid2.java @@ -1,6 +1,6 @@ // generated automatically, do not modify. -package org.ray.api.function; +package io.ray.api.function; /** * Functional interface for a remote function that has 2 parameters. diff --git a/java/api/src/main/java/org/ray/api/function/RayFuncVoid3.java b/java/api/src/main/java/io/ray/api/function/RayFuncVoid3.java similarity index 89% rename from java/api/src/main/java/org/ray/api/function/RayFuncVoid3.java rename to java/api/src/main/java/io/ray/api/function/RayFuncVoid3.java index ac24f5af2..7d538a028 100644 --- a/java/api/src/main/java/org/ray/api/function/RayFuncVoid3.java +++ b/java/api/src/main/java/io/ray/api/function/RayFuncVoid3.java @@ -1,6 +1,6 @@ // generated automatically, do not modify. -package org.ray.api.function; +package io.ray.api.function; /** * Functional interface for a remote function that has 3 parameters. diff --git a/java/api/src/main/java/org/ray/api/function/RayFuncVoid4.java b/java/api/src/main/java/io/ray/api/function/RayFuncVoid4.java similarity index 90% rename from java/api/src/main/java/org/ray/api/function/RayFuncVoid4.java rename to java/api/src/main/java/io/ray/api/function/RayFuncVoid4.java index d6ffce5ad..fd809786b 100644 --- a/java/api/src/main/java/org/ray/api/function/RayFuncVoid4.java +++ b/java/api/src/main/java/io/ray/api/function/RayFuncVoid4.java @@ -1,6 +1,6 @@ // generated automatically, do not modify. -package org.ray.api.function; +package io.ray.api.function; /** * Functional interface for a remote function that has 4 parameters. diff --git a/java/api/src/main/java/org/ray/api/function/RayFuncVoid5.java b/java/api/src/main/java/io/ray/api/function/RayFuncVoid5.java similarity index 90% rename from java/api/src/main/java/org/ray/api/function/RayFuncVoid5.java rename to java/api/src/main/java/io/ray/api/function/RayFuncVoid5.java index f0eb2afbe..10d7309f3 100644 --- a/java/api/src/main/java/org/ray/api/function/RayFuncVoid5.java +++ b/java/api/src/main/java/io/ray/api/function/RayFuncVoid5.java @@ -1,6 +1,6 @@ // generated automatically, do not modify. -package org.ray.api.function; +package io.ray.api.function; /** * Functional interface for a remote function that has 5 parameters. diff --git a/java/api/src/main/java/org/ray/api/function/RayFuncVoid6.java b/java/api/src/main/java/io/ray/api/function/RayFuncVoid6.java similarity index 90% rename from java/api/src/main/java/org/ray/api/function/RayFuncVoid6.java rename to java/api/src/main/java/io/ray/api/function/RayFuncVoid6.java index b3ea25bb6..51086913f 100644 --- a/java/api/src/main/java/org/ray/api/function/RayFuncVoid6.java +++ b/java/api/src/main/java/io/ray/api/function/RayFuncVoid6.java @@ -1,6 +1,6 @@ // generated automatically, do not modify. -package org.ray.api.function; +package io.ray.api.function; /** * Functional interface for a remote function that has 6 parameters. diff --git a/java/api/src/main/java/org/ray/api/id/ActorId.java b/java/api/src/main/java/io/ray/api/id/ActorId.java similarity index 97% rename from java/api/src/main/java/org/ray/api/id/ActorId.java rename to java/api/src/main/java/io/ray/api/id/ActorId.java index df70fc67f..65a0cf19a 100644 --- a/java/api/src/main/java/org/ray/api/id/ActorId.java +++ b/java/api/src/main/java/io/ray/api/id/ActorId.java @@ -1,4 +1,4 @@ -package org.ray.api.id; +package io.ray.api.id; import java.io.Serializable; import java.nio.ByteBuffer; diff --git a/java/api/src/main/java/org/ray/api/id/BaseId.java b/java/api/src/main/java/io/ray/api/id/BaseId.java similarity index 98% rename from java/api/src/main/java/org/ray/api/id/BaseId.java rename to java/api/src/main/java/io/ray/api/id/BaseId.java index 3cdef324e..5c784acea 100644 --- a/java/api/src/main/java/org/ray/api/id/BaseId.java +++ b/java/api/src/main/java/io/ray/api/id/BaseId.java @@ -1,4 +1,4 @@ -package org.ray.api.id; +package io.ray.api.id; import java.io.Serializable; import java.nio.ByteBuffer; diff --git a/java/api/src/main/java/org/ray/api/id/JobId.java b/java/api/src/main/java/io/ray/api/id/JobId.java similarity index 98% rename from java/api/src/main/java/org/ray/api/id/JobId.java rename to java/api/src/main/java/io/ray/api/id/JobId.java index e352925b2..eba593fe4 100644 --- a/java/api/src/main/java/org/ray/api/id/JobId.java +++ b/java/api/src/main/java/io/ray/api/id/JobId.java @@ -1,4 +1,4 @@ -package org.ray.api.id; +package io.ray.api.id; import java.io.Serializable; import java.nio.ByteBuffer; diff --git a/java/api/src/main/java/org/ray/api/id/ObjectId.java b/java/api/src/main/java/io/ray/api/id/ObjectId.java similarity index 97% rename from java/api/src/main/java/org/ray/api/id/ObjectId.java rename to java/api/src/main/java/io/ray/api/id/ObjectId.java index 4d6cf0976..9b1fa246f 100644 --- a/java/api/src/main/java/org/ray/api/id/ObjectId.java +++ b/java/api/src/main/java/io/ray/api/id/ObjectId.java @@ -1,4 +1,4 @@ -package org.ray.api.id; +package io.ray.api.id; import java.io.Serializable; import java.nio.ByteBuffer; diff --git a/java/api/src/main/java/org/ray/api/id/TaskId.java b/java/api/src/main/java/io/ray/api/id/TaskId.java similarity index 97% rename from java/api/src/main/java/org/ray/api/id/TaskId.java rename to java/api/src/main/java/io/ray/api/id/TaskId.java index c41f7145d..06c6547c9 100644 --- a/java/api/src/main/java/org/ray/api/id/TaskId.java +++ b/java/api/src/main/java/io/ray/api/id/TaskId.java @@ -1,4 +1,4 @@ -package org.ray.api.id; +package io.ray.api.id; import java.io.Serializable; import java.nio.ByteBuffer; diff --git a/java/api/src/main/java/org/ray/api/id/UniqueId.java b/java/api/src/main/java/io/ray/api/id/UniqueId.java similarity index 97% rename from java/api/src/main/java/org/ray/api/id/UniqueId.java rename to java/api/src/main/java/io/ray/api/id/UniqueId.java index 4fd723ff2..03de53943 100644 --- a/java/api/src/main/java/org/ray/api/id/UniqueId.java +++ b/java/api/src/main/java/io/ray/api/id/UniqueId.java @@ -1,4 +1,4 @@ -package org.ray.api.id; +package io.ray.api.id; import java.io.Serializable; import java.nio.ByteBuffer; diff --git a/java/api/src/main/java/org/ray/api/options/ActorCreationOptions.java b/java/api/src/main/java/io/ray/api/options/ActorCreationOptions.java similarity index 98% rename from java/api/src/main/java/org/ray/api/options/ActorCreationOptions.java rename to java/api/src/main/java/io/ray/api/options/ActorCreationOptions.java index 7bef5870c..56f1f70fb 100644 --- a/java/api/src/main/java/org/ray/api/options/ActorCreationOptions.java +++ b/java/api/src/main/java/io/ray/api/options/ActorCreationOptions.java @@ -1,4 +1,4 @@ -package org.ray.api.options; +package io.ray.api.options; import java.util.HashMap; import java.util.Map; diff --git a/java/api/src/main/java/org/ray/api/options/BaseTaskOptions.java b/java/api/src/main/java/io/ray/api/options/BaseTaskOptions.java similarity index 95% rename from java/api/src/main/java/org/ray/api/options/BaseTaskOptions.java rename to java/api/src/main/java/io/ray/api/options/BaseTaskOptions.java index f2a47cd70..6b2bc7aa9 100644 --- a/java/api/src/main/java/org/ray/api/options/BaseTaskOptions.java +++ b/java/api/src/main/java/io/ray/api/options/BaseTaskOptions.java @@ -1,4 +1,4 @@ -package org.ray.api.options; +package io.ray.api.options; import java.util.HashMap; import java.util.Map; diff --git a/java/api/src/main/java/org/ray/api/options/CallOptions.java b/java/api/src/main/java/io/ray/api/options/CallOptions.java similarity index 95% rename from java/api/src/main/java/org/ray/api/options/CallOptions.java rename to java/api/src/main/java/io/ray/api/options/CallOptions.java index 1e5b61bf1..a9a3a6faa 100644 --- a/java/api/src/main/java/org/ray/api/options/CallOptions.java +++ b/java/api/src/main/java/io/ray/api/options/CallOptions.java @@ -1,4 +1,4 @@ -package org.ray.api.options; +package io.ray.api.options; import java.util.HashMap; import java.util.Map; diff --git a/java/api/src/main/java/org/ray/api/runtime/RayRuntime.java b/java/api/src/main/java/io/ray/api/runtime/RayRuntime.java similarity index 90% rename from java/api/src/main/java/org/ray/api/runtime/RayRuntime.java rename to java/api/src/main/java/io/ray/api/runtime/RayRuntime.java index 3c94c7d2c..6036b24d8 100644 --- a/java/api/src/main/java/org/ray/api/runtime/RayRuntime.java +++ b/java/api/src/main/java/io/ray/api/runtime/RayRuntime.java @@ -1,21 +1,21 @@ -package org.ray.api.runtime; +package io.ray.api.runtime; +import io.ray.api.BaseActor; +import io.ray.api.RayActor; +import io.ray.api.RayObject; +import io.ray.api.RayPyActor; +import io.ray.api.WaitResult; +import io.ray.api.function.PyActorClass; +import io.ray.api.function.PyActorMethod; +import io.ray.api.function.PyRemoteFunction; +import io.ray.api.function.RayFunc; +import io.ray.api.id.ObjectId; +import io.ray.api.id.UniqueId; +import io.ray.api.options.ActorCreationOptions; +import io.ray.api.options.CallOptions; +import io.ray.api.runtimecontext.RuntimeContext; import java.util.List; import java.util.concurrent.Callable; -import org.ray.api.BaseActor; -import org.ray.api.RayActor; -import org.ray.api.RayObject; -import org.ray.api.RayPyActor; -import org.ray.api.WaitResult; -import org.ray.api.function.PyActorClass; -import org.ray.api.function.PyActorMethod; -import org.ray.api.function.PyRemoteFunction; -import org.ray.api.function.RayFunc; -import org.ray.api.id.ObjectId; -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. diff --git a/java/api/src/main/java/org/ray/api/runtime/RayRuntimeFactory.java b/java/api/src/main/java/io/ray/api/runtime/RayRuntimeFactory.java similarity index 81% rename from java/api/src/main/java/org/ray/api/runtime/RayRuntimeFactory.java rename to java/api/src/main/java/io/ray/api/runtime/RayRuntimeFactory.java index 61344de0c..da758c07b 100644 --- a/java/api/src/main/java/org/ray/api/runtime/RayRuntimeFactory.java +++ b/java/api/src/main/java/io/ray/api/runtime/RayRuntimeFactory.java @@ -1,4 +1,4 @@ -package org.ray.api.runtime; +package io.ray.api.runtime; /** * A factory that produces a RayRuntime instance. diff --git a/java/api/src/main/java/org/ray/api/runtimecontext/NodeInfo.java b/java/api/src/main/java/io/ray/api/runtimecontext/NodeInfo.java similarity index 92% rename from java/api/src/main/java/org/ray/api/runtimecontext/NodeInfo.java rename to java/api/src/main/java/io/ray/api/runtimecontext/NodeInfo.java index 92694a401..5a24120be 100644 --- a/java/api/src/main/java/org/ray/api/runtimecontext/NodeInfo.java +++ b/java/api/src/main/java/io/ray/api/runtimecontext/NodeInfo.java @@ -1,7 +1,7 @@ -package org.ray.api.runtimecontext; +package io.ray.api.runtimecontext; +import io.ray.api.id.UniqueId; import java.util.Map; -import org.ray.api.id.UniqueId; /** * A class that represents the information of a node. diff --git a/java/api/src/main/java/org/ray/api/runtimecontext/RuntimeContext.java b/java/api/src/main/java/io/ray/api/runtimecontext/RuntimeContext.java similarity index 90% rename from java/api/src/main/java/org/ray/api/runtimecontext/RuntimeContext.java rename to java/api/src/main/java/io/ray/api/runtimecontext/RuntimeContext.java index 913c44a03..da5655617 100644 --- a/java/api/src/main/java/org/ray/api/runtimecontext/RuntimeContext.java +++ b/java/api/src/main/java/io/ray/api/runtimecontext/RuntimeContext.java @@ -1,8 +1,8 @@ -package org.ray.api.runtimecontext; +package io.ray.api.runtimecontext; +import io.ray.api.id.ActorId; +import io.ray.api.id.JobId; import java.util.List; -import org.ray.api.id.ActorId; -import org.ray.api.id.JobId; /** * A class used for getting information of Ray runtime. diff --git a/java/checkstyle-suppressions.xml b/java/checkstyle-suppressions.xml index 0187ac392..e76437d14 100644 --- a/java/checkstyle-suppressions.xml +++ b/java/checkstyle-suppressions.xml @@ -13,5 +13,5 @@ - + diff --git a/java/modify_generated_java_flatbuffers_files.py b/java/modify_generated_java_flatbuffers_files.py index d33c8414d..d71c6c66a 100644 --- a/java/modify_generated_java_flatbuffers_files.py +++ b/java/modify_generated_java_flatbuffers_files.py @@ -13,7 +13,7 @@ RAY_HOME: The root directory of Ray project. """ # constants declarations -PACKAGE_DECLARATION = "package org.ray.runtime.generated;" +PACKAGE_DECLARATION = "package io.ray.runtime.generated;" def add_package(file): @@ -41,5 +41,5 @@ def add_package_declarations(generated_root_path): if __name__ == "__main__": ray_home = sys.argv[1] root_path = os.path.join( - ray_home, "java/runtime/src/main/java/org/ray/runtime/generated") + ray_home, "java/runtime/src/main/java/io/ray/runtime/generated") add_package_declarations(root_path) diff --git a/java/pom.xml b/java/pom.xml index 86797e1e7..60c2bffec 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -5,7 +5,7 @@ 4.0.0 pom - org.ray + io.ray ray-superpom 0.1-SNAPSHOT diff --git a/java/runtime/pom.xml b/java/runtime/pom.xml index 513f304d1..3f58e53eb 100644 --- a/java/runtime/pom.xml +++ b/java/runtime/pom.xml @@ -4,7 +4,7 @@ xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - org.ray + io.ray ray-superpom 0.1-SNAPSHOT @@ -18,7 +18,7 @@ - org.ray + io.ray ray-api ${project.version} diff --git a/java/runtime/pom_template.xml b/java/runtime/pom_template.xml index 10a36bfce..ec09ca5c4 100644 --- a/java/runtime/pom_template.xml +++ b/java/runtime/pom_template.xml @@ -4,7 +4,7 @@ xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - org.ray + io.ray ray-superpom 0.1-SNAPSHOT @@ -18,7 +18,7 @@ - org.ray + io.ray ray-api ${project.version} diff --git a/java/runtime/src/main/java/org/ray/runtime/AbstractRayRuntime.java b/java/runtime/src/main/java/io/ray/runtime/AbstractRayRuntime.java similarity index 85% rename from java/runtime/src/main/java/org/ray/runtime/AbstractRayRuntime.java rename to java/runtime/src/main/java/io/ray/runtime/AbstractRayRuntime.java index b51f85cb3..9bb1948e7 100644 --- a/java/runtime/src/main/java/org/ray/runtime/AbstractRayRuntime.java +++ b/java/runtime/src/main/java/io/ray/runtime/AbstractRayRuntime.java @@ -1,41 +1,41 @@ -package org.ray.runtime; +package io.ray.runtime; import com.google.common.base.Preconditions; import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; +import io.ray.api.BaseActor; +import io.ray.api.RayActor; +import io.ray.api.RayObject; +import io.ray.api.RayPyActor; +import io.ray.api.WaitResult; +import io.ray.api.exception.RayException; +import io.ray.api.function.PyActorClass; +import io.ray.api.function.PyActorMethod; +import io.ray.api.function.PyRemoteFunction; +import io.ray.api.function.RayFunc; +import io.ray.api.id.ObjectId; +import io.ray.api.options.ActorCreationOptions; +import io.ray.api.options.CallOptions; +import io.ray.api.runtimecontext.RuntimeContext; +import io.ray.runtime.config.RayConfig; +import io.ray.runtime.context.RuntimeContextImpl; +import io.ray.runtime.context.WorkerContext; +import io.ray.runtime.functionmanager.FunctionDescriptor; +import io.ray.runtime.functionmanager.FunctionManager; +import io.ray.runtime.functionmanager.PyFunctionDescriptor; +import io.ray.runtime.functionmanager.RayFunction; +import io.ray.runtime.gcs.GcsClient; +import io.ray.runtime.generated.Common; +import io.ray.runtime.generated.Common.Language; +import io.ray.runtime.object.ObjectStore; +import io.ray.runtime.object.RayObjectImpl; +import io.ray.runtime.task.ArgumentsBuilder; +import io.ray.runtime.task.FunctionArg; +import io.ray.runtime.task.TaskExecutor; +import io.ray.runtime.task.TaskSubmitter; import java.util.List; import java.util.Optional; import java.util.concurrent.Callable; -import org.ray.api.BaseActor; -import org.ray.api.RayActor; -import org.ray.api.RayObject; -import org.ray.api.RayPyActor; -import org.ray.api.WaitResult; -import org.ray.api.exception.RayException; -import org.ray.api.function.PyActorClass; -import org.ray.api.function.PyActorMethod; -import org.ray.api.function.PyRemoteFunction; -import org.ray.api.function.RayFunc; -import org.ray.api.id.ObjectId; -import org.ray.api.options.ActorCreationOptions; -import org.ray.api.options.CallOptions; -import org.ray.api.runtimecontext.RuntimeContext; -import org.ray.runtime.config.RayConfig; -import org.ray.runtime.context.RuntimeContextImpl; -import org.ray.runtime.context.WorkerContext; -import org.ray.runtime.functionmanager.FunctionDescriptor; -import org.ray.runtime.functionmanager.FunctionManager; -import org.ray.runtime.functionmanager.PyFunctionDescriptor; -import org.ray.runtime.functionmanager.RayFunction; -import org.ray.runtime.gcs.GcsClient; -import org.ray.runtime.generated.Common.Language; -import org.ray.runtime.generated.Common.WorkerType; -import org.ray.runtime.object.ObjectStore; -import org.ray.runtime.object.RayObjectImpl; -import org.ray.runtime.task.ArgumentsBuilder; -import org.ray.runtime.task.FunctionArg; -import org.ray.runtime.task.TaskExecutor; -import org.ray.runtime.task.TaskSubmitter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -63,7 +63,7 @@ public abstract class AbstractRayRuntime implements RayRuntimeInternal { public AbstractRayRuntime(RayConfig rayConfig) { this.rayConfig = rayConfig; - setIsContextSet(rayConfig.workerMode == WorkerType.DRIVER); + setIsContextSet(rayConfig.workerMode == Common.WorkerType.DRIVER); functionManager = new FunctionManager(rayConfig.jobResourcePath); runtimeContext = new RuntimeContextImpl(this); } diff --git a/java/runtime/src/main/java/org/ray/runtime/DefaultRayRuntimeFactory.java b/java/runtime/src/main/java/io/ray/runtime/DefaultRayRuntimeFactory.java similarity index 83% rename from java/runtime/src/main/java/org/ray/runtime/DefaultRayRuntimeFactory.java rename to java/runtime/src/main/java/io/ray/runtime/DefaultRayRuntimeFactory.java index 02e2c93be..be74d6abb 100644 --- a/java/runtime/src/main/java/org/ray/runtime/DefaultRayRuntimeFactory.java +++ b/java/runtime/src/main/java/io/ray/runtime/DefaultRayRuntimeFactory.java @@ -1,9 +1,9 @@ -package org.ray.runtime; +package io.ray.runtime; -import org.ray.api.runtime.RayRuntime; -import org.ray.api.runtime.RayRuntimeFactory; -import org.ray.runtime.config.RayConfig; -import org.ray.runtime.config.RunMode; +import io.ray.api.runtime.RayRuntime; +import io.ray.api.runtime.RayRuntimeFactory; +import io.ray.runtime.config.RayConfig; +import io.ray.runtime.config.RunMode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/java/runtime/src/main/java/org/ray/runtime/RayDevRuntime.java b/java/runtime/src/main/java/io/ray/runtime/RayDevRuntime.java similarity index 84% rename from java/runtime/src/main/java/org/ray/runtime/RayDevRuntime.java rename to java/runtime/src/main/java/io/ray/runtime/RayDevRuntime.java index a46cafda7..833277ca4 100644 --- a/java/runtime/src/main/java/org/ray/runtime/RayDevRuntime.java +++ b/java/runtime/src/main/java/io/ray/runtime/RayDevRuntime.java @@ -1,15 +1,15 @@ -package org.ray.runtime; +package io.ray.runtime; import com.google.common.base.Preconditions; +import io.ray.api.BaseActor; +import io.ray.api.id.JobId; +import io.ray.api.id.UniqueId; +import io.ray.runtime.config.RayConfig; +import io.ray.runtime.context.LocalModeWorkerContext; +import io.ray.runtime.object.LocalModeObjectStore; +import io.ray.runtime.task.LocalModeTaskExecutor; +import io.ray.runtime.task.LocalModeTaskSubmitter; import java.util.concurrent.atomic.AtomicInteger; -import org.ray.api.BaseActor; -import org.ray.api.id.JobId; -import org.ray.api.id.UniqueId; -import org.ray.runtime.config.RayConfig; -import org.ray.runtime.context.LocalModeWorkerContext; -import org.ray.runtime.object.LocalModeObjectStore; -import org.ray.runtime.task.LocalModeTaskExecutor; -import org.ray.runtime.task.LocalModeTaskSubmitter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/java/runtime/src/main/java/org/ray/runtime/RayNativeRuntime.java b/java/runtime/src/main/java/io/ray/runtime/RayNativeRuntime.java similarity index 89% rename from java/runtime/src/main/java/org/ray/runtime/RayNativeRuntime.java rename to java/runtime/src/main/java/io/ray/runtime/RayNativeRuntime.java index 67fef8906..c0e2e29aa 100644 --- a/java/runtime/src/main/java/org/ray/runtime/RayNativeRuntime.java +++ b/java/runtime/src/main/java/io/ray/runtime/RayNativeRuntime.java @@ -1,25 +1,25 @@ -package org.ray.runtime; +package io.ray.runtime; import com.google.common.base.Preconditions; +import io.ray.api.BaseActor; +import io.ray.api.id.JobId; +import io.ray.api.id.UniqueId; +import io.ray.runtime.config.RayConfig; +import io.ray.runtime.context.NativeWorkerContext; +import io.ray.runtime.gcs.GcsClient; +import io.ray.runtime.gcs.GcsClientOptions; +import io.ray.runtime.gcs.RedisClient; +import io.ray.runtime.generated.Common.WorkerType; +import io.ray.runtime.object.NativeObjectStore; +import io.ray.runtime.runner.RunManager; +import io.ray.runtime.task.NativeTaskExecutor; +import io.ray.runtime.task.NativeTaskSubmitter; +import io.ray.runtime.task.TaskExecutor; +import io.ray.runtime.util.JniUtils; import java.io.File; import java.io.IOException; import java.util.Map; import org.apache.commons.io.FileUtils; -import org.ray.api.BaseActor; -import org.ray.api.id.JobId; -import org.ray.api.id.UniqueId; -import org.ray.runtime.config.RayConfig; -import org.ray.runtime.context.NativeWorkerContext; -import org.ray.runtime.gcs.GcsClient; -import org.ray.runtime.gcs.GcsClientOptions; -import org.ray.runtime.gcs.RedisClient; -import org.ray.runtime.generated.Common.WorkerType; -import org.ray.runtime.object.NativeObjectStore; -import org.ray.runtime.runner.RunManager; -import org.ray.runtime.task.NativeTaskExecutor; -import org.ray.runtime.task.NativeTaskSubmitter; -import org.ray.runtime.task.TaskExecutor; -import org.ray.runtime.util.JniUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/java/runtime/src/main/java/org/ray/runtime/RayRuntimeInternal.java b/java/runtime/src/main/java/io/ray/runtime/RayRuntimeInternal.java similarity index 59% rename from java/runtime/src/main/java/org/ray/runtime/RayRuntimeInternal.java rename to java/runtime/src/main/java/io/ray/runtime/RayRuntimeInternal.java index a8a56c132..f155fce4d 100644 --- a/java/runtime/src/main/java/org/ray/runtime/RayRuntimeInternal.java +++ b/java/runtime/src/main/java/io/ray/runtime/RayRuntimeInternal.java @@ -1,11 +1,11 @@ -package org.ray.runtime; +package io.ray.runtime; -import org.ray.api.runtime.RayRuntime; -import org.ray.runtime.config.RayConfig; -import org.ray.runtime.context.WorkerContext; -import org.ray.runtime.functionmanager.FunctionManager; -import org.ray.runtime.gcs.GcsClient; -import org.ray.runtime.object.ObjectStore; +import io.ray.api.runtime.RayRuntime; +import io.ray.runtime.config.RayConfig; +import io.ray.runtime.context.WorkerContext; +import io.ray.runtime.functionmanager.FunctionManager; +import io.ray.runtime.gcs.GcsClient; +import io.ray.runtime.object.ObjectStore; /** * This interface is required to make {@link RayRuntimeProxy} work. diff --git a/java/runtime/src/main/java/org/ray/runtime/RayRuntimeProxy.java b/java/runtime/src/main/java/io/ray/runtime/RayRuntimeProxy.java similarity index 94% rename from java/runtime/src/main/java/org/ray/runtime/RayRuntimeProxy.java rename to java/runtime/src/main/java/io/ray/runtime/RayRuntimeProxy.java index ee1957add..1f515f91b 100644 --- a/java/runtime/src/main/java/org/ray/runtime/RayRuntimeProxy.java +++ b/java/runtime/src/main/java/io/ray/runtime/RayRuntimeProxy.java @@ -1,11 +1,11 @@ -package org.ray.runtime; +package io.ray.runtime; +import io.ray.api.exception.RayException; +import io.ray.api.runtime.RayRuntime; +import io.ray.runtime.config.RunMode; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import org.ray.api.exception.RayException; -import org.ray.api.runtime.RayRuntime; -import org.ray.runtime.config.RunMode; /** * Protect a ray runtime with context checks for all methods of {@link RayRuntime} (except {@link diff --git a/java/runtime/src/main/java/org/ray/runtime/actor/LocalModeRayActor.java b/java/runtime/src/main/java/io/ray/runtime/actor/LocalModeRayActor.java similarity index 91% rename from java/runtime/src/main/java/org/ray/runtime/actor/LocalModeRayActor.java rename to java/runtime/src/main/java/io/ray/runtime/actor/LocalModeRayActor.java index 6b4d2586f..b2cd41d1a 100644 --- a/java/runtime/src/main/java/org/ray/runtime/actor/LocalModeRayActor.java +++ b/java/runtime/src/main/java/io/ray/runtime/actor/LocalModeRayActor.java @@ -1,13 +1,13 @@ -package org.ray.runtime.actor; +package io.ray.runtime.actor; +import io.ray.api.RayActor; +import io.ray.api.id.ActorId; +import io.ray.api.id.ObjectId; import java.io.Externalizable; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import java.util.concurrent.atomic.AtomicReference; -import org.ray.api.RayActor; -import org.ray.api.id.ActorId; -import org.ray.api.id.ObjectId; /** * Implementation of actor handle for local mode. diff --git a/java/runtime/src/main/java/org/ray/runtime/actor/NativeRayActor.java b/java/runtime/src/main/java/io/ray/runtime/actor/NativeRayActor.java similarity index 94% rename from java/runtime/src/main/java/org/ray/runtime/actor/NativeRayActor.java rename to java/runtime/src/main/java/io/ray/runtime/actor/NativeRayActor.java index 21b99b783..f1097d109 100644 --- a/java/runtime/src/main/java/org/ray/runtime/actor/NativeRayActor.java +++ b/java/runtime/src/main/java/io/ray/runtime/actor/NativeRayActor.java @@ -1,14 +1,14 @@ -package org.ray.runtime.actor; +package io.ray.runtime.actor; import com.google.common.base.Preconditions; +import io.ray.api.BaseActor; +import io.ray.api.id.ActorId; +import io.ray.runtime.generated.Common.Language; import java.io.Externalizable; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import java.util.List; -import org.ray.api.BaseActor; -import org.ray.api.id.ActorId; -import org.ray.runtime.generated.Common.Language; /** * Abstract and language-independent implementation of actor handle for cluster mode. This is a diff --git a/java/runtime/src/main/java/org/ray/runtime/actor/NativeRayActorSerializer.java b/java/runtime/src/main/java/io/ray/runtime/actor/NativeRayActorSerializer.java similarity index 96% rename from java/runtime/src/main/java/org/ray/runtime/actor/NativeRayActorSerializer.java rename to java/runtime/src/main/java/io/ray/runtime/actor/NativeRayActorSerializer.java index 45a3b932d..187a827af 100644 --- a/java/runtime/src/main/java/org/ray/runtime/actor/NativeRayActorSerializer.java +++ b/java/runtime/src/main/java/io/ray/runtime/actor/NativeRayActorSerializer.java @@ -1,4 +1,4 @@ -package org.ray.runtime.actor; +package io.ray.runtime.actor; import java.io.IOException; import org.nustaq.serialization.FSTBasicObjectSerializer; diff --git a/java/runtime/src/main/java/org/ray/runtime/actor/NativeRayJavaActor.java b/java/runtime/src/main/java/io/ray/runtime/actor/NativeRayJavaActor.java similarity index 84% rename from java/runtime/src/main/java/org/ray/runtime/actor/NativeRayJavaActor.java rename to java/runtime/src/main/java/io/ray/runtime/actor/NativeRayJavaActor.java index 70dbc1a60..50f4aa4c2 100644 --- a/java/runtime/src/main/java/org/ray/runtime/actor/NativeRayJavaActor.java +++ b/java/runtime/src/main/java/io/ray/runtime/actor/NativeRayJavaActor.java @@ -1,10 +1,10 @@ -package org.ray.runtime.actor; +package io.ray.runtime.actor; import com.google.common.base.Preconditions; +import io.ray.api.RayActor; +import io.ray.runtime.generated.Common.Language; import java.io.IOException; import java.io.ObjectInput; -import org.ray.api.RayActor; -import org.ray.runtime.generated.Common.Language; /** * Java implementation of actor handle for cluster mode. diff --git a/java/runtime/src/main/java/org/ray/runtime/actor/NativeRayPyActor.java b/java/runtime/src/main/java/io/ray/runtime/actor/NativeRayPyActor.java similarity index 88% rename from java/runtime/src/main/java/org/ray/runtime/actor/NativeRayPyActor.java rename to java/runtime/src/main/java/io/ray/runtime/actor/NativeRayPyActor.java index 3b87fa58c..fa522e266 100644 --- a/java/runtime/src/main/java/org/ray/runtime/actor/NativeRayPyActor.java +++ b/java/runtime/src/main/java/io/ray/runtime/actor/NativeRayPyActor.java @@ -1,10 +1,10 @@ -package org.ray.runtime.actor; +package io.ray.runtime.actor; import com.google.common.base.Preconditions; +import io.ray.api.RayPyActor; +import io.ray.runtime.generated.Common.Language; import java.io.IOException; import java.io.ObjectInput; -import org.ray.api.RayPyActor; -import org.ray.runtime.generated.Common.Language; /** * Python actor handle implementation for cluster mode. diff --git a/java/runtime/src/main/java/org/ray/runtime/config/RayConfig.java b/java/runtime/src/main/java/io/ray/runtime/config/RayConfig.java similarity index 98% rename from java/runtime/src/main/java/org/ray/runtime/config/RayConfig.java rename to java/runtime/src/main/java/io/ray/runtime/config/RayConfig.java index ed3828141..fd8b9da37 100644 --- a/java/runtime/src/main/java/org/ray/runtime/config/RayConfig.java +++ b/java/runtime/src/main/java/io/ray/runtime/config/RayConfig.java @@ -1,4 +1,4 @@ -package org.ray.runtime.config; +package io.ray.runtime.config; import com.google.common.base.Preconditions; import com.google.common.base.Strings; @@ -7,6 +7,10 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigException; import com.typesafe.config.ConfigFactory; import com.typesafe.config.ConfigValue; +import io.ray.api.id.JobId; +import io.ray.runtime.generated.Common.WorkerType; +import io.ray.runtime.util.NetworkUtil; +import io.ray.runtime.util.ResourceUtil; import java.io.File; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; @@ -14,10 +18,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; -import org.ray.api.id.JobId; -import org.ray.runtime.generated.Common.WorkerType; -import org.ray.runtime.util.NetworkUtil; -import org.ray.runtime.util.ResourceUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/java/runtime/src/main/java/org/ray/runtime/config/RunMode.java b/java/runtime/src/main/java/io/ray/runtime/config/RunMode.java similarity index 89% rename from java/runtime/src/main/java/org/ray/runtime/config/RunMode.java rename to java/runtime/src/main/java/io/ray/runtime/config/RunMode.java index 835cb8e8d..39346804d 100644 --- a/java/runtime/src/main/java/org/ray/runtime/config/RunMode.java +++ b/java/runtime/src/main/java/io/ray/runtime/config/RunMode.java @@ -1,4 +1,4 @@ -package org.ray.runtime.config; +package io.ray.runtime.config; public enum RunMode { diff --git a/java/runtime/src/main/java/org/ray/runtime/context/LocalModeWorkerContext.java b/java/runtime/src/main/java/io/ray/runtime/context/LocalModeWorkerContext.java similarity index 83% rename from java/runtime/src/main/java/org/ray/runtime/context/LocalModeWorkerContext.java rename to java/runtime/src/main/java/io/ray/runtime/context/LocalModeWorkerContext.java index a20adf0ef..28825c55a 100644 --- a/java/runtime/src/main/java/org/ray/runtime/context/LocalModeWorkerContext.java +++ b/java/runtime/src/main/java/io/ray/runtime/context/LocalModeWorkerContext.java @@ -1,13 +1,13 @@ -package org.ray.runtime.context; +package io.ray.runtime.context; import com.google.common.base.Preconditions; -import org.ray.api.id.ActorId; -import org.ray.api.id.JobId; -import org.ray.api.id.TaskId; -import org.ray.api.id.UniqueId; -import org.ray.runtime.generated.Common.TaskSpec; -import org.ray.runtime.generated.Common.TaskType; -import org.ray.runtime.task.LocalModeTaskSubmitter; +import io.ray.api.id.ActorId; +import io.ray.api.id.JobId; +import io.ray.api.id.TaskId; +import io.ray.api.id.UniqueId; +import io.ray.runtime.generated.Common.TaskSpec; +import io.ray.runtime.generated.Common.TaskType; +import io.ray.runtime.task.LocalModeTaskSubmitter; /** * Worker context for local mode. diff --git a/java/runtime/src/main/java/org/ray/runtime/context/NativeWorkerContext.java b/java/runtime/src/main/java/io/ray/runtime/context/NativeWorkerContext.java similarity index 87% rename from java/runtime/src/main/java/org/ray/runtime/context/NativeWorkerContext.java rename to java/runtime/src/main/java/io/ray/runtime/context/NativeWorkerContext.java index 2eb814898..defb42173 100644 --- a/java/runtime/src/main/java/org/ray/runtime/context/NativeWorkerContext.java +++ b/java/runtime/src/main/java/io/ray/runtime/context/NativeWorkerContext.java @@ -1,11 +1,11 @@ -package org.ray.runtime.context; +package io.ray.runtime.context; +import io.ray.api.id.ActorId; +import io.ray.api.id.JobId; +import io.ray.api.id.TaskId; +import io.ray.api.id.UniqueId; +import io.ray.runtime.generated.Common.TaskType; import java.nio.ByteBuffer; -import org.ray.api.id.ActorId; -import org.ray.api.id.JobId; -import org.ray.api.id.TaskId; -import org.ray.api.id.UniqueId; -import org.ray.runtime.generated.Common.TaskType; /** * Worker context for cluster mode. This is a wrapper class for worker context of core worker. diff --git a/java/runtime/src/main/java/org/ray/runtime/context/RuntimeContextImpl.java b/java/runtime/src/main/java/io/ray/runtime/context/RuntimeContextImpl.java similarity index 82% rename from java/runtime/src/main/java/org/ray/runtime/context/RuntimeContextImpl.java rename to java/runtime/src/main/java/io/ray/runtime/context/RuntimeContextImpl.java index 97ad3badb..95eaa83e8 100644 --- a/java/runtime/src/main/java/org/ray/runtime/context/RuntimeContextImpl.java +++ b/java/runtime/src/main/java/io/ray/runtime/context/RuntimeContextImpl.java @@ -1,14 +1,14 @@ -package org.ray.runtime.context; +package io.ray.runtime.context; import com.google.common.base.Preconditions; +import io.ray.api.id.ActorId; +import io.ray.api.id.JobId; +import io.ray.api.runtimecontext.NodeInfo; +import io.ray.api.runtimecontext.RuntimeContext; +import io.ray.runtime.RayRuntimeInternal; +import io.ray.runtime.config.RunMode; +import io.ray.runtime.generated.Common.TaskType; import java.util.List; -import org.ray.api.id.ActorId; -import org.ray.api.id.JobId; -import org.ray.api.runtimecontext.NodeInfo; -import org.ray.api.runtimecontext.RuntimeContext; -import org.ray.runtime.RayRuntimeInternal; -import org.ray.runtime.config.RunMode; -import org.ray.runtime.generated.Common.TaskType; public class RuntimeContextImpl implements RuntimeContext { diff --git a/java/runtime/src/main/java/org/ray/runtime/context/WorkerContext.java b/java/runtime/src/main/java/io/ray/runtime/context/WorkerContext.java similarity index 75% rename from java/runtime/src/main/java/org/ray/runtime/context/WorkerContext.java rename to java/runtime/src/main/java/io/ray/runtime/context/WorkerContext.java index 253030502..40b647f69 100644 --- a/java/runtime/src/main/java/org/ray/runtime/context/WorkerContext.java +++ b/java/runtime/src/main/java/io/ray/runtime/context/WorkerContext.java @@ -1,11 +1,10 @@ -package org.ray.runtime.context; +package io.ray.runtime.context; -import org.ray.api.id.ActorId; -import org.ray.api.id.JobId; -import org.ray.api.id.TaskId; -import org.ray.api.id.UniqueId; -import org.ray.runtime.generated.Common.TaskType; -import org.ray.runtime.serializer.Serializer; +import io.ray.api.id.ActorId; +import io.ray.api.id.JobId; +import io.ray.api.id.TaskId; +import io.ray.api.id.UniqueId; +import io.ray.runtime.generated.Common.TaskType; /** * The context of worker. diff --git a/java/runtime/src/main/java/org/ray/runtime/functionmanager/FunctionDescriptor.java b/java/runtime/src/main/java/io/ray/runtime/functionmanager/FunctionDescriptor.java similarity index 82% rename from java/runtime/src/main/java/org/ray/runtime/functionmanager/FunctionDescriptor.java rename to java/runtime/src/main/java/io/ray/runtime/functionmanager/FunctionDescriptor.java index ec923e6f9..4e0711d2d 100644 --- a/java/runtime/src/main/java/org/ray/runtime/functionmanager/FunctionDescriptor.java +++ b/java/runtime/src/main/java/io/ray/runtime/functionmanager/FunctionDescriptor.java @@ -1,7 +1,7 @@ -package org.ray.runtime.functionmanager; +package io.ray.runtime.functionmanager; +import io.ray.runtime.generated.Common.Language; import java.util.List; -import org.ray.runtime.generated.Common.Language; /** * Base interface of a Ray task's function descriptor. diff --git a/java/runtime/src/main/java/org/ray/runtime/functionmanager/FunctionManager.java b/java/runtime/src/main/java/io/ray/runtime/functionmanager/FunctionManager.java similarity index 98% rename from java/runtime/src/main/java/org/ray/runtime/functionmanager/FunctionManager.java rename to java/runtime/src/main/java/io/ray/runtime/functionmanager/FunctionManager.java index dac4ee52a..f7f11fae1 100644 --- a/java/runtime/src/main/java/org/ray/runtime/functionmanager/FunctionManager.java +++ b/java/runtime/src/main/java/io/ray/runtime/functionmanager/FunctionManager.java @@ -1,6 +1,9 @@ -package org.ray.runtime.functionmanager; +package io.ray.runtime.functionmanager; import com.google.common.base.Strings; +import io.ray.api.function.RayFunc; +import io.ray.api.id.JobId; +import io.ray.runtime.util.LambdaUtils; import java.io.File; import java.lang.invoke.SerializedLambda; import java.lang.reflect.Constructor; @@ -25,9 +28,6 @@ import org.apache.commons.io.filefilter.RegexFileFilter; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; import org.objectweb.asm.Type; -import org.ray.api.function.RayFunc; -import org.ray.api.id.JobId; -import org.ray.runtime.util.LambdaUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/java/runtime/src/main/java/org/ray/runtime/functionmanager/JavaFunctionDescriptor.java b/java/runtime/src/main/java/io/ray/runtime/functionmanager/JavaFunctionDescriptor.java similarity index 93% rename from java/runtime/src/main/java/org/ray/runtime/functionmanager/JavaFunctionDescriptor.java rename to java/runtime/src/main/java/io/ray/runtime/functionmanager/JavaFunctionDescriptor.java index edf16ffaa..30d5cd881 100644 --- a/java/runtime/src/main/java/org/ray/runtime/functionmanager/JavaFunctionDescriptor.java +++ b/java/runtime/src/main/java/io/ray/runtime/functionmanager/JavaFunctionDescriptor.java @@ -1,9 +1,9 @@ -package org.ray.runtime.functionmanager; +package io.ray.runtime.functionmanager; import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; +import io.ray.runtime.generated.Common.Language; import java.util.List; -import org.ray.runtime.generated.Common.Language; /** * Represents metadata of Java function. diff --git a/java/runtime/src/main/java/org/ray/runtime/functionmanager/PyFunctionDescriptor.java b/java/runtime/src/main/java/io/ray/runtime/functionmanager/PyFunctionDescriptor.java similarity index 89% rename from java/runtime/src/main/java/org/ray/runtime/functionmanager/PyFunctionDescriptor.java rename to java/runtime/src/main/java/io/ray/runtime/functionmanager/PyFunctionDescriptor.java index 912cca2e8..f2a6bd315 100644 --- a/java/runtime/src/main/java/org/ray/runtime/functionmanager/PyFunctionDescriptor.java +++ b/java/runtime/src/main/java/io/ray/runtime/functionmanager/PyFunctionDescriptor.java @@ -1,8 +1,8 @@ -package org.ray.runtime.functionmanager; +package io.ray.runtime.functionmanager; +import io.ray.runtime.generated.Common.Language; import java.util.Arrays; import java.util.List; -import org.ray.runtime.generated.Common.Language; /** * Represents metadata of a Python function. diff --git a/java/runtime/src/main/java/org/ray/runtime/functionmanager/RayFunction.java b/java/runtime/src/main/java/io/ray/runtime/functionmanager/RayFunction.java similarity index 97% rename from java/runtime/src/main/java/org/ray/runtime/functionmanager/RayFunction.java rename to java/runtime/src/main/java/io/ray/runtime/functionmanager/RayFunction.java index 01741e5e8..d7d472ddb 100644 --- a/java/runtime/src/main/java/org/ray/runtime/functionmanager/RayFunction.java +++ b/java/runtime/src/main/java/io/ray/runtime/functionmanager/RayFunction.java @@ -1,4 +1,4 @@ -package org.ray.runtime.functionmanager; +package io.ray.runtime.functionmanager; import java.lang.reflect.Constructor; import java.lang.reflect.Executable; diff --git a/java/runtime/src/main/java/org/ray/runtime/gcs/GcsClient.java b/java/runtime/src/main/java/io/ray/runtime/gcs/GcsClient.java similarity index 92% rename from java/runtime/src/main/java/org/ray/runtime/gcs/GcsClient.java rename to java/runtime/src/main/java/io/ray/runtime/gcs/GcsClient.java index ca10f24d7..24b49f640 100644 --- a/java/runtime/src/main/java/org/ray/runtime/gcs/GcsClient.java +++ b/java/runtime/src/main/java/io/ray/runtime/gcs/GcsClient.java @@ -1,25 +1,25 @@ -package org.ray.runtime.gcs; +package io.ray.runtime.gcs; import com.google.common.base.Preconditions; import com.google.protobuf.InvalidProtocolBufferException; +import io.ray.api.Checkpointable.Checkpoint; +import io.ray.api.id.ActorId; +import io.ray.api.id.BaseId; +import io.ray.api.id.JobId; +import io.ray.api.id.TaskId; +import io.ray.api.id.UniqueId; +import io.ray.api.runtimecontext.NodeInfo; +import io.ray.runtime.generated.Gcs; +import io.ray.runtime.generated.Gcs.ActorCheckpointIdData; +import io.ray.runtime.generated.Gcs.GcsNodeInfo; +import io.ray.runtime.generated.Gcs.TablePrefix; +import io.ray.runtime.util.IdUtil; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import org.apache.commons.lang3.ArrayUtils; -import org.ray.api.Checkpointable.Checkpoint; -import org.ray.api.id.ActorId; -import org.ray.api.id.BaseId; -import org.ray.api.id.JobId; -import org.ray.api.id.TaskId; -import org.ray.api.id.UniqueId; -import org.ray.api.runtimecontext.NodeInfo; -import org.ray.runtime.generated.Gcs; -import org.ray.runtime.generated.Gcs.ActorCheckpointIdData; -import org.ray.runtime.generated.Gcs.GcsNodeInfo; -import org.ray.runtime.generated.Gcs.TablePrefix; -import org.ray.runtime.util.IdUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/java/runtime/src/main/java/org/ray/runtime/gcs/GcsClientOptions.java b/java/runtime/src/main/java/io/ray/runtime/gcs/GcsClientOptions.java similarity index 81% rename from java/runtime/src/main/java/org/ray/runtime/gcs/GcsClientOptions.java rename to java/runtime/src/main/java/io/ray/runtime/gcs/GcsClientOptions.java index 4f0b6b901..379bd20d8 100644 --- a/java/runtime/src/main/java/org/ray/runtime/gcs/GcsClientOptions.java +++ b/java/runtime/src/main/java/io/ray/runtime/gcs/GcsClientOptions.java @@ -1,6 +1,6 @@ -package org.ray.runtime.gcs; +package io.ray.runtime.gcs; -import org.ray.runtime.config.RayConfig; +import io.ray.runtime.config.RayConfig; /** * Options to create GCS Client. diff --git a/java/runtime/src/main/java/org/ray/runtime/gcs/RedisClient.java b/java/runtime/src/main/java/io/ray/runtime/gcs/RedisClient.java similarity index 99% rename from java/runtime/src/main/java/org/ray/runtime/gcs/RedisClient.java rename to java/runtime/src/main/java/io/ray/runtime/gcs/RedisClient.java index e2261509b..e9802eace 100644 --- a/java/runtime/src/main/java/org/ray/runtime/gcs/RedisClient.java +++ b/java/runtime/src/main/java/io/ray/runtime/gcs/RedisClient.java @@ -1,4 +1,4 @@ -package org.ray.runtime.gcs; +package io.ray.runtime.gcs; import com.google.common.base.Strings; import java.util.List; diff --git a/java/runtime/src/main/java/org/ray/runtime/object/LocalModeObjectStore.java b/java/runtime/src/main/java/io/ray/runtime/object/LocalModeObjectStore.java similarity index 96% rename from java/runtime/src/main/java/org/ray/runtime/object/LocalModeObjectStore.java rename to java/runtime/src/main/java/io/ray/runtime/object/LocalModeObjectStore.java index 9034bec70..9a448c331 100644 --- a/java/runtime/src/main/java/org/ray/runtime/object/LocalModeObjectStore.java +++ b/java/runtime/src/main/java/io/ray/runtime/object/LocalModeObjectStore.java @@ -1,14 +1,14 @@ -package org.ray.runtime.object; +package io.ray.runtime.object; import com.google.common.base.Preconditions; +import io.ray.api.id.ObjectId; +import io.ray.runtime.context.WorkerContext; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Consumer; import java.util.stream.Collectors; -import org.ray.api.id.ObjectId; -import org.ray.runtime.context.WorkerContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/java/runtime/src/main/java/org/ray/runtime/object/NativeObjectStore.java b/java/runtime/src/main/java/io/ray/runtime/object/NativeObjectStore.java similarity index 92% rename from java/runtime/src/main/java/org/ray/runtime/object/NativeObjectStore.java rename to java/runtime/src/main/java/io/ray/runtime/object/NativeObjectStore.java index 1d8b863cf..9d0c6a317 100644 --- a/java/runtime/src/main/java/org/ray/runtime/object/NativeObjectStore.java +++ b/java/runtime/src/main/java/io/ray/runtime/object/NativeObjectStore.java @@ -1,10 +1,10 @@ -package org.ray.runtime.object; +package io.ray.runtime.object; +import io.ray.api.id.BaseId; +import io.ray.api.id.ObjectId; +import io.ray.runtime.context.WorkerContext; import java.util.List; import java.util.stream.Collectors; -import org.ray.api.id.BaseId; -import org.ray.api.id.ObjectId; -import org.ray.runtime.context.WorkerContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/java/runtime/src/main/java/org/ray/runtime/object/NativeRayObject.java b/java/runtime/src/main/java/io/ray/runtime/object/NativeRayObject.java similarity index 95% rename from java/runtime/src/main/java/org/ray/runtime/object/NativeRayObject.java rename to java/runtime/src/main/java/io/ray/runtime/object/NativeRayObject.java index d1773c30d..662ec0e3c 100644 --- a/java/runtime/src/main/java/org/ray/runtime/object/NativeRayObject.java +++ b/java/runtime/src/main/java/io/ray/runtime/object/NativeRayObject.java @@ -1,4 +1,4 @@ -package org.ray.runtime.object; +package io.ray.runtime.object; import com.google.common.base.Preconditions; diff --git a/java/runtime/src/main/java/org/ray/runtime/object/ObjectSerializer.java b/java/runtime/src/main/java/io/ray/runtime/object/ObjectSerializer.java similarity index 91% rename from java/runtime/src/main/java/org/ray/runtime/object/ObjectSerializer.java rename to java/runtime/src/main/java/io/ray/runtime/object/ObjectSerializer.java index 528bf1099..d45aba662 100644 --- a/java/runtime/src/main/java/org/ray/runtime/object/ObjectSerializer.java +++ b/java/runtime/src/main/java/io/ray/runtime/object/ObjectSerializer.java @@ -1,15 +1,14 @@ -package org.ray.runtime.object; +package io.ray.runtime.object; +import io.ray.api.exception.RayActorException; +import io.ray.api.exception.RayTaskException; +import io.ray.api.exception.RayWorkerException; +import io.ray.api.exception.UnreconstructableException; +import io.ray.api.id.ObjectId; +import io.ray.runtime.generated.Gcs.ErrorType; +import io.ray.runtime.serializer.Serializer; import java.util.Arrays; - import org.apache.commons.lang3.tuple.Pair; -import org.ray.api.exception.RayActorException; -import org.ray.api.exception.RayTaskException; -import org.ray.api.exception.RayWorkerException; -import org.ray.api.exception.UnreconstructableException; -import org.ray.api.id.ObjectId; -import org.ray.runtime.generated.Gcs.ErrorType; -import org.ray.runtime.serializer.Serializer; /** * Serialize to and deserialize from {@link NativeRayObject}. Metadata is generated during diff --git a/java/runtime/src/main/java/org/ray/runtime/object/ObjectStore.java b/java/runtime/src/main/java/io/ray/runtime/object/ObjectStore.java similarity index 96% rename from java/runtime/src/main/java/org/ray/runtime/object/ObjectStore.java rename to java/runtime/src/main/java/io/ray/runtime/object/ObjectStore.java index d44cac969..e186b6926 100644 --- a/java/runtime/src/main/java/org/ray/runtime/object/ObjectStore.java +++ b/java/runtime/src/main/java/io/ray/runtime/object/ObjectStore.java @@ -1,16 +1,16 @@ -package org.ray.runtime.object; +package io.ray.runtime.object; import com.google.common.base.Preconditions; +import io.ray.api.RayObject; +import io.ray.api.WaitResult; +import io.ray.api.exception.RayException; +import io.ray.api.id.ObjectId; +import io.ray.runtime.context.WorkerContext; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; -import org.ray.api.RayObject; -import org.ray.api.WaitResult; -import org.ray.api.exception.RayException; -import org.ray.api.id.ObjectId; -import org.ray.runtime.context.WorkerContext; /** * A class that is used to put/get objects to/from the object store. diff --git a/java/runtime/src/main/java/org/ray/runtime/object/RayObjectImpl.java b/java/runtime/src/main/java/io/ray/runtime/object/RayObjectImpl.java similarity index 89% rename from java/runtime/src/main/java/org/ray/runtime/object/RayObjectImpl.java rename to java/runtime/src/main/java/io/ray/runtime/object/RayObjectImpl.java index b9d08ece9..b6fe7aa8e 100644 --- a/java/runtime/src/main/java/org/ray/runtime/object/RayObjectImpl.java +++ b/java/runtime/src/main/java/io/ray/runtime/object/RayObjectImpl.java @@ -1,11 +1,10 @@ -package org.ray.runtime.object; +package io.ray.runtime.object; +import io.ray.api.Ray; +import io.ray.api.RayObject; +import io.ray.api.id.ObjectId; import java.io.Serializable; -import org.ray.api.Ray; -import org.ray.api.RayObject; -import org.ray.api.id.ObjectId; - /** * Implementation of {@link RayObject}. */ diff --git a/java/runtime/src/main/java/org/ray/runtime/runner/RunManager.java b/java/runtime/src/main/java/io/ray/runtime/runner/RunManager.java similarity index 98% rename from java/runtime/src/main/java/org/ray/runtime/runner/RunManager.java rename to java/runtime/src/main/java/io/ray/runtime/runner/RunManager.java index 61c970adc..1e156b4d3 100644 --- a/java/runtime/src/main/java/org/ray/runtime/runner/RunManager.java +++ b/java/runtime/src/main/java/io/ray/runtime/runner/RunManager.java @@ -1,10 +1,13 @@ -package org.ray.runtime.runner; +package io.ray.runtime.runner; import com.google.common.base.Joiner; import com.google.common.base.Preconditions; import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; +import io.ray.runtime.config.RayConfig; +import io.ray.runtime.util.BinaryFileUtil; +import io.ray.runtime.util.ResourceUtil; import java.io.File; import java.io.IOException; import java.nio.file.Files; @@ -20,9 +23,6 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.tuple.Pair; -import org.ray.runtime.config.RayConfig; -import org.ray.runtime.util.BinaryFileUtil; -import org.ray.runtime.util.ResourceUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import redis.clients.jedis.Jedis; @@ -37,7 +37,7 @@ public class RunManager { private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("YYYY-MM-dd_HH-mm-ss"); - private static final String WORKER_CLASS = "org.ray.runtime.runner.worker.DefaultWorker"; + private static final String WORKER_CLASS = "io.ray.runtime.runner.worker.DefaultWorker"; private static final String SESSION_LATEST = "session_latest"; diff --git a/java/runtime/src/main/java/org/ray/runtime/runner/worker/DefaultDriver.java b/java/runtime/src/main/java/io/ray/runtime/runner/worker/DefaultDriver.java similarity index 91% rename from java/runtime/src/main/java/org/ray/runtime/runner/worker/DefaultDriver.java rename to java/runtime/src/main/java/io/ray/runtime/runner/worker/DefaultDriver.java index 14b315146..1495efa16 100644 --- a/java/runtime/src/main/java/org/ray/runtime/runner/worker/DefaultDriver.java +++ b/java/runtime/src/main/java/io/ray/runtime/runner/worker/DefaultDriver.java @@ -1,6 +1,6 @@ -package org.ray.runtime.runner.worker; +package io.ray.runtime.runner.worker; -import org.ray.api.Ray; +import io.ray.api.Ray; /** * The main function of DefaultDriver. diff --git a/java/runtime/src/main/java/org/ray/runtime/runner/worker/DefaultWorker.java b/java/runtime/src/main/java/io/ray/runtime/runner/worker/DefaultWorker.java similarity index 89% rename from java/runtime/src/main/java/org/ray/runtime/runner/worker/DefaultWorker.java rename to java/runtime/src/main/java/io/ray/runtime/runner/worker/DefaultWorker.java index a99db00c8..349072bcd 100644 --- a/java/runtime/src/main/java/org/ray/runtime/runner/worker/DefaultWorker.java +++ b/java/runtime/src/main/java/io/ray/runtime/runner/worker/DefaultWorker.java @@ -1,7 +1,7 @@ -package org.ray.runtime.runner.worker; +package io.ray.runtime.runner.worker; -import org.ray.api.Ray; -import org.ray.runtime.RayRuntimeInternal; +import io.ray.api.Ray; +import io.ray.runtime.RayRuntimeInternal; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/java/runtime/src/main/java/org/ray/runtime/serializer/FstSerializer.java b/java/runtime/src/main/java/io/ray/runtime/serializer/FstSerializer.java similarity index 86% rename from java/runtime/src/main/java/org/ray/runtime/serializer/FstSerializer.java rename to java/runtime/src/main/java/io/ray/runtime/serializer/FstSerializer.java index 3a93c1f95..3acd620bb 100644 --- a/java/runtime/src/main/java/org/ray/runtime/serializer/FstSerializer.java +++ b/java/runtime/src/main/java/io/ray/runtime/serializer/FstSerializer.java @@ -1,8 +1,8 @@ -package org.ray.runtime.serializer; +package io.ray.runtime.serializer; +import io.ray.runtime.actor.NativeRayActor; +import io.ray.runtime.actor.NativeRayActorSerializer; import org.nustaq.serialization.FSTConfiguration; -import org.ray.runtime.actor.NativeRayActor; -import org.ray.runtime.actor.NativeRayActorSerializer; /** * Java object serialization TODO: use others (e.g. Arrow) for higher performance diff --git a/java/runtime/src/main/java/org/ray/runtime/serializer/MessagePackSerializer.java b/java/runtime/src/main/java/io/ray/runtime/serializer/MessagePackSerializer.java similarity index 99% rename from java/runtime/src/main/java/org/ray/runtime/serializer/MessagePackSerializer.java rename to java/runtime/src/main/java/io/ray/runtime/serializer/MessagePackSerializer.java index a0856a5a4..6da909055 100644 --- a/java/runtime/src/main/java/org/ray/runtime/serializer/MessagePackSerializer.java +++ b/java/runtime/src/main/java/io/ray/runtime/serializer/MessagePackSerializer.java @@ -1,4 +1,4 @@ -package org.ray.runtime.serializer; +package io.ray.runtime.serializer; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; diff --git a/java/runtime/src/main/java/org/ray/runtime/serializer/Serializer.java b/java/runtime/src/main/java/io/ray/runtime/serializer/Serializer.java similarity index 90% rename from java/runtime/src/main/java/org/ray/runtime/serializer/Serializer.java rename to java/runtime/src/main/java/io/ray/runtime/serializer/Serializer.java index e42d9d4d1..5dbff71b4 100644 --- a/java/runtime/src/main/java/org/ray/runtime/serializer/Serializer.java +++ b/java/runtime/src/main/java/io/ray/runtime/serializer/Serializer.java @@ -1,4 +1,4 @@ -package org.ray.runtime.serializer; +package io.ray.runtime.serializer; import org.apache.commons.lang3.tuple.Pair; diff --git a/java/runtime/src/main/java/org/ray/runtime/task/ArgumentsBuilder.java b/java/runtime/src/main/java/io/ray/runtime/task/ArgumentsBuilder.java similarity index 88% rename from java/runtime/src/main/java/org/ray/runtime/task/ArgumentsBuilder.java rename to java/runtime/src/main/java/io/ray/runtime/task/ArgumentsBuilder.java index 4760fb1c2..91dfecd41 100644 --- a/java/runtime/src/main/java/org/ray/runtime/task/ArgumentsBuilder.java +++ b/java/runtime/src/main/java/io/ray/runtime/task/ArgumentsBuilder.java @@ -1,15 +1,15 @@ -package org.ray.runtime.task; +package io.ray.runtime.task; +import io.ray.api.Ray; +import io.ray.api.RayObject; +import io.ray.api.id.ObjectId; +import io.ray.runtime.RayRuntimeInternal; +import io.ray.runtime.generated.Common.Language; +import io.ray.runtime.object.NativeRayObject; +import io.ray.runtime.object.ObjectSerializer; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.ray.api.Ray; -import org.ray.api.RayObject; -import org.ray.api.id.ObjectId; -import org.ray.runtime.RayRuntimeInternal; -import org.ray.runtime.generated.Common.Language; -import org.ray.runtime.object.NativeRayObject; -import org.ray.runtime.object.ObjectSerializer; /** * Helper methods to convert arguments from/to objects. diff --git a/java/runtime/src/main/java/org/ray/runtime/task/FunctionArg.java b/java/runtime/src/main/java/io/ray/runtime/task/FunctionArg.java similarity index 91% rename from java/runtime/src/main/java/org/ray/runtime/task/FunctionArg.java rename to java/runtime/src/main/java/io/ray/runtime/task/FunctionArg.java index b397d9362..941863082 100644 --- a/java/runtime/src/main/java/org/ray/runtime/task/FunctionArg.java +++ b/java/runtime/src/main/java/io/ray/runtime/task/FunctionArg.java @@ -1,8 +1,8 @@ -package org.ray.runtime.task; +package io.ray.runtime.task; import com.google.common.base.Preconditions; -import org.ray.api.id.ObjectId; -import org.ray.runtime.object.NativeRayObject; +import io.ray.api.id.ObjectId; +import io.ray.runtime.object.NativeRayObject; /** * Represents a function argument in task spec. diff --git a/java/runtime/src/main/java/org/ray/runtime/task/LocalModeTaskExecutor.java b/java/runtime/src/main/java/io/ray/runtime/task/LocalModeTaskExecutor.java similarity index 73% rename from java/runtime/src/main/java/org/ray/runtime/task/LocalModeTaskExecutor.java rename to java/runtime/src/main/java/io/ray/runtime/task/LocalModeTaskExecutor.java index 9486e6168..b45c8a9db 100644 --- a/java/runtime/src/main/java/org/ray/runtime/task/LocalModeTaskExecutor.java +++ b/java/runtime/src/main/java/io/ray/runtime/task/LocalModeTaskExecutor.java @@ -1,14 +1,13 @@ -package org.ray.runtime.task; +package io.ray.runtime.task; -import org.ray.api.id.ActorId; -import org.ray.api.id.UniqueId; -import org.ray.runtime.RayRuntimeInternal; -import org.ray.runtime.task.LocalModeTaskExecutor.LocalActorContext; +import io.ray.api.id.ActorId; +import io.ray.api.id.UniqueId; +import io.ray.runtime.RayRuntimeInternal; /** * Task executor for local mode. */ -public class LocalModeTaskExecutor extends TaskExecutor { +public class LocalModeTaskExecutor extends TaskExecutor { static class LocalActorContext extends TaskExecutor.ActorContext { diff --git a/java/runtime/src/main/java/org/ray/runtime/task/LocalModeTaskSubmitter.java b/java/runtime/src/main/java/io/ray/runtime/task/LocalModeTaskSubmitter.java similarity index 89% rename from java/runtime/src/main/java/org/ray/runtime/task/LocalModeTaskSubmitter.java rename to java/runtime/src/main/java/io/ray/runtime/task/LocalModeTaskSubmitter.java index 181ef59cc..e3987f207 100644 --- a/java/runtime/src/main/java/org/ray/runtime/task/LocalModeTaskSubmitter.java +++ b/java/runtime/src/main/java/io/ray/runtime/task/LocalModeTaskSubmitter.java @@ -1,8 +1,29 @@ -package org.ray.runtime.task; +package io.ray.runtime.task; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.protobuf.ByteString; +import io.ray.api.BaseActor; +import io.ray.api.id.ActorId; +import io.ray.api.id.ObjectId; +import io.ray.api.id.TaskId; +import io.ray.api.id.UniqueId; +import io.ray.api.options.ActorCreationOptions; +import io.ray.api.options.CallOptions; +import io.ray.runtime.RayRuntimeInternal; +import io.ray.runtime.actor.LocalModeRayActor; +import io.ray.runtime.context.LocalModeWorkerContext; +import io.ray.runtime.functionmanager.FunctionDescriptor; +import io.ray.runtime.functionmanager.JavaFunctionDescriptor; +import io.ray.runtime.generated.Common; +import io.ray.runtime.generated.Common.ActorCreationTaskSpec; +import io.ray.runtime.generated.Common.ActorTaskSpec; +import io.ray.runtime.generated.Common.Language; +import io.ray.runtime.generated.Common.TaskArg; +import io.ray.runtime.generated.Common.TaskSpec; +import io.ray.runtime.generated.Common.TaskType; +import io.ray.runtime.object.LocalModeObjectStore; +import io.ray.runtime.object.NativeRayObject; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Collections; @@ -16,28 +37,6 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.stream.Collectors; -import org.ray.api.BaseActor; -import org.ray.api.id.ActorId; -import org.ray.api.id.ObjectId; -import org.ray.api.id.TaskId; -import org.ray.api.id.UniqueId; -import org.ray.api.options.ActorCreationOptions; -import org.ray.api.options.CallOptions; -import org.ray.runtime.RayRuntimeInternal; -import org.ray.runtime.actor.LocalModeRayActor; -import org.ray.runtime.context.LocalModeWorkerContext; -import org.ray.runtime.functionmanager.FunctionDescriptor; -import org.ray.runtime.functionmanager.JavaFunctionDescriptor; -import org.ray.runtime.generated.Common; -import org.ray.runtime.generated.Common.ActorCreationTaskSpec; -import org.ray.runtime.generated.Common.ActorTaskSpec; -import org.ray.runtime.generated.Common.Language; -import org.ray.runtime.generated.Common.TaskArg; -import org.ray.runtime.generated.Common.TaskSpec; -import org.ray.runtime.generated.Common.TaskType; -import org.ray.runtime.object.LocalModeObjectStore; -import org.ray.runtime.object.NativeRayObject; -import org.ray.runtime.task.TaskExecutor.ActorContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -61,7 +60,7 @@ public class LocalModeTaskSubmitter implements TaskSubmitter { private final ExecutorService normalTaskExecutorService; - private final Map actorContexts = new ConcurrentHashMap<>(); + private final Map actorContexts = new ConcurrentHashMap<>(); public LocalModeTaskSubmitter(RayRuntimeInternal runtime, TaskExecutor taskExecutor, LocalModeObjectStore objectStore) { @@ -123,9 +122,9 @@ public class LocalModeTaskSubmitter implements TaskSubmitter { .setJobId( ByteString.copyFrom(runtime.getRayConfig().getJobId().getBytes())) .setTaskId(ByteString.copyFrom(taskIdBytes)) - .setFunctionDescriptor(org.ray.runtime.generated.Common.FunctionDescriptor.newBuilder() + .setFunctionDescriptor(Common.FunctionDescriptor.newBuilder() .setJavaFunctionDescriptor( - org.ray.runtime.generated.Common.JavaFunctionDescriptor.newBuilder() + Common.JavaFunctionDescriptor.newBuilder() .setClassName(functionDescriptorList.get(0)) .setFunctionName(functionDescriptorList.get(1)) .setSignature(functionDescriptorList.get(2)))) @@ -254,7 +253,7 @@ public class LocalModeTaskSubmitter implements TaskSubmitter { } private void executeTask(TaskSpec taskSpec) { - ActorContext actorContext = null; + TaskExecutor.ActorContext actorContext = null; if (taskSpec.getType() == TaskType.ACTOR_TASK) { actorContext = actorContexts.get(getActorId(taskSpec)); Preconditions.checkNotNull(actorContext); @@ -300,7 +299,7 @@ public class LocalModeTaskSubmitter implements TaskSubmitter { } private static JavaFunctionDescriptor getJavaFunctionDescriptor(TaskSpec taskSpec) { - org.ray.runtime.generated.Common.FunctionDescriptor functionDescriptor = + Common.FunctionDescriptor functionDescriptor = taskSpec.getFunctionDescriptor(); if (functionDescriptor.getFunctionDescriptorCase() == Common.FunctionDescriptor.FunctionDescriptorCase.JAVA_FUNCTION_DESCRIPTOR) { diff --git a/java/runtime/src/main/java/org/ray/runtime/task/NativeTaskExecutor.java b/java/runtime/src/main/java/io/ray/runtime/task/NativeTaskExecutor.java similarity index 88% rename from java/runtime/src/main/java/org/ray/runtime/task/NativeTaskExecutor.java rename to java/runtime/src/main/java/io/ray/runtime/task/NativeTaskExecutor.java index 2f6a7579e..808465a80 100644 --- a/java/runtime/src/main/java/org/ray/runtime/task/NativeTaskExecutor.java +++ b/java/runtime/src/main/java/io/ray/runtime/task/NativeTaskExecutor.java @@ -1,20 +1,19 @@ -package org.ray.runtime.task; +package io.ray.runtime.task; import com.google.common.base.Preconditions; +import io.ray.api.Checkpointable; +import io.ray.api.Checkpointable.Checkpoint; +import io.ray.api.Checkpointable.CheckpointContext; +import io.ray.api.id.ActorId; +import io.ray.api.id.UniqueId; +import io.ray.runtime.RayRuntimeInternal; import java.util.ArrayList; import java.util.List; -import org.ray.api.Checkpointable; -import org.ray.api.Checkpointable.Checkpoint; -import org.ray.api.Checkpointable.CheckpointContext; -import org.ray.api.id.ActorId; -import org.ray.api.id.UniqueId; -import org.ray.runtime.RayRuntimeInternal; -import org.ray.runtime.task.NativeTaskExecutor.NativeActorContext; /** * Task executor for cluster mode. */ -public class NativeTaskExecutor extends TaskExecutor { +public class NativeTaskExecutor extends TaskExecutor { // TODO(hchen): Use the C++ config. private static final int NUM_ACTOR_CHECKPOINTS_TO_KEEP = 20; diff --git a/java/runtime/src/main/java/org/ray/runtime/task/NativeTaskSubmitter.java b/java/runtime/src/main/java/io/ray/runtime/task/NativeTaskSubmitter.java similarity index 87% rename from java/runtime/src/main/java/org/ray/runtime/task/NativeTaskSubmitter.java rename to java/runtime/src/main/java/io/ray/runtime/task/NativeTaskSubmitter.java index f0dacf209..21324e4bd 100644 --- a/java/runtime/src/main/java/org/ray/runtime/task/NativeTaskSubmitter.java +++ b/java/runtime/src/main/java/io/ray/runtime/task/NativeTaskSubmitter.java @@ -1,14 +1,14 @@ -package org.ray.runtime.task; +package io.ray.runtime.task; import com.google.common.base.Preconditions; +import io.ray.api.BaseActor; +import io.ray.api.id.ObjectId; +import io.ray.api.options.ActorCreationOptions; +import io.ray.api.options.CallOptions; +import io.ray.runtime.actor.NativeRayActor; +import io.ray.runtime.functionmanager.FunctionDescriptor; import java.util.List; import java.util.stream.Collectors; -import org.ray.api.BaseActor; -import org.ray.api.id.ObjectId; -import org.ray.api.options.ActorCreationOptions; -import org.ray.api.options.CallOptions; -import org.ray.runtime.actor.NativeRayActor; -import org.ray.runtime.functionmanager.FunctionDescriptor; /** * Task submitter for cluster mode. This is a wrapper class for core worker task interface. diff --git a/java/runtime/src/main/java/org/ray/runtime/task/TaskExecutor.java b/java/runtime/src/main/java/io/ray/runtime/task/TaskExecutor.java similarity index 89% rename from java/runtime/src/main/java/org/ray/runtime/task/TaskExecutor.java rename to java/runtime/src/main/java/io/ray/runtime/task/TaskExecutor.java index f89417869..7519ab753 100644 --- a/java/runtime/src/main/java/org/ray/runtime/task/TaskExecutor.java +++ b/java/runtime/src/main/java/io/ray/runtime/task/TaskExecutor.java @@ -1,30 +1,28 @@ -package org.ray.runtime.task; +package io.ray.runtime.task; import com.google.common.base.Preconditions; +import io.ray.api.exception.RayTaskException; +import io.ray.api.id.ActorId; +import io.ray.api.id.JobId; +import io.ray.api.id.TaskId; +import io.ray.api.id.UniqueId; +import io.ray.runtime.RayRuntimeInternal; +import io.ray.runtime.functionmanager.JavaFunctionDescriptor; +import io.ray.runtime.functionmanager.RayFunction; +import io.ray.runtime.generated.Common.TaskType; +import io.ray.runtime.object.NativeRayObject; +import io.ray.runtime.object.ObjectSerializer; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ConcurrentHashMap; - -import org.ray.api.exception.RayTaskException; -import org.ray.api.id.ActorId; -import org.ray.api.id.JobId; -import org.ray.api.id.TaskId; -import org.ray.api.id.UniqueId; -import org.ray.runtime.RayRuntimeInternal; -import org.ray.runtime.functionmanager.JavaFunctionDescriptor; -import org.ray.runtime.functionmanager.RayFunction; -import org.ray.runtime.generated.Common.TaskType; -import org.ray.runtime.object.NativeRayObject; -import org.ray.runtime.object.ObjectSerializer; -import org.ray.runtime.task.TaskExecutor.ActorContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * The task executor, which executes tasks assigned by raylet continuously. */ -public abstract class TaskExecutor { +public abstract class TaskExecutor { private static final Logger LOGGER = LoggerFactory.getLogger(TaskExecutor.class); diff --git a/java/runtime/src/main/java/org/ray/runtime/task/TaskSubmitter.java b/java/runtime/src/main/java/io/ray/runtime/task/TaskSubmitter.java similarity index 85% rename from java/runtime/src/main/java/org/ray/runtime/task/TaskSubmitter.java rename to java/runtime/src/main/java/io/ray/runtime/task/TaskSubmitter.java index 73ab9d8cb..eea5af048 100644 --- a/java/runtime/src/main/java/org/ray/runtime/task/TaskSubmitter.java +++ b/java/runtime/src/main/java/io/ray/runtime/task/TaskSubmitter.java @@ -1,11 +1,11 @@ -package org.ray.runtime.task; +package io.ray.runtime.task; +import io.ray.api.BaseActor; +import io.ray.api.id.ObjectId; +import io.ray.api.options.ActorCreationOptions; +import io.ray.api.options.CallOptions; +import io.ray.runtime.functionmanager.FunctionDescriptor; import java.util.List; -import org.ray.api.BaseActor; -import org.ray.api.id.ObjectId; -import org.ray.api.options.ActorCreationOptions; -import org.ray.api.options.CallOptions; -import org.ray.runtime.functionmanager.FunctionDescriptor; /** * A set of methods to submit tasks and create actors. diff --git a/java/runtime/src/main/java/org/ray/runtime/util/BinaryFileUtil.java b/java/runtime/src/main/java/io/ray/runtime/util/BinaryFileUtil.java similarity index 98% rename from java/runtime/src/main/java/org/ray/runtime/util/BinaryFileUtil.java rename to java/runtime/src/main/java/io/ray/runtime/util/BinaryFileUtil.java index df8cb8a6f..576694ac3 100644 --- a/java/runtime/src/main/java/org/ray/runtime/util/BinaryFileUtil.java +++ b/java/runtime/src/main/java/io/ray/runtime/util/BinaryFileUtil.java @@ -1,4 +1,4 @@ -package org.ray.runtime.util; +package io.ray.runtime.util; import com.google.common.base.Preconditions; import java.io.File; diff --git a/java/runtime/src/main/java/org/ray/runtime/util/IdUtil.java b/java/runtime/src/main/java/io/ray/runtime/util/IdUtil.java similarity index 96% rename from java/runtime/src/main/java/org/ray/runtime/util/IdUtil.java rename to java/runtime/src/main/java/io/ray/runtime/util/IdUtil.java index 925603bab..2dbe2e8b4 100644 --- a/java/runtime/src/main/java/org/ray/runtime/util/IdUtil.java +++ b/java/runtime/src/main/java/io/ray/runtime/util/IdUtil.java @@ -1,6 +1,6 @@ -package org.ray.runtime.util; +package io.ray.runtime.util; -import org.ray.api.id.BaseId; +import io.ray.api.id.BaseId; /** * Helper method for different Ids. Note: any changes to these methods must be synced with C++ diff --git a/java/runtime/src/main/java/org/ray/runtime/util/JniExceptionUtil.java b/java/runtime/src/main/java/io/ray/runtime/util/JniExceptionUtil.java similarity index 95% rename from java/runtime/src/main/java/org/ray/runtime/util/JniExceptionUtil.java rename to java/runtime/src/main/java/io/ray/runtime/util/JniExceptionUtil.java index bd58af6cc..7f3b727c9 100644 --- a/java/runtime/src/main/java/org/ray/runtime/util/JniExceptionUtil.java +++ b/java/runtime/src/main/java/io/ray/runtime/util/JniExceptionUtil.java @@ -1,4 +1,4 @@ -package org.ray.runtime.util; +package io.ray.runtime.util; import org.apache.commons.lang3.exception.ExceptionUtils; import org.slf4j.Logger; diff --git a/java/runtime/src/main/java/org/ray/runtime/util/JniUtils.java b/java/runtime/src/main/java/io/ray/runtime/util/JniUtils.java similarity index 97% rename from java/runtime/src/main/java/org/ray/runtime/util/JniUtils.java rename to java/runtime/src/main/java/io/ray/runtime/util/JniUtils.java index b281eb3c2..7318d0b4f 100644 --- a/java/runtime/src/main/java/org/ray/runtime/util/JniUtils.java +++ b/java/runtime/src/main/java/io/ray/runtime/util/JniUtils.java @@ -1,12 +1,12 @@ -package org.ray.runtime.util; +package io.ray.runtime.util; import com.google.common.base.Strings; import com.google.common.collect.Sets; import com.sun.jna.NativeLibrary; +import io.ray.runtime.config.RayConfig; import java.io.File; import java.lang.reflect.Field; import java.util.Set; -import org.ray.runtime.config.RayConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/java/runtime/src/main/java/org/ray/runtime/util/LambdaUtils.java b/java/runtime/src/main/java/io/ray/runtime/util/LambdaUtils.java similarity index 96% rename from java/runtime/src/main/java/org/ray/runtime/util/LambdaUtils.java rename to java/runtime/src/main/java/io/ray/runtime/util/LambdaUtils.java index e0b418217..9a8a3a901 100644 --- a/java/runtime/src/main/java/org/ray/runtime/util/LambdaUtils.java +++ b/java/runtime/src/main/java/io/ray/runtime/util/LambdaUtils.java @@ -1,4 +1,4 @@ -package org.ray.runtime.util; +package io.ray.runtime.util; import java.io.Serializable; import java.lang.invoke.SerializedLambda; diff --git a/java/runtime/src/main/java/org/ray/runtime/util/NetworkUtil.java b/java/runtime/src/main/java/io/ray/runtime/util/NetworkUtil.java similarity index 98% rename from java/runtime/src/main/java/org/ray/runtime/util/NetworkUtil.java rename to java/runtime/src/main/java/io/ray/runtime/util/NetworkUtil.java index 8d3f1af88..56b047982 100644 --- a/java/runtime/src/main/java/org/ray/runtime/util/NetworkUtil.java +++ b/java/runtime/src/main/java/io/ray/runtime/util/NetworkUtil.java @@ -1,4 +1,4 @@ -package org.ray.runtime.util; +package io.ray.runtime.util; import com.google.common.base.Strings; import java.io.IOException; diff --git a/java/runtime/src/main/java/org/ray/runtime/util/ResourceUtil.java b/java/runtime/src/main/java/io/ray/runtime/util/ResourceUtil.java similarity index 98% rename from java/runtime/src/main/java/org/ray/runtime/util/ResourceUtil.java rename to java/runtime/src/main/java/io/ray/runtime/util/ResourceUtil.java index 4863ca5d1..3b32bef66 100644 --- a/java/runtime/src/main/java/org/ray/runtime/util/ResourceUtil.java +++ b/java/runtime/src/main/java/io/ray/runtime/util/ResourceUtil.java @@ -1,4 +1,4 @@ -package org.ray.runtime.util; +package io.ray.runtime.util; import java.util.HashMap; import java.util.Map; diff --git a/java/runtime/src/test/java/org/ray/runtime/util/SerializerTest.java b/java/runtime/src/main/java/io/ray/runtime/util/SerializerTest.java similarity index 93% rename from java/runtime/src/test/java/org/ray/runtime/util/SerializerTest.java rename to java/runtime/src/main/java/io/ray/runtime/util/SerializerTest.java index 5621e424e..c85528278 100644 --- a/java/runtime/src/test/java/org/ray/runtime/util/SerializerTest.java +++ b/java/runtime/src/main/java/io/ray/runtime/util/SerializerTest.java @@ -1,13 +1,11 @@ -package org.ray.runtime.util; +package io.ray.runtime.util; -import org.apache.commons.lang3.mutable.MutableBoolean; +import io.ray.runtime.serializer.Serializer; +import java.util.ArrayList; import org.apache.commons.lang3.tuple.Pair; -import org.ray.runtime.serializer.Serializer; import org.testng.Assert; import org.testng.annotations.Test; -import java.util.ArrayList; - public class SerializerTest { @Test diff --git a/java/runtime/src/main/java/org/ray/runtime/util/SystemUtil.java b/java/runtime/src/main/java/io/ray/runtime/util/SystemUtil.java similarity index 98% rename from java/runtime/src/main/java/org/ray/runtime/util/SystemUtil.java rename to java/runtime/src/main/java/io/ray/runtime/util/SystemUtil.java index 3234cd055..f3aacdf60 100644 --- a/java/runtime/src/main/java/org/ray/runtime/util/SystemUtil.java +++ b/java/runtime/src/main/java/io/ray/runtime/util/SystemUtil.java @@ -1,4 +1,4 @@ -package org.ray.runtime.util; +package io.ray.runtime.util; import java.lang.management.ManagementFactory; import java.lang.management.RuntimeMXBean; diff --git a/java/runtime/src/main/java/org/ray/runtime/util/generator/BaseGenerator.java b/java/runtime/src/main/java/io/ray/runtime/util/generator/BaseGenerator.java similarity index 91% rename from java/runtime/src/main/java/org/ray/runtime/util/generator/BaseGenerator.java rename to java/runtime/src/main/java/io/ray/runtime/util/generator/BaseGenerator.java index 3d5bcb892..24a055175 100644 --- a/java/runtime/src/main/java/org/ray/runtime/util/generator/BaseGenerator.java +++ b/java/runtime/src/main/java/io/ray/runtime/util/generator/BaseGenerator.java @@ -1,4 +1,4 @@ -package org.ray.runtime.util.generator; +package io.ray.runtime.util.generator; public abstract class BaseGenerator { diff --git a/java/runtime/src/main/java/org/ray/runtime/util/generator/RayCallGenerator.java b/java/runtime/src/main/java/io/ray/runtime/util/generator/RayCallGenerator.java similarity index 92% rename from java/runtime/src/main/java/org/ray/runtime/util/generator/RayCallGenerator.java rename to java/runtime/src/main/java/io/ray/runtime/util/generator/RayCallGenerator.java index e85604b54..99c847a4b 100644 --- a/java/runtime/src/main/java/org/ray/runtime/util/generator/RayCallGenerator.java +++ b/java/runtime/src/main/java/io/ray/runtime/util/generator/RayCallGenerator.java @@ -1,4 +1,4 @@ -package org.ray.runtime.util.generator; +package io.ray.runtime.util.generator; import java.io.File; import java.io.IOException; @@ -21,18 +21,18 @@ public class RayCallGenerator extends BaseGenerator { newLine("// Generated by `RayCallGenerator.java`. DO NOT EDIT."); newLine(""); - newLine("package org.ray.api;"); + newLine("package io.ray.api;"); newLine(""); - newLine("import org.ray.api.function.PyActorClass;"); - newLine("import org.ray.api.function.PyRemoteFunction;"); + newLine("import io.ray.api.function.PyActorClass;"); + newLine("import io.ray.api.function.PyRemoteFunction;"); for (int i = 0; i <= MAX_PARAMETERS; i++) { - newLine("import org.ray.api.function.RayFunc" + i + ";"); + newLine("import io.ray.api.function.RayFunc" + i + ";"); } for (int i = 0; i <= MAX_PARAMETERS; i++) { - newLine("import org.ray.api.function.RayFuncVoid" + i + ";"); + newLine("import io.ray.api.function.RayFuncVoid" + i + ";"); } - newLine("import org.ray.api.options.ActorCreationOptions;"); - newLine("import org.ray.api.options.CallOptions;"); + newLine("import io.ray.api.options.ActorCreationOptions;"); + newLine("import io.ray.api.options.CallOptions;"); newLine(""); newLine("/**"); @@ -81,13 +81,13 @@ public class RayCallGenerator extends BaseGenerator { newLine("// Generated by `RayCallGenerator.java`. DO NOT EDIT."); newLine(""); - newLine("package org.ray.api;"); + newLine("package io.ray.api;"); newLine(""); for (int i = 1; i <= MAX_PARAMETERS; i++) { - newLine("import org.ray.api.function.RayFunc" + i + ";"); + newLine("import io.ray.api.function.RayFunc" + i + ";"); } for (int i = 1; i <= MAX_PARAMETERS; i++) { - newLine("import org.ray.api.function.RayFuncVoid" + i + ";"); + newLine("import io.ray.api.function.RayFuncVoid" + i + ";"); } newLine(""); newLine("/**"); @@ -112,9 +112,9 @@ public class RayCallGenerator extends BaseGenerator { newLine("// Generated by `RayCallGenerator.java`. DO NOT EDIT."); newLine(""); - newLine("package org.ray.api;"); + newLine("package io.ray.api;"); newLine(""); - newLine("import org.ray.api.function.PyActorMethod;"); + newLine("import io.ray.api.function.PyActorMethod;"); newLine(""); newLine("/**"); newLine(" * This class provides type-safe interfaces for remote actor calls."); @@ -339,15 +339,15 @@ public class RayCallGenerator extends BaseGenerator { public static void main(String[] args) throws IOException { String path = System.getProperty("user.dir") - + "/api/src/main/java/org/ray/api/RayCall.java"; + + "/api/src/main/java/io.ray/api/RayCall.java"; FileUtils.write(new File(path), new RayCallGenerator().generateRayCallDotJava(), Charset.defaultCharset()); path = System.getProperty("user.dir") - + "/api/src/main/java/org/ray/api/ActorCall.java"; + + "/api/src/main/java/io.ray/api/ActorCall.java"; FileUtils.write(new File(path), new RayCallGenerator().generateActorCallDotJava(), Charset.defaultCharset()); path = System.getProperty("user.dir") - + "/api/src/main/java/org/ray/api/PyActorCall.java"; + + "/api/src/main/java/io.ray/api/PyActorCall.java"; FileUtils.write(new File(path), new RayCallGenerator().generatePyActorCallDotJava(), Charset.defaultCharset()); } diff --git a/java/runtime/src/main/java/org/ray/runtime/util/generator/RayFuncGenerator.java b/java/runtime/src/main/java/io/ray/runtime/util/generator/RayFuncGenerator.java similarity index 90% rename from java/runtime/src/main/java/org/ray/runtime/util/generator/RayFuncGenerator.java rename to java/runtime/src/main/java/io/ray/runtime/util/generator/RayFuncGenerator.java index c272de04f..12b1f6433 100644 --- a/java/runtime/src/main/java/org/ray/runtime/util/generator/RayFuncGenerator.java +++ b/java/runtime/src/main/java/io/ray/runtime/util/generator/RayFuncGenerator.java @@ -1,4 +1,4 @@ -package org.ray.runtime.util.generator; +package io.ray.runtime.util.generator; import java.io.File; import java.io.IOException; @@ -6,7 +6,7 @@ import java.nio.charset.Charset; import org.apache.commons.io.FileUtils; /** - * A util class that generates all the RayFuncX classes under org.ray.api.function package. + * A util class that generates all the RayFuncX classes under io.ray.api.function package. */ public class RayFuncGenerator extends BaseGenerator { @@ -33,7 +33,7 @@ public class RayFuncGenerator extends BaseGenerator { newLine("// generated automatically, do not modify."); newLine(""); - newLine("package org.ray.api.function;"); + newLine("package io.ray.api.function;"); newLine(""); newLine("/**"); String comment = String.format( @@ -55,7 +55,7 @@ public class RayFuncGenerator extends BaseGenerator { public static void main(String[] args) throws IOException { String root = System.getProperty("user.dir") - + "/api/src/main/java/org/ray/api/function/"; + + "/api/src/main/java/io/ray/api/function/"; RayFuncGenerator generator = new RayFuncGenerator(); for (int i = 0; i <= MAX_PARAMETERS; i++) { // Functions that have return. diff --git a/java/runtime/src/test/java/org/ray/runtime/functionmanager/FunctionManagerTest.java b/java/runtime/src/test/java/io/ray/runtime/functionmanager/FunctionManagerTest.java similarity index 96% rename from java/runtime/src/test/java/org/ray/runtime/functionmanager/FunctionManagerTest.java rename to java/runtime/src/test/java/io/ray/runtime/functionmanager/FunctionManagerTest.java index 5c2570af2..20d60a486 100644 --- a/java/runtime/src/test/java/org/ray/runtime/functionmanager/FunctionManagerTest.java +++ b/java/runtime/src/test/java/io/ray/runtime/functionmanager/FunctionManagerTest.java @@ -1,5 +1,9 @@ -package org.ray.runtime.functionmanager; +package io.ray.runtime.functionmanager; +import io.ray.api.function.RayFunc0; +import io.ray.api.function.RayFunc1; +import io.ray.api.id.JobId; +import io.ray.runtime.functionmanager.FunctionManager.JobFunctionTable; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; @@ -9,10 +13,6 @@ import javax.tools.ToolProvider; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; -import org.ray.api.function.RayFunc0; -import org.ray.api.function.RayFunc1; -import org.ray.api.id.JobId; -import org.ray.runtime.functionmanager.FunctionManager.JobFunctionTable; import org.testng.Assert; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/java/test/pom.xml b/java/test/pom.xml index 48075ba8c..10346caf7 100644 --- a/java/test/pom.xml +++ b/java/test/pom.xml @@ -4,7 +4,7 @@ xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - org.ray + io.ray ray-superpom 0.1-SNAPSHOT @@ -18,12 +18,12 @@ - org.ray + io.ray ray-api ${project.version} - org.ray + io.ray ray-runtime ${project.version} diff --git a/java/test/pom_template.xml b/java/test/pom_template.xml index 9b8b3684f..64ac02b2c 100644 --- a/java/test/pom_template.xml +++ b/java/test/pom_template.xml @@ -4,7 +4,7 @@ xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - org.ray + io.ray ray-superpom 0.1-SNAPSHOT @@ -18,12 +18,12 @@ - org.ray + io.ray ray-api ${project.version} - org.ray + io.ray ray-runtime ${project.version} diff --git a/java/test/src/main/java/org/ray/api/TestProgressListener.java b/java/test/src/main/java/io/ray/api/TestProgressListener.java similarity index 98% rename from java/test/src/main/java/org/ray/api/TestProgressListener.java rename to java/test/src/main/java/io/ray/api/TestProgressListener.java index bc3de3953..b41549a4b 100644 --- a/java/test/src/main/java/org/ray/api/TestProgressListener.java +++ b/java/test/src/main/java/io/ray/api/TestProgressListener.java @@ -1,4 +1,4 @@ -package org.ray.api; +package io.ray.api; import java.time.LocalDateTime; import org.testng.IInvokedMethod; diff --git a/java/test/src/main/java/org/ray/api/TestUtils.java b/java/test/src/main/java/io/ray/api/TestUtils.java similarity index 94% rename from java/test/src/main/java/org/ray/api/TestUtils.java rename to java/test/src/main/java/io/ray/api/TestUtils.java index 4a8912f89..54b4cb3fe 100644 --- a/java/test/src/main/java/org/ray/api/TestUtils.java +++ b/java/test/src/main/java/io/ray/api/TestUtils.java @@ -1,10 +1,10 @@ -package org.ray.api; +package io.ray.api; +import io.ray.runtime.RayRuntimeInternal; +import io.ray.runtime.RayRuntimeProxy; +import io.ray.runtime.config.RunMode; import java.io.Serializable; import java.util.function.Supplier; -import org.ray.runtime.RayRuntimeInternal; -import org.ray.runtime.RayRuntimeProxy; -import org.ray.runtime.config.RunMode; import org.testng.Assert; import org.testng.SkipException; diff --git a/java/test/src/main/java/org/ray/api/benchmark/ActorPressTest.java b/java/test/src/main/java/io/ray/api/benchmark/ActorPressTest.java similarity index 90% rename from java/test/src/main/java/org/ray/api/benchmark/ActorPressTest.java rename to java/test/src/main/java/io/ray/api/benchmark/ActorPressTest.java index 07406ac5e..918508e55 100644 --- a/java/test/src/main/java/org/ray/api/benchmark/ActorPressTest.java +++ b/java/test/src/main/java/io/ray/api/benchmark/ActorPressTest.java @@ -1,8 +1,8 @@ -package org.ray.api.benchmark; +package io.ray.api.benchmark; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.RayObject; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.RayObject; import org.testng.annotations.Test; public class ActorPressTest extends RayBenchmarkTest { @@ -10,7 +10,7 @@ public class ActorPressTest extends RayBenchmarkTest { @Test public void singleLatencyTest() { int times = 10; - RayActor adder = Ray.createActor(ActorPressTest.Adder::new); + RayActor adder = Ray.createActor(ActorPressTest.Adder::new); super.singleLatencyTest(times, adder); } diff --git a/java/test/src/main/java/org/ray/api/benchmark/MaxPressureTest.java b/java/test/src/main/java/io/ray/api/benchmark/MaxPressureTest.java similarity index 89% rename from java/test/src/main/java/org/ray/api/benchmark/MaxPressureTest.java rename to java/test/src/main/java/io/ray/api/benchmark/MaxPressureTest.java index 086ace87d..fb68a2385 100644 --- a/java/test/src/main/java/org/ray/api/benchmark/MaxPressureTest.java +++ b/java/test/src/main/java/io/ray/api/benchmark/MaxPressureTest.java @@ -1,8 +1,8 @@ -package org.ray.api.benchmark; +package io.ray.api.benchmark; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.RayObject; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.RayObject; import org.testng.annotations.Test; public class MaxPressureTest extends RayBenchmarkTest { diff --git a/java/test/src/main/java/org/ray/api/benchmark/MicroBenchmarks.java b/java/test/src/main/java/io/ray/api/benchmark/MicroBenchmarks.java similarity index 96% rename from java/test/src/main/java/org/ray/api/benchmark/MicroBenchmarks.java rename to java/test/src/main/java/io/ray/api/benchmark/MicroBenchmarks.java index 7e94f4453..1be40a50b 100644 --- a/java/test/src/main/java/org/ray/api/benchmark/MicroBenchmarks.java +++ b/java/test/src/main/java/io/ray/api/benchmark/MicroBenchmarks.java @@ -1,6 +1,6 @@ -package org.ray.api.benchmark; +package io.ray.api.benchmark; -import org.ray.api.Ray; +import io.ray.api.Ray; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/java/test/src/main/java/org/ray/api/benchmark/PressureTestParameter.java b/java/test/src/main/java/io/ray/api/benchmark/PressureTestParameter.java similarity index 96% rename from java/test/src/main/java/org/ray/api/benchmark/PressureTestParameter.java rename to java/test/src/main/java/io/ray/api/benchmark/PressureTestParameter.java index b5c533b30..7655c1709 100644 --- a/java/test/src/main/java/org/ray/api/benchmark/PressureTestParameter.java +++ b/java/test/src/main/java/io/ray/api/benchmark/PressureTestParameter.java @@ -1,7 +1,7 @@ -package org.ray.api.benchmark; +package io.ray.api.benchmark; +import io.ray.api.RayActor; import java.io.Serializable; -import org.ray.api.RayActor; public class PressureTestParameter implements Serializable { diff --git a/java/test/src/main/java/org/ray/api/benchmark/PressureTestType.java b/java/test/src/main/java/io/ray/api/benchmark/PressureTestType.java similarity index 70% rename from java/test/src/main/java/org/ray/api/benchmark/PressureTestType.java rename to java/test/src/main/java/io/ray/api/benchmark/PressureTestType.java index 91c2291b0..4a47c737e 100644 --- a/java/test/src/main/java/org/ray/api/benchmark/PressureTestType.java +++ b/java/test/src/main/java/io/ray/api/benchmark/PressureTestType.java @@ -1,4 +1,4 @@ -package org.ray.api.benchmark; +package io.ray.api.benchmark; public enum PressureTestType { diff --git a/java/test/src/main/java/org/ray/api/benchmark/RateLimiterPressureTest.java b/java/test/src/main/java/io/ray/api/benchmark/RateLimiterPressureTest.java similarity index 90% rename from java/test/src/main/java/org/ray/api/benchmark/RateLimiterPressureTest.java rename to java/test/src/main/java/io/ray/api/benchmark/RateLimiterPressureTest.java index c860644ac..0e38d6161 100644 --- a/java/test/src/main/java/org/ray/api/benchmark/RateLimiterPressureTest.java +++ b/java/test/src/main/java/io/ray/api/benchmark/RateLimiterPressureTest.java @@ -1,8 +1,8 @@ -package org.ray.api.benchmark; +package io.ray.api.benchmark; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.RayObject; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.RayObject; import org.testng.annotations.Test; public class RateLimiterPressureTest extends RayBenchmarkTest { diff --git a/java/test/src/main/java/org/ray/api/benchmark/RayBenchmarkTest.java b/java/test/src/main/java/io/ray/api/benchmark/RayBenchmarkTest.java similarity index 96% rename from java/test/src/main/java/org/ray/api/benchmark/RayBenchmarkTest.java rename to java/test/src/main/java/io/ray/api/benchmark/RayBenchmarkTest.java index d14219d09..7f12f375c 100644 --- a/java/test/src/main/java/org/ray/api/benchmark/RayBenchmarkTest.java +++ b/java/test/src/main/java/io/ray/api/benchmark/RayBenchmarkTest.java @@ -1,16 +1,16 @@ -package org.ray.api.benchmark; +package io.ray.api.benchmark; import com.google.common.util.concurrent.RateLimiter; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.RayObject; +import io.ray.api.function.RayFunc1; +import io.ray.api.test.BaseTest; import java.io.Serializable; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.RayObject; -import org.ray.api.function.RayFunc1; -import org.ray.api.test.BaseTest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; diff --git a/java/test/src/main/java/org/ray/api/benchmark/RemoteResult.java b/java/test/src/main/java/io/ray/api/benchmark/RemoteResult.java similarity index 93% rename from java/test/src/main/java/org/ray/api/benchmark/RemoteResult.java rename to java/test/src/main/java/io/ray/api/benchmark/RemoteResult.java index 3c319af65..deea5326b 100644 --- a/java/test/src/main/java/org/ray/api/benchmark/RemoteResult.java +++ b/java/test/src/main/java/io/ray/api/benchmark/RemoteResult.java @@ -1,4 +1,4 @@ -package org.ray.api.benchmark; +package io.ray.api.benchmark; import java.io.Serializable; diff --git a/java/test/src/main/java/org/ray/api/benchmark/RemoteResultWrapper.java b/java/test/src/main/java/io/ray/api/benchmark/RemoteResultWrapper.java similarity index 87% rename from java/test/src/main/java/org/ray/api/benchmark/RemoteResultWrapper.java rename to java/test/src/main/java/io/ray/api/benchmark/RemoteResultWrapper.java index bbd37c1c3..a69179e1c 100644 --- a/java/test/src/main/java/org/ray/api/benchmark/RemoteResultWrapper.java +++ b/java/test/src/main/java/io/ray/api/benchmark/RemoteResultWrapper.java @@ -1,6 +1,6 @@ -package org.ray.api.benchmark; +package io.ray.api.benchmark; -import org.ray.api.RayObject; +import io.ray.api.RayObject; public class RemoteResultWrapper { diff --git a/java/test/src/main/java/org/ray/api/benchmark/SingleLatencyTest.java b/java/test/src/main/java/io/ray/api/benchmark/SingleLatencyTest.java similarity index 85% rename from java/test/src/main/java/org/ray/api/benchmark/SingleLatencyTest.java rename to java/test/src/main/java/io/ray/api/benchmark/SingleLatencyTest.java index cb392b1f9..89921a717 100644 --- a/java/test/src/main/java/org/ray/api/benchmark/SingleLatencyTest.java +++ b/java/test/src/main/java/io/ray/api/benchmark/SingleLatencyTest.java @@ -1,8 +1,8 @@ -package org.ray.api.benchmark; +package io.ray.api.benchmark; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.RayObject; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.RayObject; import org.testng.annotations.Test; public class SingleLatencyTest extends RayBenchmarkTest { diff --git a/java/test/src/main/java/org/ray/api/test/ActorConcurrentCallTest.java b/java/test/src/main/java/io/ray/api/test/ActorConcurrentCallTest.java similarity index 87% rename from java/test/src/main/java/org/ray/api/test/ActorConcurrentCallTest.java rename to java/test/src/main/java/io/ray/api/test/ActorConcurrentCallTest.java index c6a3ee343..ac4d0fe28 100644 --- a/java/test/src/main/java/org/ray/api/test/ActorConcurrentCallTest.java +++ b/java/test/src/main/java/io/ray/api/test/ActorConcurrentCallTest.java @@ -1,13 +1,13 @@ -package org.ray.api.test; +package io.ray.api.test; import com.google.common.collect.ImmutableList; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.RayObject; +import io.ray.api.TestUtils; +import io.ray.api.options.ActorCreationOptions; import java.util.List; import java.util.concurrent.CountDownLatch; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.RayObject; -import org.ray.api.TestUtils; -import org.ray.api.options.ActorCreationOptions; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/java/test/src/main/java/org/ray/api/test/ActorReconstructionTest.java b/java/test/src/main/java/io/ray/api/test/ActorReconstructionTest.java similarity index 92% rename from java/test/src/main/java/org/ray/api/test/ActorReconstructionTest.java rename to java/test/src/main/java/io/ray/api/test/ActorReconstructionTest.java index 1cea5b5f4..b15bbea69 100644 --- a/java/test/src/main/java/org/ray/api/test/ActorReconstructionTest.java +++ b/java/test/src/main/java/io/ray/api/test/ActorReconstructionTest.java @@ -1,18 +1,17 @@ -package org.ray.api.test; - -import static org.ray.runtime.util.SystemUtil.pid; +package io.ray.api.test; +import io.ray.api.Checkpointable; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.TestUtils; +import io.ray.api.exception.RayActorException; +import io.ray.api.id.ActorId; +import io.ray.api.id.UniqueId; +import io.ray.api.options.ActorCreationOptions; +import io.ray.runtime.util.SystemUtil; import java.io.IOException; import java.util.List; import java.util.concurrent.TimeUnit; -import org.ray.api.Checkpointable; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.TestUtils; -import org.ray.api.exception.RayActorException; -import org.ray.api.id.ActorId; -import org.ray.api.id.UniqueId; -import org.ray.api.options.ActorCreationOptions; import org.testng.Assert; import org.testng.annotations.Test; @@ -39,7 +38,7 @@ public class ActorReconstructionTest extends BaseTest { } public int getPid() { - return pid(); + return SystemUtil.pid(); } } diff --git a/java/test/src/main/java/org/ray/api/test/ActorTest.java b/java/test/src/main/java/io/ray/api/test/ActorTest.java similarity index 91% rename from java/test/src/main/java/org/ray/api/test/ActorTest.java rename to java/test/src/main/java/io/ray/api/test/ActorTest.java index f7be4daa9..5d3926cdf 100644 --- a/java/test/src/main/java/org/ray/api/test/ActorTest.java +++ b/java/test/src/main/java/io/ray/api/test/ActorTest.java @@ -1,18 +1,17 @@ -package org.ray.api.test; +package io.ray.api.test; import com.google.common.collect.ImmutableList; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.RayObject; +import io.ray.api.RayPyActor; +import io.ray.api.TestUtils; +import io.ray.api.exception.UnreconstructableException; +import io.ray.api.id.ActorId; +import io.ray.api.id.UniqueId; import java.util.Collections; import java.util.List; import java.util.concurrent.TimeUnit; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.RayObject; -import org.ray.api.RayPyActor; -import org.ray.api.TestUtils; -import org.ray.api.TestUtils.LargeObject; -import org.ray.api.exception.UnreconstructableException; -import org.ray.api.id.ActorId; -import org.ray.api.id.UniqueId; import org.testng.Assert; import org.testng.annotations.Test; @@ -40,7 +39,7 @@ public class ActorTest extends BaseTest { return value; } - public int accessLargeObject(LargeObject largeObject) { + public int accessLargeObject(TestUtils.LargeObject largeObject) { value += largeObject.data.length; return value; } @@ -75,7 +74,7 @@ public class ActorTest extends BaseTest { public void testCallActorWithLargeObject() { RayActor actor = Ray.createActor(Counter::new, 1); - LargeObject largeObject = new LargeObject(); + TestUtils.LargeObject largeObject = new TestUtils.LargeObject(); Assert.assertEquals(Integer.valueOf(largeObject.data.length + 1), actor.call(Counter::accessLargeObject, largeObject).get()); } diff --git a/java/test/src/main/java/org/ray/api/test/BaseMultiLanguageTest.java b/java/test/src/main/java/io/ray/api/test/BaseMultiLanguageTest.java similarity index 97% rename from java/test/src/main/java/org/ray/api/test/BaseMultiLanguageTest.java rename to java/test/src/main/java/io/ray/api/test/BaseMultiLanguageTest.java index 015b5af4e..a830bc37d 100644 --- a/java/test/src/main/java/org/ray/api/test/BaseMultiLanguageTest.java +++ b/java/test/src/main/java/io/ray/api/test/BaseMultiLanguageTest.java @@ -1,8 +1,11 @@ -package org.ray.api.test; +package io.ray.api.test; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.gson.Gson; +import io.ray.api.Ray; +import io.ray.runtime.config.RayConfig; +import io.ray.runtime.util.NetworkUtil; import java.io.File; import java.lang.ProcessBuilder.Redirect; import java.util.List; @@ -11,9 +14,6 @@ import java.util.Map.Entry; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import java.util.stream.Stream; -import org.ray.api.Ray; -import org.ray.runtime.config.RayConfig; -import org.ray.runtime.util.NetworkUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; diff --git a/java/test/src/main/java/org/ray/api/test/BaseTest.java b/java/test/src/main/java/io/ray/api/test/BaseTest.java similarity index 96% rename from java/test/src/main/java/org/ray/api/test/BaseTest.java rename to java/test/src/main/java/io/ray/api/test/BaseTest.java index b14344e6c..64b3d87b8 100644 --- a/java/test/src/main/java/org/ray/api/test/BaseTest.java +++ b/java/test/src/main/java/io/ray/api/test/BaseTest.java @@ -1,10 +1,10 @@ -package org.ray.api.test; +package io.ray.api.test; import com.google.common.collect.ImmutableList; +import io.ray.api.Ray; import java.io.File; import java.lang.reflect.Method; import java.util.List; -import org.ray.api.Ray; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; diff --git a/java/test/src/main/java/org/ray/api/test/ClassLoaderTest.java b/java/test/src/main/java/io/ray/api/test/ClassLoaderTest.java similarity index 94% rename from java/test/src/main/java/org/ray/api/test/ClassLoaderTest.java rename to java/test/src/main/java/io/ray/api/test/ClassLoaderTest.java index 86060814d..e4580e6db 100644 --- a/java/test/src/main/java/org/ray/api/test/ClassLoaderTest.java +++ b/java/test/src/main/java/io/ray/api/test/ClassLoaderTest.java @@ -1,5 +1,14 @@ -package org.ray.api.test; +package io.ray.api.test; +import io.ray.api.BaseActor; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.RayObject; +import io.ray.api.TestUtils; +import io.ray.api.options.ActorCreationOptions; +import io.ray.runtime.AbstractRayRuntime; +import io.ray.runtime.functionmanager.FunctionDescriptor; +import io.ray.runtime.functionmanager.JavaFunctionDescriptor; import java.io.File; import java.lang.reflect.Method; import java.nio.file.Files; @@ -8,15 +17,6 @@ import java.util.Optional; import javax.tools.JavaCompiler; import javax.tools.ToolProvider; import org.apache.commons.io.FileUtils; -import org.ray.api.BaseActor; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.RayObject; -import org.ray.api.TestUtils; -import org.ray.api.options.ActorCreationOptions; -import org.ray.runtime.AbstractRayRuntime; -import org.ray.runtime.functionmanager.FunctionDescriptor; -import org.ray.runtime.functionmanager.JavaFunctionDescriptor; import org.testng.Assert; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; diff --git a/java/test/src/main/java/org/ray/api/test/ClientExceptionTest.java b/java/test/src/main/java/io/ray/api/test/ClientExceptionTest.java similarity index 82% rename from java/test/src/main/java/org/ray/api/test/ClientExceptionTest.java rename to java/test/src/main/java/io/ray/api/test/ClientExceptionTest.java index 6ce153ed5..9641c21e4 100644 --- a/java/test/src/main/java/org/ray/api/test/ClientExceptionTest.java +++ b/java/test/src/main/java/io/ray/api/test/ClientExceptionTest.java @@ -1,15 +1,15 @@ -package org.ray.api.test; +package io.ray.api.test; import com.google.common.collect.ImmutableList; +import io.ray.api.Ray; +import io.ray.api.RayObject; +import io.ray.api.TestUtils; +import io.ray.api.exception.RayException; +import io.ray.api.id.ObjectId; +import io.ray.runtime.RayNativeRuntime; +import io.ray.runtime.object.RayObjectImpl; +import io.ray.runtime.runner.RunManager; import java.util.concurrent.TimeUnit; -import org.ray.api.Ray; -import org.ray.api.RayObject; -import org.ray.api.TestUtils; -import org.ray.api.exception.RayException; -import org.ray.api.id.ObjectId; -import org.ray.runtime.RayNativeRuntime; -import org.ray.runtime.object.RayObjectImpl; -import org.ray.runtime.runner.RunManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; diff --git a/java/test/src/main/java/org/ray/api/test/CrossLanguageInvocationTest.java b/java/test/src/main/java/io/ray/api/test/CrossLanguageInvocationTest.java similarity index 95% rename from java/test/src/main/java/org/ray/api/test/CrossLanguageInvocationTest.java rename to java/test/src/main/java/io/ray/api/test/CrossLanguageInvocationTest.java index d200f0572..19057f74f 100644 --- a/java/test/src/main/java/org/ray/api/test/CrossLanguageInvocationTest.java +++ b/java/test/src/main/java/io/ray/api/test/CrossLanguageInvocationTest.java @@ -1,7 +1,16 @@ -package org.ray.api.test; +package io.ray.api.test; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.RayObject; +import io.ray.api.RayPyActor; +import io.ray.api.function.PyActorClass; +import io.ray.api.function.PyActorMethod; +import io.ray.api.function.PyRemoteFunction; +import io.ray.runtime.actor.NativeRayActor; +import io.ray.runtime.actor.NativeRayPyActor; import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -10,15 +19,6 @@ import java.util.Arrays; import java.util.List; import java.util.Map; import org.apache.commons.io.FileUtils; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.RayObject; -import org.ray.api.RayPyActor; -import org.ray.api.function.PyActorClass; -import org.ray.api.function.PyActorMethod; -import org.ray.api.function.PyRemoteFunction; -import org.ray.runtime.actor.NativeRayActor; -import org.ray.runtime.actor.NativeRayPyActor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; diff --git a/java/test/src/main/java/org/ray/api/test/DynamicResourceTest.java b/java/test/src/main/java/io/ray/api/test/DynamicResourceTest.java similarity index 85% rename from java/test/src/main/java/org/ray/api/test/DynamicResourceTest.java rename to java/test/src/main/java/io/ray/api/test/DynamicResourceTest.java index 269501fab..e6862984b 100644 --- a/java/test/src/main/java/org/ray/api/test/DynamicResourceTest.java +++ b/java/test/src/main/java/io/ray/api/test/DynamicResourceTest.java @@ -1,14 +1,14 @@ -package org.ray.api.test; +package io.ray.api.test; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import io.ray.api.Ray; +import io.ray.api.RayObject; +import io.ray.api.TestUtils; +import io.ray.api.WaitResult; +import io.ray.api.options.CallOptions; +import io.ray.api.runtimecontext.NodeInfo; import java.util.List; -import org.ray.api.Ray; -import org.ray.api.RayObject; -import org.ray.api.TestUtils; -import org.ray.api.WaitResult; -import org.ray.api.options.CallOptions; -import org.ray.api.runtimecontext.NodeInfo; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/java/test/src/main/java/org/ray/api/test/FailureTest.java b/java/test/src/main/java/io/ray/api/test/FailureTest.java similarity index 92% rename from java/test/src/main/java/org/ray/api/test/FailureTest.java rename to java/test/src/main/java/io/ray/api/test/FailureTest.java index a7a202eb0..b82fae27b 100644 --- a/java/test/src/main/java/org/ray/api/test/FailureTest.java +++ b/java/test/src/main/java/io/ray/api/test/FailureTest.java @@ -1,18 +1,18 @@ -package org.ray.api.test; +package io.ray.api.test; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.RayObject; +import io.ray.api.TestUtils; +import io.ray.api.exception.RayActorException; +import io.ray.api.exception.RayException; +import io.ray.api.exception.RayTaskException; +import io.ray.api.exception.RayWorkerException; +import io.ray.api.function.RayFunc0; import java.time.Duration; import java.time.Instant; import java.util.Arrays; import java.util.List; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.RayObject; -import org.ray.api.TestUtils; -import org.ray.api.exception.RayActorException; -import org.ray.api.exception.RayException; -import org.ray.api.exception.RayTaskException; -import org.ray.api.exception.RayWorkerException; -import org.ray.api.function.RayFunc0; import org.testng.Assert; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; diff --git a/java/test/src/main/java/org/ray/api/test/GcsClientTest.java b/java/test/src/main/java/io/ray/api/test/GcsClientTest.java similarity index 87% rename from java/test/src/main/java/org/ray/api/test/GcsClientTest.java rename to java/test/src/main/java/io/ray/api/test/GcsClientTest.java index 58e997294..3ccf24dd1 100644 --- a/java/test/src/main/java/org/ray/api/test/GcsClientTest.java +++ b/java/test/src/main/java/io/ray/api/test/GcsClientTest.java @@ -1,12 +1,12 @@ -package org.ray.api.test; +package io.ray.api.test; import com.google.common.base.Preconditions; +import io.ray.api.TestUtils; +import io.ray.api.id.JobId; +import io.ray.api.runtimecontext.NodeInfo; +import io.ray.runtime.config.RayConfig; +import io.ray.runtime.gcs.GcsClient; import java.util.List; -import org.ray.api.TestUtils; -import org.ray.api.id.JobId; -import org.ray.api.runtimecontext.NodeInfo; -import org.ray.runtime.config.RayConfig; -import org.ray.runtime.gcs.GcsClient; import org.testng.Assert; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; diff --git a/java/test/src/main/java/org/ray/api/test/HelloWorldTest.java b/java/test/src/main/java/io/ray/api/test/HelloWorldTest.java similarity index 89% rename from java/test/src/main/java/org/ray/api/test/HelloWorldTest.java rename to java/test/src/main/java/io/ray/api/test/HelloWorldTest.java index f811de5ad..820cef770 100644 --- a/java/test/src/main/java/org/ray/api/test/HelloWorldTest.java +++ b/java/test/src/main/java/io/ray/api/test/HelloWorldTest.java @@ -1,7 +1,7 @@ -package org.ray.api.test; +package io.ray.api.test; -import org.ray.api.Ray; -import org.ray.api.RayObject; +import io.ray.api.Ray; +import io.ray.api.RayObject; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/java/test/src/main/java/org/ray/api/test/KillActorTest.java b/java/test/src/main/java/io/ray/api/test/KillActorTest.java similarity index 92% rename from java/test/src/main/java/org/ray/api/test/KillActorTest.java rename to java/test/src/main/java/io/ray/api/test/KillActorTest.java index baaf18a18..cd4837b11 100644 --- a/java/test/src/main/java/org/ray/api/test/KillActorTest.java +++ b/java/test/src/main/java/io/ray/api/test/KillActorTest.java @@ -1,13 +1,13 @@ -package org.ray.api.test; +package io.ray.api.test; import com.google.common.collect.ImmutableList; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.RayObject; +import io.ray.api.TestUtils; +import io.ray.api.exception.RayActorException; +import io.ray.api.options.ActorCreationOptions; import java.util.function.BiConsumer; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.RayObject; -import org.ray.api.TestUtils; -import org.ray.api.exception.RayActorException; -import org.ray.api.options.ActorCreationOptions; import org.testng.Assert; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; diff --git a/java/test/src/main/java/org/ray/api/test/MultiLanguageClusterTest.java b/java/test/src/main/java/io/ray/api/test/MultiLanguageClusterTest.java similarity index 82% rename from java/test/src/main/java/org/ray/api/test/MultiLanguageClusterTest.java rename to java/test/src/main/java/io/ray/api/test/MultiLanguageClusterTest.java index 91741f83c..d3de5404f 100644 --- a/java/test/src/main/java/org/ray/api/test/MultiLanguageClusterTest.java +++ b/java/test/src/main/java/io/ray/api/test/MultiLanguageClusterTest.java @@ -1,7 +1,7 @@ -package org.ray.api.test; +package io.ray.api.test; -import org.ray.api.Ray; -import org.ray.api.RayObject; +import io.ray.api.Ray; +import io.ray.api.RayObject; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/java/test/src/main/java/org/ray/api/test/MultiThreadingTest.java b/java/test/src/main/java/io/ray/api/test/MultiThreadingTest.java similarity index 97% rename from java/test/src/main/java/org/ray/api/test/MultiThreadingTest.java rename to java/test/src/main/java/io/ray/api/test/MultiThreadingTest.java index 505d79c85..cdc6dc53b 100644 --- a/java/test/src/main/java/org/ray/api/test/MultiThreadingTest.java +++ b/java/test/src/main/java/io/ray/api/test/MultiThreadingTest.java @@ -1,6 +1,13 @@ -package org.ray.api.test; +package io.ray.api.test; import com.google.common.collect.ImmutableList; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.RayObject; +import io.ray.api.TestUtils; +import io.ray.api.WaitResult; +import io.ray.api.exception.RayException; +import io.ray.api.id.ActorId; import java.util.ArrayList; import java.util.List; import java.util.Random; @@ -9,13 +16,6 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.RayObject; -import org.ray.api.TestUtils; -import org.ray.api.WaitResult; -import org.ray.api.exception.RayException; -import org.ray.api.id.ActorId; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; diff --git a/java/test/src/main/java/org/ray/api/test/ObjectStoreTest.java b/java/test/src/main/java/io/ray/api/test/ObjectStoreTest.java similarity index 89% rename from java/test/src/main/java/org/ray/api/test/ObjectStoreTest.java rename to java/test/src/main/java/io/ray/api/test/ObjectStoreTest.java index 883ce8b7d..0a16f624f 100644 --- a/java/test/src/main/java/org/ray/api/test/ObjectStoreTest.java +++ b/java/test/src/main/java/io/ray/api/test/ObjectStoreTest.java @@ -1,11 +1,11 @@ -package org.ray.api.test; +package io.ray.api.test; import com.google.common.collect.ImmutableList; +import io.ray.api.Ray; +import io.ray.api.RayObject; +import io.ray.api.id.ObjectId; import java.util.List; import java.util.stream.Collectors; -import org.ray.api.Ray; -import org.ray.api.RayObject; -import org.ray.api.id.ObjectId; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/java/test/src/main/java/org/ray/api/test/PlasmaFreeTest.java b/java/test/src/main/java/io/ray/api/test/PlasmaFreeTest.java similarity index 91% rename from java/test/src/main/java/org/ray/api/test/PlasmaFreeTest.java rename to java/test/src/main/java/io/ray/api/test/PlasmaFreeTest.java index 693901fc1..e5b9dafde 100644 --- a/java/test/src/main/java/org/ray/api/test/PlasmaFreeTest.java +++ b/java/test/src/main/java/io/ray/api/test/PlasmaFreeTest.java @@ -1,11 +1,11 @@ -package org.ray.api.test; +package io.ray.api.test; import com.google.common.collect.ImmutableList; +import io.ray.api.Ray; +import io.ray.api.RayObject; +import io.ray.api.TestUtils; +import io.ray.api.id.TaskId; import java.util.Arrays; -import org.ray.api.Ray; -import org.ray.api.RayObject; -import org.ray.api.TestUtils; -import org.ray.api.id.TaskId; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/java/test/src/main/java/org/ray/api/test/PlasmaStoreTest.java b/java/test/src/main/java/io/ray/api/test/PlasmaStoreTest.java similarity index 79% rename from java/test/src/main/java/org/ray/api/test/PlasmaStoreTest.java rename to java/test/src/main/java/io/ray/api/test/PlasmaStoreTest.java index 99a2f4b71..29b1b271e 100644 --- a/java/test/src/main/java/org/ray/api/test/PlasmaStoreTest.java +++ b/java/test/src/main/java/io/ray/api/test/PlasmaStoreTest.java @@ -1,9 +1,9 @@ -package org.ray.api.test; +package io.ray.api.test; -import org.ray.api.Ray; -import org.ray.api.TestUtils; -import org.ray.api.id.ObjectId; -import org.ray.runtime.object.ObjectStore; +import io.ray.api.Ray; +import io.ray.api.TestUtils; +import io.ray.api.id.ObjectId; +import io.ray.runtime.object.ObjectStore; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/java/test/src/main/java/org/ray/api/test/RayCallTest.java b/java/test/src/main/java/io/ray/api/test/RayCallTest.java similarity index 93% rename from java/test/src/main/java/org/ray/api/test/RayCallTest.java rename to java/test/src/main/java/io/ray/api/test/RayCallTest.java index cbe918021..fe8068704 100644 --- a/java/test/src/main/java/org/ray/api/test/RayCallTest.java +++ b/java/test/src/main/java/io/ray/api/test/RayCallTest.java @@ -1,13 +1,12 @@ -package org.ray.api.test; +package io.ray.api.test; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import io.ray.api.Ray; +import io.ray.api.TestUtils; +import io.ray.api.id.ObjectId; import java.util.List; import java.util.Map; -import org.ray.api.Ray; -import org.ray.api.TestUtils; -import org.ray.api.TestUtils.LargeObject; -import org.ray.api.id.ObjectId; import org.testng.Assert; import org.testng.annotations.Test; @@ -56,7 +55,7 @@ public class RayCallTest extends BaseTest { return val; } - private static LargeObject testLargeObject(LargeObject largeObject) { + private static TestUtils.LargeObject testLargeObject(TestUtils.LargeObject largeObject) { return largeObject; } @@ -82,7 +81,7 @@ public class RayCallTest extends BaseTest { Assert.assertEquals(list, Ray.call(RayCallTest::testList, list).get()); Map map = ImmutableMap.of("1", 1, "2", 2); Assert.assertEquals(map, Ray.call(RayCallTest::testMap, map).get()); - LargeObject largeObject = new LargeObject(); + TestUtils.LargeObject largeObject = new TestUtils.LargeObject(); Assert.assertNotNull(Ray.call(RayCallTest::testLargeObject, largeObject).get()); ObjectId randomObjectId = ObjectId.fromRandom(); diff --git a/java/test/src/main/java/org/ray/api/test/RayConfigTest.java b/java/test/src/main/java/io/ray/api/test/RayConfigTest.java similarity index 91% rename from java/test/src/main/java/org/ray/api/test/RayConfigTest.java rename to java/test/src/main/java/io/ray/api/test/RayConfigTest.java index e4615d120..69b1c3045 100644 --- a/java/test/src/main/java/org/ray/api/test/RayConfigTest.java +++ b/java/test/src/main/java/io/ray/api/test/RayConfigTest.java @@ -1,7 +1,7 @@ -package org.ray.api.test; +package io.ray.api.test; -import org.ray.runtime.config.RayConfig; -import org.ray.runtime.generated.Common.WorkerType; +import io.ray.runtime.config.RayConfig; +import io.ray.runtime.generated.Common.WorkerType; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/java/test/src/main/java/org/ray/api/test/RayMethodsTest.java b/java/test/src/main/java/io/ray/api/test/RayMethodsTest.java similarity index 89% rename from java/test/src/main/java/org/ray/api/test/RayMethodsTest.java rename to java/test/src/main/java/io/ray/api/test/RayMethodsTest.java index 784617fc1..11823cb46 100644 --- a/java/test/src/main/java/org/ray/api/test/RayMethodsTest.java +++ b/java/test/src/main/java/io/ray/api/test/RayMethodsTest.java @@ -1,11 +1,11 @@ -package org.ray.api.test; +package io.ray.api.test; import com.google.common.collect.ImmutableList; +import io.ray.api.Ray; +import io.ray.api.RayObject; +import io.ray.api.WaitResult; import java.util.List; import java.util.stream.Collectors; -import org.ray.api.Ray; -import org.ray.api.RayObject; -import org.ray.api.WaitResult; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/java/test/src/main/java/org/ray/api/test/RaySerializerTest.java b/java/test/src/main/java/io/ray/api/test/RaySerializerTest.java similarity index 74% rename from java/test/src/main/java/org/ray/api/test/RaySerializerTest.java rename to java/test/src/main/java/io/ray/api/test/RaySerializerTest.java index 0d79c1f6c..9a3bf6d3a 100644 --- a/java/test/src/main/java/org/ray/api/test/RaySerializerTest.java +++ b/java/test/src/main/java/io/ray/api/test/RaySerializerTest.java @@ -1,10 +1,10 @@ -package org.ray.api.test; +package io.ray.api.test; -import org.ray.api.Ray; -import org.ray.api.RayPyActor; -import org.ray.api.function.PyActorClass; -import org.ray.runtime.object.NativeRayObject; -import org.ray.runtime.object.ObjectSerializer; +import io.ray.api.Ray; +import io.ray.api.RayPyActor; +import io.ray.api.function.PyActorClass; +import io.ray.runtime.object.NativeRayObject; +import io.ray.runtime.object.ObjectSerializer; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/java/test/src/main/java/org/ray/api/test/RayletConfigTest.java b/java/test/src/main/java/io/ray/api/test/RayletConfigTest.java similarity index 90% rename from java/test/src/main/java/org/ray/api/test/RayletConfigTest.java rename to java/test/src/main/java/io/ray/api/test/RayletConfigTest.java index 932d443b0..3b338d3b3 100644 --- a/java/test/src/main/java/org/ray/api/test/RayletConfigTest.java +++ b/java/test/src/main/java/io/ray/api/test/RayletConfigTest.java @@ -1,8 +1,8 @@ -package org.ray.api.test; +package io.ray.api.test; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.TestUtils; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.TestUtils; import org.testng.Assert; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; diff --git a/java/test/src/main/java/org/ray/api/test/RedisPasswordTest.java b/java/test/src/main/java/io/ray/api/test/RedisPasswordTest.java similarity index 90% rename from java/test/src/main/java/org/ray/api/test/RedisPasswordTest.java rename to java/test/src/main/java/io/ray/api/test/RedisPasswordTest.java index ced19d4a0..e490cffd8 100644 --- a/java/test/src/main/java/org/ray/api/test/RedisPasswordTest.java +++ b/java/test/src/main/java/io/ray/api/test/RedisPasswordTest.java @@ -1,7 +1,7 @@ -package org.ray.api.test; +package io.ray.api.test; -import org.ray.api.Ray; -import org.ray.api.RayObject; +import io.ray.api.Ray; +import io.ray.api.RayObject; import org.testng.Assert; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; diff --git a/java/test/src/main/java/org/ray/api/test/ResourcesManagementTest.java b/java/test/src/main/java/io/ray/api/test/ResourcesManagementTest.java similarity index 92% rename from java/test/src/main/java/org/ray/api/test/ResourcesManagementTest.java rename to java/test/src/main/java/io/ray/api/test/ResourcesManagementTest.java index e523389ce..a7fb8686c 100644 --- a/java/test/src/main/java/org/ray/api/test/ResourcesManagementTest.java +++ b/java/test/src/main/java/io/ray/api/test/ResourcesManagementTest.java @@ -1,14 +1,14 @@ -package org.ray.api.test; +package io.ray.api.test; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.RayObject; -import org.ray.api.TestUtils; -import org.ray.api.WaitResult; -import org.ray.api.options.ActorCreationOptions; -import org.ray.api.options.CallOptions; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.RayObject; +import io.ray.api.TestUtils; +import io.ray.api.WaitResult; +import io.ray.api.options.ActorCreationOptions; +import io.ray.api.options.CallOptions; import org.testng.Assert; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; diff --git a/java/test/src/main/java/org/ray/api/test/RuntimeContextTest.java b/java/test/src/main/java/io/ray/api/test/RuntimeContextTest.java similarity index 94% rename from java/test/src/main/java/org/ray/api/test/RuntimeContextTest.java rename to java/test/src/main/java/io/ray/api/test/RuntimeContextTest.java index bce024525..43287967f 100644 --- a/java/test/src/main/java/org/ray/api/test/RuntimeContextTest.java +++ b/java/test/src/main/java/io/ray/api/test/RuntimeContextTest.java @@ -1,11 +1,11 @@ -package org.ray.api.test; +package io.ray.api.test; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.id.ActorId; +import io.ray.api.id.JobId; import java.nio.ByteBuffer; import java.util.Arrays; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.id.ActorId; -import org.ray.api.id.JobId; import org.testng.Assert; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; diff --git a/java/test/src/main/java/org/ray/api/test/SingleProcessModeTest.java b/java/test/src/main/java/io/ray/api/test/SingleProcessModeTest.java similarity index 90% rename from java/test/src/main/java/org/ray/api/test/SingleProcessModeTest.java rename to java/test/src/main/java/io/ray/api/test/SingleProcessModeTest.java index fa3351818..be7ca78c1 100644 --- a/java/test/src/main/java/org/ray/api/test/SingleProcessModeTest.java +++ b/java/test/src/main/java/io/ray/api/test/SingleProcessModeTest.java @@ -1,14 +1,14 @@ -package org.ray.api.test; +package io.ray.api.test; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.RayObject; +import io.ray.api.TestUtils; +import io.ray.api.id.ActorId; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.RayObject; -import org.ray.api.TestUtils; -import org.ray.api.id.ActorId; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/java/test/src/main/java/org/ray/api/test/StressTest.java b/java/test/src/main/java/io/ray/api/test/StressTest.java similarity index 93% rename from java/test/src/main/java/org/ray/api/test/StressTest.java rename to java/test/src/main/java/io/ray/api/test/StressTest.java index c6d338963..2c9c275c5 100644 --- a/java/test/src/main/java/org/ray/api/test/StressTest.java +++ b/java/test/src/main/java/io/ray/api/test/StressTest.java @@ -1,13 +1,13 @@ -package org.ray.api.test; +package io.ray.api.test; import com.google.common.collect.ImmutableList; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.RayObject; +import io.ray.api.TestUtils; +import io.ray.api.id.ObjectId; import java.util.ArrayList; import java.util.List; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.RayObject; -import org.ray.api.TestUtils; -import org.ray.api.id.ObjectId; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/java/test/src/main/java/org/ray/api/test/UniqueIdTest.java b/java/test/src/main/java/io/ray/api/test/UniqueIdTest.java similarity index 95% rename from java/test/src/main/java/org/ray/api/test/UniqueIdTest.java rename to java/test/src/main/java/io/ray/api/test/UniqueIdTest.java index 75b305f80..a396d3b0d 100644 --- a/java/test/src/main/java/org/ray/api/test/UniqueIdTest.java +++ b/java/test/src/main/java/io/ray/api/test/UniqueIdTest.java @@ -1,10 +1,10 @@ -package org.ray.api.test; +package io.ray.api.test; +import io.ray.api.id.UniqueId; +import io.ray.runtime.util.IdUtil; import java.nio.ByteBuffer; import java.util.Arrays; import javax.xml.bind.DatatypeConverter; -import org.ray.api.id.UniqueId; -import org.ray.runtime.util.IdUtil; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/java/test/src/main/java/org/ray/api/test/WaitTest.java b/java/test/src/main/java/io/ray/api/test/WaitTest.java similarity index 92% rename from java/test/src/main/java/org/ray/api/test/WaitTest.java rename to java/test/src/main/java/io/ray/api/test/WaitTest.java index 49cb2c926..128fb519e 100644 --- a/java/test/src/main/java/org/ray/api/test/WaitTest.java +++ b/java/test/src/main/java/io/ray/api/test/WaitTest.java @@ -1,12 +1,12 @@ -package org.ray.api.test; +package io.ray.api.test; import com.google.common.collect.ImmutableList; +import io.ray.api.Ray; +import io.ray.api.RayObject; +import io.ray.api.TestUtils; +import io.ray.api.WaitResult; import java.util.ArrayList; import java.util.List; -import org.ray.api.Ray; -import org.ray.api.RayObject; -import org.ray.api.TestUtils; -import org.ray.api.WaitResult; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/java/test/src/main/java/org/ray/api/test/WorkerJvmOptionsTest.java b/java/test/src/main/java/io/ray/api/test/WorkerJvmOptionsTest.java similarity index 81% rename from java/test/src/main/java/org/ray/api/test/WorkerJvmOptionsTest.java rename to java/test/src/main/java/io/ray/api/test/WorkerJvmOptionsTest.java index f93d61fe7..58b9df662 100644 --- a/java/test/src/main/java/org/ray/api/test/WorkerJvmOptionsTest.java +++ b/java/test/src/main/java/io/ray/api/test/WorkerJvmOptionsTest.java @@ -1,10 +1,10 @@ -package org.ray.api.test; +package io.ray.api.test; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.RayObject; -import org.ray.api.TestUtils; -import org.ray.api.options.ActorCreationOptions; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.RayObject; +import io.ray.api.TestUtils; +import io.ray.api.options.ActorCreationOptions; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/java/test/src/main/resources/test_cross_language_invocation.py b/java/test/src/main/resources/test_cross_language_invocation.py index 753d87480..50841b46b 100644 --- a/java/test/src/main/resources/test_cross_language_invocation.py +++ b/java/test/src/main/resources/test_cross_language_invocation.py @@ -13,32 +13,32 @@ def py_return_input(v): def py_func_call_java_function(): try: # None - r = ray.java_function("org.ray.api.test.CrossLanguageInvocationTest", + r = ray.java_function("io.ray.api.test.CrossLanguageInvocationTest", "returnInput").remote(None) assert ray.get(r) is None # bool - r = ray.java_function("org.ray.api.test.CrossLanguageInvocationTest", + r = ray.java_function("io.ray.api.test.CrossLanguageInvocationTest", "returnInputBoolean").remote(True) assert ray.get(r) is True # int - r = ray.java_function("org.ray.api.test.CrossLanguageInvocationTest", + r = ray.java_function("io.ray.api.test.CrossLanguageInvocationTest", "returnInputInt").remote(100) assert ray.get(r) == 100 # double - r = ray.java_function("org.ray.api.test.CrossLanguageInvocationTest", + r = ray.java_function("io.ray.api.test.CrossLanguageInvocationTest", "returnInputDouble").remote(1.23) assert ray.get(r) == 1.23 # string - r = ray.java_function("org.ray.api.test.CrossLanguageInvocationTest", + r = ray.java_function("io.ray.api.test.CrossLanguageInvocationTest", "returnInputString").remote("Hello World!") assert ray.get(r) == "Hello World!" # list (tuple will be packed by pickle, # so only list can be transferred across language) - r = ray.java_function("org.ray.api.test.CrossLanguageInvocationTest", + r = ray.java_function("io.ray.api.test.CrossLanguageInvocationTest", "returnInputIntArray").remote([1, 2, 3]) assert ray.get(r) == [1, 2, 3] # pack - f = ray.java_function("org.ray.api.test.CrossLanguageInvocationTest", + f = ray.java_function("io.ray.api.test.CrossLanguageInvocationTest", "pack") input = [100, "hello", 1.23, [1, "2", 3.0]] r = f.remote(*input) @@ -52,7 +52,7 @@ def py_func_call_java_function(): def py_func_call_java_actor(value): assert isinstance(value, bytes) c = ray.java_actor_class( - "org.ray.api.test.CrossLanguageInvocationTest$TestActor") + "io.ray.api.test.CrossLanguageInvocationTest$TestActor") java_actor = c.remote(b"Counter") r = java_actor.concat.remote(value) return ray.get(r) @@ -77,7 +77,7 @@ def py_func_call_python_actor_from_handle(value): @ray.remote def py_func_pass_python_actor_handle(): counter = Counter.remote(2) - f = ray.java_function("org.ray.api.test.CrossLanguageInvocationTest", + f = ray.java_function("io.ray.api.test.CrossLanguageInvocationTest", "callPythonActorHandle") r = f.remote(counter._serialization_helper()[0]) return ray.get(r) diff --git a/java/testng.xml b/java/testng.xml index f4659af98..7997f07bb 100644 --- a/java/testng.xml +++ b/java/testng.xml @@ -3,11 +3,11 @@ - - + + - + diff --git a/java/tutorial/README.rst b/java/tutorial/README.rst index 014306058..95bf08d60 100644 --- a/java/tutorial/README.rst +++ b/java/tutorial/README.rst @@ -7,19 +7,19 @@ Ray Java Tutorial Exercises --------- -Each file of ``java/example/src/main/java/org/ray/exercise/Exercise*.java`` is a separate exercise. +Each file of ``java/example/src/main/java/io/ray/exercise/Exercise*.java`` is a separate exercise. To run them, execute the following command under ``ray/java`` folder. .. code-block:: shell - java -classpath "tutorial/target/ray-tutorial-1.0.jar:tutorial/lib/*" org.ray.exercise.Exercise01 + java -classpath "tutorial/target/ray-tutorial-1.0.jar:tutorial/lib/*" Exercise01 -`Exercise 1 `_: Define a remote function, and execute multiple remote functions in parallel. +`Exercise 1 `_: Define a remote function, and execute multiple remote functions in parallel. -`Exercise 2 `_: Execute remote functions in parallel with some dependencies. +`Exercise 2 `_: Execute remote functions in parallel with some dependencies. -`Exercise 3 `_: Call remote functions from within remote functions. +`Exercise 3 `_: Call remote functions from within remote functions. -`Exercise 4 `_: Use ``Ray.wait`` to ignore stragglers. +`Exercise 4 `_: Use ``Ray.wait`` to ignore stragglers. -`Exercise 5 `_: Actor Support of create Actor and call Actor method. +`Exercise 5 `_: Actor Support of create Actor and call Actor method. diff --git a/java/tutorial/pom.xml b/java/tutorial/pom.xml index b0e78b40e..cecad8d8a 100644 --- a/java/tutorial/pom.xml +++ b/java/tutorial/pom.xml @@ -5,7 +5,7 @@ xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - org.ray + io.ray ray-superpom 0.1-SNAPSHOT @@ -20,12 +20,12 @@ - org.ray + io.ray ray-api ${project.version} - org.ray + io.ray ray-runtime ${project.version} diff --git a/java/tutorial/pom_template.xml b/java/tutorial/pom_template.xml index 0f7b2fdf4..a3c8e9ff6 100644 --- a/java/tutorial/pom_template.xml +++ b/java/tutorial/pom_template.xml @@ -5,7 +5,7 @@ xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - org.ray + io.ray ray-superpom 0.1-SNAPSHOT @@ -20,12 +20,12 @@ - org.ray + io.ray ray-api ${project.version} - org.ray + io.ray ray-runtime ${project.version} diff --git a/java/tutorial/src/main/java/org/ray/exercise/Exercise01.java b/java/tutorial/src/main/java/io/ray/exercise/Exercise01.java similarity index 92% rename from java/tutorial/src/main/java/org/ray/exercise/Exercise01.java rename to java/tutorial/src/main/java/io/ray/exercise/Exercise01.java index 2a0ccee47..b3172e8f6 100644 --- a/java/tutorial/src/main/java/org/ray/exercise/Exercise01.java +++ b/java/tutorial/src/main/java/io/ray/exercise/Exercise01.java @@ -1,8 +1,8 @@ -package org.ray.exercise; +package io.ray.exercise; +import io.ray.api.Ray; +import io.ray.api.RayObject; import java.io.Serializable; -import org.ray.api.Ray; -import org.ray.api.RayObject; /** * Define a remote function, and execute multiple remote functions in parallel. diff --git a/java/tutorial/src/main/java/org/ray/exercise/Exercise02.java b/java/tutorial/src/main/java/io/ray/exercise/Exercise02.java similarity index 93% rename from java/tutorial/src/main/java/org/ray/exercise/Exercise02.java rename to java/tutorial/src/main/java/io/ray/exercise/Exercise02.java index ea116b2f7..752dfaf8a 100644 --- a/java/tutorial/src/main/java/org/ray/exercise/Exercise02.java +++ b/java/tutorial/src/main/java/io/ray/exercise/Exercise02.java @@ -1,7 +1,7 @@ -package org.ray.exercise; +package io.ray.exercise; -import org.ray.api.Ray; -import org.ray.api.RayObject; +import io.ray.api.Ray; +import io.ray.api.RayObject; /** * Execute remote functions in parallel with some dependencies. diff --git a/java/tutorial/src/main/java/org/ray/exercise/Exercise03.java b/java/tutorial/src/main/java/io/ray/exercise/Exercise03.java similarity index 91% rename from java/tutorial/src/main/java/org/ray/exercise/Exercise03.java rename to java/tutorial/src/main/java/io/ray/exercise/Exercise03.java index a095dc56d..ff0aee1b0 100644 --- a/java/tutorial/src/main/java/org/ray/exercise/Exercise03.java +++ b/java/tutorial/src/main/java/io/ray/exercise/Exercise03.java @@ -1,7 +1,7 @@ -package org.ray.exercise; +package io.ray.exercise; -import org.ray.api.Ray; -import org.ray.api.RayObject; +import io.ray.api.Ray; +import io.ray.api.RayObject; /** * Call a remote function from within another remote function. diff --git a/java/tutorial/src/main/java/org/ray/exercise/Exercise04.java b/java/tutorial/src/main/java/io/ray/exercise/Exercise04.java similarity index 93% rename from java/tutorial/src/main/java/org/ray/exercise/Exercise04.java rename to java/tutorial/src/main/java/io/ray/exercise/Exercise04.java index 768542b01..084af1bbe 100644 --- a/java/tutorial/src/main/java/org/ray/exercise/Exercise04.java +++ b/java/tutorial/src/main/java/io/ray/exercise/Exercise04.java @@ -1,10 +1,10 @@ -package org.ray.exercise; +package io.ray.exercise; import com.google.common.collect.ImmutableList; +import io.ray.api.Ray; +import io.ray.api.RayObject; +import io.ray.api.WaitResult; import java.util.List; -import org.ray.api.Ray; -import org.ray.api.RayObject; -import org.ray.api.WaitResult; /** * Use Ray.wait to ignore stragglers diff --git a/java/tutorial/src/main/java/org/ray/exercise/Exercise05.java b/java/tutorial/src/main/java/io/ray/exercise/Exercise05.java similarity index 88% rename from java/tutorial/src/main/java/org/ray/exercise/Exercise05.java rename to java/tutorial/src/main/java/io/ray/exercise/Exercise05.java index 930f63914..a3793b0e9 100644 --- a/java/tutorial/src/main/java/org/ray/exercise/Exercise05.java +++ b/java/tutorial/src/main/java/io/ray/exercise/Exercise05.java @@ -1,8 +1,8 @@ -package org.ray.exercise; +package io.ray.exercise; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.RayObject; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.RayObject; /** * Show usage of actors. diff --git a/python/ray/scripts/scripts.py b/python/ray/scripts/scripts.py index 4d43a38e6..8b04929b4 100644 --- a/python/ray/scripts/scripts.py +++ b/python/ray/scripts/scripts.py @@ -485,7 +485,7 @@ def stop(force, verbose): ["redis-server", False], ["default_worker.py", False], # Python worker. ["ray::", True], # Python worker. - ["org.ray.runtime.runner.worker.DefaultWorker", False], # Java worker. + ["io.ray.runtime.runner.worker.DefaultWorker", False], # Java worker. ["log_monitor.py", False], ["reporter.py", False], ["dashboard.py", False], diff --git a/python/ray/services.py b/python/ray/services.py index 8ac257da8..18c788269 100644 --- a/python/ray/services.py +++ b/python/ray/services.py @@ -1422,7 +1422,7 @@ def build_java_worker_command( command += options command += ["RAY_WORKER_DYNAMIC_OPTION_PLACEHOLDER_0"] - command += ["org.ray.runtime.runner.worker.DefaultWorker"] + command += ["io.ray.runtime.runner.worker.DefaultWorker"] return command diff --git a/src/ray/core_worker/lib/java/org_ray_runtime_RayNativeRuntime.cc b/src/ray/core_worker/lib/java/io_ray_runtime_RayNativeRuntime.cc similarity index 92% rename from src/ray/core_worker/lib/java/org_ray_runtime_RayNativeRuntime.cc rename to src/ray/core_worker/lib/java/io_ray_runtime_RayNativeRuntime.cc index e4ec7ab90..94acbad06 100644 --- a/src/ray/core_worker/lib/java/org_ray_runtime_RayNativeRuntime.cc +++ b/src/ray/core_worker/lib/java/io_ray_runtime_RayNativeRuntime.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "ray/core_worker/lib/java/org_ray_runtime_RayNativeRuntime.h" +#include "ray/core_worker/lib/java/io_ray_runtime_RayNativeRuntime.h" #include #include #include "ray/common/id.h" @@ -37,7 +37,8 @@ inline ray::gcs::GcsClientOptions ToGcsClientOptions(JNIEnv *env, extern "C" { #endif -JNIEXPORT void JNICALL Java_org_ray_runtime_RayNativeRuntime_nativeInitialize( + +JNIEXPORT void JNICALL Java_io_ray_runtime_RayNativeRuntime_nativeInitialize( JNIEnv *env, jclass, jint workerMode, jstring nodeIpAddress, jint nodeManagerPort, jstring driverName, jstring storeSocket, jstring rayletSocket, jbyteArray jobId, jobject gcsClientOptions, jint numWorkersPerProcess, jstring logDir, @@ -126,19 +127,19 @@ JNIEXPORT void JNICALL Java_org_ray_runtime_RayNativeRuntime_nativeInitialize( ray::CoreWorkerProcess::Initialize(options); } -JNIEXPORT void JNICALL Java_org_ray_runtime_RayNativeRuntime_nativeRunTaskExecutor( +JNIEXPORT void JNICALL Java_io_ray_runtime_RayNativeRuntime_nativeRunTaskExecutor( JNIEnv *env, jclass o, jobject javaTaskExecutor) { java_task_executor = javaTaskExecutor; ray::CoreWorkerProcess::RunTaskExecutionLoop(); java_task_executor = nullptr; } -JNIEXPORT void JNICALL Java_org_ray_runtime_RayNativeRuntime_nativeShutdown(JNIEnv *env, +JNIEXPORT void JNICALL Java_io_ray_runtime_RayNativeRuntime_nativeShutdown(JNIEnv *env, jclass o) { ray::CoreWorkerProcess::Shutdown(); } -JNIEXPORT void JNICALL Java_org_ray_runtime_RayNativeRuntime_nativeSetResource( +JNIEXPORT void JNICALL Java_io_ray_runtime_RayNativeRuntime_nativeSetResource( JNIEnv *env, jclass, jstring resourceName, jdouble capacity, jbyteArray nodeId) { const auto node_id = JavaByteArrayToId(env, nodeId); const char *native_resource_name = env->GetStringUTFChars(resourceName, JNI_FALSE); @@ -149,7 +150,7 @@ JNIEXPORT void JNICALL Java_org_ray_runtime_RayNativeRuntime_nativeSetResource( THROW_EXCEPTION_AND_RETURN_IF_NOT_OK(env, status, (void)0); } -JNIEXPORT void JNICALL Java_org_ray_runtime_RayNativeRuntime_nativeKillActor( +JNIEXPORT void JNICALL Java_io_ray_runtime_RayNativeRuntime_nativeKillActor( JNIEnv *env, jclass, jbyteArray actorId, jboolean noReconstruction) { auto status = ray::CoreWorkerProcess::GetCoreWorker().KillActor( JavaByteArrayToId(env, actorId), @@ -157,7 +158,7 @@ JNIEXPORT void JNICALL Java_org_ray_runtime_RayNativeRuntime_nativeKillActor( THROW_EXCEPTION_AND_RETURN_IF_NOT_OK(env, status, (void)0); } -JNIEXPORT void JNICALL Java_org_ray_runtime_RayNativeRuntime_nativeSetCoreWorker( +JNIEXPORT void JNICALL Java_io_ray_runtime_RayNativeRuntime_nativeSetCoreWorker( JNIEnv *env, jclass, jbyteArray workerId) { const auto worker_id = JavaByteArrayToId(env, workerId); ray::CoreWorkerProcess::SetCurrentThreadWorkerId(worker_id); diff --git a/src/ray/core_worker/lib/java/org_ray_runtime_RayNativeRuntime.h b/src/ray/core_worker/lib/java/io_ray_runtime_RayNativeRuntime.h similarity index 66% rename from src/ray/core_worker/lib/java/org_ray_runtime_RayNativeRuntime.h rename to src/ray/core_worker/lib/java/io_ray_runtime_RayNativeRuntime.h index 0e642dde4..4930a2052 100644 --- a/src/ray/core_worker/lib/java/org_ray_runtime_RayNativeRuntime.h +++ b/src/ray/core_worker/lib/java/io_ray_runtime_RayNativeRuntime.h @@ -14,64 +14,64 @@ /* DO NOT EDIT THIS FILE - it is machine generated */ #include -/* Header for class org_ray_runtime_RayNativeRuntime */ +/* Header for class io_ray_runtime_RayNativeRuntime */ -#ifndef _Included_org_ray_runtime_RayNativeRuntime -#define _Included_org_ray_runtime_RayNativeRuntime +#ifndef _Included_io_ray_runtime_RayNativeRuntime +#define _Included_io_ray_runtime_RayNativeRuntime #ifdef __cplusplus extern "C" { #endif /* - * Class: org_ray_runtime_RayNativeRuntime + * Class: io_ray_runtime_RayNativeRuntime * Method: nativeInitialize * Signature: * (ILjava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;[BLorg/ray/runtime/gcs/GcsClientOptions;ILjava/lang/String;Ljava/util/Map;)V */ -JNIEXPORT void JNICALL Java_org_ray_runtime_RayNativeRuntime_nativeInitialize( +JNIEXPORT void JNICALL Java_io_ray_runtime_RayNativeRuntime_nativeInitialize( JNIEnv *, jclass, jint, jstring, jint, jstring, jstring, jstring, jbyteArray, jobject, jint, jstring, jobject); /* - * Class: org_ray_runtime_RayNativeRuntime + * Class: io_ray_runtime_RayNativeRuntime * Method: nativeRunTaskExecutor * Signature: (Lorg/ray/runtime/task/TaskExecutor;)V */ JNIEXPORT void JNICALL -Java_org_ray_runtime_RayNativeRuntime_nativeRunTaskExecutor(JNIEnv *, jclass, jobject); +Java_io_ray_runtime_RayNativeRuntime_nativeRunTaskExecutor(JNIEnv *, jclass, jobject); /* - * Class: org_ray_runtime_RayNativeRuntime + * Class: io_ray_runtime_RayNativeRuntime * Method: nativeShutdown * Signature: ()V */ -JNIEXPORT void JNICALL Java_org_ray_runtime_RayNativeRuntime_nativeShutdown(JNIEnv *, +JNIEXPORT void JNICALL Java_io_ray_runtime_RayNativeRuntime_nativeShutdown(JNIEnv *, jclass); /* - * Class: org_ray_runtime_RayNativeRuntime + * Class: io_ray_runtime_RayNativeRuntime * Method: nativeSetResource * Signature: (Ljava/lang/String;D[B)V */ -JNIEXPORT void JNICALL Java_org_ray_runtime_RayNativeRuntime_nativeSetResource( +JNIEXPORT void JNICALL Java_io_ray_runtime_RayNativeRuntime_nativeSetResource( JNIEnv *, jclass, jstring, jdouble, jbyteArray); /* - * Class: org_ray_runtime_RayNativeRuntime + * Class: io_ray_runtime_RayNativeRuntime * Method: nativeKillActor * Signature: ([BZ)V */ -JNIEXPORT void JNICALL Java_org_ray_runtime_RayNativeRuntime_nativeKillActor(JNIEnv *, +JNIEXPORT void JNICALL Java_io_ray_runtime_RayNativeRuntime_nativeKillActor(JNIEnv *, jclass, jbyteArray, jboolean); /* - * Class: org_ray_runtime_RayNativeRuntime + * Class: io_ray_runtime_RayNativeRuntime * Method: nativeSetCoreWorker * Signature: ([B)V */ JNIEXPORT void JNICALL -Java_org_ray_runtime_RayNativeRuntime_nativeSetCoreWorker(JNIEnv *, jclass, jbyteArray); +Java_io_ray_runtime_RayNativeRuntime_nativeSetCoreWorker(JNIEnv *, jclass, jbyteArray); #ifdef __cplusplus } diff --git a/src/ray/core_worker/lib/java/org_ray_runtime_actor_NativeRayActor.cc b/src/ray/core_worker/lib/java/io_ray_runtime_actor_NativeRayActor.cc similarity index 86% rename from src/ray/core_worker/lib/java/org_ray_runtime_actor_NativeRayActor.cc rename to src/ray/core_worker/lib/java/io_ray_runtime_actor_NativeRayActor.cc index dde1acbf1..e3064e4d6 100644 --- a/src/ray/core_worker/lib/java/org_ray_runtime_actor_NativeRayActor.cc +++ b/src/ray/core_worker/lib/java/io_ray_runtime_actor_NativeRayActor.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "ray/core_worker/lib/java/org_ray_runtime_actor_NativeRayActor.h" +#include "ray/core_worker/lib/java/io_ray_runtime_actor_NativeRayActor.h" #include #include "ray/common/id.h" #include "ray/core_worker/actor_handle.h" @@ -24,7 +24,7 @@ extern "C" { #endif -JNIEXPORT jint JNICALL Java_org_ray_runtime_actor_NativeRayActor_nativeGetLanguage( +JNIEXPORT jint JNICALL Java_io_ray_runtime_actor_NativeRayActor_nativeGetLanguage( JNIEnv *env, jclass o, jbyteArray actorId) { auto actor_id = JavaByteArrayToId(env, actorId); ray::ActorHandle *native_actor_handle = nullptr; @@ -35,7 +35,7 @@ JNIEXPORT jint JNICALL Java_org_ray_runtime_actor_NativeRayActor_nativeGetLangua } JNIEXPORT jobject JNICALL -Java_org_ray_runtime_actor_NativeRayActor_nativeGetActorCreationTaskFunctionDescriptor( +Java_io_ray_runtime_actor_NativeRayActor_nativeGetActorCreationTaskFunctionDescriptor( JNIEnv *env, jclass o, jbyteArray actorId) { auto actor_id = JavaByteArrayToId(env, actorId); ray::ActorHandle *native_actor_handle = nullptr; @@ -46,7 +46,7 @@ Java_org_ray_runtime_actor_NativeRayActor_nativeGetActorCreationTaskFunctionDesc return NativeRayFunctionDescriptorToJavaStringList(env, function_descriptor); } -JNIEXPORT jbyteArray JNICALL Java_org_ray_runtime_actor_NativeRayActor_nativeSerialize( +JNIEXPORT jbyteArray JNICALL Java_io_ray_runtime_actor_NativeRayActor_nativeSerialize( JNIEnv *env, jclass o, jbyteArray actorId) { auto actor_id = JavaByteArrayToId(env, actorId); std::string output; @@ -59,7 +59,7 @@ JNIEXPORT jbyteArray JNICALL Java_org_ray_runtime_actor_NativeRayActor_nativeSer return bytes; } -JNIEXPORT jbyteArray JNICALL Java_org_ray_runtime_actor_NativeRayActor_nativeDeserialize( +JNIEXPORT jbyteArray JNICALL Java_io_ray_runtime_actor_NativeRayActor_nativeDeserialize( JNIEnv *env, jclass o, jbyteArray data) { auto buffer = JavaByteArrayToNativeBuffer(env, data); RAY_CHECK(buffer->Size() > 0); diff --git a/src/ray/core_worker/lib/java/org_ray_runtime_actor_NativeRayActor.h b/src/ray/core_worker/lib/java/io_ray_runtime_actor_NativeRayActor.h similarity index 61% rename from src/ray/core_worker/lib/java/org_ray_runtime_actor_NativeRayActor.h rename to src/ray/core_worker/lib/java/io_ray_runtime_actor_NativeRayActor.h index b04dc4fbe..0843cc104 100644 --- a/src/ray/core_worker/lib/java/org_ray_runtime_actor_NativeRayActor.h +++ b/src/ray/core_worker/lib/java/io_ray_runtime_actor_NativeRayActor.h @@ -14,45 +14,45 @@ /* DO NOT EDIT THIS FILE - it is machine generated */ #include -/* Header for class org_ray_runtime_actor_NativeRayActor */ +/* Header for class io_ray_runtime_actor_NativeRayActor */ -#ifndef _Included_org_ray_runtime_actor_NativeRayActor -#define _Included_org_ray_runtime_actor_NativeRayActor +#ifndef _Included_io_ray_runtime_actor_NativeRayActor +#define _Included_io_ray_runtime_actor_NativeRayActor #ifdef __cplusplus extern "C" { #endif /* - * Class: org_ray_runtime_actor_NativeRayActor + * Class: io_ray_runtime_actor_NativeRayActor * Method: nativeGetLanguage * Signature: ([B)I */ JNIEXPORT jint JNICALL -Java_org_ray_runtime_actor_NativeRayActor_nativeGetLanguage(JNIEnv *, jclass, jbyteArray); +Java_io_ray_runtime_actor_NativeRayActor_nativeGetLanguage(JNIEnv *, jclass, jbyteArray); /* - * Class: org_ray_runtime_actor_NativeRayActor + * Class: io_ray_runtime_actor_NativeRayActor * Method: nativeGetActorCreationTaskFunctionDescriptor * Signature: ([B)Ljava/util/List; */ JNIEXPORT jobject JNICALL -Java_org_ray_runtime_actor_NativeRayActor_nativeGetActorCreationTaskFunctionDescriptor( +Java_io_ray_runtime_actor_NativeRayActor_nativeGetActorCreationTaskFunctionDescriptor( JNIEnv *, jclass, jbyteArray); /* - * Class: org_ray_runtime_actor_NativeRayActor + * Class: io_ray_runtime_actor_NativeRayActor * Method: nativeSerialize * Signature: ([B)[B */ JNIEXPORT jbyteArray JNICALL -Java_org_ray_runtime_actor_NativeRayActor_nativeSerialize(JNIEnv *, jclass, jbyteArray); +Java_io_ray_runtime_actor_NativeRayActor_nativeSerialize(JNIEnv *, jclass, jbyteArray); /* - * Class: org_ray_runtime_actor_NativeRayActor + * Class: io_ray_runtime_actor_NativeRayActor * Method: nativeDeserialize * Signature: ([B)[B */ JNIEXPORT jbyteArray JNICALL -Java_org_ray_runtime_actor_NativeRayActor_nativeDeserialize(JNIEnv *, jclass, jbyteArray); +Java_io_ray_runtime_actor_NativeRayActor_nativeDeserialize(JNIEnv *, jclass, jbyteArray); #ifdef __cplusplus } diff --git a/src/ray/core_worker/lib/java/org_ray_runtime_context_NativeWorkerContext.cc b/src/ray/core_worker/lib/java/io_ray_runtime_context_NativeWorkerContext.cc similarity index 81% rename from src/ray/core_worker/lib/java/org_ray_runtime_context_NativeWorkerContext.cc rename to src/ray/core_worker/lib/java/io_ray_runtime_context_NativeWorkerContext.cc index 780834d5e..e83dbba09 100644 --- a/src/ray/core_worker/lib/java/org_ray_runtime_context_NativeWorkerContext.cc +++ b/src/ray/core_worker/lib/java/io_ray_runtime_context_NativeWorkerContext.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "ray/core_worker/lib/java/org_ray_runtime_context_NativeWorkerContext.h" +#include "ray/core_worker/lib/java/io_ray_runtime_context_NativeWorkerContext.h" #include #include "ray/common/id.h" #include "ray/core_worker/context.h" @@ -24,7 +24,7 @@ extern "C" { #endif JNIEXPORT jint JNICALL -Java_org_ray_runtime_context_NativeWorkerContext_nativeGetCurrentTaskType(JNIEnv *env, +Java_io_ray_runtime_context_NativeWorkerContext_nativeGetCurrentTaskType(JNIEnv *env, jclass) { auto task_spec = ray::CoreWorkerProcess::GetCoreWorker().GetWorkerContext().GetCurrentTask(); @@ -33,7 +33,7 @@ Java_org_ray_runtime_context_NativeWorkerContext_nativeGetCurrentTaskType(JNIEnv } JNIEXPORT jobject JNICALL -Java_org_ray_runtime_context_NativeWorkerContext_nativeGetCurrentTaskId(JNIEnv *env, +Java_io_ray_runtime_context_NativeWorkerContext_nativeGetCurrentTaskId(JNIEnv *env, jclass) { const ray::TaskID &task_id = ray::CoreWorkerProcess::GetCoreWorker().GetWorkerContext().GetCurrentTaskID(); @@ -41,7 +41,7 @@ Java_org_ray_runtime_context_NativeWorkerContext_nativeGetCurrentTaskId(JNIEnv * } JNIEXPORT jobject JNICALL -Java_org_ray_runtime_context_NativeWorkerContext_nativeGetCurrentJobId(JNIEnv *env, +Java_io_ray_runtime_context_NativeWorkerContext_nativeGetCurrentJobId(JNIEnv *env, jclass) { const auto &job_id = ray::CoreWorkerProcess::GetCoreWorker().GetWorkerContext().GetCurrentJobID(); @@ -49,7 +49,7 @@ Java_org_ray_runtime_context_NativeWorkerContext_nativeGetCurrentJobId(JNIEnv *e } JNIEXPORT jobject JNICALL -Java_org_ray_runtime_context_NativeWorkerContext_nativeGetCurrentWorkerId(JNIEnv *env, +Java_io_ray_runtime_context_NativeWorkerContext_nativeGetCurrentWorkerId(JNIEnv *env, jclass) { const auto &worker_id = ray::CoreWorkerProcess::GetCoreWorker().GetWorkerContext().GetWorkerID(); @@ -57,7 +57,7 @@ Java_org_ray_runtime_context_NativeWorkerContext_nativeGetCurrentWorkerId(JNIEnv } JNIEXPORT jobject JNICALL -Java_org_ray_runtime_context_NativeWorkerContext_nativeGetCurrentActorId(JNIEnv *env, +Java_io_ray_runtime_context_NativeWorkerContext_nativeGetCurrentActorId(JNIEnv *env, jclass) { const auto &actor_id = ray::CoreWorkerProcess::GetCoreWorker().GetWorkerContext().GetCurrentActorID(); diff --git a/src/ray/core_worker/lib/java/org_ray_runtime_context_NativeWorkerContext.h b/src/ray/core_worker/lib/java/io_ray_runtime_context_NativeWorkerContext.h similarity index 62% rename from src/ray/core_worker/lib/java/org_ray_runtime_context_NativeWorkerContext.h rename to src/ray/core_worker/lib/java/io_ray_runtime_context_NativeWorkerContext.h index 983ff1dcb..f5476aebf 100644 --- a/src/ray/core_worker/lib/java/org_ray_runtime_context_NativeWorkerContext.h +++ b/src/ray/core_worker/lib/java/io_ray_runtime_context_NativeWorkerContext.h @@ -14,54 +14,54 @@ /* DO NOT EDIT THIS FILE - it is machine generated */ #include -/* Header for class org_ray_runtime_context_NativeWorkerContext */ +/* Header for class io_ray_runtime_context_NativeWorkerContext */ -#ifndef _Included_org_ray_runtime_context_NativeWorkerContext -#define _Included_org_ray_runtime_context_NativeWorkerContext +#ifndef _Included_io_ray_runtime_context_NativeWorkerContext +#define _Included_io_ray_runtime_context_NativeWorkerContext #ifdef __cplusplus extern "C" { #endif /* - * Class: org_ray_runtime_context_NativeWorkerContext + * Class: io_ray_runtime_context_NativeWorkerContext * Method: nativeGetCurrentTaskType * Signature: ()I */ JNIEXPORT jint JNICALL -Java_org_ray_runtime_context_NativeWorkerContext_nativeGetCurrentTaskType(JNIEnv *, +Java_io_ray_runtime_context_NativeWorkerContext_nativeGetCurrentTaskType(JNIEnv *, jclass); /* - * Class: org_ray_runtime_context_NativeWorkerContext + * Class: io_ray_runtime_context_NativeWorkerContext * Method: nativeGetCurrentTaskId * Signature: ()Ljava/nio/ByteBuffer; */ JNIEXPORT jobject JNICALL -Java_org_ray_runtime_context_NativeWorkerContext_nativeGetCurrentTaskId(JNIEnv *, jclass); +Java_io_ray_runtime_context_NativeWorkerContext_nativeGetCurrentTaskId(JNIEnv *, jclass); /* - * Class: org_ray_runtime_context_NativeWorkerContext + * Class: io_ray_runtime_context_NativeWorkerContext * Method: nativeGetCurrentJobId * Signature: ()Ljava/nio/ByteBuffer; */ JNIEXPORT jobject JNICALL -Java_org_ray_runtime_context_NativeWorkerContext_nativeGetCurrentJobId(JNIEnv *, jclass); +Java_io_ray_runtime_context_NativeWorkerContext_nativeGetCurrentJobId(JNIEnv *, jclass); /* - * Class: org_ray_runtime_context_NativeWorkerContext + * Class: io_ray_runtime_context_NativeWorkerContext * Method: nativeGetCurrentWorkerId * Signature: ()Ljava/nio/ByteBuffer; */ JNIEXPORT jobject JNICALL -Java_org_ray_runtime_context_NativeWorkerContext_nativeGetCurrentWorkerId(JNIEnv *, +Java_io_ray_runtime_context_NativeWorkerContext_nativeGetCurrentWorkerId(JNIEnv *, jclass); /* - * Class: org_ray_runtime_context_NativeWorkerContext + * Class: io_ray_runtime_context_NativeWorkerContext * Method: nativeGetCurrentActorId * Signature: ()Ljava/nio/ByteBuffer; */ JNIEXPORT jobject JNICALL -Java_org_ray_runtime_context_NativeWorkerContext_nativeGetCurrentActorId(JNIEnv *, +Java_io_ray_runtime_context_NativeWorkerContext_nativeGetCurrentActorId(JNIEnv *, jclass); #ifdef __cplusplus diff --git a/src/ray/core_worker/lib/java/org_ray_runtime_object_NativeObjectStore.cc b/src/ray/core_worker/lib/java/io_ray_runtime_object_NativeObjectStore.cc similarity index 87% rename from src/ray/core_worker/lib/java/org_ray_runtime_object_NativeObjectStore.cc rename to src/ray/core_worker/lib/java/io_ray_runtime_object_NativeObjectStore.cc index a4a175c0b..c5cd904a0 100644 --- a/src/ray/core_worker/lib/java/org_ray_runtime_object_NativeObjectStore.cc +++ b/src/ray/core_worker/lib/java/io_ray_runtime_object_NativeObjectStore.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "ray/core_worker/lib/java/org_ray_runtime_object_NativeObjectStore.h" +#include "ray/core_worker/lib/java/io_ray_runtime_object_NativeObjectStore.h" #include #include "ray/common/id.h" #include "ray/core_worker/common.h" @@ -24,7 +24,7 @@ extern "C" { #endif JNIEXPORT jbyteArray JNICALL -Java_org_ray_runtime_object_NativeObjectStore_nativePut__Lorg_ray_runtime_object_NativeRayObject_2( +Java_io_ray_runtime_object_NativeObjectStore_nativePut__Lio_ray_runtime_object_NativeRayObject_2( JNIEnv *env, jclass, jobject obj) { auto ray_object = JavaNativeRayObjectToNativeRayObject(env, obj); RAY_CHECK(ray_object != nullptr); @@ -35,7 +35,7 @@ Java_org_ray_runtime_object_NativeObjectStore_nativePut__Lorg_ray_runtime_object } JNIEXPORT void JNICALL -Java_org_ray_runtime_object_NativeObjectStore_nativePut___3BLorg_ray_runtime_object_NativeRayObject_2( +Java_io_ray_runtime_object_NativeObjectStore_nativePut___3BLio_ray_runtime_object_NativeRayObject_2( JNIEnv *env, jclass, jbyteArray objectId, jobject obj) { auto object_id = JavaByteArrayToId(env, objectId); auto ray_object = JavaNativeRayObjectToNativeRayObject(env, obj); @@ -44,7 +44,7 @@ Java_org_ray_runtime_object_NativeObjectStore_nativePut___3BLorg_ray_runtime_obj THROW_EXCEPTION_AND_RETURN_IF_NOT_OK(env, status, (void)0); } -JNIEXPORT jobject JNICALL Java_org_ray_runtime_object_NativeObjectStore_nativeGet( +JNIEXPORT jobject JNICALL Java_io_ray_runtime_object_NativeObjectStore_nativeGet( JNIEnv *env, jclass, jobject ids, jlong timeoutMs) { std::vector object_ids; JavaListToNativeVector( @@ -59,7 +59,7 @@ JNIEXPORT jobject JNICALL Java_org_ray_runtime_object_NativeObjectStore_nativeGe env, results, NativeRayObjectToJavaNativeRayObject); } -JNIEXPORT jobject JNICALL Java_org_ray_runtime_object_NativeObjectStore_nativeWait( +JNIEXPORT jobject JNICALL Java_io_ray_runtime_object_NativeObjectStore_nativeWait( JNIEnv *env, jclass, jobject objectIds, jint numObjects, jlong timeoutMs) { std::vector object_ids; JavaListToNativeVector( @@ -75,7 +75,7 @@ JNIEXPORT jobject JNICALL Java_org_ray_runtime_object_NativeObjectStore_nativeWa }); } -JNIEXPORT void JNICALL Java_org_ray_runtime_object_NativeObjectStore_nativeDelete( +JNIEXPORT void JNICALL Java_io_ray_runtime_object_NativeObjectStore_nativeDelete( JNIEnv *env, jclass, jobject objectIds, jboolean localOnly, jboolean deleteCreatingTasks) { std::vector object_ids; diff --git a/src/ray/core_worker/lib/java/org_ray_runtime_object_NativeObjectStore.h b/src/ray/core_worker/lib/java/io_ray_runtime_object_NativeObjectStore.h similarity index 60% rename from src/ray/core_worker/lib/java/org_ray_runtime_object_NativeObjectStore.h rename to src/ray/core_worker/lib/java/io_ray_runtime_object_NativeObjectStore.h index 1cf64a7ba..31fe70b23 100644 --- a/src/ray/core_worker/lib/java/org_ray_runtime_object_NativeObjectStore.h +++ b/src/ray/core_worker/lib/java/io_ray_runtime_object_NativeObjectStore.h @@ -14,53 +14,53 @@ /* DO NOT EDIT THIS FILE - it is machine generated */ #include -/* Header for class org_ray_runtime_object_NativeObjectStore */ +/* Header for class io_ray_runtime_object_NativeObjectStore */ -#ifndef _Included_org_ray_runtime_object_NativeObjectStore -#define _Included_org_ray_runtime_object_NativeObjectStore +#ifndef _Included_io_ray_runtime_object_NativeObjectStore +#define _Included_io_ray_runtime_object_NativeObjectStore #ifdef __cplusplus extern "C" { #endif /* - * Class: org_ray_runtime_object_NativeObjectStore + * Class: io_ray_runtime_object_NativeObjectStore * Method: nativePut * Signature: (Lorg/ray/runtime/object/NativeRayObject;)[B */ JNIEXPORT jbyteArray JNICALL -Java_org_ray_runtime_object_NativeObjectStore_nativePut__Lorg_ray_runtime_object_NativeRayObject_2( +Java_io_ray_runtime_object_NativeObjectStore_nativePut__Lio_ray_runtime_object_NativeRayObject_2( JNIEnv *, jclass, jobject); /* - * Class: org_ray_runtime_object_NativeObjectStore + * Class: io_ray_runtime_object_NativeObjectStore * Method: nativePut * Signature: ([BLorg/ray/runtime/object/NativeRayObject;)V */ JNIEXPORT void JNICALL -Java_org_ray_runtime_object_NativeObjectStore_nativePut___3BLorg_ray_runtime_object_NativeRayObject_2( +Java_io_ray_runtime_object_NativeObjectStore_nativePut___3BLio_ray_runtime_object_NativeRayObject_2( JNIEnv *, jclass, jbyteArray, jobject); /* - * Class: org_ray_runtime_object_NativeObjectStore + * Class: io_ray_runtime_object_NativeObjectStore * Method: nativeGet * Signature: (Ljava/util/List;J)Ljava/util/List; */ JNIEXPORT jobject JNICALL -Java_org_ray_runtime_object_NativeObjectStore_nativeGet(JNIEnv *, jclass, jobject, jlong); +Java_io_ray_runtime_object_NativeObjectStore_nativeGet(JNIEnv *, jclass, jobject, jlong); /* - * Class: org_ray_runtime_object_NativeObjectStore + * Class: io_ray_runtime_object_NativeObjectStore * Method: nativeWait * Signature: (Ljava/util/List;IJ)Ljava/util/List; */ -JNIEXPORT jobject JNICALL Java_org_ray_runtime_object_NativeObjectStore_nativeWait( +JNIEXPORT jobject JNICALL Java_io_ray_runtime_object_NativeObjectStore_nativeWait( JNIEnv *, jclass, jobject, jint, jlong); /* - * Class: org_ray_runtime_object_NativeObjectStore + * Class: io_ray_runtime_object_NativeObjectStore * Method: nativeDelete * Signature: (Ljava/util/List;ZZ)V */ -JNIEXPORT void JNICALL Java_org_ray_runtime_object_NativeObjectStore_nativeDelete( +JNIEXPORT void JNICALL Java_io_ray_runtime_object_NativeObjectStore_nativeDelete( JNIEnv *, jclass, jobject, jboolean, jboolean); #ifdef __cplusplus diff --git a/src/ray/core_worker/lib/java/org_ray_runtime_task_NativeTaskExecutor.cc b/src/ray/core_worker/lib/java/io_ray_runtime_task_NativeTaskExecutor.cc similarity index 89% rename from src/ray/core_worker/lib/java/org_ray_runtime_task_NativeTaskExecutor.cc rename to src/ray/core_worker/lib/java/io_ray_runtime_task_NativeTaskExecutor.cc index 9753793ef..d0d05bb88 100644 --- a/src/ray/core_worker/lib/java/org_ray_runtime_task_NativeTaskExecutor.cc +++ b/src/ray/core_worker/lib/java/io_ray_runtime_task_NativeTaskExecutor.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "ray/core_worker/lib/java/org_ray_runtime_task_NativeTaskExecutor.h" +#include "ray/core_worker/lib/java/io_ray_runtime_task_NativeTaskExecutor.h" #include #include "ray/common/id.h" #include "ray/core_worker/common.h" @@ -27,7 +27,7 @@ extern "C" { using ray::ClientID; JNIEXPORT jbyteArray JNICALL -Java_org_ray_runtime_task_NativeTaskExecutor_nativePrepareCheckpoint(JNIEnv *env, +Java_io_ray_runtime_task_NativeTaskExecutor_nativePrepareCheckpoint(JNIEnv *env, jclass) { auto &core_worker = ray::CoreWorkerProcess::GetCoreWorker(); const auto &actor_id = core_worker.GetWorkerContext().GetCurrentActorID(); @@ -43,7 +43,7 @@ Java_org_ray_runtime_task_NativeTaskExecutor_nativePrepareCheckpoint(JNIEnv *env } JNIEXPORT void JNICALL -Java_org_ray_runtime_task_NativeTaskExecutor_nativeNotifyActorResumedFromCheckpoint( +Java_io_ray_runtime_task_NativeTaskExecutor_nativeNotifyActorResumedFromCheckpoint( JNIEnv *env, jclass, jbyteArray checkpointId) { const auto &actor_id = ray::CoreWorkerProcess::GetCoreWorker().GetWorkerContext().GetCurrentActorID(); diff --git a/src/ray/core_worker/lib/java/org_ray_runtime_task_NativeTaskExecutor.h b/src/ray/core_worker/lib/java/io_ray_runtime_task_NativeTaskExecutor.h similarity index 61% rename from src/ray/core_worker/lib/java/org_ray_runtime_task_NativeTaskExecutor.h rename to src/ray/core_worker/lib/java/io_ray_runtime_task_NativeTaskExecutor.h index 87b0f1837..bf376aa12 100644 --- a/src/ray/core_worker/lib/java/org_ray_runtime_task_NativeTaskExecutor.h +++ b/src/ray/core_worker/lib/java/io_ray_runtime_task_NativeTaskExecutor.h @@ -14,30 +14,30 @@ /* DO NOT EDIT THIS FILE - it is machine generated */ #include -/* Header for class org_ray_runtime_task_NativeTaskExecutor */ +/* Header for class io_ray_runtime_task_NativeTaskExecutor */ -#ifndef _Included_org_ray_runtime_task_NativeTaskExecutor -#define _Included_org_ray_runtime_task_NativeTaskExecutor +#ifndef _Included_io_ray_runtime_task_NativeTaskExecutor +#define _Included_io_ray_runtime_task_NativeTaskExecutor #ifdef __cplusplus extern "C" { #endif -#undef org_ray_runtime_task_NativeTaskExecutor_NUM_ACTOR_CHECKPOINTS_TO_KEEP -#define org_ray_runtime_task_NativeTaskExecutor_NUM_ACTOR_CHECKPOINTS_TO_KEEP 20L +#undef io_ray_runtime_task_NativeTaskExecutor_NUM_ACTOR_CHECKPOINTS_TO_KEEP +#define io_ray_runtime_task_NativeTaskExecutor_NUM_ACTOR_CHECKPOINTS_TO_KEEP 20L /* - * Class: org_ray_runtime_task_NativeTaskExecutor + * Class: io_ray_runtime_task_NativeTaskExecutor * Method: nativePrepareCheckpoint * Signature: ()[B */ JNIEXPORT jbyteArray JNICALL -Java_org_ray_runtime_task_NativeTaskExecutor_nativePrepareCheckpoint(JNIEnv *, jclass); +Java_io_ray_runtime_task_NativeTaskExecutor_nativePrepareCheckpoint(JNIEnv *, jclass); /* - * Class: org_ray_runtime_task_NativeTaskExecutor + * Class: io_ray_runtime_task_NativeTaskExecutor * Method: nativeNotifyActorResumedFromCheckpoint * Signature: ([B)V */ JNIEXPORT void JNICALL -Java_org_ray_runtime_task_NativeTaskExecutor_nativeNotifyActorResumedFromCheckpoint( +Java_io_ray_runtime_task_NativeTaskExecutor_nativeNotifyActorResumedFromCheckpoint( JNIEnv *, jclass, jbyteArray); #ifdef __cplusplus diff --git a/src/ray/core_worker/lib/java/org_ray_runtime_task_NativeTaskSubmitter.cc b/src/ray/core_worker/lib/java/io_ray_runtime_task_NativeTaskSubmitter.cc similarity index 95% rename from src/ray/core_worker/lib/java/org_ray_runtime_task_NativeTaskSubmitter.cc rename to src/ray/core_worker/lib/java/io_ray_runtime_task_NativeTaskSubmitter.cc index 9a1e26a75..5c07706e1 100644 --- a/src/ray/core_worker/lib/java/org_ray_runtime_task_NativeTaskSubmitter.cc +++ b/src/ray/core_worker/lib/java/io_ray_runtime_task_NativeTaskSubmitter.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "ray/core_worker/lib/java/org_ray_runtime_task_NativeTaskSubmitter.h" +#include "ray/core_worker/lib/java/io_ray_runtime_task_NativeTaskSubmitter.h" #include #include "ray/common/id.h" #include "ray/core_worker/common.h" @@ -122,7 +122,7 @@ inline ray::ActorCreationOptions ToActorCreationOptions(JNIEnv *env, extern "C" { #endif -JNIEXPORT jobject JNICALL Java_org_ray_runtime_task_NativeTaskSubmitter_nativeSubmitTask( +JNIEXPORT jobject JNICALL Java_io_ray_runtime_task_NativeTaskSubmitter_nativeSubmitTask( JNIEnv *env, jclass p, jobject functionDescriptor, jobject args, jint numReturns, jobject callOptions) { auto ray_function = ToRayFunction(env, functionDescriptor); @@ -141,7 +141,7 @@ JNIEXPORT jobject JNICALL Java_org_ray_runtime_task_NativeTaskSubmitter_nativeSu } JNIEXPORT jbyteArray JNICALL -Java_org_ray_runtime_task_NativeTaskSubmitter_nativeCreateActor( +Java_io_ray_runtime_task_NativeTaskSubmitter_nativeCreateActor( JNIEnv *env, jclass p, jobject functionDescriptor, jobject args, jobject actorCreationOptions) { auto ray_function = ToRayFunction(env, functionDescriptor); @@ -158,7 +158,7 @@ Java_org_ray_runtime_task_NativeTaskSubmitter_nativeCreateActor( } JNIEXPORT jobject JNICALL -Java_org_ray_runtime_task_NativeTaskSubmitter_nativeSubmitActorTask( +Java_io_ray_runtime_task_NativeTaskSubmitter_nativeSubmitActorTask( JNIEnv *env, jclass p, jbyteArray actorId, jobject functionDescriptor, jobject args, jint numReturns, jobject callOptions) { auto actor_id = JavaByteArrayToId(env, actorId); diff --git a/src/ray/core_worker/lib/java/org_ray_runtime_task_NativeTaskSubmitter.h b/src/ray/core_worker/lib/java/io_ray_runtime_task_NativeTaskSubmitter.h similarity index 73% rename from src/ray/core_worker/lib/java/org_ray_runtime_task_NativeTaskSubmitter.h rename to src/ray/core_worker/lib/java/io_ray_runtime_task_NativeTaskSubmitter.h index 472f2aaf7..26dfab594 100644 --- a/src/ray/core_worker/lib/java/org_ray_runtime_task_NativeTaskSubmitter.h +++ b/src/ray/core_worker/lib/java/io_ray_runtime_task_NativeTaskSubmitter.h @@ -14,40 +14,40 @@ /* DO NOT EDIT THIS FILE - it is machine generated */ #include -/* Header for class org_ray_runtime_task_NativeTaskSubmitter */ +/* Header for class io_ray_runtime_task_NativeTaskSubmitter */ -#ifndef _Included_org_ray_runtime_task_NativeTaskSubmitter -#define _Included_org_ray_runtime_task_NativeTaskSubmitter +#ifndef _Included_io_ray_runtime_task_NativeTaskSubmitter +#define _Included_io_ray_runtime_task_NativeTaskSubmitter #ifdef __cplusplus extern "C" { #endif /* - * Class: org_ray_runtime_task_NativeTaskSubmitter + * Class: io_ray_runtime_task_NativeTaskSubmitter * Method: nativeSubmitTask * Signature: * (Lorg/ray/runtime/functionmanager/FunctionDescriptor;Ljava/util/List;ILorg/ray/api/options/CallOptions;)Ljava/util/List; */ -JNIEXPORT jobject JNICALL Java_org_ray_runtime_task_NativeTaskSubmitter_nativeSubmitTask( +JNIEXPORT jobject JNICALL Java_io_ray_runtime_task_NativeTaskSubmitter_nativeSubmitTask( JNIEnv *, jclass, jobject, jobject, jint, jobject); /* - * Class: org_ray_runtime_task_NativeTaskSubmitter + * Class: io_ray_runtime_task_NativeTaskSubmitter * Method: nativeCreateActor * Signature: * (Lorg/ray/runtime/functionmanager/FunctionDescriptor;Ljava/util/List;Lorg/ray/api/options/ActorCreationOptions;)[B */ JNIEXPORT jbyteArray JNICALL -Java_org_ray_runtime_task_NativeTaskSubmitter_nativeCreateActor(JNIEnv *, jclass, jobject, +Java_io_ray_runtime_task_NativeTaskSubmitter_nativeCreateActor(JNIEnv *, jclass, jobject, jobject, jobject); /* - * Class: org_ray_runtime_task_NativeTaskSubmitter + * Class: io_ray_runtime_task_NativeTaskSubmitter * Method: nativeSubmitActorTask * Signature: * ([BLorg/ray/runtime/functionmanager/FunctionDescriptor;Ljava/util/List;ILorg/ray/api/options/CallOptions;)Ljava/util/List; */ JNIEXPORT jobject JNICALL -Java_org_ray_runtime_task_NativeTaskSubmitter_nativeSubmitActorTask(JNIEnv *, jclass, +Java_io_ray_runtime_task_NativeTaskSubmitter_nativeSubmitActorTask(JNIEnv *, jclass, jbyteArray, jobject, jobject, jint, jobject); diff --git a/src/ray/core_worker/lib/java/jni_init.cc b/src/ray/core_worker/lib/java/jni_init.cc index 57de4fdcf..ae66bcddc 100644 --- a/src/ray/core_worker/lib/java/jni_init.cc +++ b/src/ray/core_worker/lib/java/jni_init.cc @@ -136,46 +136,46 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) { java_map_entry_get_value = env->GetMethodID(java_map_entry_class, "getValue", "()Ljava/lang/Object;"); - java_ray_exception_class = LoadClass(env, "org/ray/api/exception/RayException"); + java_ray_exception_class = LoadClass(env, "io/ray/api/exception/RayException"); - java_jni_exception_util_class = LoadClass(env, "org/ray/runtime/util/JniExceptionUtil"); + java_jni_exception_util_class = LoadClass(env, "io/ray/runtime/util/JniExceptionUtil"); java_jni_exception_util_get_stack_trace = env->GetStaticMethodID( java_jni_exception_util_class, "getStackTrace", "(Ljava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)Ljava/lang/String;"); - java_base_id_class = LoadClass(env, "org/ray/api/id/BaseId"); + java_base_id_class = LoadClass(env, "io/ray/api/id/BaseId"); java_base_id_get_bytes = env->GetMethodID(java_base_id_class, "getBytes", "()[B"); java_function_descriptor_class = - LoadClass(env, "org/ray/runtime/functionmanager/FunctionDescriptor"); + LoadClass(env, "io/ray/runtime/functionmanager/FunctionDescriptor"); java_function_descriptor_get_language = env->GetMethodID(java_function_descriptor_class, "getLanguage", - "()Lorg/ray/runtime/generated/Common$Language;"); + "()Lio/ray/runtime/generated/Common$Language;"); java_function_descriptor_to_list = env->GetMethodID(java_function_descriptor_class, "toList", "()Ljava/util/List;"); - java_language_class = LoadClass(env, "org/ray/runtime/generated/Common$Language"); + java_language_class = LoadClass(env, "io/ray/runtime/generated/Common$Language"); java_language_get_number = env->GetMethodID(java_language_class, "getNumber", "()I"); - java_function_arg_class = LoadClass(env, "org/ray/runtime/task/FunctionArg"); + java_function_arg_class = LoadClass(env, "io/ray/runtime/task/FunctionArg"); java_function_arg_id = - env->GetFieldID(java_function_arg_class, "id", "Lorg/ray/api/id/ObjectId;"); + env->GetFieldID(java_function_arg_class, "id", "Lio/ray/api/id/ObjectId;"); java_function_arg_value = env->GetFieldID(java_function_arg_class, "value", - "Lorg/ray/runtime/object/NativeRayObject;"); + "Lio/ray/runtime/object/NativeRayObject;"); - java_base_task_options_class = LoadClass(env, "org/ray/api/options/BaseTaskOptions"); + java_base_task_options_class = LoadClass(env, "io/ray/api/options/BaseTaskOptions"); java_base_task_options_resources = env->GetFieldID(java_base_task_options_class, "resources", "Ljava/util/Map;"); java_actor_creation_options_class = - LoadClass(env, "org/ray/api/options/ActorCreationOptions"); + LoadClass(env, "io/ray/api/options/ActorCreationOptions"); java_actor_creation_options_max_reconstructions = env->GetFieldID(java_actor_creation_options_class, "maxReconstructions", "I"); java_actor_creation_options_jvm_options = env->GetFieldID( java_actor_creation_options_class, "jvmOptions", "Ljava/lang/String;"); java_actor_creation_options_max_concurrency = env->GetFieldID(java_actor_creation_options_class, "maxConcurrency", "I"); - java_gcs_client_options_class = LoadClass(env, "org/ray/runtime/gcs/GcsClientOptions"); + java_gcs_client_options_class = LoadClass(env, "io/ray/runtime/gcs/GcsClientOptions"); java_gcs_client_options_ip = env->GetFieldID(java_gcs_client_options_class, "ip", "Ljava/lang/String;"); java_gcs_client_options_port = @@ -183,7 +183,7 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) { java_gcs_client_options_password = env->GetFieldID(java_gcs_client_options_class, "password", "Ljava/lang/String;"); - java_native_ray_object_class = LoadClass(env, "org/ray/runtime/object/NativeRayObject"); + java_native_ray_object_class = LoadClass(env, "io/ray/runtime/object/NativeRayObject"); java_native_ray_object_init = env->GetMethodID(java_native_ray_object_class, "", "([B[B)V"); java_native_ray_object_data = @@ -191,11 +191,10 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) { java_native_ray_object_metadata = env->GetFieldID(java_native_ray_object_class, "metadata", "[B"); - java_task_executor_class = LoadClass(env, "org/ray/runtime/task/TaskExecutor"); + java_task_executor_class = LoadClass(env, "io/ray/runtime/task/TaskExecutor"); java_task_executor_execute = env->GetMethodID(java_task_executor_class, "execute", "(Ljava/util/List;Ljava/util/List;)Ljava/util/List;"); - return CURRENT_JNI_VERSION; } diff --git a/src/ray/protobuf/common.proto b/src/ray/protobuf/common.proto index 77da54370..80eb6f111 100644 --- a/src/ray/protobuf/common.proto +++ b/src/ray/protobuf/common.proto @@ -16,7 +16,7 @@ syntax = "proto3"; package ray.rpc; -option java_package = "org.ray.runtime.generated"; +option java_package = "io.ray.runtime.generated"; // Language of a task or worker. enum Language { diff --git a/src/ray/protobuf/gcs.proto b/src/ray/protobuf/gcs.proto index 0eb56098c..c137fbf25 100644 --- a/src/ray/protobuf/gcs.proto +++ b/src/ray/protobuf/gcs.proto @@ -18,7 +18,7 @@ package ray.rpc; import "src/ray/protobuf/common.proto"; -option java_package = "org.ray.runtime.generated"; +option java_package = "io.ray.runtime.generated"; // These indexes are mapped to strings in ray_redis_module.cc. enum TablePrefix { diff --git a/streaming/java/BUILD.bazel b/streaming/java/BUILD.bazel index 53331edcd..0ec9b8831 100644 --- a/streaming/java/BUILD.bazel +++ b/streaming/java/BUILD.bazel @@ -13,17 +13,17 @@ all_modules = [ java_import( name = "all_modules", jars = [ - "liborg_ray_ray_" + module + ".jar" + "libio_ray_ray_" + module + ".jar" for module in all_modules ] + [ - "liborg_ray_ray_" + module + "-src.jar" + "libio_ray_ray_" + module + "-src.jar" for module in all_modules ] + [ "all_streaming_tests_deploy.jar", "all_streaming_tests_deploy-src.jar", ], deps = [ - ":org_ray_ray_" + module + ":io_ray_ray_" + module for module in all_modules ] + [ ":all_streaming_tests", @@ -34,8 +34,8 @@ define_java_module( name = "streaming-api", define_test_lib = True, test_deps = [ - "//java:org_ray_ray_api", - ":org_ray_ray_streaming-api", + "//java:io_ray_ray_api", + ":io_ray_ray_streaming-api", "@ray_streaming_maven//:com_google_guava_guava", "@ray_streaming_maven//:org_slf4j_slf4j_api", "@ray_streaming_maven//:org_slf4j_slf4j_log4j12", @@ -93,13 +93,13 @@ define_java_module( ], define_test_lib = True, exclude_srcs = [ - "streaming-runtime/src/main/java/org/ray/streaming/runtime/generated/*.java", + "streaming-runtime/src/main/java/io/ray/streaming/runtime/generated/*.java", ], test_deps = [ - "//java:org_ray_ray_api", - "//java:org_ray_ray_runtime", - ":org_ray_ray_streaming-api", - ":org_ray_ray_streaming-runtime", + "//java:io_ray_ray_api", + "//java:io_ray_ray_runtime", + ":io_ray_ray_streaming-api", + ":io_ray_ray_streaming-runtime", "@ray_streaming_maven//:com_google_guava_guava", "@ray_streaming_maven//:de_ruedigermoeller_fst", "@ray_streaming_maven//:org_msgpack_msgpack_core", @@ -110,9 +110,9 @@ define_java_module( ], visibility = ["//visibility:public"], deps = [ - ":org_ray_ray_streaming-api", - "//java:org_ray_ray_api", - "//java:org_ray_ray_runtime", + ":io_ray_ray_streaming-api", + "//java:io_ray_ray_api", + "//java:io_ray_ray_runtime", "@ray_streaming_maven//:com_github_davidmoten_flatbuffers_java", "@ray_streaming_maven//:com_google_guava_guava", "@ray_streaming_maven//:com_google_protobuf_protobuf_java", @@ -130,10 +130,10 @@ java_binary( data = ["testng.xml"], main_class = "org.testng.TestNG", runtime_deps = [ - ":org_ray_ray_streaming-api_test", - ":org_ray_ray_streaming-runtime", - ":org_ray_ray_streaming-runtime_test", - "//java:org_ray_ray_runtime", + ":io_ray_ray_streaming-api_test", + ":io_ray_ray_streaming-runtime", + ":io_ray_ray_streaming-runtime_test", + "//java:io_ray_ray_runtime", "@ray_streaming_maven//:com_beust_jcommander", "@ray_streaming_maven//:org_testng_testng", ], @@ -161,15 +161,15 @@ filegroup( genrule( name = "copy_pom_file", srcs = [ - "//streaming/java:org_ray_ray_" + module + "_pom" + "//streaming/java:io_ray_ray_" + module + "_pom" for module in all_modules ], outs = ["copy_pom_file.out"], cmd = """ set -x WORK_DIR="$$(pwd)" - cp -f $(location //streaming/java:org_ray_ray_streaming-api_pom) "$$WORK_DIR/streaming/java/streaming-api/pom.xml" - cp -f $(location //streaming/java:org_ray_ray_streaming-runtime_pom) "$$WORK_DIR/streaming/java/streaming-runtime/pom.xml" + cp -f $(location //streaming/java:io_ray_ray_streaming-api_pom) "$$WORK_DIR/streaming/java/streaming-api/pom.xml" + cp -f $(location //streaming/java:io_ray_ray_streaming-runtime_pom) "$$WORK_DIR/streaming/java/streaming-runtime/pom.xml" date > $@ """, local = 1, @@ -186,7 +186,7 @@ genrule( cmd = """ set -x WORK_DIR="$$(pwd)" - GENERATED_DIR="$$WORK_DIR/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/generated" + GENERATED_DIR="$$WORK_DIR/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/generated" rm -rf "$$GENERATED_DIR" mkdir -p "$$GENERATED_DIR" # Copy protobuf-generated files. diff --git a/streaming/java/checkstyle-suppressions.xml b/streaming/java/checkstyle-suppressions.xml index 7847b6a83..7bb5e95cb 100644 --- a/streaming/java/checkstyle-suppressions.xml +++ b/streaming/java/checkstyle-suppressions.xml @@ -10,5 +10,5 @@ - + diff --git a/streaming/java/pom.xml b/streaming/java/pom.xml index 02e222b5a..d0fea927c 100644 --- a/streaming/java/pom.xml +++ b/streaming/java/pom.xml @@ -8,7 +8,7 @@ 4.0.0 pom - org.ray + io.ray ray-streaming 0.1-SNAPSHOT ray streaming diff --git a/streaming/java/streaming-api/pom.xml b/streaming/java/streaming-api/pom.xml index 419636d48..9c8ff9764 100755 --- a/streaming/java/streaming-api/pom.xml +++ b/streaming/java/streaming-api/pom.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> ray-streaming - org.ray + io.ray 0.1-SNAPSHOT 4.0.0 @@ -18,7 +18,7 @@ - org.ray + io.ray ray-api ${project.version} diff --git a/streaming/java/streaming-api/pom_template.xml b/streaming/java/streaming-api/pom_template.xml index 53c0e9d7e..6ea6d8701 100644 --- a/streaming/java/streaming-api/pom_template.xml +++ b/streaming/java/streaming-api/pom_template.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> ray-streaming - org.ray + io.ray 0.1-SNAPSHOT 4.0.0 @@ -18,7 +18,7 @@ - org.ray + io.ray ray-api ${project.version} diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/Language.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/Language.java similarity index 58% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/Language.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/Language.java index 80f254f43..e580b34f2 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/Language.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/Language.java @@ -1,4 +1,4 @@ -package org.ray.streaming.api; +package io.ray.streaming.api; public enum Language { JAVA, diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/collector/CollectionCollector.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/collector/CollectionCollector.java similarity index 85% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/collector/CollectionCollector.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/collector/CollectionCollector.java index 33b0fcd4c..04504a845 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/collector/CollectionCollector.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/collector/CollectionCollector.java @@ -1,7 +1,7 @@ -package org.ray.streaming.api.collector; +package io.ray.streaming.api.collector; +import io.ray.streaming.message.Record; import java.util.List; -import org.ray.streaming.message.Record; /** * Combination of multiple collectors. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/collector/Collector.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/collector/Collector.java similarity index 84% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/collector/Collector.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/collector/Collector.java index 481f3e95f..1fba29053 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/collector/Collector.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/collector/Collector.java @@ -1,4 +1,4 @@ -package org.ray.streaming.api.collector; +package io.ray.streaming.api.collector; /** * The collector that collects data from an upstream operator, and emits data to downstream diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/context/RuntimeContext.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/context/RuntimeContext.java similarity index 84% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/context/RuntimeContext.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/context/RuntimeContext.java index 4a6ca368e..fa723c8ae 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/context/RuntimeContext.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/context/RuntimeContext.java @@ -1,4 +1,4 @@ -package org.ray.streaming.api.context; +package io.ray.streaming.api.context; /** * Encapsulate the runtime information of a streaming task. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/context/StreamingContext.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/context/StreamingContext.java similarity index 89% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/context/StreamingContext.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/context/StreamingContext.java index cee30fddb..edf2fcd50 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/context/StreamingContext.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/context/StreamingContext.java @@ -1,6 +1,10 @@ -package org.ray.streaming.api.context; +package io.ray.streaming.api.context; import com.google.common.base.Preconditions; +import io.ray.streaming.api.stream.StreamSink; +import io.ray.streaming.jobgraph.JobGraph; +import io.ray.streaming.jobgraph.JobGraphBuilder; +import io.ray.streaming.schedule.JobScheduler; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; @@ -9,10 +13,6 @@ import java.util.List; import java.util.Map; import java.util.ServiceLoader; import java.util.concurrent.atomic.AtomicInteger; -import org.ray.streaming.api.stream.StreamSink; -import org.ray.streaming.jobgraph.JobGraph; -import org.ray.streaming.jobgraph.JobGraphBuilder; -import org.ray.streaming.schedule.JobScheduler; /** * Encapsulate the context information of a streaming Job. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/Function.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/Function.java similarity index 76% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/Function.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/Function.java index 35fe994b7..f29915381 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/Function.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/Function.java @@ -1,4 +1,4 @@ -package org.ray.streaming.api.function; +package io.ray.streaming.api.function; import java.io.Serializable; diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/AggregateFunction.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/AggregateFunction.java similarity index 80% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/AggregateFunction.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/AggregateFunction.java index a7a8032e1..53ef5144f 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/AggregateFunction.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/AggregateFunction.java @@ -1,6 +1,6 @@ -package org.ray.streaming.api.function.impl; +package io.ray.streaming.api.function.impl; -import org.ray.streaming.api.function.Function; +import io.ray.streaming.api.function.Function; /** * Interface of aggregate functions. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/FilterFunction.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/FilterFunction.java similarity index 84% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/FilterFunction.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/FilterFunction.java index 9b63bfac8..ad8e630ea 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/FilterFunction.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/FilterFunction.java @@ -1,6 +1,6 @@ -package org.ray.streaming.api.function.impl; +package io.ray.streaming.api.function.impl; -import org.ray.streaming.api.function.Function; +import io.ray.streaming.api.function.Function; /** * A filter function is a predicate applied individually to each record. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/FlatMapFunction.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/FlatMapFunction.java similarity index 64% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/FlatMapFunction.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/FlatMapFunction.java index 20b2a91de..fe648cb57 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/FlatMapFunction.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/FlatMapFunction.java @@ -1,7 +1,7 @@ -package org.ray.streaming.api.function.impl; +package io.ray.streaming.api.function.impl; -import org.ray.streaming.api.collector.Collector; -import org.ray.streaming.api.function.Function; +import io.ray.streaming.api.collector.Collector; +import io.ray.streaming.api.function.Function; /** * Interface of flat-map functions. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/JoinFunction.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/JoinFunction.java similarity index 75% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/JoinFunction.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/JoinFunction.java index 8dad87a90..e851da194 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/JoinFunction.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/JoinFunction.java @@ -1,6 +1,6 @@ -package org.ray.streaming.api.function.impl; +package io.ray.streaming.api.function.impl; -import org.ray.streaming.api.function.Function; +import io.ray.streaming.api.function.Function; /** * Interface of join functions. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/KeyFunction.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/KeyFunction.java similarity index 70% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/KeyFunction.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/KeyFunction.java index 4c3c28904..c1cd608c6 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/KeyFunction.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/KeyFunction.java @@ -1,6 +1,6 @@ -package org.ray.streaming.api.function.impl; +package io.ray.streaming.api.function.impl; -import org.ray.streaming.api.function.Function; +import io.ray.streaming.api.function.Function; /** * Interface of key-by functions. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/MapFunction.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/MapFunction.java similarity index 70% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/MapFunction.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/MapFunction.java index 88a487fc7..ee2c76c82 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/MapFunction.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/MapFunction.java @@ -1,6 +1,6 @@ -package org.ray.streaming.api.function.impl; +package io.ray.streaming.api.function.impl; -import org.ray.streaming.api.function.Function; +import io.ray.streaming.api.function.Function; /** * Interface of map functions. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/ProcessFunction.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/ProcessFunction.java similarity index 67% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/ProcessFunction.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/ProcessFunction.java index 5633783aa..eab9e711f 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/ProcessFunction.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/ProcessFunction.java @@ -1,6 +1,6 @@ -package org.ray.streaming.api.function.impl; +package io.ray.streaming.api.function.impl; -import org.ray.streaming.api.function.Function; +import io.ray.streaming.api.function.Function; /** * Interface of process functions. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/ReduceFunction.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/ReduceFunction.java similarity index 68% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/ReduceFunction.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/ReduceFunction.java index 96d6ab289..350ea9264 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/ReduceFunction.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/ReduceFunction.java @@ -1,6 +1,6 @@ -package org.ray.streaming.api.function.impl; +package io.ray.streaming.api.function.impl; -import org.ray.streaming.api.function.Function; +import io.ray.streaming.api.function.Function; /** * Interface of reduce functions. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/SinkFunction.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/SinkFunction.java similarity index 65% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/SinkFunction.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/SinkFunction.java index 6a311a30e..31a156bc7 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/SinkFunction.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/SinkFunction.java @@ -1,6 +1,6 @@ -package org.ray.streaming.api.function.impl; +package io.ray.streaming.api.function.impl; -import org.ray.streaming.api.function.Function; +import io.ray.streaming.api.function.Function; /** * Interface of sink functions. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/SourceFunction.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/SourceFunction.java similarity index 78% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/SourceFunction.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/SourceFunction.java index 93d2030e3..40135b34b 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/impl/SourceFunction.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/impl/SourceFunction.java @@ -1,6 +1,6 @@ -package org.ray.streaming.api.function.impl; +package io.ray.streaming.api.function.impl; -import org.ray.streaming.api.function.Function; +import io.ray.streaming.api.function.Function; /** * Interface of Source functions. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/internal/CollectionSourceFunction.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/internal/CollectionSourceFunction.java similarity index 86% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/internal/CollectionSourceFunction.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/internal/CollectionSourceFunction.java index 48c29ff7a..b14aa9a6c 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/function/internal/CollectionSourceFunction.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/function/internal/CollectionSourceFunction.java @@ -1,8 +1,8 @@ -package org.ray.streaming.api.function.internal; +package io.ray.streaming.api.function.internal; +import io.ray.streaming.api.function.impl.SourceFunction; import java.util.ArrayList; import java.util.Collection; -import org.ray.streaming.api.function.impl.SourceFunction; /** * The SourceFunction that fetch data from a Java Collection object. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/partition/Partition.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/partition/Partition.java similarity index 84% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/partition/Partition.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/partition/Partition.java index 9ea5d28ed..5f923769b 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/partition/Partition.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/partition/Partition.java @@ -1,6 +1,6 @@ -package org.ray.streaming.api.partition; +package io.ray.streaming.api.partition; -import org.ray.streaming.api.function.Function; +import io.ray.streaming.api.function.Function; /** * Interface of the partitioning strategy. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/partition/impl/BroadcastPartition.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/partition/impl/BroadcastPartition.java similarity index 82% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/partition/impl/BroadcastPartition.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/partition/impl/BroadcastPartition.java index c148c4ec5..4135c9f5e 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/partition/impl/BroadcastPartition.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/partition/impl/BroadcastPartition.java @@ -1,7 +1,7 @@ -package org.ray.streaming.api.partition.impl; +package io.ray.streaming.api.partition.impl; +import io.ray.streaming.api.partition.Partition; import java.util.stream.IntStream; -import org.ray.streaming.api.partition.Partition; /** * Broadcast the record to all downstream partitions. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/partition/impl/KeyPartition.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/partition/impl/KeyPartition.java similarity index 75% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/partition/impl/KeyPartition.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/partition/impl/KeyPartition.java index ac4d635d4..b76b41c3e 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/partition/impl/KeyPartition.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/partition/impl/KeyPartition.java @@ -1,7 +1,7 @@ -package org.ray.streaming.api.partition.impl; +package io.ray.streaming.api.partition.impl; -import org.ray.streaming.api.partition.Partition; -import org.ray.streaming.message.KeyRecord; +import io.ray.streaming.api.partition.Partition; +import io.ray.streaming.message.KeyRecord; /** * Partition the record by the key. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/partition/impl/RoundRobinPartition.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/partition/impl/RoundRobinPartition.java similarity index 82% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/partition/impl/RoundRobinPartition.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/partition/impl/RoundRobinPartition.java index 0c8f7a68c..3e5960740 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/partition/impl/RoundRobinPartition.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/partition/impl/RoundRobinPartition.java @@ -1,6 +1,6 @@ -package org.ray.streaming.api.partition.impl; +package io.ray.streaming.api.partition.impl; -import org.ray.streaming.api.partition.Partition; +import io.ray.streaming.api.partition.Partition; /** * Partition record to downstream tasks in a round-robin matter. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/DataStream.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/DataStream.java similarity index 80% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/DataStream.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/DataStream.java index 923eb85b2..b3b43fd6c 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/DataStream.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/DataStream.java @@ -1,20 +1,20 @@ -package org.ray.streaming.api.stream; +package io.ray.streaming.api.stream; -import org.ray.streaming.api.context.StreamingContext; -import org.ray.streaming.api.function.impl.FilterFunction; -import org.ray.streaming.api.function.impl.FlatMapFunction; -import org.ray.streaming.api.function.impl.KeyFunction; -import org.ray.streaming.api.function.impl.MapFunction; -import org.ray.streaming.api.function.impl.SinkFunction; -import org.ray.streaming.api.partition.Partition; -import org.ray.streaming.api.partition.impl.BroadcastPartition; -import org.ray.streaming.operator.StreamOperator; -import org.ray.streaming.operator.impl.FilterOperator; -import org.ray.streaming.operator.impl.FlatMapOperator; -import org.ray.streaming.operator.impl.KeyByOperator; -import org.ray.streaming.operator.impl.MapOperator; -import org.ray.streaming.operator.impl.SinkOperator; +import io.ray.streaming.api.context.StreamingContext; +import io.ray.streaming.api.function.impl.FilterFunction; +import io.ray.streaming.api.function.impl.FlatMapFunction; +import io.ray.streaming.api.function.impl.KeyFunction; +import io.ray.streaming.api.function.impl.MapFunction; +import io.ray.streaming.api.function.impl.SinkFunction; +import io.ray.streaming.api.partition.Partition; +import io.ray.streaming.api.partition.impl.BroadcastPartition; +import io.ray.streaming.operator.StreamOperator; +import io.ray.streaming.operator.impl.FilterOperator; +import io.ray.streaming.operator.impl.FlatMapOperator; +import io.ray.streaming.operator.impl.KeyByOperator; +import io.ray.streaming.operator.impl.MapOperator; +import io.ray.streaming.operator.impl.SinkOperator; /** * Represents a stream of data. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/DataStreamSink.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/DataStreamSink.java similarity index 82% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/DataStreamSink.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/DataStreamSink.java index 53b6db4b6..e19d1b027 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/DataStreamSink.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/DataStreamSink.java @@ -1,6 +1,6 @@ -package org.ray.streaming.api.stream; +package io.ray.streaming.api.stream; -import org.ray.streaming.operator.impl.SinkOperator; +import io.ray.streaming.operator.impl.SinkOperator; /** * Represents a sink of the DataStream. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/DataStreamSource.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/DataStreamSource.java similarity index 74% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/DataStreamSource.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/DataStreamSource.java index 4d38a5df7..9f3b353ca 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/DataStreamSource.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/DataStreamSource.java @@ -1,11 +1,11 @@ -package org.ray.streaming.api.stream; +package io.ray.streaming.api.stream; +import io.ray.streaming.api.context.StreamingContext; +import io.ray.streaming.api.function.impl.SourceFunction; +import io.ray.streaming.api.function.internal.CollectionSourceFunction; +import io.ray.streaming.api.partition.impl.RoundRobinPartition; +import io.ray.streaming.operator.impl.SourceOperator; import java.util.Collection; -import org.ray.streaming.api.context.StreamingContext; -import org.ray.streaming.api.function.impl.SourceFunction; -import org.ray.streaming.api.function.internal.CollectionSourceFunction; -import org.ray.streaming.api.partition.impl.RoundRobinPartition; -import org.ray.streaming.operator.impl.SourceOperator; /** * Represents a source of the DataStream. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/JoinStream.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/JoinStream.java similarity index 93% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/JoinStream.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/JoinStream.java index e2117aaee..ae33a8829 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/JoinStream.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/JoinStream.java @@ -1,8 +1,8 @@ -package org.ray.streaming.api.stream; +package io.ray.streaming.api.stream; +import io.ray.streaming.api.function.impl.JoinFunction; +import io.ray.streaming.api.function.impl.KeyFunction; import java.io.Serializable; -import org.ray.streaming.api.function.impl.JoinFunction; -import org.ray.streaming.api.function.impl.KeyFunction; /** * Represents a DataStream of two joined DataStream. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/KeyDataStream.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/KeyDataStream.java similarity index 77% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/KeyDataStream.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/KeyDataStream.java index e388bb88a..ad48f2efa 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/KeyDataStream.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/KeyDataStream.java @@ -1,10 +1,10 @@ -package org.ray.streaming.api.stream; +package io.ray.streaming.api.stream; -import org.ray.streaming.api.function.impl.AggregateFunction; -import org.ray.streaming.api.function.impl.ReduceFunction; -import org.ray.streaming.api.partition.impl.KeyPartition; -import org.ray.streaming.operator.StreamOperator; -import org.ray.streaming.operator.impl.ReduceOperator; +import io.ray.streaming.api.function.impl.AggregateFunction; +import io.ray.streaming.api.function.impl.ReduceFunction; +import io.ray.streaming.api.partition.impl.KeyPartition; +import io.ray.streaming.operator.StreamOperator; +import io.ray.streaming.operator.impl.ReduceOperator; /** * Represents a DataStream returned by a key-by operation. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/Stream.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/Stream.java similarity index 83% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/Stream.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/Stream.java index 2e49f4db5..791124c41 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/Stream.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/Stream.java @@ -1,13 +1,13 @@ -package org.ray.streaming.api.stream; +package io.ray.streaming.api.stream; +import io.ray.streaming.api.context.StreamingContext; +import io.ray.streaming.api.partition.Partition; +import io.ray.streaming.api.partition.impl.RoundRobinPartition; +import io.ray.streaming.operator.StreamOperator; +import io.ray.streaming.python.PythonOperator; +import io.ray.streaming.python.PythonPartition; +import io.ray.streaming.python.stream.PythonStream; import java.io.Serializable; -import org.ray.streaming.api.context.StreamingContext; -import org.ray.streaming.api.partition.Partition; -import org.ray.streaming.api.partition.impl.RoundRobinPartition; -import org.ray.streaming.operator.StreamOperator; -import org.ray.streaming.python.PythonOperator; -import org.ray.streaming.python.PythonPartition; -import org.ray.streaming.python.stream.PythonStream; /** * Abstract base class of all stream types. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/StreamSink.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/StreamSink.java similarity index 75% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/StreamSink.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/StreamSink.java index e3bc0b66d..944b93eae 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/StreamSink.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/StreamSink.java @@ -1,6 +1,6 @@ -package org.ray.streaming.api.stream; +package io.ray.streaming.api.stream; -import org.ray.streaming.operator.StreamOperator; +import io.ray.streaming.operator.StreamOperator; /** * Represents a sink of the Stream. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/StreamSource.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/StreamSource.java similarity index 80% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/StreamSource.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/StreamSource.java index e6e7df3e7..0f099be8c 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/StreamSource.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/StreamSource.java @@ -1,4 +1,4 @@ -package org.ray.streaming.api.stream; +package io.ray.streaming.api.stream; /** * A mark interface that represents a source of the Stream. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/UnionStream.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/UnionStream.java similarity index 85% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/UnionStream.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/UnionStream.java index 0e296526e..ed7434c5c 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/api/stream/UnionStream.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/api/stream/UnionStream.java @@ -1,8 +1,8 @@ -package org.ray.streaming.api.stream; +package io.ray.streaming.api.stream; +import io.ray.streaming.operator.StreamOperator; import java.util.ArrayList; import java.util.List; -import org.ray.streaming.operator.StreamOperator; /** * Represents a union DataStream. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/jobgraph/JobEdge.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/jobgraph/JobEdge.java similarity index 92% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/jobgraph/JobEdge.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/jobgraph/JobEdge.java index 7aa0e1dc7..1d3e23b68 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/jobgraph/JobEdge.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/jobgraph/JobEdge.java @@ -1,7 +1,7 @@ -package org.ray.streaming.jobgraph; +package io.ray.streaming.jobgraph; +import io.ray.streaming.api.partition.Partition; import java.io.Serializable; -import org.ray.streaming.api.partition.Partition; /** * Job edge is connection and partition rules of upstream and downstream execution nodes. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/jobgraph/JobGraph.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/jobgraph/JobGraph.java similarity index 98% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/jobgraph/JobGraph.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/jobgraph/JobGraph.java index d7008e8ef..675cad1ea 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/jobgraph/JobGraph.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/jobgraph/JobGraph.java @@ -1,4 +1,4 @@ -package org.ray.streaming.jobgraph; +package io.ray.streaming.jobgraph; import java.io.Serializable; import java.util.ArrayList; diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/jobgraph/JobGraphBuilder.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/jobgraph/JobGraphBuilder.java similarity index 87% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/jobgraph/JobGraphBuilder.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/jobgraph/JobGraphBuilder.java index aac840dd4..b8d5af9a4 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/jobgraph/JobGraphBuilder.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/jobgraph/JobGraphBuilder.java @@ -1,15 +1,15 @@ -package org.ray.streaming.jobgraph; +package io.ray.streaming.jobgraph; +import io.ray.streaming.api.stream.DataStream; +import io.ray.streaming.api.stream.Stream; +import io.ray.streaming.api.stream.StreamSink; +import io.ray.streaming.api.stream.StreamSource; +import io.ray.streaming.operator.StreamOperator; +import io.ray.streaming.python.stream.PythonDataStream; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; -import org.ray.streaming.api.stream.DataStream; -import org.ray.streaming.api.stream.Stream; -import org.ray.streaming.api.stream.StreamSink; -import org.ray.streaming.api.stream.StreamSource; -import org.ray.streaming.operator.StreamOperator; -import org.ray.streaming.python.stream.PythonDataStream; public class JobGraphBuilder { diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/jobgraph/JobVertex.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/jobgraph/JobVertex.java similarity index 91% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/jobgraph/JobVertex.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/jobgraph/JobVertex.java index 3fd04608d..6ab13cb66 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/jobgraph/JobVertex.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/jobgraph/JobVertex.java @@ -1,9 +1,9 @@ -package org.ray.streaming.jobgraph; +package io.ray.streaming.jobgraph; import com.google.common.base.MoreObjects; +import io.ray.streaming.api.Language; +import io.ray.streaming.operator.StreamOperator; import java.io.Serializable; -import org.ray.streaming.api.Language; -import org.ray.streaming.operator.StreamOperator; /** * Job vertex is a cell node where logic is executed. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/jobgraph/VertexType.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/jobgraph/VertexType.java similarity index 74% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/jobgraph/VertexType.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/jobgraph/VertexType.java index 396fe498a..c99af2fcc 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/jobgraph/VertexType.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/jobgraph/VertexType.java @@ -1,4 +1,4 @@ -package org.ray.streaming.jobgraph; +package io.ray.streaming.jobgraph; /** * Different roles for a node. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/message/KeyRecord.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/message/KeyRecord.java similarity index 87% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/message/KeyRecord.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/message/KeyRecord.java index de4fb2767..d91b4cbd5 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/message/KeyRecord.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/message/KeyRecord.java @@ -1,4 +1,4 @@ -package org.ray.streaming.message; +package io.ray.streaming.message; public class KeyRecord extends Record { diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/message/Message.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/message/Message.java similarity index 97% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/message/Message.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/message/Message.java index 164aba7d5..a943dcb9d 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/message/Message.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/message/Message.java @@ -1,4 +1,4 @@ -package org.ray.streaming.message; +package io.ray.streaming.message; import com.google.common.collect.Lists; import java.io.Serializable; diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/message/Record.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/message/Record.java similarity index 93% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/message/Record.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/message/Record.java index d1b0184e0..8d0ca368b 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/message/Record.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/message/Record.java @@ -1,4 +1,4 @@ -package org.ray.streaming.message; +package io.ray.streaming.message; import java.io.Serializable; diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/OneInputOperator.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/OneInputOperator.java similarity index 71% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/OneInputOperator.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/OneInputOperator.java index fdc620740..d2fc3bd79 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/OneInputOperator.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/OneInputOperator.java @@ -1,6 +1,6 @@ -package org.ray.streaming.operator; +package io.ray.streaming.operator; -import org.ray.streaming.message.Record; +import io.ray.streaming.message.Record; public interface OneInputOperator extends Operator { diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/Operator.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/Operator.java similarity index 56% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/Operator.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/Operator.java index 51f365ddd..58a0d5fa2 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/Operator.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/Operator.java @@ -1,11 +1,11 @@ -package org.ray.streaming.operator; +package io.ray.streaming.operator; +import io.ray.streaming.api.Language; +import io.ray.streaming.api.collector.Collector; +import io.ray.streaming.api.context.RuntimeContext; +import io.ray.streaming.api.function.Function; import java.io.Serializable; import java.util.List; -import org.ray.streaming.api.Language; -import org.ray.streaming.api.collector.Collector; -import org.ray.streaming.api.context.RuntimeContext; -import org.ray.streaming.api.function.Function; public interface Operator extends Serializable { diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/OperatorType.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/OperatorType.java similarity index 64% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/OperatorType.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/OperatorType.java index be3916846..68ab987b8 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/OperatorType.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/OperatorType.java @@ -1,4 +1,4 @@ -package org.ray.streaming.operator; +package io.ray.streaming.operator; public enum OperatorType { SOURCE, diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/StreamOperator.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/StreamOperator.java similarity index 78% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/StreamOperator.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/StreamOperator.java index dcf89b5ca..3ae688ccf 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/StreamOperator.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/StreamOperator.java @@ -1,12 +1,12 @@ -package org.ray.streaming.operator; +package io.ray.streaming.operator; +import io.ray.streaming.api.Language; +import io.ray.streaming.api.collector.Collector; +import io.ray.streaming.api.context.RuntimeContext; +import io.ray.streaming.api.function.Function; +import io.ray.streaming.message.KeyRecord; +import io.ray.streaming.message.Record; import java.util.List; -import org.ray.streaming.api.Language; -import org.ray.streaming.api.collector.Collector; -import org.ray.streaming.api.context.RuntimeContext; -import org.ray.streaming.api.function.Function; -import org.ray.streaming.message.KeyRecord; -import org.ray.streaming.message.Record; public abstract class StreamOperator implements Operator { protected String name; diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/TwoInputOperator.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/TwoInputOperator.java similarity index 72% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/TwoInputOperator.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/TwoInputOperator.java index 5528b0875..d14efe3ce 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/TwoInputOperator.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/TwoInputOperator.java @@ -1,6 +1,6 @@ -package org.ray.streaming.operator; +package io.ray.streaming.operator; -import org.ray.streaming.message.Record; +import io.ray.streaming.message.Record; public interface TwoInputOperator extends Operator { diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/FilterOperator.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/FilterOperator.java similarity index 60% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/FilterOperator.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/FilterOperator.java index 95ccc5836..e6aacee59 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/FilterOperator.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/FilterOperator.java @@ -1,9 +1,9 @@ -package org.ray.streaming.operator.impl; +package io.ray.streaming.operator.impl; -import org.ray.streaming.api.function.impl.FilterFunction; -import org.ray.streaming.message.Record; -import org.ray.streaming.operator.OneInputOperator; -import org.ray.streaming.operator.StreamOperator; +import io.ray.streaming.api.function.impl.FilterFunction; +import io.ray.streaming.message.Record; +import io.ray.streaming.operator.OneInputOperator; +import io.ray.streaming.operator.StreamOperator; public class FilterOperator extends StreamOperator> implements OneInputOperator { diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/FlatMapOperator.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/FlatMapOperator.java similarity index 62% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/FlatMapOperator.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/FlatMapOperator.java index f2ae5c326..39384a548 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/FlatMapOperator.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/FlatMapOperator.java @@ -1,13 +1,13 @@ -package org.ray.streaming.operator.impl; +package io.ray.streaming.operator.impl; +import io.ray.streaming.api.collector.CollectionCollector; +import io.ray.streaming.api.collector.Collector; +import io.ray.streaming.api.context.RuntimeContext; +import io.ray.streaming.api.function.impl.FlatMapFunction; +import io.ray.streaming.message.Record; +import io.ray.streaming.operator.OneInputOperator; +import io.ray.streaming.operator.StreamOperator; import java.util.List; -import org.ray.streaming.api.collector.CollectionCollector; -import org.ray.streaming.api.collector.Collector; -import org.ray.streaming.api.context.RuntimeContext; -import org.ray.streaming.api.function.impl.FlatMapFunction; -import org.ray.streaming.message.Record; -import org.ray.streaming.operator.OneInputOperator; -import org.ray.streaming.operator.StreamOperator; public class FlatMapOperator extends StreamOperator> implements OneInputOperator { diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/KeyByOperator.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/KeyByOperator.java similarity index 57% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/KeyByOperator.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/KeyByOperator.java index 5ace0b13f..f06b5e3f0 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/KeyByOperator.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/KeyByOperator.java @@ -1,10 +1,10 @@ -package org.ray.streaming.operator.impl; +package io.ray.streaming.operator.impl; -import org.ray.streaming.api.function.impl.KeyFunction; -import org.ray.streaming.message.KeyRecord; -import org.ray.streaming.message.Record; -import org.ray.streaming.operator.OneInputOperator; -import org.ray.streaming.operator.StreamOperator; +import io.ray.streaming.api.function.impl.KeyFunction; +import io.ray.streaming.message.KeyRecord; +import io.ray.streaming.message.Record; +import io.ray.streaming.operator.OneInputOperator; +import io.ray.streaming.operator.StreamOperator; public class KeyByOperator extends StreamOperator> implements OneInputOperator { diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/MapOperator.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/MapOperator.java similarity index 59% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/MapOperator.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/MapOperator.java index 7fc260479..9090816be 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/MapOperator.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/MapOperator.java @@ -1,9 +1,9 @@ -package org.ray.streaming.operator.impl; +package io.ray.streaming.operator.impl; -import org.ray.streaming.api.function.impl.MapFunction; -import org.ray.streaming.message.Record; -import org.ray.streaming.operator.OneInputOperator; -import org.ray.streaming.operator.StreamOperator; +import io.ray.streaming.api.function.impl.MapFunction; +import io.ray.streaming.message.Record; +import io.ray.streaming.operator.OneInputOperator; +import io.ray.streaming.operator.StreamOperator; public class MapOperator extends StreamOperator> implements diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/ReduceOperator.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/ReduceOperator.java similarity index 71% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/ReduceOperator.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/ReduceOperator.java index 341db84ae..1cde66ff3 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/ReduceOperator.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/ReduceOperator.java @@ -1,15 +1,15 @@ -package org.ray.streaming.operator.impl; +package io.ray.streaming.operator.impl; +import io.ray.streaming.api.collector.Collector; +import io.ray.streaming.api.context.RuntimeContext; +import io.ray.streaming.api.function.impl.ReduceFunction; +import io.ray.streaming.message.KeyRecord; +import io.ray.streaming.message.Record; +import io.ray.streaming.operator.OneInputOperator; +import io.ray.streaming.operator.StreamOperator; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.ray.streaming.api.collector.Collector; -import org.ray.streaming.api.context.RuntimeContext; -import org.ray.streaming.api.function.impl.ReduceFunction; -import org.ray.streaming.message.KeyRecord; -import org.ray.streaming.message.Record; -import org.ray.streaming.operator.OneInputOperator; -import org.ray.streaming.operator.StreamOperator; public class ReduceOperator extends StreamOperator> implements OneInputOperator { diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/SinkOperator.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/SinkOperator.java similarity index 57% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/SinkOperator.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/SinkOperator.java index 66bd7b9ac..2b355d828 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/SinkOperator.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/SinkOperator.java @@ -1,9 +1,9 @@ -package org.ray.streaming.operator.impl; +package io.ray.streaming.operator.impl; -import org.ray.streaming.api.function.impl.SinkFunction; -import org.ray.streaming.message.Record; -import org.ray.streaming.operator.OneInputOperator; -import org.ray.streaming.operator.StreamOperator; +import io.ray.streaming.api.function.impl.SinkFunction; +import io.ray.streaming.message.Record; +import io.ray.streaming.operator.OneInputOperator; +import io.ray.streaming.operator.StreamOperator; public class SinkOperator extends StreamOperator> implements diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/SourceOperator.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/SourceOperator.java similarity index 73% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/SourceOperator.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/SourceOperator.java index a4b42e67b..5f3eaf6c1 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/operator/impl/SourceOperator.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/operator/impl/SourceOperator.java @@ -1,13 +1,13 @@ -package org.ray.streaming.operator.impl; +package io.ray.streaming.operator.impl; +import io.ray.streaming.api.collector.Collector; +import io.ray.streaming.api.context.RuntimeContext; +import io.ray.streaming.api.function.impl.SourceFunction; +import io.ray.streaming.api.function.impl.SourceFunction.SourceContext; +import io.ray.streaming.message.Record; +import io.ray.streaming.operator.OperatorType; +import io.ray.streaming.operator.StreamOperator; import java.util.List; -import org.ray.streaming.api.collector.Collector; -import org.ray.streaming.api.context.RuntimeContext; -import org.ray.streaming.api.function.impl.SourceFunction; -import org.ray.streaming.api.function.impl.SourceFunction.SourceContext; -import org.ray.streaming.message.Record; -import org.ray.streaming.operator.OperatorType; -import org.ray.streaming.operator.StreamOperator; public class SourceOperator extends StreamOperator> { diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/python/PythonFunction.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/python/PythonFunction.java similarity index 97% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/python/PythonFunction.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/python/PythonFunction.java index f446e9738..31c82b43e 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/python/PythonFunction.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/python/PythonFunction.java @@ -1,6 +1,6 @@ -package org.ray.streaming.python; +package io.ray.streaming.python; -import org.ray.streaming.api.function.Function; +import io.ray.streaming.api.function.Function; /** * Represents a user defined python function. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/python/PythonOperator.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/python/PythonOperator.java similarity index 83% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/python/PythonOperator.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/python/PythonOperator.java index 1a0a127af..d0eec6e3b 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/python/PythonOperator.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/python/PythonOperator.java @@ -1,10 +1,10 @@ -package org.ray.streaming.python; +package io.ray.streaming.python; +import io.ray.streaming.api.Language; +import io.ray.streaming.api.context.RuntimeContext; +import io.ray.streaming.operator.OperatorType; +import io.ray.streaming.operator.StreamOperator; import java.util.List; -import org.ray.streaming.api.Language; -import org.ray.streaming.api.context.RuntimeContext; -import org.ray.streaming.operator.OperatorType; -import org.ray.streaming.operator.StreamOperator; /** * Represents a {@link StreamOperator} that wraps python {@link PythonFunction}. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/python/PythonPartition.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/python/PythonPartition.java similarity index 95% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/python/PythonPartition.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/python/PythonPartition.java index 58275f4b6..c4548031b 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/python/PythonPartition.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/python/PythonPartition.java @@ -1,6 +1,6 @@ -package org.ray.streaming.python; +package io.ray.streaming.python; -import org.ray.streaming.api.partition.Partition; +import io.ray.streaming.api.partition.Partition; /** * Represents a python partition function. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/python/stream/PythonDataStream.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/python/stream/PythonDataStream.java similarity index 89% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/python/stream/PythonDataStream.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/python/stream/PythonDataStream.java index f200ab69f..da8be7368 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/python/stream/PythonDataStream.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/python/stream/PythonDataStream.java @@ -1,11 +1,11 @@ -package org.ray.streaming.python.stream; +package io.ray.streaming.python.stream; -import org.ray.streaming.api.context.StreamingContext; -import org.ray.streaming.api.stream.Stream; -import org.ray.streaming.python.PythonFunction; -import org.ray.streaming.python.PythonFunction.FunctionInterface; -import org.ray.streaming.python.PythonOperator; -import org.ray.streaming.python.PythonPartition; +import io.ray.streaming.api.context.StreamingContext; +import io.ray.streaming.api.stream.Stream; +import io.ray.streaming.python.PythonFunction; +import io.ray.streaming.python.PythonFunction.FunctionInterface; +import io.ray.streaming.python.PythonOperator; +import io.ray.streaming.python.PythonPartition; /** * Represents a stream of data whose transformations will be executed in python. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/python/stream/PythonKeyDataStream.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/python/stream/PythonKeyDataStream.java similarity index 75% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/python/stream/PythonKeyDataStream.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/python/stream/PythonKeyDataStream.java index 49bb9b11f..780a63866 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/python/stream/PythonKeyDataStream.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/python/stream/PythonKeyDataStream.java @@ -1,9 +1,9 @@ -package org.ray.streaming.python.stream; +package io.ray.streaming.python.stream; -import org.ray.streaming.python.PythonFunction; -import org.ray.streaming.python.PythonFunction.FunctionInterface; -import org.ray.streaming.python.PythonOperator; -import org.ray.streaming.python.PythonPartition; +import io.ray.streaming.python.PythonFunction; +import io.ray.streaming.python.PythonFunction.FunctionInterface; +import io.ray.streaming.python.PythonOperator; +import io.ray.streaming.python.PythonPartition; /** * Represents a python DataStream returned by a key-by operation. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/python/stream/PythonStream.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/python/stream/PythonStream.java similarity index 71% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/python/stream/PythonStream.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/python/stream/PythonStream.java index 985a90262..f74f970f6 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/python/stream/PythonStream.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/python/stream/PythonStream.java @@ -1,4 +1,4 @@ -package org.ray.streaming.python.stream; +package io.ray.streaming.python.stream; /** * A marker interface used to identify all python streams. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/python/stream/PythonStreamSink.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/python/stream/PythonStreamSink.java similarity index 74% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/python/stream/PythonStreamSink.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/python/stream/PythonStreamSink.java index e23b96a58..d8bfddaa5 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/python/stream/PythonStreamSink.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/python/stream/PythonStreamSink.java @@ -1,7 +1,7 @@ -package org.ray.streaming.python.stream; +package io.ray.streaming.python.stream; -import org.ray.streaming.api.stream.StreamSink; -import org.ray.streaming.python.PythonOperator; +import io.ray.streaming.api.stream.StreamSink; +import io.ray.streaming.python.PythonOperator; /** * Represents a sink of the PythonStream. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/python/stream/PythonStreamSource.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/python/stream/PythonStreamSource.java similarity index 68% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/python/stream/PythonStreamSource.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/python/stream/PythonStreamSource.java index 425086834..25d2ebba0 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/python/stream/PythonStreamSource.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/python/stream/PythonStreamSource.java @@ -1,11 +1,11 @@ -package org.ray.streaming.python.stream; +package io.ray.streaming.python.stream; -import org.ray.streaming.api.context.StreamingContext; -import org.ray.streaming.api.stream.StreamSource; -import org.ray.streaming.python.PythonFunction; -import org.ray.streaming.python.PythonFunction.FunctionInterface; -import org.ray.streaming.python.PythonOperator; -import org.ray.streaming.python.PythonPartition; +import io.ray.streaming.api.context.StreamingContext; +import io.ray.streaming.api.stream.StreamSource; +import io.ray.streaming.python.PythonFunction; +import io.ray.streaming.python.PythonFunction.FunctionInterface; +import io.ray.streaming.python.PythonOperator; +import io.ray.streaming.python.PythonPartition; /** * Represents a source of the PythonStream. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/schedule/JobScheduler.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/schedule/JobScheduler.java similarity index 78% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/schedule/JobScheduler.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/schedule/JobScheduler.java index 5b7846af8..150fde10f 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/schedule/JobScheduler.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/schedule/JobScheduler.java @@ -1,8 +1,8 @@ -package org.ray.streaming.schedule; +package io.ray.streaming.schedule; +import io.ray.streaming.jobgraph.JobGraph; import java.util.Map; -import org.ray.streaming.jobgraph.JobGraph; /** * Interface of the job scheduler. diff --git a/streaming/java/streaming-api/src/main/java/org/ray/streaming/util/Config.java b/streaming/java/streaming-api/src/main/java/io/ray/streaming/util/Config.java similarity index 98% rename from streaming/java/streaming-api/src/main/java/org/ray/streaming/util/Config.java rename to streaming/java/streaming-api/src/main/java/io/ray/streaming/util/Config.java index b8392e96b..789674c76 100644 --- a/streaming/java/streaming-api/src/main/java/org/ray/streaming/util/Config.java +++ b/streaming/java/streaming-api/src/main/java/io/ray/streaming/util/Config.java @@ -1,4 +1,4 @@ -package org.ray.streaming.util; +package io.ray.streaming.util; public class Config { diff --git a/streaming/java/streaming-api/src/test/java/org/ray/streaming/jobgraph/JobGraphBuilderTest.java b/streaming/java/streaming-api/src/test/java/io/ray/streaming/jobgraph/JobGraphBuilderTest.java similarity index 89% rename from streaming/java/streaming-api/src/test/java/org/ray/streaming/jobgraph/JobGraphBuilderTest.java rename to streaming/java/streaming-api/src/test/java/io/ray/streaming/jobgraph/JobGraphBuilderTest.java index 1ce3065a0..cb1974b4b 100644 --- a/streaming/java/streaming-api/src/test/java/org/ray/streaming/jobgraph/JobGraphBuilderTest.java +++ b/streaming/java/streaming-api/src/test/java/io/ray/streaming/jobgraph/JobGraphBuilderTest.java @@ -1,13 +1,13 @@ -package org.ray.streaming.jobgraph; +package io.ray.streaming.jobgraph; import com.google.common.collect.Lists; +import io.ray.streaming.api.context.StreamingContext; +import io.ray.streaming.api.partition.impl.KeyPartition; +import io.ray.streaming.api.partition.impl.RoundRobinPartition; +import io.ray.streaming.api.stream.DataStream; +import io.ray.streaming.api.stream.DataStreamSource; +import io.ray.streaming.api.stream.StreamSink; import java.util.List; -import org.ray.streaming.api.context.StreamingContext; -import org.ray.streaming.api.partition.impl.KeyPartition; -import org.ray.streaming.api.partition.impl.RoundRobinPartition; -import org.ray.streaming.api.stream.DataStream; -import org.ray.streaming.api.stream.DataStreamSource; -import org.ray.streaming.api.stream.StreamSink; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; diff --git a/streaming/java/streaming-runtime/pom.xml b/streaming/java/streaming-runtime/pom.xml index 827cb8b9a..70ac52151 100755 --- a/streaming/java/streaming-runtime/pom.xml +++ b/streaming/java/streaming-runtime/pom.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> ray-streaming - org.ray + io.ray 0.1-SNAPSHOT 4.0.0 @@ -17,17 +17,17 @@ - org.ray + io.ray ray-api ${project.version} - org.ray + io.ray ray-runtime ${project.version} - org.ray + io.ray streaming-api ${project.version} diff --git a/streaming/java/streaming-runtime/pom_template.xml b/streaming/java/streaming-runtime/pom_template.xml index 848e9fec2..392948d2e 100644 --- a/streaming/java/streaming-runtime/pom_template.xml +++ b/streaming/java/streaming-runtime/pom_template.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> ray-streaming - org.ray + io.ray 0.1-SNAPSHOT 4.0.0 @@ -17,17 +17,17 @@ - org.ray + io.ray ray-api ${project.version} - org.ray + io.ray ray-runtime ${project.version} - org.ray + io.ray streaming-api ${project.version} diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/Config.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/Config.java similarity index 82% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/Config.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/Config.java index bc185e44c..7b0a1dc12 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/Config.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/Config.java @@ -1,4 +1,4 @@ -package org.ray.streaming.runtime.config; +package io.ray.streaming.runtime.config; import java.io.Serializable; import javax.accessibility.Accessible; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/StreamingConfig.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/StreamingConfig.java similarity index 93% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/StreamingConfig.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/StreamingConfig.java index a5faac393..591e1e852 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/StreamingConfig.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/StreamingConfig.java @@ -1,4 +1,4 @@ -package org.ray.streaming.runtime.config; +package io.ray.streaming.runtime.config; import java.io.Serializable; import java.util.Map; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/StreamingGlobalConfig.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/StreamingGlobalConfig.java similarity index 96% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/StreamingGlobalConfig.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/StreamingGlobalConfig.java index f10f265ac..1658ee8ee 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/StreamingGlobalConfig.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/StreamingGlobalConfig.java @@ -1,6 +1,7 @@ -package org.ray.streaming.runtime.config; +package io.ray.streaming.runtime.config; import com.google.common.base.Preconditions; +import io.ray.streaming.runtime.config.global.CommonConfig; import java.io.Serializable; import java.lang.reflect.Method; import java.util.HashMap; @@ -8,7 +9,6 @@ import java.util.Map; import org.aeonbits.owner.Config.DefaultValue; import org.aeonbits.owner.Config.Key; import org.aeonbits.owner.ConfigFactory; -import org.ray.streaming.runtime.config.global.CommonConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/StreamingMasterConfig.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/StreamingMasterConfig.java similarity index 83% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/StreamingMasterConfig.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/StreamingMasterConfig.java index 907b46ba3..36e5a0c38 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/StreamingMasterConfig.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/StreamingMasterConfig.java @@ -1,8 +1,8 @@ -package org.ray.streaming.runtime.config; +package io.ray.streaming.runtime.config; +import io.ray.streaming.runtime.config.master.ResourceConfig; import java.util.Map; import org.aeonbits.owner.ConfigFactory; -import org.ray.streaming.runtime.config.master.ResourceConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/StreamingWorkerConfig.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/StreamingWorkerConfig.java similarity index 90% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/StreamingWorkerConfig.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/StreamingWorkerConfig.java index 0eefe2656..6cd7e4009 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/StreamingWorkerConfig.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/StreamingWorkerConfig.java @@ -1,4 +1,4 @@ -package org.ray.streaming.runtime.config; +package io.ray.streaming.runtime.config; import java.util.Map; import org.slf4j.Logger; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/global/CommonConfig.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/global/CommonConfig.java similarity index 84% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/global/CommonConfig.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/global/CommonConfig.java index d5a07db27..7da8db4ac 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/global/CommonConfig.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/global/CommonConfig.java @@ -1,6 +1,6 @@ -package org.ray.streaming.runtime.config.global; +package io.ray.streaming.runtime.config.global; -import org.ray.streaming.runtime.config.Config; +import io.ray.streaming.runtime.config.Config; /** * Job common config. diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/master/ResourceConfig.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/master/ResourceConfig.java similarity index 95% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/master/ResourceConfig.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/master/ResourceConfig.java index 4f07e8375..0a066423b 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/master/ResourceConfig.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/master/ResourceConfig.java @@ -1,6 +1,6 @@ -package org.ray.streaming.runtime.config.master; +package io.ray.streaming.runtime.config.master; -import org.ray.streaming.runtime.config.Config; +import io.ray.streaming.runtime.config.Config; /** * Job resource management config. diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/types/SlotAssignStrategyType.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/types/SlotAssignStrategyType.java similarity index 89% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/types/SlotAssignStrategyType.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/types/SlotAssignStrategyType.java index 073fb8d27..d8ff17497 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/types/SlotAssignStrategyType.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/config/types/SlotAssignStrategyType.java @@ -1,4 +1,4 @@ -package org.ray.streaming.runtime.config.types; +package io.ray.streaming.runtime.config.types; public enum SlotAssignStrategyType { diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/collector/OutputCollector.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/collector/OutputCollector.java similarity index 76% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/collector/OutputCollector.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/collector/OutputCollector.java index 900518362..7939e69b1 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/collector/OutputCollector.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/collector/OutputCollector.java @@ -1,13 +1,13 @@ -package org.ray.streaming.runtime.core.collector; +package io.ray.streaming.runtime.core.collector; +import io.ray.runtime.serializer.Serializer; +import io.ray.streaming.api.collector.Collector; +import io.ray.streaming.api.partition.Partition; +import io.ray.streaming.message.Record; +import io.ray.streaming.runtime.transfer.ChannelID; +import io.ray.streaming.runtime.transfer.DataWriter; import java.nio.ByteBuffer; import java.util.Collection; -import org.ray.runtime.serializer.Serializer; -import org.ray.streaming.api.collector.Collector; -import org.ray.streaming.api.partition.Partition; -import org.ray.streaming.message.Record; -import org.ray.streaming.runtime.transfer.ChannelID; -import org.ray.streaming.runtime.transfer.DataWriter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/command/BatchInfo.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/command/BatchInfo.java similarity index 86% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/command/BatchInfo.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/command/BatchInfo.java index d950d4450..5291a586e 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/command/BatchInfo.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/command/BatchInfo.java @@ -1,4 +1,4 @@ -package org.ray.streaming.runtime.core.command; +package io.ray.streaming.runtime.core.command; import java.io.Serializable; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/common/AbstractID.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/common/AbstractID.java similarity index 96% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/common/AbstractID.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/common/AbstractID.java index 67361cae1..4131e2336 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/common/AbstractID.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/common/AbstractID.java @@ -1,11 +1,11 @@ -package org.ray.streaming.runtime.core.common; +package io.ray.streaming.runtime.core.common; import java.io.Serializable; import java.util.Random; /** * Streaming system unique identity base class. - * For example, ${@link org.ray.streaming.runtime.core.resource.ContainerID } + * For example, ${@link io.ray.streaming.runtime.core.resource.ContainerID } */ public class AbstractID implements Comparable, Serializable { diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/ExecutionEdge.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/ExecutionEdge.java similarity index 90% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/ExecutionEdge.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/ExecutionEdge.java index c74e94b22..fc5c37c16 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/ExecutionEdge.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/ExecutionEdge.java @@ -1,7 +1,7 @@ -package org.ray.streaming.runtime.core.graph; +package io.ray.streaming.runtime.core.graph; +import io.ray.streaming.api.partition.Partition; import java.io.Serializable; -import org.ray.streaming.api.partition.Partition; /** * An edge in the physical execution graph. diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/ExecutionGraph.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/ExecutionGraph.java similarity index 95% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/ExecutionGraph.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/ExecutionGraph.java index 4f37a0134..bf13f4528 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/ExecutionGraph.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/ExecutionGraph.java @@ -1,18 +1,18 @@ -package org.ray.streaming.runtime.core.graph; +package io.ray.streaming.runtime.core.graph; +import io.ray.api.BaseActor; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import org.ray.api.BaseActor; /** * Physical execution graph. * *

Notice: Temporary implementation for now to keep functional. This will be changed to - * {@link org.ray.streaming.runtime.core.graph.executiongraph.ExecutionGraph} later when + * {@link io.ray.streaming.runtime.core.graph.executiongraph.ExecutionGraph} later when * new stream task implementation is ready. */ public class ExecutionGraph implements Serializable { diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/ExecutionNode.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/ExecutionNode.java similarity index 93% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/ExecutionNode.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/ExecutionNode.java index 83595cc26..c4e29b4e8 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/ExecutionNode.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/ExecutionNode.java @@ -1,11 +1,11 @@ -package org.ray.streaming.runtime.core.graph; +package io.ray.streaming.runtime.core.graph; +import io.ray.streaming.api.Language; +import io.ray.streaming.jobgraph.VertexType; +import io.ray.streaming.operator.StreamOperator; import java.io.Serializable; import java.util.ArrayList; import java.util.List; -import org.ray.streaming.api.Language; -import org.ray.streaming.jobgraph.VertexType; -import org.ray.streaming.operator.StreamOperator; /** * A node in the physical execution graph. diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/ExecutionTask.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/ExecutionTask.java similarity index 91% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/ExecutionTask.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/ExecutionTask.java index 3d067d733..766119605 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/ExecutionTask.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/ExecutionTask.java @@ -1,7 +1,7 @@ -package org.ray.streaming.runtime.core.graph; +package io.ray.streaming.runtime.core.graph; +import io.ray.api.BaseActor; import java.io.Serializable; -import org.ray.api.BaseActor; /** * ExecutionTask is minimal execution unit. diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/executiongraph/ExecutionEdge.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/executiongraph/ExecutionEdge.java similarity index 94% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/executiongraph/ExecutionEdge.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/executiongraph/ExecutionEdge.java index cdd35a571..3779788b3 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/executiongraph/ExecutionEdge.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/executiongraph/ExecutionEdge.java @@ -1,8 +1,8 @@ -package org.ray.streaming.runtime.core.graph.executiongraph; +package io.ray.streaming.runtime.core.graph.executiongraph; import com.google.common.base.MoreObjects; +import io.ray.streaming.api.partition.Partition; import java.io.Serializable; -import org.ray.streaming.api.partition.Partition; /** * An edge that connects two execution vertices. diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/executiongraph/ExecutionGraph.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/executiongraph/ExecutionGraph.java similarity index 98% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/executiongraph/ExecutionGraph.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/executiongraph/ExecutionGraph.java index 97bc56827..bff6c7909 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/executiongraph/ExecutionGraph.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/executiongraph/ExecutionGraph.java @@ -1,4 +1,4 @@ -package org.ray.streaming.runtime.core.graph.executiongraph; +package io.ray.streaming.runtime.core.graph.executiongraph; import java.io.Serializable; import java.util.ArrayList; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/executiongraph/ExecutionJobEdge.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/executiongraph/ExecutionJobEdge.java similarity index 90% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/executiongraph/ExecutionJobEdge.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/executiongraph/ExecutionJobEdge.java index fed044a53..b357ccb2e 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/executiongraph/ExecutionJobEdge.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/executiongraph/ExecutionJobEdge.java @@ -1,8 +1,8 @@ -package org.ray.streaming.runtime.core.graph.executiongraph; +package io.ray.streaming.runtime.core.graph.executiongraph; import com.google.common.base.MoreObjects; -import org.ray.streaming.api.partition.Partition; -import org.ray.streaming.jobgraph.JobEdge; +import io.ray.streaming.api.partition.Partition; +import io.ray.streaming.jobgraph.JobEdge; /** * An edge that connects two execution job vertices. diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/executiongraph/ExecutionJobVertex.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/executiongraph/ExecutionJobVertex.java similarity index 92% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/executiongraph/ExecutionJobVertex.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/executiongraph/ExecutionJobVertex.java index a20420ede..c471facac 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/executiongraph/ExecutionJobVertex.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/executiongraph/ExecutionJobVertex.java @@ -1,20 +1,20 @@ -package org.ray.streaming.runtime.core.graph.executiongraph; +package io.ray.streaming.runtime.core.graph.executiongraph; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; +import io.ray.api.RayActor; +import io.ray.streaming.api.Language; +import io.ray.streaming.jobgraph.JobVertex; +import io.ray.streaming.jobgraph.VertexType; +import io.ray.streaming.operator.StreamOperator; +import io.ray.streaming.runtime.config.master.ResourceConfig; +import io.ray.streaming.runtime.worker.JobWorker; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; import org.aeonbits.owner.ConfigFactory; -import org.ray.api.RayActor; -import org.ray.streaming.api.Language; -import org.ray.streaming.jobgraph.JobVertex; -import org.ray.streaming.jobgraph.VertexType; -import org.ray.streaming.operator.StreamOperator; -import org.ray.streaming.runtime.config.master.ResourceConfig; -import org.ray.streaming.runtime.worker.JobWorker; /** * Physical job vertex. diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/executiongraph/ExecutionVertex.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/executiongraph/ExecutionVertex.java similarity index 90% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/executiongraph/ExecutionVertex.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/executiongraph/ExecutionVertex.java index 2f21a0ac5..cee20610d 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/executiongraph/ExecutionVertex.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/executiongraph/ExecutionVertex.java @@ -1,20 +1,20 @@ -package org.ray.streaming.runtime.core.graph.executiongraph; +package io.ray.streaming.runtime.core.graph.executiongraph; import com.google.common.base.MoreObjects; +import io.ray.api.RayActor; +import io.ray.api.id.ActorId; +import io.ray.streaming.api.Language; +import io.ray.streaming.jobgraph.VertexType; +import io.ray.streaming.operator.StreamOperator; +import io.ray.streaming.runtime.config.master.ResourceConfig; +import io.ray.streaming.runtime.core.resource.ResourceType; +import io.ray.streaming.runtime.core.resource.Slot; +import io.ray.streaming.runtime.worker.JobWorker; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.ray.api.RayActor; -import org.ray.api.id.ActorId; -import org.ray.streaming.api.Language; -import org.ray.streaming.jobgraph.VertexType; -import org.ray.streaming.operator.StreamOperator; -import org.ray.streaming.runtime.config.master.ResourceConfig; -import org.ray.streaming.runtime.core.resource.ResourceType; -import org.ray.streaming.runtime.core.resource.Slot; -import org.ray.streaming.runtime.worker.JobWorker; /** * Physical vertex, correspond to {@link ExecutionJobVertex}. diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/executiongraph/ExecutionVertexState.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/executiongraph/ExecutionVertexState.java similarity index 89% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/executiongraph/ExecutionVertexState.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/executiongraph/ExecutionVertexState.java index cfff38c47..ab14891cf 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/executiongraph/ExecutionVertexState.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/graph/executiongraph/ExecutionVertexState.java @@ -1,4 +1,4 @@ -package org.ray.streaming.runtime.core.graph.executiongraph; +package io.ray.streaming.runtime.core.graph.executiongraph; import java.io.Serializable; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/OneInputProcessor.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/processor/OneInputProcessor.java similarity index 80% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/OneInputProcessor.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/processor/OneInputProcessor.java index 7b9fbc4c1..faad2fc9e 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/OneInputProcessor.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/processor/OneInputProcessor.java @@ -1,7 +1,7 @@ -package org.ray.streaming.runtime.core.processor; +package io.ray.streaming.runtime.core.processor; -import org.ray.streaming.message.Record; -import org.ray.streaming.operator.OneInputOperator; +import io.ray.streaming.message.Record; +import io.ray.streaming.operator.OneInputOperator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/ProcessBuilder.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/processor/ProcessBuilder.java similarity index 73% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/ProcessBuilder.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/processor/ProcessBuilder.java index 07dfda0f8..a2a0c4c44 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/ProcessBuilder.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/processor/ProcessBuilder.java @@ -1,10 +1,10 @@ -package org.ray.streaming.runtime.core.processor; +package io.ray.streaming.runtime.core.processor; -import org.ray.streaming.operator.OneInputOperator; -import org.ray.streaming.operator.OperatorType; -import org.ray.streaming.operator.StreamOperator; -import org.ray.streaming.operator.TwoInputOperator; -import org.ray.streaming.operator.impl.SourceOperator; +import io.ray.streaming.operator.OneInputOperator; +import io.ray.streaming.operator.OperatorType; +import io.ray.streaming.operator.StreamOperator; +import io.ray.streaming.operator.TwoInputOperator; +import io.ray.streaming.operator.impl.SourceOperator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/Processor.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/processor/Processor.java similarity index 59% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/Processor.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/processor/Processor.java index 0578bc6ca..3b128376c 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/Processor.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/processor/Processor.java @@ -1,9 +1,9 @@ -package org.ray.streaming.runtime.core.processor; +package io.ray.streaming.runtime.core.processor; +import io.ray.streaming.api.collector.Collector; +import io.ray.streaming.api.context.RuntimeContext; import java.io.Serializable; import java.util.List; -import org.ray.streaming.api.collector.Collector; -import org.ray.streaming.api.context.RuntimeContext; public interface Processor extends Serializable { diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/SourceProcessor.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/processor/SourceProcessor.java similarity index 78% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/SourceProcessor.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/processor/SourceProcessor.java index 1e36ae3f3..35cdc750c 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/SourceProcessor.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/processor/SourceProcessor.java @@ -1,7 +1,7 @@ -package org.ray.streaming.runtime.core.processor; +package io.ray.streaming.runtime.core.processor; -import org.ray.streaming.message.Record; -import org.ray.streaming.operator.impl.SourceOperator; +import io.ray.streaming.message.Record; +import io.ray.streaming.operator.impl.SourceOperator; /** * The processor for the stream sources, containing a SourceOperator. diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/StreamProcessor.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/processor/StreamProcessor.java similarity index 83% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/StreamProcessor.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/processor/StreamProcessor.java index a2ecef263..1a718093d 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/StreamProcessor.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/processor/StreamProcessor.java @@ -1,9 +1,9 @@ -package org.ray.streaming.runtime.core.processor; +package io.ray.streaming.runtime.core.processor; +import io.ray.streaming.api.collector.Collector; +import io.ray.streaming.api.context.RuntimeContext; +import io.ray.streaming.operator.Operator; import java.util.List; -import org.ray.streaming.api.collector.Collector; -import org.ray.streaming.api.context.RuntimeContext; -import org.ray.streaming.operator.Operator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/TwoInputProcessor.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/processor/TwoInputProcessor.java similarity index 88% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/TwoInputProcessor.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/processor/TwoInputProcessor.java index fbaf84a16..8e5f70d2a 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/TwoInputProcessor.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/processor/TwoInputProcessor.java @@ -1,7 +1,7 @@ -package org.ray.streaming.runtime.core.processor; +package io.ray.streaming.runtime.core.processor; -import org.ray.streaming.message.Record; -import org.ray.streaming.operator.TwoInputOperator; +import io.ray.streaming.message.Record; +import io.ray.streaming.operator.TwoInputOperator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/resource/Container.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/resource/Container.java similarity index 95% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/resource/Container.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/resource/Container.java index c8dc3552e..bb690060a 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/resource/Container.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/resource/Container.java @@ -1,12 +1,12 @@ -package org.ray.streaming.runtime.core.resource; +package io.ray.streaming.runtime.core.resource; import com.google.common.base.MoreObjects; +import io.ray.api.id.UniqueId; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.ray.api.id.UniqueId; /** * Resource manager unit abstraction. diff --git a/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/resource/ContainerID.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/resource/ContainerID.java new file mode 100644 index 000000000..207406299 --- /dev/null +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/resource/ContainerID.java @@ -0,0 +1,9 @@ +package io.ray.streaming.runtime.core.resource; + +import io.ray.streaming.runtime.core.common.AbstractID; + +/** + * Container unique identifier. + */ +public class ContainerID extends AbstractID { +} diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/resource/ResourceType.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/resource/ResourceType.java similarity index 88% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/resource/ResourceType.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/resource/ResourceType.java index 7075a4b5a..f15c05756 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/resource/ResourceType.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/resource/ResourceType.java @@ -1,4 +1,4 @@ -package org.ray.streaming.runtime.core.resource; +package io.ray.streaming.runtime.core.resource; /** * Key for different type of resources. diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/resource/Resources.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/resource/Resources.java similarity index 96% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/resource/Resources.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/resource/Resources.java index 4d866e7f2..e97df9d6f 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/resource/Resources.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/resource/Resources.java @@ -1,13 +1,13 @@ -package org.ray.streaming.runtime.core.resource; +package io.ray.streaming.runtime.core.resource; import com.google.common.base.MoreObjects; +import io.ray.api.id.UniqueId; +import io.ray.streaming.runtime.config.master.ResourceConfig; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.ray.api.id.UniqueId; -import org.ray.streaming.runtime.config.master.ResourceConfig; /** * Resource description of ResourceManager. diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/resource/Slot.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/resource/Slot.java similarity index 96% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/resource/Slot.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/resource/Slot.java index daa59571e..189f9d12c 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/resource/Slot.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/core/resource/Slot.java @@ -1,4 +1,4 @@ -package org.ray.streaming.runtime.core.resource; +package io.ray.streaming.runtime.core.resource; import com.google.common.base.MoreObjects; import java.io.Serializable; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/JobRuntimeContext.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/JobRuntimeContext.java similarity index 83% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/JobRuntimeContext.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/JobRuntimeContext.java index 699018e01..041abb185 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/JobRuntimeContext.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/JobRuntimeContext.java @@ -1,10 +1,10 @@ -package org.ray.streaming.runtime.master; +package io.ray.streaming.runtime.master; import com.google.common.base.MoreObjects; +import io.ray.streaming.jobgraph.JobGraph; +import io.ray.streaming.runtime.config.StreamingConfig; +import io.ray.streaming.runtime.core.graph.executiongraph.ExecutionGraph; import java.io.Serializable; -import org.ray.streaming.jobgraph.JobGraph; -import org.ray.streaming.runtime.config.StreamingConfig; -import org.ray.streaming.runtime.core.graph.executiongraph.ExecutionGraph; /** * Runtime context for job master. diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/graphmanager/GraphManager.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/graphmanager/GraphManager.java similarity index 81% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/graphmanager/GraphManager.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/graphmanager/GraphManager.java index b5ec8ffc0..d30bacca6 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/graphmanager/GraphManager.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/graphmanager/GraphManager.java @@ -1,7 +1,7 @@ -package org.ray.streaming.runtime.master.graphmanager; +package io.ray.streaming.runtime.master.graphmanager; -import org.ray.streaming.jobgraph.JobGraph; -import org.ray.streaming.runtime.core.graph.executiongraph.ExecutionGraph; +import io.ray.streaming.jobgraph.JobGraph; +import io.ray.streaming.runtime.core.graph.executiongraph.ExecutionGraph; /** * Graph manager is one of the important roles of JobMaster. It mainly focuses on graph management. diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/graphmanager/GraphManagerImpl.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/graphmanager/GraphManagerImpl.java similarity index 84% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/graphmanager/GraphManagerImpl.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/graphmanager/GraphManagerImpl.java index 200b1eefa..f44c00402 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/graphmanager/GraphManagerImpl.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/graphmanager/GraphManagerImpl.java @@ -1,14 +1,14 @@ -package org.ray.streaming.runtime.master.graphmanager; +package io.ray.streaming.runtime.master.graphmanager; +import io.ray.streaming.jobgraph.JobGraph; +import io.ray.streaming.jobgraph.JobVertex; +import io.ray.streaming.runtime.core.graph.executiongraph.ExecutionEdge; +import io.ray.streaming.runtime.core.graph.executiongraph.ExecutionGraph; +import io.ray.streaming.runtime.core.graph.executiongraph.ExecutionJobEdge; +import io.ray.streaming.runtime.core.graph.executiongraph.ExecutionJobVertex; +import io.ray.streaming.runtime.master.JobRuntimeContext; import java.util.LinkedHashMap; import java.util.Map; -import org.ray.streaming.jobgraph.JobGraph; -import org.ray.streaming.jobgraph.JobVertex; -import org.ray.streaming.runtime.core.graph.executiongraph.ExecutionEdge; -import org.ray.streaming.runtime.core.graph.executiongraph.ExecutionGraph; -import org.ray.streaming.runtime.core.graph.executiongraph.ExecutionJobEdge; -import org.ray.streaming.runtime.core.graph.executiongraph.ExecutionJobVertex; -import org.ray.streaming.runtime.master.JobRuntimeContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/resourcemanager/ResourceManager.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/resourcemanager/ResourceManager.java similarity index 82% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/resourcemanager/ResourceManager.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/resourcemanager/ResourceManager.java index f8c544d5e..d427dede6 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/resourcemanager/ResourceManager.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/resourcemanager/ResourceManager.java @@ -1,10 +1,10 @@ -package org.ray.streaming.runtime.master.resourcemanager; +package io.ray.streaming.runtime.master.resourcemanager; +import io.ray.streaming.runtime.core.resource.Container; +import io.ray.streaming.runtime.core.resource.Resources; +import io.ray.streaming.runtime.master.scheduler.strategy.SlotAssignStrategy; import java.util.List; import java.util.Map; -import org.ray.streaming.runtime.core.resource.Container; -import org.ray.streaming.runtime.core.resource.Resources; -import org.ray.streaming.runtime.master.scheduler.strategy.SlotAssignStrategy; /** * The resource manager is responsible for resource de-/allocation and monitoring ray cluster. diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/resourcemanager/ResourceManagerImpl.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/resourcemanager/ResourceManagerImpl.java similarity index 90% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/resourcemanager/ResourceManagerImpl.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/resourcemanager/ResourceManagerImpl.java index 0bad2111f..714cfdb2d 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/resourcemanager/ResourceManagerImpl.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/resourcemanager/ResourceManagerImpl.java @@ -1,5 +1,15 @@ -package org.ray.streaming.runtime.master.resourcemanager; +package io.ray.streaming.runtime.master.resourcemanager; +import io.ray.api.Ray; +import io.ray.api.runtimecontext.NodeInfo; +import io.ray.streaming.runtime.config.StreamingMasterConfig; +import io.ray.streaming.runtime.config.master.ResourceConfig; +import io.ray.streaming.runtime.config.types.SlotAssignStrategyType; +import io.ray.streaming.runtime.core.resource.Container; +import io.ray.streaming.runtime.core.resource.Resources; +import io.ray.streaming.runtime.master.JobRuntimeContext; +import io.ray.streaming.runtime.master.scheduler.strategy.SlotAssignStrategy; +import io.ray.streaming.runtime.master.scheduler.strategy.SlotAssignStrategyFactory; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -8,16 +18,6 @@ import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; -import org.ray.api.Ray; -import org.ray.api.runtimecontext.NodeInfo; -import org.ray.streaming.runtime.config.StreamingMasterConfig; -import org.ray.streaming.runtime.config.master.ResourceConfig; -import org.ray.streaming.runtime.config.types.SlotAssignStrategyType; -import org.ray.streaming.runtime.core.resource.Container; -import org.ray.streaming.runtime.core.resource.Resources; -import org.ray.streaming.runtime.master.JobRuntimeContext; -import org.ray.streaming.runtime.master.scheduler.strategy.SlotAssignStrategy; -import org.ray.streaming.runtime.master.scheduler.strategy.SlotAssignStrategyFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/scheduler/strategy/SlotAssignStrategy.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/scheduler/strategy/SlotAssignStrategy.java similarity index 68% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/scheduler/strategy/SlotAssignStrategy.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/scheduler/strategy/SlotAssignStrategy.java index 14ecde275..65df0c94a 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/scheduler/strategy/SlotAssignStrategy.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/scheduler/strategy/SlotAssignStrategy.java @@ -1,12 +1,12 @@ -package org.ray.streaming.runtime.master.scheduler.strategy; +package io.ray.streaming.runtime.master.scheduler.strategy; +import io.ray.streaming.runtime.core.graph.executiongraph.ExecutionGraph; +import io.ray.streaming.runtime.core.resource.Container; +import io.ray.streaming.runtime.core.resource.ContainerID; +import io.ray.streaming.runtime.core.resource.Resources; +import io.ray.streaming.runtime.core.resource.Slot; import java.util.List; import java.util.Map; -import org.ray.streaming.runtime.core.graph.executiongraph.ExecutionGraph; -import org.ray.streaming.runtime.core.resource.Container; -import org.ray.streaming.runtime.core.resource.ContainerID; -import org.ray.streaming.runtime.core.resource.Resources; -import org.ray.streaming.runtime.core.resource.Slot; /** * The SlotAssignStrategy managers a set of slots. When a container is diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/scheduler/strategy/SlotAssignStrategyFactory.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/scheduler/strategy/SlotAssignStrategyFactory.java similarity index 74% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/scheduler/strategy/SlotAssignStrategyFactory.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/scheduler/strategy/SlotAssignStrategyFactory.java index bbafa1804..6cef25a68 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/scheduler/strategy/SlotAssignStrategyFactory.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/scheduler/strategy/SlotAssignStrategyFactory.java @@ -1,7 +1,7 @@ -package org.ray.streaming.runtime.master.scheduler.strategy; +package io.ray.streaming.runtime.master.scheduler.strategy; -import org.ray.streaming.runtime.config.types.SlotAssignStrategyType; -import org.ray.streaming.runtime.master.scheduler.strategy.impl.PipelineFirstStrategy; +import io.ray.streaming.runtime.config.types.SlotAssignStrategyType; +import io.ray.streaming.runtime.master.scheduler.strategy.impl.PipelineFirstStrategy; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/scheduler/strategy/impl/PipelineFirstStrategy.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/scheduler/strategy/impl/PipelineFirstStrategy.java similarity index 91% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/scheduler/strategy/impl/PipelineFirstStrategy.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/scheduler/strategy/impl/PipelineFirstStrategy.java index b8c192136..df89847fa 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/master/scheduler/strategy/impl/PipelineFirstStrategy.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/scheduler/strategy/impl/PipelineFirstStrategy.java @@ -1,18 +1,18 @@ -package org.ray.streaming.runtime.master.scheduler.strategy.impl; +package io.ray.streaming.runtime.master.scheduler.strategy.impl; import com.google.common.base.Preconditions; +import io.ray.streaming.runtime.config.types.SlotAssignStrategyType; +import io.ray.streaming.runtime.core.graph.executiongraph.ExecutionGraph; +import io.ray.streaming.runtime.core.graph.executiongraph.ExecutionJobVertex; +import io.ray.streaming.runtime.core.graph.executiongraph.ExecutionVertex; +import io.ray.streaming.runtime.core.resource.Container; +import io.ray.streaming.runtime.core.resource.ContainerID; +import io.ray.streaming.runtime.core.resource.Resources; +import io.ray.streaming.runtime.core.resource.Slot; +import io.ray.streaming.runtime.master.scheduler.strategy.SlotAssignStrategy; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.ray.streaming.runtime.config.types.SlotAssignStrategyType; -import org.ray.streaming.runtime.core.graph.executiongraph.ExecutionGraph; -import org.ray.streaming.runtime.core.graph.executiongraph.ExecutionJobVertex; -import org.ray.streaming.runtime.core.graph.executiongraph.ExecutionVertex; -import org.ray.streaming.runtime.core.resource.Container; -import org.ray.streaming.runtime.core.resource.ContainerID; -import org.ray.streaming.runtime.core.resource.Resources; -import org.ray.streaming.runtime.core.resource.Slot; -import org.ray.streaming.runtime.master.scheduler.strategy.SlotAssignStrategy; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/python/GraphPbBuilder.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/python/GraphPbBuilder.java similarity index 84% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/python/GraphPbBuilder.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/python/GraphPbBuilder.java index c2d7393eb..d90e02463 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/python/GraphPbBuilder.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/python/GraphPbBuilder.java @@ -1,18 +1,18 @@ -package org.ray.streaming.runtime.python; +package io.ray.streaming.runtime.python; import com.google.protobuf.ByteString; +import io.ray.runtime.actor.NativeRayActor; +import io.ray.streaming.api.function.Function; +import io.ray.streaming.api.partition.Partition; +import io.ray.streaming.python.PythonFunction; +import io.ray.streaming.python.PythonPartition; +import io.ray.streaming.runtime.core.graph.ExecutionEdge; +import io.ray.streaming.runtime.core.graph.ExecutionGraph; +import io.ray.streaming.runtime.core.graph.ExecutionNode; +import io.ray.streaming.runtime.core.graph.ExecutionTask; +import io.ray.streaming.runtime.generated.RemoteCall; +import io.ray.streaming.runtime.generated.Streaming; import java.util.Arrays; -import org.ray.runtime.actor.NativeRayActor; -import org.ray.streaming.api.function.Function; -import org.ray.streaming.api.partition.Partition; -import org.ray.streaming.python.PythonFunction; -import org.ray.streaming.python.PythonPartition; -import org.ray.streaming.runtime.core.graph.ExecutionEdge; -import org.ray.streaming.runtime.core.graph.ExecutionGraph; -import org.ray.streaming.runtime.core.graph.ExecutionNode; -import org.ray.streaming.runtime.core.graph.ExecutionTask; -import org.ray.streaming.runtime.generated.RemoteCall; -import org.ray.streaming.runtime.generated.Streaming; public class GraphPbBuilder { diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/python/MsgPackSerializer.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/python/MsgPackSerializer.java similarity index 98% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/python/MsgPackSerializer.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/python/MsgPackSerializer.java index 1e3b48cb7..20415a438 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/python/MsgPackSerializer.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/python/MsgPackSerializer.java @@ -1,4 +1,4 @@ -package org.ray.streaming.runtime.python; +package io.ray.streaming.runtime.python; import com.google.common.io.BaseEncoding; import java.util.ArrayList; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/python/PythonGateway.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/python/PythonGateway.java similarity index 94% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/python/PythonGateway.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/python/PythonGateway.java index 600733811..80a487db0 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/python/PythonGateway.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/python/PythonGateway.java @@ -1,16 +1,16 @@ -package org.ray.streaming.runtime.python; +package io.ray.streaming.runtime.python; +import io.ray.streaming.api.context.StreamingContext; +import io.ray.streaming.python.PythonFunction; +import io.ray.streaming.python.PythonPartition; +import io.ray.streaming.python.stream.PythonStreamSource; +import io.ray.streaming.runtime.util.ReflectionUtils; import java.lang.reflect.Method; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import org.msgpack.core.Preconditions; -import org.ray.streaming.api.context.StreamingContext; -import org.ray.streaming.python.PythonFunction; -import org.ray.streaming.python.PythonPartition; -import org.ray.streaming.python.stream.PythonStreamSource; -import org.ray.streaming.runtime.util.ReflectionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/schedule/JobSchedulerImpl.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/schedule/JobSchedulerImpl.java similarity index 78% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/schedule/JobSchedulerImpl.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/schedule/JobSchedulerImpl.java index 5d827e380..f1de23c8c 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/schedule/JobSchedulerImpl.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/schedule/JobSchedulerImpl.java @@ -1,24 +1,24 @@ -package org.ray.streaming.runtime.schedule; +package io.ray.streaming.runtime.schedule; +import io.ray.api.BaseActor; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.RayObject; +import io.ray.api.RayPyActor; +import io.ray.api.function.PyActorMethod; +import io.ray.streaming.api.Language; +import io.ray.streaming.jobgraph.JobGraph; +import io.ray.streaming.runtime.core.graph.ExecutionGraph; +import io.ray.streaming.runtime.core.graph.ExecutionNode; +import io.ray.streaming.runtime.core.graph.ExecutionTask; +import io.ray.streaming.runtime.generated.RemoteCall; +import io.ray.streaming.runtime.python.GraphPbBuilder; +import io.ray.streaming.runtime.worker.JobWorker; +import io.ray.streaming.runtime.worker.context.WorkerContext; +import io.ray.streaming.schedule.JobScheduler; import java.util.ArrayList; import java.util.List; import java.util.Map; -import org.ray.api.BaseActor; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.RayObject; -import org.ray.api.RayPyActor; -import org.ray.api.function.PyActorMethod; -import org.ray.streaming.api.Language; -import org.ray.streaming.jobgraph.JobGraph; -import org.ray.streaming.runtime.core.graph.ExecutionGraph; -import org.ray.streaming.runtime.core.graph.ExecutionNode; -import org.ray.streaming.runtime.core.graph.ExecutionTask; -import org.ray.streaming.runtime.generated.RemoteCall; -import org.ray.streaming.runtime.python.GraphPbBuilder; -import org.ray.streaming.runtime.worker.JobWorker; -import org.ray.streaming.runtime.worker.context.WorkerContext; -import org.ray.streaming.schedule.JobScheduler; /** * JobSchedulerImpl schedules workers by the Plan and the resource information diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/schedule/TaskAssigner.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/schedule/TaskAssigner.java similarity index 62% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/schedule/TaskAssigner.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/schedule/TaskAssigner.java index 82f7d5f6d..f525994f1 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/schedule/TaskAssigner.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/schedule/TaskAssigner.java @@ -1,8 +1,8 @@ -package org.ray.streaming.runtime.schedule; +package io.ray.streaming.runtime.schedule; +import io.ray.streaming.jobgraph.JobGraph; +import io.ray.streaming.runtime.core.graph.ExecutionGraph; import java.io.Serializable; -import org.ray.streaming.jobgraph.JobGraph; -import org.ray.streaming.runtime.core.graph.ExecutionGraph; /** * Interface of the task assigning strategy. diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/schedule/TaskAssignerImpl.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/schedule/TaskAssignerImpl.java similarity index 79% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/schedule/TaskAssignerImpl.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/schedule/TaskAssignerImpl.java index 1b541e02a..171375ed2 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/schedule/TaskAssignerImpl.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/schedule/TaskAssignerImpl.java @@ -1,20 +1,20 @@ -package org.ray.streaming.runtime.schedule; +package io.ray.streaming.runtime.schedule; +import io.ray.api.BaseActor; +import io.ray.api.Ray; +import io.ray.api.function.PyActorClass; +import io.ray.streaming.jobgraph.JobEdge; +import io.ray.streaming.jobgraph.JobGraph; +import io.ray.streaming.jobgraph.JobVertex; +import io.ray.streaming.runtime.core.graph.ExecutionEdge; +import io.ray.streaming.runtime.core.graph.ExecutionGraph; +import io.ray.streaming.runtime.core.graph.ExecutionNode; +import io.ray.streaming.runtime.core.graph.ExecutionTask; +import io.ray.streaming.runtime.worker.JobWorker; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.ray.api.BaseActor; -import org.ray.api.Ray; -import org.ray.api.function.PyActorClass; -import org.ray.streaming.jobgraph.JobEdge; -import org.ray.streaming.jobgraph.JobGraph; -import org.ray.streaming.jobgraph.JobVertex; -import org.ray.streaming.runtime.core.graph.ExecutionEdge; -import org.ray.streaming.runtime.core.graph.ExecutionGraph; -import org.ray.streaming.runtime.core.graph.ExecutionNode; -import org.ray.streaming.runtime.core.graph.ExecutionTask; -import org.ray.streaming.runtime.worker.JobWorker; public class TaskAssignerImpl implements TaskAssigner { diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/ChannelID.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/ChannelID.java similarity index 99% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/ChannelID.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/ChannelID.java index 154940862..08c7fbacb 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/ChannelID.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/ChannelID.java @@ -1,4 +1,4 @@ -package org.ray.streaming.runtime.transfer; +package io.ray.streaming.runtime.transfer; import com.google.common.base.FinalizablePhantomReference; import com.google.common.base.FinalizableReferenceQueue; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/ChannelInitException.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/ChannelInitException.java similarity index 92% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/ChannelInitException.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/ChannelInitException.java index 9c5206ba3..3ac6d129f 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/ChannelInitException.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/ChannelInitException.java @@ -1,4 +1,4 @@ -package org.ray.streaming.runtime.transfer; +package io.ray.streaming.runtime.transfer; import java.util.ArrayList; import java.util.List; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/ChannelInterruptException.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/ChannelInterruptException.java similarity index 82% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/ChannelInterruptException.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/ChannelInterruptException.java index b922bc415..d78a62829 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/ChannelInterruptException.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/ChannelInterruptException.java @@ -1,4 +1,4 @@ -package org.ray.streaming.runtime.transfer; +package io.ray.streaming.runtime.transfer; public class ChannelInterruptException extends RuntimeException { public ChannelInterruptException() { diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/ChannelUtils.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/ChannelUtils.java similarity index 93% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/ChannelUtils.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/ChannelUtils.java index bba6e3e5b..0ee016ef1 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/ChannelUtils.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/ChannelUtils.java @@ -1,8 +1,8 @@ -package org.ray.streaming.runtime.transfer; +package io.ray.streaming.runtime.transfer; +import io.ray.streaming.runtime.generated.Streaming; +import io.ray.streaming.util.Config; import java.util.Map; -import org.ray.streaming.runtime.generated.Streaming; -import org.ray.streaming.util.Config; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/DataMessage.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/DataMessage.java similarity index 95% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/DataMessage.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/DataMessage.java index 2fb80b09e..e6426a549 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/DataMessage.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/DataMessage.java @@ -1,4 +1,4 @@ -package org.ray.streaming.runtime.transfer; +package io.ray.streaming.runtime.transfer; import java.nio.ByteBuffer; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/DataReader.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/DataReader.java similarity index 98% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/DataReader.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/DataReader.java index d1ce9327d..243c8d036 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/DataReader.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/DataReader.java @@ -1,15 +1,15 @@ -package org.ray.streaming.runtime.transfer; +package io.ray.streaming.runtime.transfer; import com.google.common.base.Preconditions; +import io.ray.api.id.ActorId; +import io.ray.streaming.runtime.util.Platform; +import io.ray.streaming.util.Config; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Queue; -import org.ray.api.id.ActorId; -import org.ray.streaming.runtime.util.Platform; -import org.ray.streaming.util.Config; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/DataWriter.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/DataWriter.java similarity index 96% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/DataWriter.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/DataWriter.java index b0c943b0e..516f2c794 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/DataWriter.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/DataWriter.java @@ -1,14 +1,14 @@ -package org.ray.streaming.runtime.transfer; +package io.ray.streaming.runtime.transfer; import com.google.common.base.Preconditions; +import io.ray.api.id.ActorId; +import io.ray.streaming.runtime.util.Platform; +import io.ray.streaming.util.Config; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.List; import java.util.Map; import java.util.Set; -import org.ray.api.id.ActorId; -import org.ray.streaming.runtime.util.Platform; -import org.ray.streaming.util.Config; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/Message.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/Message.java similarity index 91% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/Message.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/Message.java index b43e713e7..dd620429c 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/Message.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/Message.java @@ -1,4 +1,4 @@ -package org.ray.streaming.runtime.transfer; +package io.ray.streaming.runtime.transfer; import java.nio.ByteBuffer; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/TransferHandler.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/TransferHandler.java similarity index 88% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/TransferHandler.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/TransferHandler.java index 5f17eac4f..7f06673a2 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/TransferHandler.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/transfer/TransferHandler.java @@ -1,9 +1,9 @@ -package org.ray.streaming.runtime.transfer; +package io.ray.streaming.runtime.transfer; -import org.ray.runtime.RayNativeRuntime; -import org.ray.runtime.functionmanager.FunctionDescriptor; -import org.ray.runtime.functionmanager.JavaFunctionDescriptor; -import org.ray.runtime.util.JniUtils; +import io.ray.runtime.RayNativeRuntime; +import io.ray.runtime.functionmanager.FunctionDescriptor; +import io.ray.runtime.functionmanager.JavaFunctionDescriptor; +import io.ray.runtime.util.JniUtils; /** * TransferHandler is used for handle direct call based data transfer between workers. diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/util/EnvUtil.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/util/EnvUtil.java similarity index 82% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/util/EnvUtil.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/util/EnvUtil.java index 70cb72cb0..f5120fb3a 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/util/EnvUtil.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/util/EnvUtil.java @@ -1,8 +1,8 @@ -package org.ray.streaming.runtime.util; +package io.ray.streaming.runtime.util; +import io.ray.runtime.RayNativeRuntime; +import io.ray.runtime.util.JniUtils; import java.lang.management.ManagementFactory; -import org.ray.runtime.RayNativeRuntime; -import org.ray.runtime.util.JniUtils; public class EnvUtil { diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/util/Platform.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/util/Platform.java similarity index 98% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/util/Platform.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/util/Platform.java index 21cda5d6f..739b0424d 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/util/Platform.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/util/Platform.java @@ -1,4 +1,4 @@ -package org.ray.streaming.runtime.util; +package io.ray.streaming.runtime.util; import com.google.common.base.Preconditions; import java.lang.reflect.Constructor; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/util/ReflectionUtils.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/util/ReflectionUtils.java similarity index 98% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/util/ReflectionUtils.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/util/ReflectionUtils.java index 89430e653..d3f26a06a 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/util/ReflectionUtils.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/util/ReflectionUtils.java @@ -1,4 +1,4 @@ -package org.ray.streaming.runtime.util; +package io.ray.streaming.runtime.util; import com.google.common.base.Preconditions; import java.lang.reflect.Method; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/JobWorker.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/JobWorker.java similarity index 79% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/JobWorker.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/JobWorker.java index aff7c047c..d555f1446 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/JobWorker.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/JobWorker.java @@ -1,23 +1,23 @@ -package org.ray.streaming.runtime.worker; +package io.ray.streaming.runtime.worker; +import io.ray.runtime.functionmanager.JavaFunctionDescriptor; +import io.ray.streaming.runtime.core.graph.ExecutionGraph; +import io.ray.streaming.runtime.core.graph.ExecutionNode; +import io.ray.streaming.runtime.core.graph.ExecutionNode.NodeType; +import io.ray.streaming.runtime.core.graph.ExecutionTask; +import io.ray.streaming.runtime.core.processor.OneInputProcessor; +import io.ray.streaming.runtime.core.processor.ProcessBuilder; +import io.ray.streaming.runtime.core.processor.SourceProcessor; +import io.ray.streaming.runtime.core.processor.StreamProcessor; +import io.ray.streaming.runtime.transfer.TransferHandler; +import io.ray.streaming.runtime.util.EnvUtil; +import io.ray.streaming.runtime.worker.context.WorkerContext; +import io.ray.streaming.runtime.worker.tasks.OneInputStreamTask; +import io.ray.streaming.runtime.worker.tasks.SourceStreamTask; +import io.ray.streaming.runtime.worker.tasks.StreamTask; +import io.ray.streaming.util.Config; import java.io.Serializable; import java.util.Map; -import org.ray.runtime.functionmanager.JavaFunctionDescriptor; -import org.ray.streaming.runtime.core.graph.ExecutionGraph; -import org.ray.streaming.runtime.core.graph.ExecutionNode; -import org.ray.streaming.runtime.core.graph.ExecutionNode.NodeType; -import org.ray.streaming.runtime.core.graph.ExecutionTask; -import org.ray.streaming.runtime.core.processor.OneInputProcessor; -import org.ray.streaming.runtime.core.processor.ProcessBuilder; -import org.ray.streaming.runtime.core.processor.SourceProcessor; -import org.ray.streaming.runtime.core.processor.StreamProcessor; -import org.ray.streaming.runtime.transfer.TransferHandler; -import org.ray.streaming.runtime.util.EnvUtil; -import org.ray.streaming.runtime.worker.context.WorkerContext; -import org.ray.streaming.runtime.worker.tasks.OneInputStreamTask; -import org.ray.streaming.runtime.worker.tasks.SourceStreamTask; -import org.ray.streaming.runtime.worker.tasks.StreamTask; -import org.ray.streaming.util.Config; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/context/RayRuntimeContext.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/context/RayRuntimeContext.java similarity index 83% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/context/RayRuntimeContext.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/context/RayRuntimeContext.java index b4d89c3ae..4cb107cd0 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/context/RayRuntimeContext.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/context/RayRuntimeContext.java @@ -1,10 +1,10 @@ -package org.ray.streaming.runtime.worker.context; +package io.ray.streaming.runtime.worker.context; -import static org.ray.streaming.util.Config.STREAMING_BATCH_MAX_COUNT; +import static io.ray.streaming.util.Config.STREAMING_BATCH_MAX_COUNT; +import io.ray.streaming.api.context.RuntimeContext; +import io.ray.streaming.runtime.core.graph.ExecutionTask; import java.util.Map; -import org.ray.streaming.api.context.RuntimeContext; -import org.ray.streaming.runtime.core.graph.ExecutionTask; /** * Use Ray to implement RuntimeContext. diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/context/WorkerContext.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/context/WorkerContext.java similarity index 88% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/context/WorkerContext.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/context/WorkerContext.java index 8ef3e0d24..a0178b5dc 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/context/WorkerContext.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/context/WorkerContext.java @@ -1,8 +1,8 @@ -package org.ray.streaming.runtime.worker.context; +package io.ray.streaming.runtime.worker.context; +import io.ray.streaming.runtime.core.graph.ExecutionGraph; import java.io.Serializable; import java.util.Map; -import org.ray.streaming.runtime.core.graph.ExecutionGraph; /** * Encapsulate the context information for worker initialization. diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/tasks/InputStreamTask.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/tasks/InputStreamTask.java similarity index 80% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/tasks/InputStreamTask.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/tasks/InputStreamTask.java index a4ba75eb4..a3fd7a470 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/tasks/InputStreamTask.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/tasks/InputStreamTask.java @@ -1,10 +1,10 @@ -package org.ray.streaming.runtime.worker.tasks; +package io.ray.streaming.runtime.worker.tasks; -import org.ray.runtime.serializer.Serializer; -import org.ray.streaming.runtime.core.processor.Processor; -import org.ray.streaming.runtime.transfer.Message; -import org.ray.streaming.runtime.worker.JobWorker; -import org.ray.streaming.util.Config; +import io.ray.runtime.serializer.Serializer; +import io.ray.streaming.runtime.core.processor.Processor; +import io.ray.streaming.runtime.transfer.Message; +import io.ray.streaming.runtime.worker.JobWorker; +import io.ray.streaming.util.Config; public abstract class InputStreamTask extends StreamTask { private volatile boolean running = true; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/tasks/OneInputStreamTask.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/tasks/OneInputStreamTask.java similarity index 56% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/tasks/OneInputStreamTask.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/tasks/OneInputStreamTask.java index 0b9491f76..5fd384b89 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/tasks/OneInputStreamTask.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/tasks/OneInputStreamTask.java @@ -1,7 +1,7 @@ -package org.ray.streaming.runtime.worker.tasks; +package io.ray.streaming.runtime.worker.tasks; -import org.ray.streaming.runtime.core.processor.Processor; -import org.ray.streaming.runtime.worker.JobWorker; +import io.ray.streaming.runtime.core.processor.Processor; +import io.ray.streaming.runtime.worker.JobWorker; public class OneInputStreamTask extends InputStreamTask { diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/tasks/SourceStreamTask.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/tasks/SourceStreamTask.java similarity index 72% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/tasks/SourceStreamTask.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/tasks/SourceStreamTask.java index 74a197708..c13fcc092 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/tasks/SourceStreamTask.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/tasks/SourceStreamTask.java @@ -1,8 +1,8 @@ -package org.ray.streaming.runtime.worker.tasks; +package io.ray.streaming.runtime.worker.tasks; -import org.ray.streaming.runtime.core.processor.Processor; -import org.ray.streaming.runtime.core.processor.SourceProcessor; -import org.ray.streaming.runtime.worker.JobWorker; +import io.ray.streaming.runtime.core.processor.Processor; +import io.ray.streaming.runtime.core.processor.SourceProcessor; +import io.ray.streaming.runtime.worker.JobWorker; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/tasks/StreamTask.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/tasks/StreamTask.java similarity index 82% rename from streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/tasks/StreamTask.java rename to streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/tasks/StreamTask.java index 8a3695bda..c0b1961fe 100644 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/tasks/StreamTask.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/worker/tasks/StreamTask.java @@ -1,26 +1,26 @@ -package org.ray.streaming.runtime.worker.tasks; +package io.ray.streaming.runtime.worker.tasks; +import io.ray.api.BaseActor; +import io.ray.api.Ray; +import io.ray.api.id.ActorId; +import io.ray.streaming.api.collector.Collector; +import io.ray.streaming.api.context.RuntimeContext; +import io.ray.streaming.api.partition.Partition; +import io.ray.streaming.runtime.core.collector.OutputCollector; +import io.ray.streaming.runtime.core.graph.ExecutionEdge; +import io.ray.streaming.runtime.core.graph.ExecutionGraph; +import io.ray.streaming.runtime.core.graph.ExecutionNode; +import io.ray.streaming.runtime.core.processor.Processor; +import io.ray.streaming.runtime.transfer.ChannelID; +import io.ray.streaming.runtime.transfer.DataReader; +import io.ray.streaming.runtime.transfer.DataWriter; +import io.ray.streaming.runtime.worker.JobWorker; +import io.ray.streaming.runtime.worker.context.RayRuntimeContext; +import io.ray.streaming.util.Config; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.ray.api.BaseActor; -import org.ray.api.Ray; -import org.ray.api.id.ActorId; -import org.ray.streaming.api.collector.Collector; -import org.ray.streaming.api.context.RuntimeContext; -import org.ray.streaming.api.partition.Partition; -import org.ray.streaming.runtime.core.collector.OutputCollector; -import org.ray.streaming.runtime.core.graph.ExecutionEdge; -import org.ray.streaming.runtime.core.graph.ExecutionGraph; -import org.ray.streaming.runtime.core.graph.ExecutionNode; -import org.ray.streaming.runtime.core.processor.Processor; -import org.ray.streaming.runtime.transfer.ChannelID; -import org.ray.streaming.runtime.transfer.DataReader; -import org.ray.streaming.runtime.transfer.DataWriter; -import org.ray.streaming.runtime.worker.JobWorker; -import org.ray.streaming.runtime.worker.context.RayRuntimeContext; -import org.ray.streaming.util.Config; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/resource/ContainerID.java b/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/resource/ContainerID.java deleted file mode 100644 index 1ea53280e..000000000 --- a/streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/resource/ContainerID.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.ray.streaming.runtime.core.resource; - -import org.ray.streaming.runtime.core.common.AbstractID; - -/** - * Container unique identifier. - */ -public class ContainerID extends AbstractID { -} diff --git a/streaming/java/streaming-runtime/src/main/resources/META-INF/services/io.ray.streaming.schedule.JobScheduler b/streaming/java/streaming-runtime/src/main/resources/META-INF/services/io.ray.streaming.schedule.JobScheduler new file mode 100644 index 000000000..f5930c35b --- /dev/null +++ b/streaming/java/streaming-runtime/src/main/resources/META-INF/services/io.ray.streaming.schedule.JobScheduler @@ -0,0 +1 @@ +io.ray.streaming.runtime.schedule.JobSchedulerImpl \ No newline at end of file diff --git a/streaming/java/streaming-runtime/src/main/resources/META-INF/services/org.ray.streaming.schedule.JobScheduler b/streaming/java/streaming-runtime/src/main/resources/META-INF/services/org.ray.streaming.schedule.JobScheduler deleted file mode 100644 index 53719a32a..000000000 --- a/streaming/java/streaming-runtime/src/main/resources/META-INF/services/org.ray.streaming.schedule.JobScheduler +++ /dev/null @@ -1 +0,0 @@ -org.ray.streaming.runtime.schedule.JobSchedulerImpl \ No newline at end of file diff --git a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/BaseUnitTest.java b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/BaseUnitTest.java similarity index 96% rename from streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/BaseUnitTest.java rename to streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/BaseUnitTest.java index b320d6b64..e757f14e1 100644 --- a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/BaseUnitTest.java +++ b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/BaseUnitTest.java @@ -1,4 +1,4 @@ -package org.ray.streaming.runtime; +package io.ray.streaming.runtime; import java.lang.reflect.Method; import org.slf4j.Logger; diff --git a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/TestHelper.java b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/TestHelper.java similarity index 88% rename from streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/TestHelper.java rename to streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/TestHelper.java index 43f6e8f25..dd200d318 100644 --- a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/TestHelper.java +++ b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/TestHelper.java @@ -1,4 +1,4 @@ -package org.ray.streaming.runtime; +package io.ray.streaming.runtime; public class TestHelper { diff --git a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/config/ConfigTest.java b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/config/ConfigTest.java similarity index 93% rename from streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/config/ConfigTest.java rename to streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/config/ConfigTest.java index a529f70e4..0a7ca3dd7 100644 --- a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/config/ConfigTest.java +++ b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/config/ConfigTest.java @@ -1,11 +1,11 @@ -package org.ray.streaming.runtime.config; +package io.ray.streaming.runtime.config; +import io.ray.streaming.runtime.BaseUnitTest; +import io.ray.streaming.runtime.config.global.CommonConfig; import java.util.HashMap; import java.util.Map; import org.aeonbits.owner.ConfigFactory; import org.nustaq.serialization.FSTConfiguration; -import org.ray.streaming.runtime.BaseUnitTest; -import org.ray.streaming.runtime.config.global.CommonConfig; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/demo/WordCountTest.java b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/demo/WordCountTest.java similarity index 85% rename from streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/demo/WordCountTest.java rename to streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/demo/WordCountTest.java index 604b0fce3..389c1bc1a 100644 --- a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/demo/WordCountTest.java +++ b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/demo/WordCountTest.java @@ -1,13 +1,13 @@ -package org.ray.streaming.runtime.demo; +package io.ray.streaming.runtime.demo; import com.google.common.collect.ImmutableMap; -import org.ray.streaming.api.context.StreamingContext; -import org.ray.streaming.api.function.impl.FlatMapFunction; -import org.ray.streaming.api.function.impl.ReduceFunction; -import org.ray.streaming.api.function.impl.SinkFunction; -import org.ray.streaming.api.stream.DataStreamSource; -import org.ray.streaming.runtime.BaseUnitTest; -import org.ray.streaming.util.Config; +import io.ray.streaming.api.context.StreamingContext; +import io.ray.streaming.api.function.impl.FlatMapFunction; +import io.ray.streaming.api.function.impl.ReduceFunction; +import io.ray.streaming.api.function.impl.SinkFunction; +import io.ray.streaming.api.stream.DataStreamSource; +import io.ray.streaming.runtime.BaseUnitTest; +import io.ray.streaming.util.Config; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; diff --git a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/graph/ExecutionGraphTest.java b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/graph/ExecutionGraphTest.java similarity index 77% rename from streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/graph/ExecutionGraphTest.java rename to streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/graph/ExecutionGraphTest.java index fa216ac74..f76e91f61 100644 --- a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/graph/ExecutionGraphTest.java +++ b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/graph/ExecutionGraphTest.java @@ -1,27 +1,25 @@ -package org.ray.streaming.runtime.graph; +package io.ray.streaming.runtime.graph; import com.google.common.collect.Lists; - +import io.ray.streaming.api.context.StreamingContext; +import io.ray.streaming.api.stream.DataStream; +import io.ray.streaming.api.stream.DataStreamSource; +import io.ray.streaming.api.stream.StreamSink; +import io.ray.streaming.jobgraph.JobGraph; +import io.ray.streaming.jobgraph.JobGraphBuilder; +import io.ray.streaming.runtime.BaseUnitTest; +import io.ray.streaming.runtime.config.StreamingConfig; +import io.ray.streaming.runtime.config.master.ResourceConfig; +import io.ray.streaming.runtime.core.graph.executiongraph.ExecutionGraph; +import io.ray.streaming.runtime.core.graph.executiongraph.ExecutionJobVertex; +import io.ray.streaming.runtime.core.graph.executiongraph.ExecutionVertex; +import io.ray.streaming.runtime.core.resource.ResourceType; +import io.ray.streaming.runtime.master.JobRuntimeContext; +import io.ray.streaming.runtime.master.graphmanager.GraphManager; +import io.ray.streaming.runtime.master.graphmanager.GraphManagerImpl; import java.util.HashMap; import java.util.List; import java.util.Map; - -import org.ray.streaming.api.context.StreamingContext; -import org.ray.streaming.api.stream.DataStream; -import org.ray.streaming.api.stream.DataStreamSource; -import org.ray.streaming.api.stream.StreamSink; -import org.ray.streaming.jobgraph.JobGraph; -import org.ray.streaming.jobgraph.JobGraphBuilder; -import org.ray.streaming.runtime.BaseUnitTest; -import org.ray.streaming.runtime.config.StreamingConfig; -import org.ray.streaming.runtime.config.master.ResourceConfig; -import org.ray.streaming.runtime.core.graph.executiongraph.ExecutionGraph; -import org.ray.streaming.runtime.core.graph.executiongraph.ExecutionJobVertex; -import org.ray.streaming.runtime.core.graph.executiongraph.ExecutionVertex; -import org.ray.streaming.runtime.core.resource.ResourceType; -import org.ray.streaming.runtime.master.JobRuntimeContext; -import org.ray.streaming.runtime.master.graphmanager.GraphManager; -import org.ray.streaming.runtime.master.graphmanager.GraphManagerImpl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; diff --git a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/python/MsgPackSerializerTest.java b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/python/MsgPackSerializerTest.java similarity index 95% rename from streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/python/MsgPackSerializerTest.java rename to streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/python/MsgPackSerializerTest.java index 930e8556e..b2213538b 100644 --- a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/python/MsgPackSerializerTest.java +++ b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/python/MsgPackSerializerTest.java @@ -1,7 +1,4 @@ -package org.ray.streaming.runtime.python; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; +package io.ray.streaming.runtime.python; import java.util.ArrayList; import java.util.Arrays; @@ -9,6 +6,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.testng.annotations.Test; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; @SuppressWarnings("unchecked") public class MsgPackSerializerTest { diff --git a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/python/PythonGatewayTest.java b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/python/PythonGatewayTest.java similarity index 90% rename from streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/python/PythonGatewayTest.java rename to streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/python/PythonGatewayTest.java index c8a1a5ea4..51440dba6 100644 --- a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/python/PythonGatewayTest.java +++ b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/python/PythonGatewayTest.java @@ -1,15 +1,14 @@ -package org.ray.streaming.runtime.python; - -import static org.testng.Assert.assertEquals; +package io.ray.streaming.runtime.python; +import io.ray.streaming.api.stream.StreamSink; +import io.ray.streaming.jobgraph.JobGraph; +import io.ray.streaming.jobgraph.JobGraphBuilder; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.ray.streaming.api.stream.StreamSink; -import org.ray.streaming.jobgraph.JobGraph; -import org.ray.streaming.jobgraph.JobGraphBuilder; import org.testng.annotations.Test; +import static org.testng.Assert.assertEquals; public class PythonGatewayTest { diff --git a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/resourcemanager/ResourceManagerTest.java b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/resourcemanager/ResourceManagerTest.java similarity index 73% rename from streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/resourcemanager/ResourceManagerTest.java rename to streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/resourcemanager/ResourceManagerTest.java index 2fbb60ad8..0d1b9ece8 100644 --- a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/resourcemanager/ResourceManagerTest.java +++ b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/resourcemanager/ResourceManagerTest.java @@ -1,30 +1,29 @@ -package org.ray.streaming.runtime.resourcemanager; +package io.ray.streaming.runtime.resourcemanager; +import io.ray.api.Ray; +import io.ray.streaming.jobgraph.JobGraph; +import io.ray.streaming.runtime.BaseUnitTest; +import io.ray.streaming.runtime.TestHelper; +import io.ray.streaming.runtime.config.StreamingConfig; +import io.ray.streaming.runtime.config.global.CommonConfig; +import io.ray.streaming.runtime.config.master.ResourceConfig; +import io.ray.streaming.runtime.core.graph.executiongraph.ExecutionGraph; +import io.ray.streaming.runtime.core.resource.Container; +import io.ray.streaming.runtime.core.resource.ContainerID; +import io.ray.streaming.runtime.core.resource.ResourceType; +import io.ray.streaming.runtime.core.resource.Slot; +import io.ray.streaming.runtime.graph.ExecutionGraphTest; +import io.ray.streaming.runtime.master.JobRuntimeContext; +import io.ray.streaming.runtime.master.graphmanager.GraphManager; +import io.ray.streaming.runtime.master.graphmanager.GraphManagerImpl; +import io.ray.streaming.runtime.master.resourcemanager.ResourceManager; +import io.ray.streaming.runtime.master.resourcemanager.ResourceManagerImpl; +import io.ray.streaming.runtime.master.scheduler.strategy.SlotAssignStrategy; +import io.ray.streaming.runtime.master.scheduler.strategy.impl.PipelineFirstStrategy; import java.util.HashMap; import java.util.List; import java.util.Map; - import org.aeonbits.owner.util.Collections; -import org.ray.api.Ray; -import org.ray.streaming.jobgraph.JobGraph; -import org.ray.streaming.runtime.BaseUnitTest; -import org.ray.streaming.runtime.TestHelper; -import org.ray.streaming.runtime.config.StreamingConfig; -import org.ray.streaming.runtime.config.global.CommonConfig; -import org.ray.streaming.runtime.config.master.ResourceConfig; -import org.ray.streaming.runtime.core.graph.executiongraph.ExecutionGraph; -import org.ray.streaming.runtime.core.resource.ResourceType; -import org.ray.streaming.runtime.master.resourcemanager.ResourceManager; -import org.ray.streaming.runtime.master.resourcemanager.ResourceManagerImpl; -import org.ray.streaming.runtime.master.scheduler.strategy.SlotAssignStrategy; -import org.ray.streaming.runtime.master.scheduler.strategy.impl.PipelineFirstStrategy; -import org.ray.streaming.runtime.core.resource.Container; -import org.ray.streaming.runtime.core.resource.ContainerID; -import org.ray.streaming.runtime.core.resource.Slot; -import org.ray.streaming.runtime.graph.ExecutionGraphTest; -import org.ray.streaming.runtime.master.JobRuntimeContext; -import org.ray.streaming.runtime.master.graphmanager.GraphManager; -import org.ray.streaming.runtime.master.graphmanager.GraphManagerImpl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; diff --git a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/schedule/TaskAssignerImplTest.java b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/schedule/TaskAssignerImplTest.java similarity index 72% rename from streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/schedule/TaskAssignerImplTest.java rename to streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/schedule/TaskAssignerImplTest.java index 14708cb91..7c2e7e7ff 100644 --- a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/schedule/TaskAssignerImplTest.java +++ b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/schedule/TaskAssignerImplTest.java @@ -1,20 +1,20 @@ -package org.ray.streaming.runtime.schedule; +package io.ray.streaming.runtime.schedule; import com.google.common.collect.Lists; +import io.ray.api.Ray; +import io.ray.streaming.api.context.StreamingContext; +import io.ray.streaming.api.partition.impl.RoundRobinPartition; +import io.ray.streaming.api.stream.DataStream; +import io.ray.streaming.api.stream.DataStreamSink; +import io.ray.streaming.api.stream.DataStreamSource; +import io.ray.streaming.jobgraph.JobGraph; +import io.ray.streaming.jobgraph.JobGraphBuilder; +import io.ray.streaming.runtime.BaseUnitTest; +import io.ray.streaming.runtime.core.graph.ExecutionEdge; +import io.ray.streaming.runtime.core.graph.ExecutionGraph; +import io.ray.streaming.runtime.core.graph.ExecutionNode; +import io.ray.streaming.runtime.core.graph.ExecutionNode.NodeType; import java.util.List; -import org.ray.api.Ray; -import org.ray.streaming.api.context.StreamingContext; -import org.ray.streaming.api.partition.impl.RoundRobinPartition; -import org.ray.streaming.api.stream.DataStream; -import org.ray.streaming.api.stream.DataStreamSink; -import org.ray.streaming.api.stream.DataStreamSource; -import org.ray.streaming.jobgraph.JobGraph; -import org.ray.streaming.jobgraph.JobGraphBuilder; -import org.ray.streaming.runtime.BaseUnitTest; -import org.ray.streaming.runtime.core.graph.ExecutionEdge; -import org.ray.streaming.runtime.core.graph.ExecutionGraph; -import org.ray.streaming.runtime.core.graph.ExecutionNode; -import org.ray.streaming.runtime.core.graph.ExecutionNode.NodeType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; diff --git a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/schedule/strategy/PipelineFirstStrategyTest.java b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/schedule/strategy/PipelineFirstStrategyTest.java similarity index 72% rename from streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/schedule/strategy/PipelineFirstStrategyTest.java rename to streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/schedule/strategy/PipelineFirstStrategyTest.java index 1babff3a3..de66df82f 100644 --- a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/schedule/strategy/PipelineFirstStrategyTest.java +++ b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/schedule/strategy/PipelineFirstStrategyTest.java @@ -1,30 +1,28 @@ -package org.ray.streaming.runtime.schedule.strategy; +package io.ray.streaming.runtime.schedule.strategy; +import io.ray.api.id.UniqueId; +import io.ray.streaming.jobgraph.JobGraph; +import io.ray.streaming.runtime.BaseUnitTest; +import io.ray.streaming.runtime.config.StreamingConfig; +import io.ray.streaming.runtime.config.master.ResourceConfig; +import io.ray.streaming.runtime.core.graph.executiongraph.ExecutionGraph; +import io.ray.streaming.runtime.core.resource.Container; +import io.ray.streaming.runtime.core.resource.ContainerID; +import io.ray.streaming.runtime.core.resource.ResourceType; +import io.ray.streaming.runtime.core.resource.Resources; +import io.ray.streaming.runtime.core.resource.Slot; +import io.ray.streaming.runtime.graph.ExecutionGraphTest; +import io.ray.streaming.runtime.master.JobRuntimeContext; +import io.ray.streaming.runtime.master.graphmanager.GraphManager; +import io.ray.streaming.runtime.master.graphmanager.GraphManagerImpl; +import io.ray.streaming.runtime.master.scheduler.strategy.SlotAssignStrategy; +import io.ray.streaming.runtime.master.scheduler.strategy.impl.PipelineFirstStrategy; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; - - import org.aeonbits.owner.ConfigFactory; -import org.ray.api.id.UniqueId; -import org.ray.streaming.jobgraph.JobGraph; -import org.ray.streaming.runtime.BaseUnitTest; -import org.ray.streaming.runtime.config.StreamingConfig; -import org.ray.streaming.runtime.config.master.ResourceConfig; -import org.ray.streaming.runtime.core.graph.executiongraph.ExecutionGraph; -import org.ray.streaming.runtime.core.resource.ResourceType; -import org.ray.streaming.runtime.master.scheduler.strategy.SlotAssignStrategy; -import org.ray.streaming.runtime.master.scheduler.strategy.impl.PipelineFirstStrategy; -import org.ray.streaming.runtime.core.resource.Container; -import org.ray.streaming.runtime.core.resource.ContainerID; -import org.ray.streaming.runtime.core.resource.Resources; -import org.ray.streaming.runtime.core.resource.Slot; -import org.ray.streaming.runtime.graph.ExecutionGraphTest; -import org.ray.streaming.runtime.master.JobRuntimeContext; -import org.ray.streaming.runtime.master.graphmanager.GraphManager; -import org.ray.streaming.runtime.master.graphmanager.GraphManagerImpl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; diff --git a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/streamingqueue/StreamingQueueTest.java b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/streamingqueue/StreamingQueueTest.java similarity index 91% rename from streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/streamingqueue/StreamingQueueTest.java rename to streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/streamingqueue/StreamingQueueTest.java index dcc5943d5..e2d617927 100644 --- a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/streamingqueue/StreamingQueueTest.java +++ b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/streamingqueue/StreamingQueueTest.java @@ -1,6 +1,18 @@ -package org.ray.streaming.runtime.streamingqueue; +package io.ray.streaming.runtime.streamingqueue; import com.google.common.collect.ImmutableMap; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.options.ActorCreationOptions; +import io.ray.api.options.ActorCreationOptions.Builder; +import io.ray.streaming.api.context.StreamingContext; +import io.ray.streaming.api.function.impl.FlatMapFunction; +import io.ray.streaming.api.function.impl.ReduceFunction; +import io.ray.streaming.api.stream.DataStreamSource; +import io.ray.streaming.runtime.BaseUnitTest; +import io.ray.streaming.runtime.transfer.ChannelID; +import io.ray.streaming.runtime.util.EnvUtil; +import io.ray.streaming.util.Config; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -13,18 +25,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.options.ActorCreationOptions; -import org.ray.api.options.ActorCreationOptions.Builder; -import org.ray.streaming.api.context.StreamingContext; -import org.ray.streaming.api.function.impl.FlatMapFunction; -import org.ray.streaming.api.function.impl.ReduceFunction; -import org.ray.streaming.api.stream.DataStreamSource; -import org.ray.streaming.runtime.BaseUnitTest; -import org.ray.streaming.runtime.transfer.ChannelID; -import org.ray.streaming.runtime.util.EnvUtil; -import org.ray.streaming.util.Config; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; @@ -146,7 +146,7 @@ public class StreamingQueueTest extends BaseUnitTest implements Serializable { public void testWordCount() { LOGGER.info("StreamingQueueTest.testWordCount run-mode: {}", System.getProperty("ray.run-mode")); - String resultFile = "/tmp/org.ray.streaming.runtime.streamingqueue.testWordCount.txt"; + String resultFile = "/tmp/io.ray.streaming.runtime.streamingqueue.testWordCount.txt"; deleteResultFile(resultFile); Map wordCount = new ConcurrentHashMap<>(); diff --git a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/streamingqueue/Worker.java b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/streamingqueue/Worker.java similarity index 92% rename from streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/streamingqueue/Worker.java rename to streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/streamingqueue/Worker.java index 71364bbee..a1fe04f86 100644 --- a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/streamingqueue/Worker.java +++ b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/streamingqueue/Worker.java @@ -1,5 +1,15 @@ -package org.ray.streaming.runtime.streamingqueue; +package io.ray.streaming.runtime.streamingqueue; +import io.ray.api.Ray; +import io.ray.api.RayActor; +import io.ray.api.id.ActorId; +import io.ray.runtime.functionmanager.JavaFunctionDescriptor; +import io.ray.streaming.runtime.transfer.ChannelID; +import io.ray.streaming.runtime.transfer.DataMessage; +import io.ray.streaming.runtime.transfer.DataReader; +import io.ray.streaming.runtime.transfer.DataWriter; +import io.ray.streaming.runtime.transfer.TransferHandler; +import io.ray.streaming.util.Config; import java.lang.management.ManagementFactory; import java.nio.ByteBuffer; import java.util.ArrayList; @@ -7,17 +17,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; -import org.ray.api.Ray; -import org.ray.api.RayActor; -import org.ray.api.id.ActorId; -import org.ray.runtime.actor.NativeRayActor; -import org.ray.runtime.functionmanager.JavaFunctionDescriptor; -import org.ray.streaming.runtime.transfer.ChannelID; -import org.ray.streaming.runtime.transfer.DataMessage; -import org.ray.streaming.runtime.transfer.DataReader; -import org.ray.streaming.runtime.transfer.DataWriter; -import org.ray.streaming.runtime.transfer.TransferHandler; -import org.ray.streaming.util.Config; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; diff --git a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/transfer/ChannelIDTest.java b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/transfer/ChannelIDTest.java similarity index 75% rename from streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/transfer/ChannelIDTest.java rename to streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/transfer/ChannelIDTest.java index a621b311c..4174efe15 100644 --- a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/transfer/ChannelIDTest.java +++ b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/transfer/ChannelIDTest.java @@ -1,10 +1,9 @@ -package org.ray.streaming.runtime.transfer; +package io.ray.streaming.runtime.transfer; -import static org.testng.Assert.assertEquals; - -import org.ray.streaming.runtime.BaseUnitTest; -import org.ray.streaming.runtime.util.EnvUtil; +import io.ray.streaming.runtime.BaseUnitTest; +import io.ray.streaming.runtime.util.EnvUtil; import org.testng.annotations.Test; +import static org.testng.Assert.assertEquals; public class ChannelIDTest extends BaseUnitTest { diff --git a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/util/ReflectionUtilsTest.java b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/util/ReflectionUtilsTest.java similarity index 95% rename from streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/util/ReflectionUtilsTest.java rename to streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/util/ReflectionUtilsTest.java index 6f42b1c0a..ce445cbde 100644 --- a/streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/util/ReflectionUtilsTest.java +++ b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/util/ReflectionUtilsTest.java @@ -1,10 +1,9 @@ -package org.ray.streaming.runtime.util; - -import static org.testng.Assert.assertEquals; +package io.ray.streaming.runtime.util; import java.io.Serializable; import java.util.Collections; import org.testng.annotations.Test; +import static org.testng.Assert.assertEquals; public class ReflectionUtilsTest { diff --git a/streaming/java/testng.xml b/streaming/java/testng.xml index 3ae10ba75..69e4af5af 100644 --- a/streaming/java/testng.xml +++ b/streaming/java/testng.xml @@ -3,7 +3,7 @@ - + diff --git a/streaming/python/context.py b/streaming/python/context.py index e051d0894..7ad80a909 100644 --- a/streaming/python/context.py +++ b/streaming/python/context.py @@ -11,7 +11,7 @@ class StreamingContext: """ Main entry point for ray streaming functionality. A StreamingContext is also a wrapper of java - `org.ray.streaming.api.context.StreamingContext` + `io.ray.streaming.api.context.StreamingContext` """ class Builder: diff --git a/streaming/python/datastream.py b/streaming/python/datastream.py index 7dc897d35..39a067a6a 100644 --- a/streaming/python/datastream.py +++ b/streaming/python/datastream.py @@ -68,7 +68,7 @@ class DataStream(Stream): """ Represents a stream of data which applies a transformation executed by python. It's also a wrapper of java - `org.ray.streaming.python.stream.PythonDataStream` + `io.ray.streaming.python.stream.PythonDataStream` """ def __init__(self, input_stream, j_stream, streaming_context=None): @@ -220,7 +220,7 @@ class DataStream(Stream): class KeyDataStream(Stream): """Represents a DataStream returned by a key-by operation. - Wrapper of java org.ray.streaming.python.stream.PythonKeyDataStream + Wrapper of java io.ray.streaming.python.stream.PythonKeyDataStream """ def __init__(self, input_stream, j_stream): @@ -254,7 +254,7 @@ class KeyDataStream(Stream): class StreamSource(DataStream): """Represents a source of the DataStream. - Wrapper of java org.ray.streaming.python.stream.PythonStreamSource + Wrapper of java io.ray.streaming.python.stream.PythonStreamSource """ def __init__(self, j_stream, streaming_context, source_func): @@ -277,7 +277,7 @@ class StreamSource(DataStream): class StreamSink(Stream): """Represents a sink of the DataStream. - Wrapper of java org.ray.streaming.python.stream.PythonStreamSink + Wrapper of java io.ray.streaming.python.stream.PythonStreamSink """ def __init__(self, input_stream, j_stream, func): diff --git a/streaming/python/function.py b/streaming/python/function.py index fceb819a5..9a9a22a19 100644 --- a/streaming/python/function.py +++ b/streaming/python/function.py @@ -275,7 +275,7 @@ def load_function(descriptor_func_bytes: bytes): Deserialize `descriptor_func_bytes` to get function info, then get or load streaming function. Note that this function must be kept in sync with - `org.ray.streaming.runtime.python.GraphPbBuilder.serializeFunction` + `io.ray.streaming.runtime.python.GraphPbBuilder.serializeFunction` Args: descriptor_func_bytes: serialized function info diff --git a/streaming/python/partition.py b/streaming/python/partition.py index b6a9b87fe..722fb7933 100644 --- a/streaming/python/partition.py +++ b/streaming/python/partition.py @@ -88,7 +88,7 @@ def load_partition(descriptor_partition_bytes: bytes): Deserialize `descriptor_partition_bytes` to get partition info, then get or load partition function. Note that this function must be kept in sync with - `org.ray.streaming.runtime.python.GraphPbBuilder.serializePartition` + `io.ray.streaming.runtime.python.GraphPbBuilder.serializePartition` Args: descriptor_partition_bytes: serialized partition info diff --git a/streaming/python/runtime/gateway_client.py b/streaming/python/runtime/gateway_client.py index 12433b017..5477d9230 100644 --- a/streaming/python/runtime/gateway_client.py +++ b/streaming/python/runtime/gateway_client.py @@ -10,7 +10,7 @@ class GatewayClient: """GatewayClient is used to interact with `PythonGateway` java actor""" _PYTHON_GATEWAY_CLASSNAME = \ - b"org.ray.streaming.runtime.python.PythonGateway" + b"io.ray.streaming.runtime.python.PythonGateway" def __init__(self): self._python_gateway_actor = ray.java_actor_class( diff --git a/streaming/src/lib/java/org_ray_streaming_runtime_transfer_ChannelID.cc b/streaming/src/lib/java/io_ray_streaming_runtime_transfer_ChannelID.cc similarity index 66% rename from streaming/src/lib/java/org_ray_streaming_runtime_transfer_ChannelID.cc rename to streaming/src/lib/java/io_ray_streaming_runtime_transfer_ChannelID.cc index 364d0af9f..b8591fcc6 100644 --- a/streaming/src/lib/java/org_ray_streaming_runtime_transfer_ChannelID.cc +++ b/streaming/src/lib/java/io_ray_streaming_runtime_transfer_ChannelID.cc @@ -1,15 +1,15 @@ -#include "org_ray_streaming_runtime_transfer_ChannelID.h" +#include "io_ray_streaming_runtime_transfer_ChannelID.h" #include "streaming_jni_common.h" using namespace ray::streaming; -JNIEXPORT jlong JNICALL Java_org_ray_streaming_runtime_transfer_ChannelID_createNativeID( +JNIEXPORT jlong JNICALL Java_io_ray_streaming_runtime_transfer_ChannelID_createNativeID( JNIEnv *env, jclass cls, jlong qid_address) { auto id = ray::ObjectID::FromBinary( std::string(reinterpret_cast(qid_address), ray::ObjectID::Size())); return reinterpret_cast(new ray::ObjectID(id)); } -JNIEXPORT void JNICALL Java_org_ray_streaming_runtime_transfer_ChannelID_destroyNativeID( +JNIEXPORT void JNICALL Java_io_ray_streaming_runtime_transfer_ChannelID_destroyNativeID( JNIEnv *env, jclass cls, jlong native_id_ptr) { auto id = reinterpret_cast(native_id_ptr); STREAMING_CHECK(id != nullptr); diff --git a/streaming/src/lib/java/io_ray_streaming_runtime_transfer_ChannelID.h b/streaming/src/lib/java/io_ray_streaming_runtime_transfer_ChannelID.h new file mode 100644 index 000000000..c97613afa --- /dev/null +++ b/streaming/src/lib/java/io_ray_streaming_runtime_transfer_ChannelID.h @@ -0,0 +1,31 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class io_ray_streaming_runtime_transfer_ChannelID */ + +#ifndef _Included_io_ray_streaming_runtime_transfer_ChannelID +#define _Included_io_ray_streaming_runtime_transfer_ChannelID +#ifdef __cplusplus +extern "C" { +#endif +#undef io_ray_streaming_runtime_transfer_ChannelID_ID_LENGTH +#define io_ray_streaming_runtime_transfer_ChannelID_ID_LENGTH 20L +/* + * Class: io_ray_streaming_runtime_transfer_ChannelID + * Method: createNativeID + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_io_ray_streaming_runtime_transfer_ChannelID_createNativeID + (JNIEnv *, jclass, jlong); + +/* + * Class: io_ray_streaming_runtime_transfer_ChannelID + * Method: destroyNativeID + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_io_ray_streaming_runtime_transfer_ChannelID_destroyNativeID + (JNIEnv *, jclass, jlong); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/streaming/src/lib/java/org_ray_streaming_runtime_transfer_DataReader.cc b/streaming/src/lib/java/io_ray_streaming_runtime_transfer_DataReader.cc similarity index 90% rename from streaming/src/lib/java/org_ray_streaming_runtime_transfer_DataReader.cc rename to streaming/src/lib/java/io_ray_streaming_runtime_transfer_DataReader.cc index 651ef6b32..3caa7182a 100644 --- a/streaming/src/lib/java/org_ray_streaming_runtime_transfer_DataReader.cc +++ b/streaming/src/lib/java/io_ray_streaming_runtime_transfer_DataReader.cc @@ -1,4 +1,4 @@ -#include "org_ray_streaming_runtime_transfer_DataReader.h" +#include "io_ray_streaming_runtime_transfer_DataReader.h" #include #include "data_reader.h" #include "runtime_context.h" @@ -8,7 +8,7 @@ using namespace ray; using namespace ray::streaming; JNIEXPORT jlong JNICALL -Java_org_ray_streaming_runtime_transfer_DataReader_createDataReaderNative( +Java_io_ray_streaming_runtime_transfer_DataReader_createDataReaderNative( JNIEnv *env, jclass, jobjectArray input_channels, jobjectArray input_actor_ids, jlongArray seq_id_array, jlongArray msg_id_array, jlong timer_interval, jboolean isRecreate, jbyteArray config_bytes, jboolean is_mock) { @@ -34,7 +34,7 @@ Java_org_ray_streaming_runtime_transfer_DataReader_createDataReaderNative( return reinterpret_cast(reader); } -JNIEXPORT void JNICALL Java_org_ray_streaming_runtime_transfer_DataReader_getBundleNative( +JNIEXPORT void JNICALL Java_io_ray_streaming_runtime_transfer_DataReader_getBundleNative( JNIEnv *env, jobject, jlong reader_ptr, jlong timeout_millis, jlong out, jlong meta_addr) { std::shared_ptr bundle; @@ -73,7 +73,7 @@ JNIEXPORT void JNICALL Java_org_ray_streaming_runtime_transfer_DataReader_getBun } JNIEXPORT void JNICALL -Java_org_ray_streaming_runtime_transfer_DataReader_stopReaderNative(JNIEnv *env, +Java_io_ray_streaming_runtime_transfer_DataReader_stopReaderNative(JNIEnv *env, jobject thisObj, jlong ptr) { auto reader = reinterpret_cast(ptr); @@ -81,7 +81,7 @@ Java_org_ray_streaming_runtime_transfer_DataReader_stopReaderNative(JNIEnv *env, } JNIEXPORT void JNICALL -Java_org_ray_streaming_runtime_transfer_DataReader_closeReaderNative(JNIEnv *env, +Java_io_ray_streaming_runtime_transfer_DataReader_closeReaderNative(JNIEnv *env, jobject thisObj, jlong ptr) { delete reinterpret_cast(ptr); diff --git a/streaming/src/lib/java/io_ray_streaming_runtime_transfer_DataReader.h b/streaming/src/lib/java/io_ray_streaming_runtime_transfer_DataReader.h new file mode 100644 index 000000000..19c02ac4a --- /dev/null +++ b/streaming/src/lib/java/io_ray_streaming_runtime_transfer_DataReader.h @@ -0,0 +1,45 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class io_ray_streaming_runtime_transfer_DataReader */ + +#ifndef _Included_io_ray_streaming_runtime_transfer_DataReader +#define _Included_io_ray_streaming_runtime_transfer_DataReader +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: io_ray_streaming_runtime_transfer_DataReader + * Method: createDataReaderNative + * Signature: ([[B[[B[J[JJZ[BZ)J + */ +JNIEXPORT jlong JNICALL Java_io_ray_streaming_runtime_transfer_DataReader_createDataReaderNative + (JNIEnv *, jclass, jobjectArray, jobjectArray, jlongArray, jlongArray, jlong, jboolean, jbyteArray, jboolean); + +/* + * Class: io_ray_streaming_runtime_transfer_DataReader + * Method: getBundleNative + * Signature: (JJJJ)V + */ +JNIEXPORT void JNICALL Java_io_ray_streaming_runtime_transfer_DataReader_getBundleNative + (JNIEnv *, jobject, jlong, jlong, jlong, jlong); + +/* + * Class: io_ray_streaming_runtime_transfer_DataReader + * Method: stopReaderNative + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_io_ray_streaming_runtime_transfer_DataReader_stopReaderNative + (JNIEnv *, jobject, jlong); + +/* + * Class: io_ray_streaming_runtime_transfer_DataReader + * Method: closeReaderNative + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_io_ray_streaming_runtime_transfer_DataReader_closeReaderNative + (JNIEnv *, jobject, jlong); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/streaming/src/lib/java/org_ray_streaming_runtime_transfer_DataWriter.cc b/streaming/src/lib/java/io_ray_streaming_runtime_transfer_DataWriter.cc similarity index 90% rename from streaming/src/lib/java/org_ray_streaming_runtime_transfer_DataWriter.cc rename to streaming/src/lib/java/io_ray_streaming_runtime_transfer_DataWriter.cc index 439cd89a9..84e77153a 100644 --- a/streaming/src/lib/java/org_ray_streaming_runtime_transfer_DataWriter.cc +++ b/streaming/src/lib/java/io_ray_streaming_runtime_transfer_DataWriter.cc @@ -1,4 +1,4 @@ -#include "org_ray_streaming_runtime_transfer_DataWriter.h" +#include "io_ray_streaming_runtime_transfer_DataWriter.h" #include "config/streaming_config.h" #include "data_writer.h" #include "streaming_jni_common.h" @@ -6,7 +6,7 @@ using namespace ray::streaming; JNIEXPORT jlong JNICALL -Java_org_ray_streaming_runtime_transfer_DataWriter_createWriterNative( +Java_io_ray_streaming_runtime_transfer_DataWriter_createWriterNative( JNIEnv *env, jclass, jobjectArray output_queue_ids, jobjectArray output_actor_ids, jlongArray msg_ids, jlong channel_size, jbyteArray conf_bytes_array, jboolean is_mock) { @@ -48,7 +48,7 @@ Java_org_ray_streaming_runtime_transfer_DataWriter_createWriterNative( } JNIEXPORT jlong JNICALL -Java_org_ray_streaming_runtime_transfer_DataWriter_writeMessageNative( +Java_io_ray_streaming_runtime_transfer_DataWriter_writeMessageNative( JNIEnv *env, jobject, jlong writer_ptr, jlong qid_ptr, jlong address, jint size) { auto *data_writer = reinterpret_cast(writer_ptr); auto qid = *reinterpret_cast(qid_ptr); @@ -65,7 +65,7 @@ Java_org_ray_streaming_runtime_transfer_DataWriter_writeMessageNative( } JNIEXPORT void JNICALL -Java_org_ray_streaming_runtime_transfer_DataWriter_stopWriterNative(JNIEnv *env, +Java_io_ray_streaming_runtime_transfer_DataWriter_stopWriterNative(JNIEnv *env, jobject thisObj, jlong ptr) { STREAMING_LOG(INFO) << "jni: stop writer."; @@ -74,7 +74,7 @@ Java_org_ray_streaming_runtime_transfer_DataWriter_stopWriterNative(JNIEnv *env, } JNIEXPORT void JNICALL -Java_org_ray_streaming_runtime_transfer_DataWriter_closeWriterNative(JNIEnv *env, +Java_io_ray_streaming_runtime_transfer_DataWriter_closeWriterNative(JNIEnv *env, jobject thisObj, jlong ptr) { auto *data_writer = reinterpret_cast(ptr); diff --git a/streaming/src/lib/java/io_ray_streaming_runtime_transfer_DataWriter.h b/streaming/src/lib/java/io_ray_streaming_runtime_transfer_DataWriter.h new file mode 100644 index 000000000..b54e900b1 --- /dev/null +++ b/streaming/src/lib/java/io_ray_streaming_runtime_transfer_DataWriter.h @@ -0,0 +1,45 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class io_ray_streaming_runtime_transfer_DataWriter */ + +#ifndef _Included_io_ray_streaming_runtime_transfer_DataWriter +#define _Included_io_ray_streaming_runtime_transfer_DataWriter +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: io_ray_streaming_runtime_transfer_DataWriter + * Method: createWriterNative + * Signature: ([[B[[B[JJ[BZ)J + */ +JNIEXPORT jlong JNICALL Java_io_ray_streaming_runtime_transfer_DataWriter_createWriterNative + (JNIEnv *, jclass, jobjectArray, jobjectArray, jlongArray, jlong, jbyteArray, jboolean); + +/* + * Class: io_ray_streaming_runtime_transfer_DataWriter + * Method: writeMessageNative + * Signature: (JJJI)J + */ +JNIEXPORT jlong JNICALL Java_io_ray_streaming_runtime_transfer_DataWriter_writeMessageNative + (JNIEnv *, jobject, jlong, jlong, jlong, jint); + +/* + * Class: io_ray_streaming_runtime_transfer_DataWriter + * Method: stopWriterNative + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_io_ray_streaming_runtime_transfer_DataWriter_stopWriterNative + (JNIEnv *, jobject, jlong); + +/* + * Class: io_ray_streaming_runtime_transfer_DataWriter + * Method: closeWriterNative + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_io_ray_streaming_runtime_transfer_DataWriter_closeWriterNative + (JNIEnv *, jobject, jlong); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/streaming/src/lib/java/org_ray_streaming_runtime_transfer_TransferHandler.cc b/streaming/src/lib/java/io_ray_streaming_runtime_transfer_TransferHandler.cc similarity index 82% rename from streaming/src/lib/java/org_ray_streaming_runtime_transfer_TransferHandler.cc rename to streaming/src/lib/java/io_ray_streaming_runtime_transfer_TransferHandler.cc index 997404fdd..a3298f081 100644 --- a/streaming/src/lib/java/org_ray_streaming_runtime_transfer_TransferHandler.cc +++ b/streaming/src/lib/java/io_ray_streaming_runtime_transfer_TransferHandler.cc @@ -1,4 +1,4 @@ -#include "org_ray_streaming_runtime_transfer_TransferHandler.h" +#include "io_ray_streaming_runtime_transfer_TransferHandler.h" #include "queue/queue_client.h" #include "streaming_jni_common.h" @@ -13,7 +13,7 @@ static std::shared_ptr JByteArrayToBuffer(JNIEnv *env, } JNIEXPORT jlong JNICALL -Java_org_ray_streaming_runtime_transfer_TransferHandler_createWriterClientNative( +Java_io_ray_streaming_runtime_transfer_TransferHandler_createWriterClientNative( JNIEnv *env, jobject this_obj, jobject async_func, jobject sync_func) { auto ray_async_func = FunctionDescriptorToRayFunction(env, async_func); auto ray_sync_func = FunctionDescriptorToRayFunction(env, sync_func); @@ -22,7 +22,7 @@ Java_org_ray_streaming_runtime_transfer_TransferHandler_createWriterClientNative } JNIEXPORT jlong JNICALL -Java_org_ray_streaming_runtime_transfer_TransferHandler_createReaderClientNative( +Java_io_ray_streaming_runtime_transfer_TransferHandler_createReaderClientNative( JNIEnv *env, jobject this_obj, jobject async_func, jobject sync_func) { ray::RayFunction ray_async_func = FunctionDescriptorToRayFunction(env, async_func); ray::RayFunction ray_sync_func = FunctionDescriptorToRayFunction(env, sync_func); @@ -31,14 +31,14 @@ Java_org_ray_streaming_runtime_transfer_TransferHandler_createReaderClientNative } JNIEXPORT void JNICALL -Java_org_ray_streaming_runtime_transfer_TransferHandler_handleWriterMessageNative( +Java_io_ray_streaming_runtime_transfer_TransferHandler_handleWriterMessageNative( JNIEnv *env, jobject this_obj, jlong ptr, jbyteArray bytes) { auto *writer_client = reinterpret_cast(ptr); writer_client->OnWriterMessage(JByteArrayToBuffer(env, bytes)); } JNIEXPORT jbyteArray JNICALL -Java_org_ray_streaming_runtime_transfer_TransferHandler_handleWriterMessageSyncNative( +Java_io_ray_streaming_runtime_transfer_TransferHandler_handleWriterMessageSyncNative( JNIEnv *env, jobject this_obj, jlong ptr, jbyteArray bytes) { auto *writer_client = reinterpret_cast(ptr); std::shared_ptr result_buffer = @@ -50,14 +50,14 @@ Java_org_ray_streaming_runtime_transfer_TransferHandler_handleWriterMessageSyncN } JNIEXPORT void JNICALL -Java_org_ray_streaming_runtime_transfer_TransferHandler_handleReaderMessageNative( +Java_io_ray_streaming_runtime_transfer_TransferHandler_handleReaderMessageNative( JNIEnv *env, jobject this_obj, jlong ptr, jbyteArray bytes) { auto *reader_client = reinterpret_cast(ptr); reader_client->OnReaderMessage(JByteArrayToBuffer(env, bytes)); } JNIEXPORT jbyteArray JNICALL -Java_org_ray_streaming_runtime_transfer_TransferHandler_handleReaderMessageSyncNative( +Java_io_ray_streaming_runtime_transfer_TransferHandler_handleReaderMessageSyncNative( JNIEnv *env, jobject this_obj, jlong ptr, jbyteArray bytes) { auto *reader_client = reinterpret_cast(ptr); auto result_buffer = reader_client->OnReaderMessageSync(JByteArrayToBuffer(env, bytes)); diff --git a/streaming/src/lib/java/io_ray_streaming_runtime_transfer_TransferHandler.h b/streaming/src/lib/java/io_ray_streaming_runtime_transfer_TransferHandler.h new file mode 100644 index 000000000..63d284c41 --- /dev/null +++ b/streaming/src/lib/java/io_ray_streaming_runtime_transfer_TransferHandler.h @@ -0,0 +1,71 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class io_ray_streaming_runtime_transfer_TransferHandler */ + +#ifndef _Included_io_ray_streaming_runtime_transfer_TransferHandler +#define _Included_io_ray_streaming_runtime_transfer_TransferHandler +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: io_ray_streaming_runtime_transfer_TransferHandler + * Method: createWriterClientNative + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL +Java_io_ray_streaming_runtime_transfer_TransferHandler_createWriterClientNative(JNIEnv *, + jobject, + jobject, + jobject); + +/* + * Class: io_ray_streaming_runtime_transfer_TransferHandler + * Method: createReaderClientNative + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL +Java_io_ray_streaming_runtime_transfer_TransferHandler_createReaderClientNative(JNIEnv *, + jobject, + jobject, + jobject); + +/* + * Class: io_ray_streaming_runtime_transfer_TransferHandler + * Method: handleWriterMessageNative + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL +Java_io_ray_streaming_runtime_transfer_TransferHandler_handleWriterMessageNative( + JNIEnv *, jobject, jlong, jbyteArray); + +/* + * Class: io_ray_streaming_runtime_transfer_TransferHandler + * Method: handleWriterMessageSyncNative + * Signature: (J[B)[B + */ +JNIEXPORT jbyteArray JNICALL + Java_io_ray_streaming_runtime_transfer_TransferHandler_handleWriterMessageSyncNative( + JNIEnv *, jobject, jlong, jbyteArray); + +/* + * Class: io_ray_streaming_runtime_transfer_TransferHandler + * Method: handleReaderMessageNative + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL +Java_io_ray_streaming_runtime_transfer_TransferHandler_handleReaderMessageNative( + JNIEnv *, jobject, jlong, jbyteArray); + +/* + * Class: io_ray_streaming_runtime_transfer_TransferHandler + * Method: handleReaderMessageSyncNative + * Signature: (J[B)[B + */ +JNIEXPORT jbyteArray JNICALL + Java_io_ray_streaming_runtime_transfer_TransferHandler_handleReaderMessageSyncNative( + JNIEnv *, jobject, jlong, jbyteArray); + +#ifdef __cplusplus +} +#endif +#endif \ No newline at end of file diff --git a/streaming/src/lib/java/org_ray_streaming_runtime_transfer_ChannelID.h b/streaming/src/lib/java/org_ray_streaming_runtime_transfer_ChannelID.h deleted file mode 100644 index c6353e9b1..000000000 --- a/streaming/src/lib/java/org_ray_streaming_runtime_transfer_ChannelID.h +++ /dev/null @@ -1,31 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class org_ray_streaming_runtime_transfer_ChannelID */ - -#ifndef _Included_org_ray_streaming_runtime_transfer_ChannelID -#define _Included_org_ray_streaming_runtime_transfer_ChannelID -#ifdef __cplusplus -extern "C" { -#endif -#undef org_ray_streaming_runtime_transfer_ChannelID_ID_LENGTH -#define org_ray_streaming_runtime_transfer_ChannelID_ID_LENGTH 20L -/* - * Class: org_ray_streaming_runtime_transfer_ChannelID - * Method: createNativeID - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ray_streaming_runtime_transfer_ChannelID_createNativeID - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ray_streaming_runtime_transfer_ChannelID - * Method: destroyNativeID - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_org_ray_streaming_runtime_transfer_ChannelID_destroyNativeID - (JNIEnv *, jclass, jlong); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/streaming/src/lib/java/org_ray_streaming_runtime_transfer_DataReader.h b/streaming/src/lib/java/org_ray_streaming_runtime_transfer_DataReader.h deleted file mode 100644 index f9f266a3d..000000000 --- a/streaming/src/lib/java/org_ray_streaming_runtime_transfer_DataReader.h +++ /dev/null @@ -1,45 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class org_ray_streaming_runtime_transfer_DataReader */ - -#ifndef _Included_org_ray_streaming_runtime_transfer_DataReader -#define _Included_org_ray_streaming_runtime_transfer_DataReader -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: org_ray_streaming_runtime_transfer_DataReader - * Method: createDataReaderNative - * Signature: ([[B[[B[J[JJZ[BZ)J - */ -JNIEXPORT jlong JNICALL Java_org_ray_streaming_runtime_transfer_DataReader_createDataReaderNative - (JNIEnv *, jclass, jobjectArray, jobjectArray, jlongArray, jlongArray, jlong, jboolean, jbyteArray, jboolean); - -/* - * Class: org_ray_streaming_runtime_transfer_DataReader - * Method: getBundleNative - * Signature: (JJJJ)V - */ -JNIEXPORT void JNICALL Java_org_ray_streaming_runtime_transfer_DataReader_getBundleNative - (JNIEnv *, jobject, jlong, jlong, jlong, jlong); - -/* - * Class: org_ray_streaming_runtime_transfer_DataReader - * Method: stopReaderNative - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_org_ray_streaming_runtime_transfer_DataReader_stopReaderNative - (JNIEnv *, jobject, jlong); - -/* - * Class: org_ray_streaming_runtime_transfer_DataReader - * Method: closeReaderNative - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_org_ray_streaming_runtime_transfer_DataReader_closeReaderNative - (JNIEnv *, jobject, jlong); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/streaming/src/lib/java/org_ray_streaming_runtime_transfer_DataWriter.h b/streaming/src/lib/java/org_ray_streaming_runtime_transfer_DataWriter.h deleted file mode 100644 index a6fdf533c..000000000 --- a/streaming/src/lib/java/org_ray_streaming_runtime_transfer_DataWriter.h +++ /dev/null @@ -1,45 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class org_ray_streaming_runtime_transfer_DataWriter */ - -#ifndef _Included_org_ray_streaming_runtime_transfer_DataWriter -#define _Included_org_ray_streaming_runtime_transfer_DataWriter -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: org_ray_streaming_runtime_transfer_DataWriter - * Method: createWriterNative - * Signature: ([[B[[B[JJ[BZ)J - */ -JNIEXPORT jlong JNICALL Java_org_ray_streaming_runtime_transfer_DataWriter_createWriterNative - (JNIEnv *, jclass, jobjectArray, jobjectArray, jlongArray, jlong, jbyteArray, jboolean); - -/* - * Class: org_ray_streaming_runtime_transfer_DataWriter - * Method: writeMessageNative - * Signature: (JJJI)J - */ -JNIEXPORT jlong JNICALL Java_org_ray_streaming_runtime_transfer_DataWriter_writeMessageNative - (JNIEnv *, jobject, jlong, jlong, jlong, jint); - -/* - * Class: org_ray_streaming_runtime_transfer_DataWriter - * Method: stopWriterNative - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_org_ray_streaming_runtime_transfer_DataWriter_stopWriterNative - (JNIEnv *, jobject, jlong); - -/* - * Class: org_ray_streaming_runtime_transfer_DataWriter - * Method: closeWriterNative - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_org_ray_streaming_runtime_transfer_DataWriter_closeWriterNative - (JNIEnv *, jobject, jlong); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/streaming/src/lib/java/org_ray_streaming_runtime_transfer_TransferHandler.h b/streaming/src/lib/java/org_ray_streaming_runtime_transfer_TransferHandler.h deleted file mode 100644 index 61a38f189..000000000 --- a/streaming/src/lib/java/org_ray_streaming_runtime_transfer_TransferHandler.h +++ /dev/null @@ -1,71 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class org_ray_streaming_runtime_transfer_TransferHandler */ - -#ifndef _Included_org_ray_streaming_runtime_transfer_TransferHandler -#define _Included_org_ray_streaming_runtime_transfer_TransferHandler -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: org_ray_streaming_runtime_transfer_TransferHandler - * Method: createWriterClientNative - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL -Java_org_ray_streaming_runtime_transfer_TransferHandler_createWriterClientNative(JNIEnv *, - jobject, - jobject, - jobject); - -/* - * Class: org_ray_streaming_runtime_transfer_TransferHandler - * Method: createReaderClientNative - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL -Java_org_ray_streaming_runtime_transfer_TransferHandler_createReaderClientNative(JNIEnv *, - jobject, - jobject, - jobject); - -/* - * Class: org_ray_streaming_runtime_transfer_TransferHandler - * Method: handleWriterMessageNative - * Signature: (J[B)V - */ -JNIEXPORT void JNICALL -Java_org_ray_streaming_runtime_transfer_TransferHandler_handleWriterMessageNative( - JNIEnv *, jobject, jlong, jbyteArray); - -/* - * Class: org_ray_streaming_runtime_transfer_TransferHandler - * Method: handleWriterMessageSyncNative - * Signature: (J[B)[B - */ -JNIEXPORT jbyteArray JNICALL -Java_org_ray_streaming_runtime_transfer_TransferHandler_handleWriterMessageSyncNative( - JNIEnv *, jobject, jlong, jbyteArray); - -/* - * Class: org_ray_streaming_runtime_transfer_TransferHandler - * Method: handleReaderMessageNative - * Signature: (J[B)V - */ -JNIEXPORT void JNICALL -Java_org_ray_streaming_runtime_transfer_TransferHandler_handleReaderMessageNative( - JNIEnv *, jobject, jlong, jbyteArray); - -/* - * Class: org_ray_streaming_runtime_transfer_TransferHandler - * Method: handleReaderMessageSyncNative - * Signature: (J[B)[B - */ -JNIEXPORT jbyteArray JNICALL -Java_org_ray_streaming_runtime_transfer_TransferHandler_handleReaderMessageSyncNative( - JNIEnv *, jobject, jlong, jbyteArray); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/streaming/src/lib/java/streaming_jni_common.cc b/streaming/src/lib/java/streaming_jni_common.cc index f6b0ba213..cc807af72 100644 --- a/streaming/src/lib/java/streaming_jni_common.cc +++ b/streaming/src/lib/java/streaming_jni_common.cc @@ -49,7 +49,7 @@ jint throwChannelInitException(JNIEnv *env, const char *message, } jclass ex_class = - env->FindClass("org/ray/streaming/runtime/transfer/ChannelInitException"); + env->FindClass("io/ray/streaming/runtime/transfer/ChannelInitException"); jmethodID ex_constructor = env->GetMethodID(ex_class, "", "(Ljava/lang/String;Ljava/util/List;)V"); jstring message_jstr = env->NewStringUTF(message); @@ -60,7 +60,7 @@ jint throwChannelInitException(JNIEnv *env, const char *message, jint throwChannelInterruptException(JNIEnv *env, const char *message) { jclass ex_class = - env->FindClass("org/ray/streaming/runtime/transfer/ChannelInterruptException"); + env->FindClass("io/ray/streaming/runtime/transfer/ChannelInterruptException"); return env->ThrowNew(ex_class, message); } @@ -108,14 +108,14 @@ void JavaStringListToNativeStringVector(JNIEnv *env, jobject java_list, ray::RayFunction FunctionDescriptorToRayFunction(JNIEnv *env, jobject functionDescriptor) { jclass java_language_class = - LoadClass(env, "org/ray/runtime/generated/Common$Language"); + LoadClass(env, "io/ray/runtime/generated/Common$Language"); jclass java_function_descriptor_class = - LoadClass(env, "org/ray/runtime/functionmanager/FunctionDescriptor"); + LoadClass(env, "io/ray/runtime/functionmanager/FunctionDescriptor"); jmethodID java_language_get_number = env->GetMethodID(java_language_class, "getNumber", "()I"); jmethodID java_function_descriptor_get_language = env->GetMethodID(java_function_descriptor_class, "getLanguage", - "()Lorg/ray/runtime/generated/Common$Language;"); + "()Lio/ray/runtime/generated/Common$Language;"); jobject java_language = env->CallObjectMethod(functionDescriptor, java_function_descriptor_get_language); auto language = static_cast<::Language>( diff --git a/streaming/src/protobuf/remote_call.proto b/streaming/src/protobuf/remote_call.proto index bb952b624..2138cf4ba 100644 --- a/streaming/src/protobuf/remote_call.proto +++ b/streaming/src/protobuf/remote_call.proto @@ -4,7 +4,7 @@ package ray.streaming.proto; import "streaming/src/protobuf/streaming.proto"; -option java_package = "org.ray.streaming.runtime.generated"; +option java_package = "io.ray.streaming.runtime.generated"; // Streaming execution graph message ExecutionGraph { diff --git a/streaming/src/protobuf/streaming.proto b/streaming/src/protobuf/streaming.proto index 3c68c51e6..581861c10 100644 --- a/streaming/src/protobuf/streaming.proto +++ b/streaming/src/protobuf/streaming.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ray.streaming.proto; -option java_package = "org.ray.streaming.runtime.generated"; +option java_package = "io.ray.streaming.runtime.generated"; enum Language { JAVA = 0;