-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-4449][Core]Specify port range in spark #8054
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
Can one of the admins verify this patch? |
@@ -193,7 +187,7 @@ private[spark] object Utils extends Logging { | |||
} | |||
|
|||
/** | |||
* Primitive often used when writing [[java.nio.ByteBuffer]] to [[java.io.DataOutput]] | |||
* Primitive often used when writing java.nio.ByteBuffer to java.io.DataOutput |
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.
Are these unrelated changes?
…rrectly. Made maxPort 65536 to allow the range to be port to 65536. Implemented logic
@nssalian can you explain the difference between this and #5722? IIUC this introduces some kind of global port range right? I think our past discussions with @srowen @vanzin and @tgravescs already ruled that solution out. |
} | ||
else { | ||
// If the new port wraps around, do not try a privilege port or a failedPort | ||
while(!failedPorts.contains((startPort + Math.random() * (maxPort - startPort + 1))) && |
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.
This is an array buffer, so contains
is linear time, which is pretty expensive. Also this code is very difficult to understand.
Yes, do you mind closing this PR? this is not quite getting at what needs to happen for SPARK-4449 |
Closing the PR. |
Specify port range in spark
JIRA link: https://issues.apache.org/jira/browse/SPARK-4449
Goal: To add a port range to services
Design: (Based on the input and the suggestions in t #3314 and #5722):
Requesting review.