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

The following examples show how to use org.apache.hadoop.mapreduce.Cluster.JobTrackerStatus. These examples are extracted from open source projects. 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 Project: hadoop   Source File: UtilsForTests.java    License: 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 Project: hadoop   Source File: ClusterStatus.java    License: 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 3
Source Project: hadoop   Source File: ClusterStatus.java    License: 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 4
Source Project: big-c   Source File: UtilsForTests.java    License: 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 Project: big-c   Source File: ClusterStatus.java    License: 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 6
Source Project: big-c   Source File: ClusterStatus.java    License: 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 7
Source Project: hadoop   Source File: YARNRunner.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public JobTrackerStatus getJobTrackerStatus() throws IOException,
    InterruptedException {
  return JobTrackerStatus.RUNNING;
}
 
Example 8
Source Project: hadoop   Source File: LocalJobRunner.java    License: Apache License 2.0 4 votes vote down vote up
public JobTrackerStatus getJobTrackerStatus() {
  return JobTrackerStatus.RUNNING;
}
 
Example 9
Source Project: big-c   Source File: YARNRunner.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public JobTrackerStatus getJobTrackerStatus() throws IOException,
    InterruptedException {
  return JobTrackerStatus.RUNNING;
}
 
Example 10
Source Project: big-c   Source File: LocalJobRunner.java    License: Apache License 2.0 4 votes vote down vote up
public JobTrackerStatus getJobTrackerStatus() {
  return JobTrackerStatus.RUNNING;
}
 
Example 11
Source Project: incubator-tez   Source File: YARNRunner.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public JobTrackerStatus getJobTrackerStatus() throws IOException,
    InterruptedException {
  return JobTrackerStatus.RUNNING;
}
 
Example 12
Source Project: tez   Source File: YARNRunner.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public JobTrackerStatus getJobTrackerStatus() throws IOException,
    InterruptedException {
  return JobTrackerStatus.RUNNING;
}
 
Example 13
Source Project: hadoop   Source File: ClusterStatus.java    License: 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 Project: hadoop   Source File: ClusterStatus.java    License: 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 15
Source Project: hadoop   Source File: ClusterStatus.java    License: 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 Project: hadoop   Source File: ClusterStatus.java    License: 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 17
Source Project: big-c   Source File: ClusterStatus.java    License: 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 Project: big-c   Source File: ClusterStatus.java    License: 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 Project: big-c   Source File: ClusterStatus.java    License: 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 20
Source Project: big-c   Source File: ClusterStatus.java    License: 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 21
Source Project: hadoop   Source File: ClusterStatus.java    License: 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 22
Source Project: hadoop   Source File: ClientProtocol.java    License: 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 23
Source Project: big-c   Source File: ClusterStatus.java    License: 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 Project: big-c   Source File: ClientProtocol.java    License: 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;