-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
[jvm-packages] Allow specifying host ip from TrackerProperties #3833
Conversation
…cker.properties file
@CodingCat @hcho3 please have a look. Thank you! |
@@ -93,8 +93,11 @@ private[scala] class RabitTracker(numWorkers: Int, port: Option[Int] = None, | |||
* @return Boolean flag indicating if the Rabit tracker starts successfully. | |||
*/ | |||
private def start(timeout: Duration): Boolean = { | |||
val hostAddress = Option(TrackerProperties.getInstance().getHostIp) | |||
.map(InetAddress.getByName).getOrElse(InetAddress.getLocalHost) |
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.
we do not include property file in the released jar, you mean build by your own?
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.
TrackerProperties
already handles the case if the property file is missing in the jar. In that case it would return null
when calling getHostIp
hence the Option
.
I borrowed this idea from the java RabitTracker implementation here.
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.
I know, I mean how you add a property file , you have to build by your own
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.
I didn't try adding in application's resource folder
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.
Correct. In my project I have to add resources/xgboost-tracker.properties
file. For example with the following contents:
host-ip=0.0.0.0
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.
Good!
Thanks for the contribution!, merged |
@CodingCat thanks. What's the ETA on the 0.81 release? |
I've been working on it. November 1 is the day. I may decide to ignore the issue if it takes too much time. |
…the xgboost-tracker.properties file (dmlc#3833)
Allow specifying host ip from the
xgboost-tracker.properties
file in RabitTracker for Scala