Commit graph

53 commits

Author SHA1 Message Date
Qing Wang
cc621ff08a
[Java][API CHANGE] Rename mode SINGLE_PROCESS to LOCAL (#24714)
for aligning to the key concept local mode, this PR renames SINGLE_PROCESS to LOCAL.
2022-05-19 10:17:24 +08:00
Qing Wang
eb29895dbb
[Core] Remove multiple core workers in one process 1/n. (#24147)
This is the 1st PR to remove the code path of multiple core workers in one process. This PR is aiming to remove the flags and APIs related to `num_workers`.
After this PR checking in, we needn't to consider the multiple core workers any longer.

The further following PRs are related to the deeper logic refactor, like eliminating the gap between core worker and core worker process,  removing the logic related to multiple workers from workerpool, gcs and etc.

**BREAK CHANGE**
This PR removes these APIs:
- Ray.wrapRunnable();
- Ray.wrapCallable();
- Ray.setAsyncContext();
- Ray.getAsyncContext();

And the following APIs are not allowed to invoke in a user-created thread in local mode:
- Ray.getRuntimeContext().getCurrentActorId();
- Ray.getRuntimeContext().getCurrentTaskId()

Note that this PR shouldn't be merged to 1.x.
2022-05-19 00:36:22 +08:00
Qing Wang
e653d47533
[Java] Shade some widely used dependencies in bazel_jar_jar rule. (#21237)
These dependencies are widely used:
- com.google.common
- com.google.protobuf
- com.google.thirdparty

So that we need to shade them to avoid being conflict with jars introduced by user.

In this PR, we introduce a `bazel_jar_jar` rule for doing these and also shade them in maven pom files.
2021-12-23 16:54:31 +08:00
Jiajun Yao
5de4a38948
[CI] Run Java CI on Mac (#19757)
Why are these changes needed?
Enable Java tests on Mac CI to avoid more breakages.

Related issue number
Closes #19700
2021-11-03 23:40:05 +08:00
Gagandeep Singh
d226cbf21a
Added StartupToken to idenitfy a process at startup (#19014)
* Added StartupToken to idenitfy a process at startup

* Applied linting formats

* Addressed reviews

* Fixing worker_pool_test

* Fixed worker_pool_test

* Applied linting formatting

* Added documentation for StartupToken

* Fixed linting

* Reordered initialisation of WorkerPool members

* Fixed Python docs

* Fixing bugs in cluster_mode_test

* Fixing Java tests

* Create and set shim process after verifying startup_token

* shim_process.GetId() -> worker_shim_pid

* Improvements in startup token and modifying java files

* update io_ray_runtime_RayNativeRuntime.h

* Fixed java tests by adding startup-token to conf

* Applied linting

* Increased arg count for startup_token

* Attempt to fix streaming tests

* Type correction

* applied linting

* Corrected index of startup token arg

* Modified, mock_worker.cc to accept startup tokens

* Applied linting

* Applied linting changes from CI

* Removed override from worker.h

* Applied linting from scripts/format.sh

* Addressed reviews and applied scripts/format.sh

* Applied linting script from ci/travis

* Removed unrequired methods from public scope

* Applied linting
2021-10-15 15:13:13 -07:00
wanxing
0ad0839265
Optimize lambda copy to improve direct call performance. (#15036) 2021-04-14 11:02:49 +08:00
Kai Yang
d653394c7f
[Java] Some bug fixes about Java UT workflow (#14444) 2021-03-03 19:32:14 +08:00
Kai Yang
e0b81796c5
Revert "Revert "[Java] fix test hang occasionally when running FailureTest (#13934)" (#13992)" (#14008) 2021-02-09 12:43:26 -08:00
Simon Mo
ec94214957
Revert "[Java] fix test hang occasionally when running FailureTest (#13934)" (#13992)
This reverts commit bcf9457abb.
2021-02-08 11:30:30 -08:00
Kai Yang
bcf9457abb
[Java] fix test hang occasionally when running FailureTest (#13934) 2021-02-08 18:21:50 +08:00
Simon Mo
a3796b3ed5
[CI] Add other Travis Linux builds to buildkite (#13769) 2021-01-29 15:48:02 -08:00
Simon Mo
3644df415a
[CI] Add retry to java doc test (#13743) 2021-01-27 14:18:06 -08:00
Kai Yang
e9103eeb6d
[Java] [Test] Move multi-worker config to ray.conf file (#13583) 2021-01-25 18:07:45 +08:00
Kai Yang
90f1e408de
[Java] Add fetchLocal parameter in Ray.wait() (#13604) 2021-01-22 17:55:00 +08:00
chaokunyang
d1dd3410c8
[Java] Format ray java code (#13056) 2020-12-29 10:36:16 +08:00
Kai Yang
e3b5deb741
[Multi-tenancy] Delete flag enable_multi_tenancy and remove old code path (#10573) 2020-12-10 19:01:40 +08:00
Kai Yang
21fcee28f9
[Java] Simplify Ray.init() by invoking ray start internally (#10762) 2020-12-04 14:33:45 +08:00
Alex Wu
9a07c7b963
[1.0] Remove args from ray start (#10659) 2020-09-18 16:41:23 -07:00
Hao Chen
1a5cfe0b79
[Java] rename config ray.redis.address to ray.address (#10772) 2020-09-15 11:13:19 +08:00
chaokunyang
1aad8aa39c
[Java] Fix java doc building error (#10757) 2020-09-14 17:44:45 +08:00
Hao Chen
f7558ed2a5
Remove outdated Java doc and run demo code in CI (#10698) 2020-09-11 19:15:52 +08:00
Kai Yang
23051385a4
Fix Java CI crash caused by incorrect destruction order in core worker (#10709) 2020-09-11 17:33:09 +08:00
Kai Yang
afa0216280
Remove the '--include-java' option (#10594) 2020-09-09 17:01:17 +08:00
chaokunyang
bbfbc98a41
[Core] Allow users to specify the classpath and import path (#10560)
* move job resource path to job config

* job resource path support list

* job resource path support for python

* fix job_resource_path support

* fix worker command

* fix job config

* use jar file instead of parent path

* fix job resource path

* add test to test.sh

* lint

* Update java/runtime/src/main/resources/ray.default.conf

Co-authored-by: Kai Yang <kfstorm@outlook.com>

* fix testGetFunctionFromLocalResource

* lint

* fix rebase

* add jars in resource path to classloader

* add job_resource_path to worker

* add ray stop

* rename job_resource_path to resource_path

* fix resource_path

* refine resource_path comments

* rename job resource path to code search path

* Add instruction about starting a cross-language cluster

* fix ClassLoaderTest.java

* add code-search-path to RunManager

* refine comments for code-search-path

* rename resourcePath to codeSearchPath

* Update doc

* fix

* rename resourcePath to codeSearchPath

* update doc

* filter out empty path

* fix comments

* fix comments

* fix tests

* revert pom

* lint

* fix doc

* update doc

* Apply suggestions from code review

* lint

Co-authored-by: Kai Yang <kfstorm@outlook.com>
Co-authored-by: Hao Chen <chenh1024@gmail.com>
2020-09-09 00:46:32 +08:00
Kai Yang
ca8792e4ff
[Java] Disable the multi-worker feature by default (#10593) 2020-09-08 13:10:46 +08:00
chaokunyang
f10a5a40b0
[Java] Simplify ray cmd params (#10394) 2020-09-02 19:47:52 +08:00
mehrdadn
e2c0174ab2
Factor out some Bazel options into .bazelrc (#9804)
* Factor out --keep_going in Bazel --config=ci

* Remove Bazel --test_timeout=600 for Windows

* Use global --test_output for Bazel CI

Co-authored-by: Mehrdad <noreply@github.com>
2020-07-30 18:09:31 -07:00
mehrdadn
b14728d999
Shellcheck quoting (#9596)
* Fix SC2006: Use $(...) notation instead of legacy backticked `...`.

* Fix SC2016: Expressions don't expand in single quotes, use double quotes for that.

* Fix SC2046: Quote this to prevent word splitting.

* Fix SC2053: Quote the right-hand side of == in [[ ]] to prevent glob matching.

* Fix SC2068: Double quote array expansions to avoid re-splitting elements.

* Fix SC2086: Double quote to prevent globbing and word splitting.

* Fix SC2102: Ranges can only match single chars (mentioned due to duplicates).

* Fix SC2140: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"?

* Fix SC2145: Argument mixes string and array. Use * or separate argument.

* Fix SC2209: warning: Use var=$(command) to assign output (or quote to assign string).

Co-authored-by: Mehrdad <noreply@github.com>
2020-07-21 21:56:41 -05:00
chaokunyang
ccc1133a7a
[Java] fix redis-server binary path (#9398) 2020-07-15 10:47:16 +08:00
mehrdadn
f15618033d
Remove --no-transfer-progress as it appears to be unsupported (#8066)
Co-authored-by: Mehrdad <noreply@github.com>
2020-04-17 16:30:37 +02:00
mehrdadn
ba00c29b67
Factor out Travis 'install' sections for use with GitHub Actions (#7988) 2020-04-15 08:10:22 -07:00
Qing Wang
dfb0ad0d3e
[Java] Fix Java CI exit code issue (#8028) 2020-04-15 15:28:52 +08:00
mehrdadn
3061067039
Fix bug in java/test.sh (#7952)
Co-authored-by: Mehrdad <noreply@github.com>
2020-04-11 23:56:14 -07:00
mehrdadn
4aa68b82fa
[CI] Various Improvements to Travis Scripts (#7956)
* Delete LINT section of install-ray.sh since it appears unused

* Delete install.sh since it appears unused

* Delete run_test.sh since it appears unused

* Put environment variables on separate lines in .travis.yml

* Move --jobs 50 out of install-ray.sh

* Delete upgrade-syn.sh since it appears unused

* Move CI bazel flags to .bazelrc via --config

* Make installations quieter

* Get rid of verbose Maven messages

* Install Bazel system-wide for CI so that there's no need to update PATH

* Recognize Windows as valid platform

Co-authored-by: Mehrdad <noreply@github.com>
2020-04-10 13:26:28 -07:00
Qing Wang
f4656d8cc3
[Java] Enable direct call by default. (#7408)
* WIP

* Address comments.

* Linting

* Fix

* Fix

* Fix test

* Fix

* Fix single process ci

* Fix ut

* Update java/test/src/main/java/org/ray/api/test/PlasmaFreeTest.java

* Address comments

* Fix linting

* Minor update comments.

* Fix streaming CI
2020-03-13 12:25:30 +08:00
Kai Yang
007333b960
[Java] Support direct call for normal tasks (#7193) 2020-02-21 10:03:34 +08:00
chaokunyang
4097d076d4 Package ray java jars into wheels (#6600) 2020-01-10 11:41:00 +08:00
Chaokun Yang
7bbfa85c66 [Streaming] Streaming data transfer java (#6474) 2019-12-22 10:56:05 +08:00
Kai Yang
ed761900f6 [Java] Support direct actor call in Java worker (#5504) 2019-09-09 14:29:20 +08:00
Hao Chen
ffd596d5bb
Fix pom file generation (#4800) 2019-05-17 10:56:39 +08:00
bibabolynn
20c7b2a6eb [Java] TestNG outputs more verbose error messages (#4507)
[Java] TestNG outputs more verbose error messages
2019-04-02 17:41:20 +08:00
ppeagle
5efb21e1d0 Initial commit for Ray streaming (#4268) 2019-03-30 19:32:05 +08:00
Hao Chen
7a38f9be1c
Avoid redundant bazel build (#4458) 2019-03-23 10:44:11 +08:00
Ruifang Chen
59d74d5e92 [Java] Build Java code with Bazel (#4284) 2019-03-22 14:30:05 +08:00
Hao Chen
f0465bc68c
[Java] Refine tests and fix single-process mode (#4265) 2019-03-07 09:59:13 +08:00
bibabolynn
c73d5086f3 [Java] Single-process mode (#4245) 2019-03-05 13:50:20 +08:00
Hanwei Jin
fbf214e408 update ray cmake build process (#2853)
* use cmake to build ray project, no need to appply build.sh before cmake, fix some abuse of cmake, improve the build performance

* support boost external project, avoid using the system or build.sh boost

* keep compatible with build.sh, remove boost and arrow build from it.

* bugfix: parquet bison version control, plasma_java lib install problem

* bugfix: cmake, do not compile plasma java client if no need

* bugfix: component failures test timeout machenism has problem for plasma manager failed case

* bugfix: arrow use lib64 in centos, travis check-git-clang-format-output.sh does not support other branches except master

* revert some fix

* set arrow python executable, fix format error in component_failures_test.py

* make clean arrow python build directory

* update cmake code style, back to support cmake minimum version 3.4
2018-09-12 11:19:33 -07:00
Wang Qing
7e13e1fd49 [Java] Remove non-raylet code in Java. (#2828) 2018-09-06 14:54:13 +08:00
Yuhong Guo
4bd98eed45 Support building Java and Python version at the same time. (#2640)
* Support building Java and Python version at the same time.

* Remove duplicated definition.

* Refine the building process of local_scheduler

* Refine

* Add comment for languages

* Modify instruction and add python,jave building to CI.

* change according to comment
2018-08-14 11:33:51 -07:00
Stephanie Wang
d49b4bef0a [xray] Basic task reconstruction mechanism (#2526)
## What do these changes do?

This implements basic task reconstruction in raylet. There are two parts to this PR:
1. Reconstruction suppression through the `TaskReconstructionLog`. This prevents two raylets from reconstructing the same task if they decide simultaneously (via the logic in #2497) that reconstruction is necessary.
2. Task resubmission once a raylet becomes responsible for reconstructing a task.

Reconstruction is quite slow in this PR, especially for long chains of dependent tasks. This is mainly due to the lease table mechanism, where nodes may wait too long before trying to reconstruct a task. There are two ways to improve this:
1. Expire entries in the lease table using Redis `PEXPIRE`. This is a WIP and I may include it in this PR.
2. Introduce a "fast path" for reconstructing dependencies of a re-executed task. Normally, we wait for an initial timeout before checking whether a task requires reconstruction. However, if a task requires reconstruction, then it's likely that its dependencies also require reconstruction. In this case, we could skip the initial timeout before checking the GCS to see whether reconstruction is necessary (e.g., if the object has been evicted).

Since handling failures of other raylets is probably not yet complete in master, this only turns back on Python tests for reconstructing evicted objects.
2018-08-09 07:24:37 -07:00