Package ml.dmlc.xgboost4j.java
Class RabitTracker
- java.lang.Object
-
- ml.dmlc.xgboost4j.java.RabitTracker
-
- All Implemented Interfaces:
Thread.UncaughtExceptionHandler
,IRabitTracker
public class RabitTracker extends Object implements IRabitTracker
Java implementation of the Rabit tracker to coordinate distributed workers. As a wrapper of the Python Rabit tracker, this implementation does not handle timeout for both start() and waitFor() methods (i.e., the timeout is infinite.) For systems lacking Python environment, or for timeout functionality, consider using the Scala Rabit tracker (ml.dmlc.xgboost4j.scala.rabit.RabitTracker) which does not depend on Python, and provides timeout support. The tracker must be started on driver node before running distributed jobs.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ml.dmlc.xgboost4j.java.IRabitTracker
IRabitTracker.TrackerStatus
-
-
Constructor Summary
Constructors Constructor Description RabitTracker(int numWorkers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
getWorkerEnvs()
Get environments that can be used to pass to worker.boolean
start(long timeout)
void
stop()
void
uncaughtException(Thread t, Throwable e)
int
waitFor(long timeout)
-
-
-
Constructor Detail
-
RabitTracker
public RabitTracker(int numWorkers) throws XGBoostError
- Throws:
XGBoostError
-
-
Method Detail
-
uncaughtException
public void uncaughtException(Thread t, Throwable e)
- Specified by:
uncaughtException
in interfaceThread.UncaughtExceptionHandler
-
getWorkerEnvs
public Map<String,String> getWorkerEnvs()
Get environments that can be used to pass to worker.- Specified by:
getWorkerEnvs
in interfaceIRabitTracker
- Returns:
- The environment settings.
-
stop
public void stop()
- Specified by:
stop
in interfaceIRabitTracker
-
start
public boolean start(long timeout)
- Specified by:
start
in interfaceIRabitTracker
-
waitFor
public int waitFor(long timeout)
- Specified by:
waitFor
in interfaceIRabitTracker
-
-