-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-27102][R][PYTHON][CORE] Remove the references to Python's Scala codes in R's Scala codes #24023
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All moved codes are as are, except that I made this private.
|
cc @vanzin, @felixcheung, @squito |
This comment has been minimized.
This comment has been minimized.
|
Test build #103196 has finished for PR 24023 at commit
|
|
retest this please |
|
Test build #103198 has finished for PR 24023 at commit
|
squito
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to double-check I understand -- you're not trying to change any behavior, just don't want "python" to appear in stack traces from R?
a couple very minor style things, but lgtm otherwise.
core/src/main/scala/org/apache/spark/security/SocketAuthServer.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/org/apache/spark/security/SocketAuthHelper.scala
Outdated
Show resolved
Hide resolved
|
@squito, Yup. That's the main reason and I tried to not change behaviour, yes. Actually I received some comments that's a bit odd R's Scala codes refers Python's Scala codes from @vanzin and @felixcheung as well. |
|
Test build #103241 has finished for PR 24023 at commit
|
|
Test build #103243 has finished for PR 24023 at commit
|
felixcheung
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG, one comment
srowen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good if this is just a refactoring
|
LGTM |
|
Merged to master. Thanks, guys. |
…a codes in R's Scala codes ## What changes were proposed in this pull request? Currently, R's Scala codes happened to refer Python's Scala codes for code deduplications. It's a bit odd. For instance, when we face an exception from R, it shows python related code path, which makes confusing to debug. It should rather have one code base and R's and Python's should share. This PR proposes: 1. Make a `SocketAuthServer` and move `PythonServer` so that `PythonRDD` and `RRDD` can share it. 2. Move `readRDDFromFile` and `readRDDFromInputStream` into `JavaRDD`. 3. Reuse `RAuthHelper` and remove `RSocketAuthHelper` in `RRDD`. 4. Rename `getEncryptionEnabled` to `isEncryptionEnabled` while I am here. So, now, the places below: - `sql/core/src/main/scala/org/apache/spark/sql/api/r` - `core/src/main/scala/org/apache/spark/api/r` - `mllib/src/main/scala/org/apache/spark/ml/r` don't refer Python's Scala codes. ## How was this patch tested? Existing tests should cover this. Closes apache#24023 from HyukjinKwon/SPARK-27102. Authored-by: Hyukjin Kwon <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
…a codes in R's Scala codes ## What changes were proposed in this pull request? Currently, R's Scala codes happened to refer Python's Scala codes for code deduplications. It's a bit odd. For instance, when we face an exception from R, it shows python related code path, which makes confusing to debug. It should rather have one code base and R's and Python's should share. This PR proposes: 1. Make a `SocketAuthServer` and move `PythonServer` so that `PythonRDD` and `RRDD` can share it. 2. Move `readRDDFromFile` and `readRDDFromInputStream` into `JavaRDD`. 3. Reuse `RAuthHelper` and remove `RSocketAuthHelper` in `RRDD`. 4. Rename `getEncryptionEnabled` to `isEncryptionEnabled` while I am here. So, now, the places below: - `sql/core/src/main/scala/org/apache/spark/sql/api/r` - `core/src/main/scala/org/apache/spark/api/r` - `mllib/src/main/scala/org/apache/spark/ml/r` don't refer Python's Scala codes. ## How was this patch tested? Existing tests should cover this. Closes apache#24023 from HyukjinKwon/SPARK-27102. Authored-by: Hyukjin Kwon <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
What changes were proposed in this pull request?
Currently, R's Scala codes happened to refer Python's Scala codes for code deduplications. It's a bit odd. For instance, when we face an exception from R, it shows python related code path, which makes confusing to debug. It should rather have one code base and R's and Python's should share.
This PR proposes:
SocketAuthServerand movePythonServerso thatPythonRDDandRRDDcan share it.readRDDFromFileandreadRDDFromInputStreamintoJavaRDD.RAuthHelperand removeRSocketAuthHelperinRRDD.getEncryptionEnabledtoisEncryptionEnabledwhile I am here.So, now, the places below:
sql/core/src/main/scala/org/apache/spark/sql/api/rcore/src/main/scala/org/apache/spark/api/rmllib/src/main/scala/org/apache/spark/ml/rdon't refer Python's Scala codes.
How was this patch tested?
Existing tests should cover this.