Package org.apache.hadoop.corona

Examples of org.apache.hadoop.corona.NodeUsageReport


   * @param trackerName The name of the tracker.
   * @return A boolean indicating if the tracker is faulty.
   */
  public boolean isFaulty(String trackerName) {
    synchronized (this) {
      NodeUsageReport usageReport = usageReports.get(trackerName);
      return isDeadTracker(trackerName) || (usageReport != null &&
             (usageReport.getNumFailedConnections() > maxFailedConnections ||
              usageReport.getNumFailed() > maxFailures));
    }
  }
View Full Code Here


   * Increment the number of tasks assigned to a tracker.
   * @param trackerName The name of the tracker.
   */
  public void recordTask(String trackerName) {
    synchronized (this) {
      NodeUsageReport usageReport = getReportUnprotected(trackerName);
      usageReport.setNumTotalTasks(usageReport.getNumTotalTasks() + 1);
    }
  }
View Full Code Here

   * Increment the number of succeeded tasks on a tracker.
   * @param trackerName The name of the tracker.
   */
  public void recordSucceededTask(String trackerName) {
    synchronized (this) {
      NodeUsageReport usageReport = getReportUnprotected(trackerName);
      usageReport.setNumSucceeded(usageReport.getNumSucceeded() + 1);
    }
  }
View Full Code Here

   * Increment the number of killed tasks on a tracker.
   * @param trackerName The name of the tracker.
   */
  public void recordKilledTask(String trackerName) {
    synchronized (this) {
      NodeUsageReport usageReport = getReportUnprotected(trackerName);
      usageReport.setNumKilled(usageReport.getNumKilled() + 1);
    }
  }
View Full Code Here

   * Increment the number of failed tasks on a tracker.
   * @param trackerName The name of the tracker.
   */
  public void recordFailedTask(String trackerName) {
    synchronized (this) {
      NodeUsageReport usageReport = getReportUnprotected(trackerName);
      usageReport.setNumFailed(usageReport.getNumFailed() + 1);
    }
  }
View Full Code Here

   * Increment the number of timeouts (expired launch) on a tracker.
   * @param trackerName The name of the tracker.
   */
  public void recordTimeout(String trackerName) {
    synchronized (this) {
      NodeUsageReport usageReport = getReportUnprotected(trackerName);
      usageReport.setNumTimeout(usageReport.getNumTimeout() + 1);
    }
  }
View Full Code Here

   * Increment the number of tasks that ran slowly on a tracker.
   * @param trackerName The name of the tracker.
   */
  public void recordSlowTask(String trackerName) {
    synchronized (this) {
      NodeUsageReport usageReport = getReportUnprotected(trackerName);
      usageReport.setNumSlow(usageReport.getNumSlow() + 1);
    }
  }
View Full Code Here

   * Increment the number of connection errors encountered on a tracker.
   * @param trackerName The name of the tracker.
   */
  public void recordConnectionError(String trackerName) {
    synchronized (this) {
      NodeUsageReport usageReport = getReportUnprotected(trackerName);
      usageReport
          .setNumFailedConnections(usageReport.getNumFailedConnections() + 1);
    }
  }
View Full Code Here

   * Get the usage report for a tracker.
   * @param trackerName The name of the tracker.
   * @return The {@link NodeUsageReport} for the tracker.
   */
  private NodeUsageReport getReportUnprotected(String trackerName) {
    NodeUsageReport usageReport = usageReports.get(trackerName);
    if (usageReport == null) {
      usageReport = new NodeUsageReport(trackerName, 0, 0, 0, 0, 0, 0, 0);
      usageReports.put(trackerName, usageReport);
    }
    return usageReport;
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.corona.NodeUsageReport

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.