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 and Description
    `RabitTracker(int numWorkers)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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 interface `Thread.UncaughtExceptionHandler`

    - #### getWorkerEnvs

          public Map<String,String> getWorkerEnvs()

      Get environments that can be used to pass to worker.
      Specified by:
        `getWorkerEnvs` in interface `IRabitTracker`
      Returns:
        The environment settings.

    - #### stop

          public void stop()

      Specified by:
        `stop` in interface `IRabitTracker`

    - #### start

          public boolean start(long timeout)

      Specified by:
        `start` in interface `IRabitTracker`

    - #### waitFor

          public int waitFor(long timeout)

      Specified by:
        `waitFor` in interface `IRabitTracker`

Copyright © 2018. All rights reserved.