org.apache.hadoop.mapreduce.Cluster.JobTrackerStatus Java Examples

The following examples show how to use org.apache.hadoop.mapreduce.Cluster.JobTrackerStatus. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: UtilsForTests.java    From hadoop with Apache License 2.0 5 votes vote down vote up
/**
 * Wait for the jobtracker to be RUNNING.
 */
static void waitForJobTracker(JobClient jobClient) {
  while (true) {
    try {
      ClusterStatus status = jobClient.getClusterStatus();
      while (status.getJobTrackerStatus() != JobTrackerStatus.RUNNING) {
        waitFor(100);
        status = jobClient.getClusterStatus();
      }
      break; // means that the jt is ready
    } catch (IOException ioe) {}
  }
}
 
Example #2
Source File: ClusterStatus.java    From big-c with Apache License 2.0 5 votes vote down vote up
public void readFields(DataInput in) throws IOException {
  numActiveTrackers = in.readInt();
  int numTrackerNames = in.readInt();
  if (numTrackerNames > 0) {
    for (int i = 0; i < numTrackerNames; i++) {
      String name = StringInterner.weakIntern(Text.readString(in));
      activeTrackers.add(name);
    }
  }
  numBlacklistedTrackers = in.readInt();
  int blackListTrackerInfoSize = in.readInt();
  if(blackListTrackerInfoSize > 0) {
    for (int i = 0; i < blackListTrackerInfoSize; i++) {
      BlackListInfo info = new BlackListInfo();
      info.readFields(in);
      blacklistedTrackersInfo.add(info);
    }
  }
  numExcludedNodes = in.readInt();
  ttExpiryInterval = in.readLong();
  map_tasks = in.readInt();
  reduce_tasks = in.readInt();
  max_map_tasks = in.readInt();
  max_reduce_tasks = in.readInt();
  status = WritableUtils.readEnum(in, JobTrackerStatus.class);
  grayListedTrackers = in.readInt();
}
 
Example #3
Source File: ClusterStatus.java    From big-c with Apache License 2.0 5 votes vote down vote up
/**
 * Construct a new cluster status.
 * 
 * @param trackers no. of tasktrackers in the cluster
 * @param blacklists no of blacklisted task trackers in the cluster
 * @param ttExpiryInterval the tasktracker expiry interval
 * @param maps no. of currently running map-tasks in the cluster
 * @param reduces no. of currently running reduce-tasks in the cluster
 * @param maxMaps the maximum no. of map tasks in the cluster
 * @param maxReduces the maximum no. of reduce tasks in the cluster
 * @param status the {@link JobTrackerStatus} of the <code>JobTracker</code>
 * @param numDecommissionedNodes number of decommission trackers
 * @param numGrayListedTrackers number of graylisted trackers
 */
ClusterStatus(int trackers, int blacklists, long ttExpiryInterval, int maps,
    int reduces, int maxMaps, int maxReduces, JobTrackerStatus status,
    int numDecommissionedNodes, int numGrayListedTrackers) {
  numActiveTrackers = trackers;
  numBlacklistedTrackers = blacklists;
  this.numExcludedNodes = numDecommissionedNodes;
  this.ttExpiryInterval = ttExpiryInterval;
  map_tasks = maps;
  reduce_tasks = reduces;
  max_map_tasks = maxMaps;
  max_reduce_tasks = maxReduces;
  this.status = status;
  this.grayListedTrackers = numGrayListedTrackers;
}
 
Example #4
Source File: UtilsForTests.java    From big-c with Apache License 2.0 5 votes vote down vote up
/**
 * Wait for the jobtracker to be RUNNING.
 */
static void waitForJobTracker(JobClient jobClient) {
  while (true) {
    try {
      ClusterStatus status = jobClient.getClusterStatus();
      while (status.getJobTrackerStatus() != JobTrackerStatus.RUNNING) {
        waitFor(100);
        status = jobClient.getClusterStatus();
      }
      break; // means that the jt is ready
    } catch (IOException ioe) {}
  }
}
 
Example #5
Source File: ClusterStatus.java    From hadoop with Apache License 2.0 5 votes vote down vote up
public void readFields(DataInput in) throws IOException {
  numActiveTrackers = in.readInt();
  int numTrackerNames = in.readInt();
  if (numTrackerNames > 0) {
    for (int i = 0; i < numTrackerNames; i++) {
      String name = StringInterner.weakIntern(Text.readString(in));
      activeTrackers.add(name);
    }
  }
  numBlacklistedTrackers = in.readInt();
  int blackListTrackerInfoSize = in.readInt();
  if(blackListTrackerInfoSize > 0) {
    for (int i = 0; i < blackListTrackerInfoSize; i++) {
      BlackListInfo info = new BlackListInfo();
      info.readFields(in);
      blacklistedTrackersInfo.add(info);
    }
  }
  numExcludedNodes = in.readInt();
  ttExpiryInterval = in.readLong();
  map_tasks = in.readInt();
  reduce_tasks = in.readInt();
  max_map_tasks = in.readInt();
  max_reduce_tasks = in.readInt();
  status = WritableUtils.readEnum(in, JobTrackerStatus.class);
  grayListedTrackers = in.readInt();
}
 
Example #6
Source File: ClusterStatus.java    From hadoop with Apache License 2.0 5 votes vote down vote up
/**
 * Construct a new cluster status.
 * 
 * @param trackers no. of tasktrackers in the cluster
 * @param blacklists no of blacklisted task trackers in the cluster
 * @param ttExpiryInterval the tasktracker expiry interval
 * @param maps no. of currently running map-tasks in the cluster
 * @param reduces no. of currently running reduce-tasks in the cluster
 * @param maxMaps the maximum no. of map tasks in the cluster
 * @param maxReduces the maximum no. of reduce tasks in the cluster
 * @param status the {@link JobTrackerStatus} of the <code>JobTracker</code>
 * @param numDecommissionedNodes number of decommission trackers
 * @param numGrayListedTrackers number of graylisted trackers
 */
ClusterStatus(int trackers, int blacklists, long ttExpiryInterval, int maps,
    int reduces, int maxMaps, int maxReduces, JobTrackerStatus status,
    int numDecommissionedNodes, int numGrayListedTrackers) {
  numActiveTrackers = trackers;
  numBlacklistedTrackers = blacklists;
  this.numExcludedNodes = numDecommissionedNodes;
  this.ttExpiryInterval = ttExpiryInterval;
  map_tasks = maps;
  reduce_tasks = reduces;
  max_map_tasks = maxMaps;
  max_reduce_tasks = maxReduces;
  this.status = status;
  this.grayListedTrackers = numGrayListedTrackers;
}
 
Example #7
Source File: YARNRunner.java    From tez with Apache License 2.0 4 votes vote down vote up
@Override
public JobTrackerStatus getJobTrackerStatus() throws IOException,
    InterruptedException {
  return JobTrackerStatus.RUNNING;
}
 
Example #8
Source File: YARNRunner.java    From incubator-tez with Apache License 2.0 4 votes vote down vote up
@Override
public JobTrackerStatus getJobTrackerStatus() throws IOException,
    InterruptedException {
  return JobTrackerStatus.RUNNING;
}
 
Example #9
Source File: YARNRunner.java    From hadoop with Apache License 2.0 4 votes vote down vote up
@Override
public JobTrackerStatus getJobTrackerStatus() throws IOException,
    InterruptedException {
  return JobTrackerStatus.RUNNING;
}
 
Example #10
Source File: YARNRunner.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
public JobTrackerStatus getJobTrackerStatus() throws IOException,
    InterruptedException {
  return JobTrackerStatus.RUNNING;
}
 
Example #11
Source File: LocalJobRunner.java    From hadoop with Apache License 2.0 4 votes vote down vote up
public JobTrackerStatus getJobTrackerStatus() {
  return JobTrackerStatus.RUNNING;
}
 
Example #12
Source File: LocalJobRunner.java    From big-c with Apache License 2.0 4 votes vote down vote up
public JobTrackerStatus getJobTrackerStatus() {
  return JobTrackerStatus.RUNNING;
}
 
Example #13
Source File: ClusterStatus.java    From big-c with Apache License 2.0 3 votes vote down vote up
/**
 * Construct a new cluster status.
 * 
 * @param trackers no. of tasktrackers in the cluster
 * @param blacklists no of blacklisted task trackers in the cluster
 * @param ttExpiryInterval the tasktracker expiry interval
 * @param maps no. of currently running map-tasks in the cluster
 * @param reduces no. of currently running reduce-tasks in the cluster
 * @param maxMaps the maximum no. of map tasks in the cluster
 * @param maxReduces the maximum no. of reduce tasks in the cluster
 * @param status the {@link JobTrackerStatus} of the <code>JobTracker</code>
 */
ClusterStatus(int trackers, int blacklists, long ttExpiryInterval, 
              int maps, int reduces,
              int maxMaps, int maxReduces, JobTrackerStatus status) {
  this(trackers, blacklists, ttExpiryInterval, maps, reduces, maxMaps, 
       maxReduces, status, 0);
}
 
Example #14
Source File: ClusterStatus.java    From big-c with Apache License 2.0 3 votes vote down vote up
/**
 * Construct a new cluster status.
 * 
 * @param activeTrackers active tasktrackers in the cluster
 * @param blackListedTrackerInfo blacklisted tasktrackers information 
 * in the cluster
 * @param ttExpiryInterval the tasktracker expiry interval
 * @param maps no. of currently running map-tasks in the cluster
 * @param reduces no. of currently running reduce-tasks in the cluster
 * @param maxMaps the maximum no. of map tasks in the cluster
 * @param maxReduces the maximum no. of reduce tasks in the cluster
 * @param status the {@link JobTrackerStatus} of the <code>JobTracker</code>
 * @param numDecommissionNodes number of decommission trackers
 */

ClusterStatus(Collection<String> activeTrackers,
    Collection<BlackListInfo> blackListedTrackerInfo, long ttExpiryInterval,
    int maps, int reduces, int maxMaps, int maxReduces,
    JobTrackerStatus status, int numDecommissionNodes) {
  this(activeTrackers.size(), blackListedTrackerInfo.size(),
      ttExpiryInterval, maps, reduces, maxMaps, maxReduces, status,
      numDecommissionNodes);
  this.activeTrackers = activeTrackers;
  this.blacklistedTrackersInfo = blackListedTrackerInfo;
}
 
Example #15
Source File: ClusterStatus.java    From big-c with Apache License 2.0 3 votes vote down vote up
/**
 * Construct a new cluster status.
 * 
 * @param activeTrackers active tasktrackers in the cluster
 * @param blacklistedTrackers blacklisted tasktrackers in the cluster
 * @param ttExpiryInterval the tasktracker expiry interval
 * @param maps no. of currently running map-tasks in the cluster
 * @param reduces no. of currently running reduce-tasks in the cluster
 * @param maxMaps the maximum no. of map tasks in the cluster
 * @param maxReduces the maximum no. of reduce tasks in the cluster
 * @param status the {@link JobTrackerStatus} of the <code>JobTracker</code>
 */
ClusterStatus(Collection<String> activeTrackers, 
    Collection<BlackListInfo> blacklistedTrackers,
    long ttExpiryInterval,
    int maps, int reduces, int maxMaps, int maxReduces, 
    JobTrackerStatus status) {
  this(activeTrackers, blacklistedTrackers, ttExpiryInterval, maps, reduces, 
       maxMaps, maxReduces, status, 0);
}
 
Example #16
Source File: ClusterStatus.java    From big-c with Apache License 2.0 3 votes vote down vote up
/**
 * Construct a new cluster status.
 * 
 * @param trackers no. of tasktrackers in the cluster
 * @param blacklists no of blacklisted task trackers in the cluster
 * @param ttExpiryInterval the tasktracker expiry interval
 * @param maps no. of currently running map-tasks in the cluster
 * @param reduces no. of currently running reduce-tasks in the cluster
 * @param maxMaps the maximum no. of map tasks in the cluster
 * @param maxReduces the maximum no. of reduce tasks in the cluster
 * @param status the {@link JobTrackerStatus} of the <code>JobTracker</code>
 * @param numDecommissionedNodes number of decommission trackers
 */
ClusterStatus(int trackers, int blacklists, long ttExpiryInterval, int maps,
    int reduces, int maxMaps, int maxReduces, JobTrackerStatus status,
    int numDecommissionedNodes) {
  this(trackers, blacklists, ttExpiryInterval, maps, reduces, maxMaps,
    maxReduces, status, numDecommissionedNodes, 0);
}
 
Example #17
Source File: ClusterStatus.java    From hadoop with Apache License 2.0 3 votes vote down vote up
/**
 * Construct a new cluster status.
 * 
 * @param trackers no. of tasktrackers in the cluster
 * @param blacklists no of blacklisted task trackers in the cluster
 * @param ttExpiryInterval the tasktracker expiry interval
 * @param maps no. of currently running map-tasks in the cluster
 * @param reduces no. of currently running reduce-tasks in the cluster
 * @param maxMaps the maximum no. of map tasks in the cluster
 * @param maxReduces the maximum no. of reduce tasks in the cluster
 * @param status the {@link JobTrackerStatus} of the <code>JobTracker</code>
 */
ClusterStatus(int trackers, int blacklists, long ttExpiryInterval, 
              int maps, int reduces,
              int maxMaps, int maxReduces, JobTrackerStatus status) {
  this(trackers, blacklists, ttExpiryInterval, maps, reduces, maxMaps, 
       maxReduces, status, 0);
}
 
Example #18
Source File: ClusterStatus.java    From hadoop with Apache License 2.0 3 votes vote down vote up
/**
 * Construct a new cluster status.
 * 
 * @param trackers no. of tasktrackers in the cluster
 * @param blacklists no of blacklisted task trackers in the cluster
 * @param ttExpiryInterval the tasktracker expiry interval
 * @param maps no. of currently running map-tasks in the cluster
 * @param reduces no. of currently running reduce-tasks in the cluster
 * @param maxMaps the maximum no. of map tasks in the cluster
 * @param maxReduces the maximum no. of reduce tasks in the cluster
 * @param status the {@link JobTrackerStatus} of the <code>JobTracker</code>
 * @param numDecommissionedNodes number of decommission trackers
 */
ClusterStatus(int trackers, int blacklists, long ttExpiryInterval, int maps,
    int reduces, int maxMaps, int maxReduces, JobTrackerStatus status,
    int numDecommissionedNodes) {
  this(trackers, blacklists, ttExpiryInterval, maps, reduces, maxMaps,
    maxReduces, status, numDecommissionedNodes, 0);
}
 
Example #19
Source File: ClusterStatus.java    From hadoop with Apache License 2.0 3 votes vote down vote up
/**
 * Construct a new cluster status.
 * 
 * @param activeTrackers active tasktrackers in the cluster
 * @param blackListedTrackerInfo blacklisted tasktrackers information 
 * in the cluster
 * @param ttExpiryInterval the tasktracker expiry interval
 * @param maps no. of currently running map-tasks in the cluster
 * @param reduces no. of currently running reduce-tasks in the cluster
 * @param maxMaps the maximum no. of map tasks in the cluster
 * @param maxReduces the maximum no. of reduce tasks in the cluster
 * @param status the {@link JobTrackerStatus} of the <code>JobTracker</code>
 * @param numDecommissionNodes number of decommission trackers
 */

ClusterStatus(Collection<String> activeTrackers,
    Collection<BlackListInfo> blackListedTrackerInfo, long ttExpiryInterval,
    int maps, int reduces, int maxMaps, int maxReduces,
    JobTrackerStatus status, int numDecommissionNodes) {
  this(activeTrackers.size(), blackListedTrackerInfo.size(),
      ttExpiryInterval, maps, reduces, maxMaps, maxReduces, status,
      numDecommissionNodes);
  this.activeTrackers = activeTrackers;
  this.blacklistedTrackersInfo = blackListedTrackerInfo;
}
 
Example #20
Source File: ClusterStatus.java    From hadoop with Apache License 2.0 3 votes vote down vote up
/**
 * Construct a new cluster status.
 * 
 * @param activeTrackers active tasktrackers in the cluster
 * @param blacklistedTrackers blacklisted tasktrackers in the cluster
 * @param ttExpiryInterval the tasktracker expiry interval
 * @param maps no. of currently running map-tasks in the cluster
 * @param reduces no. of currently running reduce-tasks in the cluster
 * @param maxMaps the maximum no. of map tasks in the cluster
 * @param maxReduces the maximum no. of reduce tasks in the cluster
 * @param status the {@link JobTrackerStatus} of the <code>JobTracker</code>
 */
ClusterStatus(Collection<String> activeTrackers, 
    Collection<BlackListInfo> blacklistedTrackers,
    long ttExpiryInterval,
    int maps, int reduces, int maxMaps, int maxReduces, 
    JobTrackerStatus status) {
  this(activeTrackers, blacklistedTrackers, ttExpiryInterval, maps, reduces, 
       maxMaps, maxReduces, status, 0);
}
 
Example #21
Source File: ClientProtocol.java    From hadoop with Apache License 2.0 2 votes vote down vote up
/**
 * Get the JobTracker's status.
 * 
 * @return {@link JobTrackerStatus} of the JobTracker
 * @throws IOException
 * @throws InterruptedException
 */
public JobTrackerStatus getJobTrackerStatus() throws IOException,
  InterruptedException;
 
Example #22
Source File: ClusterStatus.java    From big-c with Apache License 2.0 2 votes vote down vote up
/**
 * Get the JobTracker's status.
 * 
 * @return {@link JobTrackerStatus} of the JobTracker
 */
public JobTrackerStatus getJobTrackerStatus() {
  return status;
}
 
Example #23
Source File: ClusterStatus.java    From hadoop with Apache License 2.0 2 votes vote down vote up
/**
 * Get the JobTracker's status.
 * 
 * @return {@link JobTrackerStatus} of the JobTracker
 */
public JobTrackerStatus getJobTrackerStatus() {
  return status;
}
 
Example #24
Source File: ClientProtocol.java    From big-c with Apache License 2.0 2 votes vote down vote up
/**
 * Get the JobTracker's status.
 * 
 * @return {@link JobTrackerStatus} of the JobTracker
 * @throws IOException
 * @throws InterruptedException
 */
public JobTrackerStatus getJobTrackerStatus() throws IOException,
  InterruptedException;