-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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
[SPARK-3797] Minor addendum to Yarn shuffle service #3144
Conversation
Test build #23021 has started for PR 3144 at commit
|
@@ -98,7 +98,9 @@ class ExecutorRunnable( | |||
val secretString = securityMgr.getSecretKey() | |||
val secretBytes = | |||
if (secretString != null) { | |||
ShuffleSecretManager.stringToBytes(secretString) | |||
// This uses a JavaUtils method because the reverse conversion takes |
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.
nit: not sure the comment is useful. Might as well say it uses JavaUtils because that's where the method is implemented...
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.
Yeah maybe. It's just that it's not super intuitive why we need to use JavaUtils
in scala code when we could have used something from Spark's Utils
. I'd rather err on the safe side of being verbose. Maybe I'll reword the comment a little to make it sound less stupid.
LGTM. I guess the network code can't depend on Guava (so it could use |
* converted back to the same string through {@link #bytesToString(ByteBuffer)}. | ||
*/ | ||
public static ByteBuffer stringToBytes(String s) { | ||
return ByteBuffer.wrap(s.getBytes(UTF8_CHARSET)); |
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.
use Charsets.UTF_8
Test build #23024 has started for PR 3144 at commit
|
Test FAILed. |
retest this please |
Test build #23025 has started for PR 3144 at commit
|
Test build #23021 has finished for PR 3144 at commit
|
Test PASSed. |
Oh wait JK the tests that just passed are not from the recent changes. I'll wait a little longer. |
Test build #23030 has started for PR 3144 at commit
|
Test build #23024 has finished for PR 3144 at commit
|
Test PASSed. |
LGTM |
Test build #23025 has finished for PR 3144 at commit
|
Test PASSed. |
Ok merging for real |
I did not realize there was a `network.util.JavaUtils` when I wrote this code. This PR moves the `ByteBuffer` string conversion to the appropriate place. I tested the changes on a stable yarn cluster. Author: Andrew Or <andrew@databricks.com> Closes #3144 from andrewor14/yarn-shuffle-util and squashes the following commits: b6c08bf [Andrew Or] Remove unused import 94e205c [Andrew Or] Use netty Unpooled 85202a5 [Andrew Or] Use guava Charsets 057135b [Andrew Or] Reword comment adf186d [Andrew Or] Move byte buffer String conversion logic to JavaUtils (cherry picked from commit 96136f2) Signed-off-by: Andrew Or <andrew@databricks.com>
Test build #23030 has finished for PR 3144 at commit
|
Test PASSed. |
I did not realize there was a
network.util.JavaUtils
when I wrote this code. This PR moves theByteBuffer
string conversion to the appropriate place. I tested the changes on a stable yarn cluster.