Commit Graph
100 Commits
Author SHA1 Message Date
Hao Chen 6e354690b6 [Java] Make task options serializable (#13010) 2020-12-21 23:58:43 +08:00
Hao Chen 20eb217c55 Fix a zsh compatiblity issue in java/BUILD.bazel (#12199) 2020-11-25 14:49:49 +08:00
Hao Chen 1a5cfe0b79 [Java] rename config ray.redis.address to ray.address (#10772) 2020-09-15 11:13:19 +08:00
Hao Chen f7558ed2a5 Remove outdated Java doc and run demo code in CI (#10698) 2020-09-11 19:15:52 +08:00
Hao Chen d22980a5c3 [Hotfix] fix bug about code_search_path in JobConfig (#10666) 2020-09-09 15:28:45 +08:00
Hao Chen f9098fe631 [Java doc] index and introduction page (#10646) 2020-09-08 22:00:46 +08:00
Hao Chen da8181725d [Java] Fix duplicated isInitialized methods (#10601) 2020-09-05 23:13:53 +08:00
Hao Chen 6fb6bd3e61 Refine Java "Ray Core Walkthrough" doc (#9836) 2020-07-31 15:35:43 +08:00
Hao Chen 260bc52254 Java doc: "Ray Core Walkthrough" page (#8595) 2020-07-30 11:13:38 +08:00
Hao Chen e6225bdfa1 [GCS] Fix the bug about raylet receiving duplicate actor creation tasks (#9422) 2020-07-13 11:34:02 -07:00
Hao Chen d49dadf891 Change Python's ObjectID to ObjectRef (#9353) 2020-07-10 17:49:04 +08:00
Hao Chen bed1be611e Fix flaky test_dynres.py (#9310) 2020-07-10 10:34:23 +08:00
Hao Chen dc3e98890f Improve Java logging (#8640) 2020-06-02 16:15:20 +08:00
Hao Chen 08fee00bc8 Increase rayelt client connect timeout to fix test_debug_tools (#8605) 2020-05-28 20:57:30 +08:00
Hao Chen d27e6da1b2 Fix a lint issue (#8530) 2020-05-21 16:12:44 +08:00
Hao Chen 6c5ea32857 Fix installing pickle5-backport for Python 3.8.2 (#8453) 2020-05-18 17:03:13 -07:00
Hao Chen 212f78f735 Small improvements on build.sh (#8418) 2020-05-14 15:30:09 +08:00
Hao Chen a593fde606 Fix core dumps in ExitActor (#8382) 2020-05-12 20:06:04 +08:00
Hao Chen 93138e617a Fix a bad usage of std::move (#8364) 2020-05-09 14:24:24 +08:00
Hao Chen 7678418210 [Java] Fix the issue that the cached value in RayObject is serialized (#7613) 2020-03-17 22:07:41 +08:00
Hao Chen fe7820fec9 [Java] New Java actor API (#7414) 2020-03-04 22:39:23 +08:00
Hao Chen b53d00b659 [Java] Fix Java test issues (#7000) 2020-02-03 19:21:25 +08:00
Hao Chen 7e2addb424 Revert "[GCS] refactor the GCS Client Task Interface (#5515)" (#6543)
This reverts commit f78583147c.
2019-12-19 17:11:36 +08:00
Hao Chen 5cc3e1341a [Java] Cache result in RayObjectImpl (#6414) 2019-12-11 11:26:01 +08:00
Hao Chen fab5ae64c4 [Java] Automatically clean up temp files. (#5507)
* Remove unused code

* Auto clean up temp files

* refine

* fix

* print warning

* fix
2019-08-24 17:20:27 +08:00
Hao Chen 239c177fe8 [Java] Support calling functions returning void (#5494) 2019-08-23 21:10:15 +08:00
Hao Chen f2b3c273db Fix direct actor transport not treating some tasks as failed (#5464) 2019-08-20 12:44:38 -07:00
Hao Chen 03d05c8765 Fix test_logging_to_driver and test_not_logging_to_driver (#5462) 2019-08-17 18:06:08 +08:00
Hao Chen 657ce4b3c7 increase timeout for test_actor_lifetime_load_balancing (#5463) 2019-08-17 17:25:53 +08:00
Hao Chen 3ad2fe76e0 Cap concurrent requests (#5341) 2019-08-06 13:56:19 -07:00
Hao Chen 991e71dde6 Submit task asynchronously from raylet client (#5313) 2019-07-30 12:58:57 -07:00
Hao Chen 6f737e6a50 Add CODEOWNERS file (#5259) 2019-07-26 12:40:07 +08:00
Hao Chen ea6aa6409a Reconstruct failed actors without sending tasks. (#5161)
* fast reconstruct dead actors

* add test

* fix typos

* remove debug print

* small fix

* fix typos

* Update test_actor.py
2019-07-15 10:25:09 -07:00
Hao Chen 7342117710 Fix a multithreading bug in grpc ClientCall (#5196) 2019-07-15 14:49:53 +08:00
Hao Chen f5a87b88a3 Fix: ServerCallFactory's destructor not marked as virtual (#5185) 2019-07-13 09:38:47 +08:00
Hao Chen 0ec3a16bbd Fix Java MultithreadingTest (#5182) 2019-07-12 19:00:13 +08:00
Hao Chen fd835d107e Move task to common module and add checks in getter methods (#5147) 2019-07-11 17:07:04 +08:00
Hao Chen 88365d4112 Fix Java MultithreadingTest (#5170) 2019-07-11 13:40:40 +08:00
Hao Chen 0c34749779 Use bazel disk cache for all CI jobs (#5144) 2019-07-10 22:03:45 +08:00
Hao Chen 8a30b93e42 Define common data structures with protobuf. (#5121) 2019-07-08 22:41:37 +08:00
Hao Chen cefbb0c94c Fix driver id in TaskInfo (#5055) 2019-06-28 12:56:48 +08:00
Hao Chen a1156754e9 Fix test_task_forward (#5040) 2019-06-27 14:37:00 +08:00
Hao Chen 469ae41013 Fix memory leak in rpc ServerCall and ClientCall (#5046) 2019-06-27 13:19:47 +08:00
Hao Chen 0131353d42 [gRPC] Migrate gcs data structures to protobuf (#5024) 2019-06-25 14:31:19 -07:00
Hao Chen 2bf92e02e2 [gRPC] Use gRPC for inter-node-manager communication (#4968) 2019-06-17 19:00:50 +08:00
Hao Chen 3c92b2ee4d Upgrade CI clang-format to 6.0 (#4976) 2019-06-14 14:52:32 +08:00
Hao Chen d106283769 Better organize ray_common module (#4898) 2019-06-04 23:19:09 -07:00
Hao Chen 2912a7cb86 Initial high-level code structure of CoreWorker. (#4875) 2019-05-30 02:43:17 -07:00
Hao Chen ffd596d5bb Fix pom file generation (#4800) 2019-05-17 10:56:39 +08:00
Hao Chen 643f62dc43 [Java][Bazel] Refine auto-generated pom files (#4780) 2019-05-16 11:19:31 +08:00
Hao Chen be2cbdf130 [Bazel] Use rules_jvm_external to manage java dependencies (#4615) 2019-04-18 16:53:25 +08:00
Hao Chen d52b080081 [Java] Avoid unnecessary memory copy and addd a benchmark (#4611) 2019-04-14 00:17:04 +08:00
Hao Chen 23404f7bcf Fix some flaky tests (#4535) 2019-04-02 17:57:11 -07:00
Hao Chen 7a38f9be1c Avoid redundant bazel build (#4458) 2019-03-23 10:44:11 +08:00
Hao Chen 80cd9c9c1a [travis] Add back '-v' option to pytest and install psutil (#4430) 2019-03-22 17:45:55 +08:00
Hao Chen d03999d01e Cross-language invocation Part 1: Java calling Python functions and actors (#4166) 2019-03-21 13:34:21 +08:00
Hao Chen a6a5b344b9 [Java] Upgrade checkstyle plugin (#4375) 2019-03-15 11:36:09 -07:00
Hao Chen 93d9867290 Fix linting error on master (#4377) 2019-03-15 10:31:09 -07:00
Hao Chen f8d12b0418 [Java] Package native dependencies into jar (#4367) 2019-03-15 12:38:40 +08:00
Hao Chen f0465bc68c [Java] Refine tests and fix single-process mode (#4265) 2019-03-07 09:59:13 +08:00
Hao Chen a22d6ef955 Fix RemoteFunction._last_export_session (#4243) 2019-03-04 19:57:42 +08:00
Hao Chen 48f6cd3e5d Release GIL in prepare_actor_checkpoint (#4208) 2019-03-01 19:43:28 -08:00
Hao Chen 6f1a29ad3f Consodiate CI Python tests and fix bug about multiple ray.init (#4195) 2019-03-01 14:38:28 -08:00
Hao Chen 14ff402d70 Make ray stop command also kill Java workers (#4179) 2019-03-01 11:05:19 +08:00
Hao Chen 484708d44d Fix JNI throwing exception (#4178) 2019-02-28 15:11:25 +08:00
Hao Chen d583edb07c Skip test_multithreading in Python 2 (#4107) 2019-02-27 14:06:12 +08:00
Hao Chen 62055cc01c Cleanup depulicated code of Cython ID types (#4162) 2019-02-26 16:19:12 +08:00
Hao Chen 49dc85e54b Fix wrong ID type in prepare_checkpoint (#4124)
* Fix wrong ID type in prepare_checkpoint

* fix

* fix eq
2019-02-25 11:53:09 -08:00
Hao Chen a99676e39b [Java] lint unused imports (#4100) 2019-02-20 12:37:04 -08:00
Hao Chen de17443dc2 Propagate backend error to worker (#4039) 2019-02-16 11:39:15 +08:00
Hao Chen 042ad84573 Simplify Cython ID types and fix bug of ActorCheckpointID (#4045) 2019-02-15 20:15:16 +08:00
Hao Chen f31a79f3f7 Implement actor checkpointing (#3839)
* Implement Actor checkpointing

* docs

* fix

* fix

* fix

* move restore-from-checkpoint to HandleActorStateTransition

* Revert "move restore-from-checkpoint to HandleActorStateTransition"

This reverts commit 9aa4447c1e3e321f42a1d895d72f17098b72de12.

* resubmit waiting tasks when actor frontier restored

* add doc about num_actor_checkpoints_to_keep=1

* add num_actor_checkpoints_to_keep to Cython

* add checkpoint_expired api

* check if actor class is abstract

* change checkpoint_ids to long string

* implement java

* Refactor to delay actor creation publish until checkpoint is resumed

* debug, lint

* Erase from checkpoints to restore if task fails

* fix lint

* update comments

* avoid duplicated actor notification log

* fix unintended change

* add actor_id to checkpoint_expired

* small java updates

* make checkpoint info per actor

* lint

* Remove logging

* Remove old actor checkpointing Python code, move new checkpointing code to FunctionActionManager

* Replace old actor checkpointing tests

* Fix test and lint

* address comments

* consolidate kill_actor

* Remove __ray_checkpoint__

* fix non-ascii char

* Loosen test checks

* fix java

* fix sphinx-build
2019-02-13 19:39:02 +08:00
Hao Chen bfcf254e52 Fix: do not treat actor task as failed if the actor will be reconstructed (#3736) 2019-01-23 23:28:44 -08:00
Hao Chen d1840bc7a9 Simplify RayConfig (#3714) 2019-01-16 16:43:26 -08:00
Hao Chen 1bb20badec [Java] Fix bug when actor creation task fails (#3740)
* [Java] Fix bug when actor creation task fails

* remove imports
2019-01-14 11:09:15 +08:00
Hao Chen 597abb24ea Refine multi-threading support (#3672)
* [Python] refine multi-threading support

fix

* [java] refine multithreading code

fix java

* format
2019-01-10 13:58:11 -08:00
Hao Chen 6fc3fc4120 Cap task lease timeout (#3707) 2019-01-09 17:19:48 -08:00
Hao Chen df0733cafb Skip test_multiple_recursive (#3683)
This test often hangs or fails in CI. Skip it for now to unblock other PRs.
2019-01-06 13:24:29 -08:00
Hao Chen 0b682d043e Fix memory leak in PyRayletCient (#3640)
1) if using `PyObject_GetIter`, the caller must call `Py_DECREF` to avoid memory leak. But with `PyList_GetItem`, `Py_DECREF` isn't needed.
2) the `Py_BuildValue` call in `wait` doesn't need to increment ref count.
2018-12-27 17:39:02 -08:00
Hao Chen 62af2f25be Fix test_multiple_actor_reconstruction failure (#3641)
* Fix test_multiple_actor_reconstruction failure

* add comment
2018-12-27 13:57:52 -08:00
Hao Chen f4011754d6 Fix: ServerConnection should be closed before being removed (#3626)
Otherwise, in the event of a remote raylet crashing, the connection might be held by boost asio forever, and the pending callbacks will never get invoked. See also #3586.
2018-12-25 11:01:53 -08:00
Hao Chen 132a23354e Fix pending callback not called when ServerConnection destructs (#3572) 2018-12-19 17:29:36 -08:00
Hao Chen e7b51cbd1b [xray] Implement Actor Reconstruction (#3332)
* Implement Actor Reconstruction

* fix

* fix actor handle __del__

* fix lint

* add comment

* Remove actorCreationDummyObjectId

* address comments

* fix

* address comments

* avoid copy

* change log to debug

* fix error name
2018-12-13 21:28:58 -08:00
Hao Chen abd37df41e Add stress test for Java worker (#3424) 2018-12-01 16:11:09 -08:00
Hao Chen c5b8840193 [Java] fix java/cleanup.sh (#2989)
Remove legacy-ray-related stuff from this script, and update temp file locations.
2018-09-28 21:31:47 -05:00
Hao Chen 18173dde26 [Java] update api doc (#2988)
API doc is kind of out-dated, because of some recent code changes. Update it and add some simple examples.
2018-09-28 19:05:42 -05:00
Hao Chen 4ffe1e3556 [Java] Fix: task spec's resource map should contain CPU (#2987) 2018-09-28 14:23:38 -05:00
Hao Chen 971df5ea8a [java] put function meta in task spec and load functions with function meta (#2881)
This PR adds a `function_desc` field into task spec. a function descriptor is a list of strings that can uniquely describe a function.
- For a Python function, it should be: [module_name, class_name, function_name]
- For a Java function, it should be: [class_name, method_name, type_descriptor]

There're a couple of purposes to add this field:

In this PR:
- Java worker needs to know function's class name to load it. Previously, since task spec didn't have such a field to hold this info, we did a hack by appending the class name to the argument list. With this change, we fixed that hack and significantly simplified function management in Java.

Will be done in subsequent PRs:
- Support cross-language invocation (#2576): currently Python worker manages functions by saving them in GCS and pass function id in task spec. However, if we want to call a Python function from Java, we cannot save it in GCS and get the function id. But instead, we can pass the function descriptor (module name, class name, function name) in task spec and use it to load the function.
- Support deployment: one major problem of Python worker's current function management mechanism is #2327. In prod env, we should have a mechanism to deploy code and dependencies to the cluster. And when code is already deployed, we don't need to save functions to GCS any more and can use `function_desc` to manage functions.
2018-09-25 23:05:05 -07:00
Hao Chen 3cccb49191 [Java] Implement missing methods in MockRayletClient (#2954)
Previous changes broke single-process mode in raylet. This PR fixes the hello-world example work in single-process mode. Follow-up diffs will completely fix single-process mode and add tests.
2018-09-25 09:57:32 -07:00
Hao Chen 715ec1bca5 Modularize NodeManager::ProcessClientMessage (#2895)
Split NodeManager::ProcessClientMessage into a couple of smaller functions, each of which handles one type of message.
2018-09-18 14:18:34 -07:00
Hao Chen e96817d074 fix a syntax error of initializing unordered_map (#2871)
The previous way is incompatible with older version of gcc.
2018-09-14 12:07:08 -07:00
Hao Chen 8414e413a2 [java] refine and simplify java worker code structure (#2838) 2018-09-10 10:48:17 -07:00
Hao Chen 9d655721e5 [java] support creating an actor with parameters (#2817)
Previously `Ray.createActor` only support creating an actor without any parameter. This PR adds the support for creating an actor with parameters. Moreover, besides using a constructor, it's now also allowed to create an actor with a factory method. For more usage, prefer refer to `ActorTest.java`.
2018-09-03 09:53:03 -07:00
Hao Chen 3b0a2c4197 [Java] improve Java API module (#2783)
API module (`ray/java/api` dir) includes all public APIs provided by Ray, it should be the only module that normal Ray users need to face.

The purpose of this PR to first improve the code quality of the API module. Subsequent PRs will improve other modules later. The changes of this PR include the following aspects: 
1) Only keep interfaces in api module, to hide implementation details from users and fix circular dependencies among modules.
2) Document everything in the api module. 
3) Improve naming.
4) Add more tests for API. 
5) Also fix/improve related code in other modules.
6) Remove some unused code.

(Apologize for posting such a large PR. Java worker code has been lack of maintenance for a while. There're a lot of code quality issues that need to be fixed. We plan to use a couple of large PRs to address them. After that, future changes will come in small PRs.)
2018-09-02 11:51:16 -07:00
Hao Chen f37c260bdb [multi-language part 3] support multiple languages in raylet backend (#2672)
This PR enables multi-language support in the raylet backend.
- `Worker` class now has a `language` label;
- `WorkerPool`:
	- It now maintains one set of states for each language.
	- `PopWorker` function's parameter type is changed to `TaskSpecification`, and it will choose a worker to pop based on both task's language and actor id.
    -  `Size` and `StartWorkerProcess` functions now have an extra `language` parameter.
- `RegisterClientRequest` message now has an extra `language` field in raylet mode, which tells the node manager which language the worker is.
2018-08-26 22:06:25 -07:00
Hao Chen 4f4bea086a [java] Remove multi-return API (#2724) 2018-08-26 00:04:54 -07:00
Hao Chen 78b6bfb7f9 [Java] Change log dir to /tmp/raylogs (#2677)
Currently, log directory in Java is a relative path . This PR changes it to `/tmp/raylogs` (with the same format as Python, e.g., `local_scheduler-2018-51-17_17-8-6-05164.err`). It also cleans up some relative code.
2018-08-18 23:46:36 -07:00
Hao Chen a719e089b0 [multi-language part 1] add a 'language' field to task specification (#2639) 2018-08-16 21:26:42 -07:00
Hao Chen dd924a388b silence progress log from 'git clone' and 'pip install' (#2667) 2018-08-15 22:54:35 -07:00
Hao Chen 3c75e71afc reduce noisy log messages from wget (#2656) 2018-08-15 09:10:28 -07:00