[jvm-packages] Add XGBOOST_RABIT_TRACKER_IP_FOR_TEST to set rabit tracker IP. (#6869)
* Add `XGBOOST_RABIT_TRACKER_IP_FOR_TEST` to set rabit tracker IP * change spark and rabit tracker IP to 127.0.0.1on GitHub Action. Co-authored-by: fis <jm.yuan@outlook.com>
This commit is contained in:
@@ -51,6 +51,8 @@ public class TrackerProperties {
|
||||
}
|
||||
|
||||
public String getHostIp(){
|
||||
return this.properties.getProperty(HOST_IP);
|
||||
// mostly for testing
|
||||
String hostIp = System.getenv("XGBOOST_RABIT_TRACKER_IP_FOR_TEST");
|
||||
return hostIp != null ? hostIp : this.properties.getProperty(HOST_IP);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user