Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Revert "[Java] Remove RayRuntimeInternal class (#25016)" (#25… #25153

Merged
merged 1 commit into from
May 26, 2022

Conversation

jovany-wang
Copy link
Contributor

Why are these changes needed?

This reverts commit 804b6b1.

Related issue number

Checks

  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@jovany-wang jovany-wang requested review from krfricke and kfstorm May 24, 2022 14:18
@jovany-wang
Copy link
Contributor Author

jovany-wang commented May 24, 2022

Hi @kira-lin , this PR made the regression of raydp_dataset_test. The error message is

 failure: Lost task 0.3 in stage 7.0 (TID 13) (127.0.0.1 executor 0): java.lang.NoClassDefFoundError: io/ray/runtime/RayRuntimeInternal
	at org.apache.spark.sql.raydp.ObjectStoreWriter.writeToRay(ObjectStoreWriter.scala:66)
	at org.apache.spark.sql.raydp.ObjectStoreWriter.$anonfun$save$2(ObjectStoreWriter.scala:129)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
	at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1462)
	at org.apache.spark.sql.raydp.ObjectStoreWriter.$anonfun$save$1(ObjectStoreWriter.scala:137)
	at org.apache.spark.rdd.RDD.$anonfun$mapPartitions$2(RDD.scala:863)
	at org.apache.spark.rdd.RDD.$anonfun$mapPartitions$2$adapted(RDD.scala:863)
	at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
	at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:373)
	at org.apache.spark.rdd.RDD.iterator(RDD.scala:337)
	at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
	at org.apache.spark.scheduler.Task.run(Task.scala:131)
	at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:506)
	at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1462)
	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:509)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

We removed the RayRuntimeInternal class which is in the runtime module. But raydp still uses this internal API. https://github.com/oap-project/raydp/blob/c08a7867708224c25a73ae326d9244492b3f71fd/core/src/main/scala/org/apache/spark/sql/raydp/ObjectStoreWriter.scala#L76

We also found the internal API is in used at this line as well https://github.com/oap-project/raydp/blob/c97e68e29c9ac23db8f2aae4ed968df1aefe77c1/core/src/main/java/org/apache/spark/raydp/RayDPUtils.java#L48 , which is not recommended.

@kira-lin Please help to avoid that internal API, thanks.

@kfstorm
Copy link
Member

kfstorm commented May 25, 2022

@kira-lin May I know the purpose of holding the owner address?

@kira-lin
Copy link
Contributor

We hold the owner adresses to implement preferredLocations of RDD. @kfstorm

@jovany-wang
Copy link
Contributor Author

@jovany-wang
Copy link
Contributor Author

@jovany-wang jovany-wang merged commit 65d863d into ray-project:master May 26, 2022
@jovany-wang jovany-wang deleted the revert-revert branch May 26, 2022 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants