Java 类org.apache.hadoop.mapreduce.util.HostUtil 实例源码

项目:hadoop    文件:HistoryViewer.java   
/**
 * Return the TaskLogsUrl of a particular TaskAttempt
 * 
 * @param attempt
 * @return the taskLogsUrl. null if http-port or tracker-name or
 *         task-attempt-id are unavailable.
 */
public static String getTaskLogsUrl(String scheme,
    JobHistoryParser.TaskAttemptInfo attempt) {
  if (attempt.getHttpPort() == -1
      || attempt.getTrackerName().equals("")
      || attempt.getAttemptId() == null) {
    return null;
  }

  String taskTrackerName =
    HostUtil.convertTrackerNameToHostName(
      attempt.getTrackerName());
  return HostUtil.getTaskLogUrl(scheme, taskTrackerName,
      Integer.toString(attempt.getHttpPort()),
      attempt.getAttemptId().toString());
}
项目:aliyun-oss-hadoop-fs    文件:HistoryViewer.java   
/**
 * Return the TaskLogsUrl of a particular TaskAttempt
 * 
 * @param attempt
 * @return the taskLogsUrl. null if http-port or tracker-name or
 *         task-attempt-id are unavailable.
 */
public static String getTaskLogsUrl(String scheme,
    JobHistoryParser.TaskAttemptInfo attempt) {
  if (attempt.getHttpPort() == -1
      || attempt.getTrackerName().equals("")
      || attempt.getAttemptId() == null) {
    return null;
  }

  String taskTrackerName =
    HostUtil.convertTrackerNameToHostName(
      attempt.getTrackerName());
  return HostUtil.getTaskLogUrl(scheme, taskTrackerName,
      Integer.toString(attempt.getHttpPort()),
      attempt.getAttemptId().toString());
}
项目:big-c    文件:HistoryViewer.java   
/**
 * Return the TaskLogsUrl of a particular TaskAttempt
 * 
 * @param attempt
 * @return the taskLogsUrl. null if http-port or tracker-name or
 *         task-attempt-id are unavailable.
 */
public static String getTaskLogsUrl(String scheme,
    JobHistoryParser.TaskAttemptInfo attempt) {
  if (attempt.getHttpPort() == -1
      || attempt.getTrackerName().equals("")
      || attempt.getAttemptId() == null) {
    return null;
  }

  String taskTrackerName =
    HostUtil.convertTrackerNameToHostName(
      attempt.getTrackerName());
  return HostUtil.getTaskLogUrl(scheme, taskTrackerName,
      Integer.toString(attempt.getHttpPort()),
      attempt.getAttemptId().toString());
}
项目:hadoop-2.6.0-cdh5.4.3    文件:HistoryViewer.java   
/**
 * Return the TaskLogsUrl of a particular TaskAttempt
 * 
 * @param attempt
 * @return the taskLogsUrl. null if http-port or tracker-name or
 *         task-attempt-id are unavailable.
 */
public static String getTaskLogsUrl(String scheme,
    JobHistoryParser.TaskAttemptInfo attempt) {
  if (attempt.getHttpPort() == -1
      || attempt.getTrackerName().equals("")
      || attempt.getAttemptId() == null) {
    return null;
  }

  String taskTrackerName =
    HostUtil.convertTrackerNameToHostName(
      attempt.getTrackerName());
  return HostUtil.getTaskLogUrl(scheme, taskTrackerName,
      Integer.toString(attempt.getHttpPort()),
      attempt.getAttemptId().toString());
}
项目:hadoop-plus    文件:HistoryViewer.java   
/**
 * Return the TaskLogsUrl of a particular TaskAttempt
 * 
 * @param attempt
 * @return the taskLogsUrl. null if http-port or tracker-name or
 *         task-attempt-id are unavailable.
 */
public static String getTaskLogsUrl(
    JobHistoryParser.TaskAttemptInfo attempt) {
  if (attempt.getHttpPort() == -1
      || attempt.getTrackerName().equals("")
      || attempt.getAttemptId() == null) {
    return null;
  }

  String taskTrackerName =
    HostUtil.convertTrackerNameToHostName(
      attempt.getTrackerName());
  return HostUtil.getTaskLogUrl(taskTrackerName,
      Integer.toString(attempt.getHttpPort()),
      attempt.getAttemptId().toString());
}
项目:FlexMap    文件:HistoryViewer.java   
/**
 * Return the TaskLogsUrl of a particular TaskAttempt
 * 
 * @param attempt
 * @return the taskLogsUrl. null if http-port or tracker-name or
 *         task-attempt-id are unavailable.
 */
public static String getTaskLogsUrl(String scheme,
    JobHistoryParser.TaskAttemptInfo attempt) {
  if (attempt.getHttpPort() == -1
      || attempt.getTrackerName().equals("")
      || attempt.getAttemptId() == null) {
    return null;
  }

  String taskTrackerName =
    HostUtil.convertTrackerNameToHostName(
      attempt.getTrackerName());
  return HostUtil.getTaskLogUrl(scheme, taskTrackerName,
      Integer.toString(attempt.getHttpPort()),
      attempt.getAttemptId().toString());
}
项目:hops    文件:HistoryViewer.java   
/**
 * Return the TaskLogsUrl of a particular TaskAttempt
 * 
 * @param attempt
 * @return the taskLogsUrl. null if http-port or tracker-name or
 *         task-attempt-id are unavailable.
 */
public static String getTaskLogsUrl(String scheme,
    JobHistoryParser.TaskAttemptInfo attempt) {
  if (attempt.getHttpPort() == -1
      || attempt.getTrackerName().equals("")
      || attempt.getAttemptId() == null) {
    return null;
  }

  String taskTrackerName =
    HostUtil.convertTrackerNameToHostName(
      attempt.getTrackerName());
  return HostUtil.getTaskLogUrl(scheme, taskTrackerName,
      Integer.toString(attempt.getHttpPort()),
      attempt.getAttemptId().toString());
}
项目:hadoop-TCP    文件:HistoryViewer.java   
/**
 * Return the TaskLogsUrl of a particular TaskAttempt
 * 
 * @param attempt
 * @return the taskLogsUrl. null if http-port or tracker-name or
 *         task-attempt-id are unavailable.
 */
public static String getTaskLogsUrl(
    JobHistoryParser.TaskAttemptInfo attempt) {
  if (attempt.getHttpPort() == -1
      || attempt.getTrackerName().equals("")
      || attempt.getAttemptId() == null) {
    return null;
  }

  String taskTrackerName =
    HostUtil.convertTrackerNameToHostName(
      attempt.getTrackerName());
  return HostUtil.getTaskLogUrl(taskTrackerName,
      Integer.toString(attempt.getHttpPort()),
      attempt.getAttemptId().toString());
}
项目:hardfs    文件:HistoryViewer.java   
/**
 * Return the TaskLogsUrl of a particular TaskAttempt
 * 
 * @param attempt
 * @return the taskLogsUrl. null if http-port or tracker-name or
 *         task-attempt-id are unavailable.
 */
public static String getTaskLogsUrl(
    JobHistoryParser.TaskAttemptInfo attempt) {
  if (attempt.getHttpPort() == -1
      || attempt.getTrackerName().equals("")
      || attempt.getAttemptId() == null) {
    return null;
  }

  String taskTrackerName =
    HostUtil.convertTrackerNameToHostName(
      attempt.getTrackerName());
  return HostUtil.getTaskLogUrl(taskTrackerName,
      Integer.toString(attempt.getHttpPort()),
      attempt.getAttemptId().toString());
}
项目:hadoop-on-lustre2    文件:HistoryViewer.java   
/**
 * Return the TaskLogsUrl of a particular TaskAttempt
 * 
 * @param attempt
 * @return the taskLogsUrl. null if http-port or tracker-name or
 *         task-attempt-id are unavailable.
 */
public static String getTaskLogsUrl(String scheme,
    JobHistoryParser.TaskAttemptInfo attempt) {
  if (attempt.getHttpPort() == -1
      || attempt.getTrackerName().equals("")
      || attempt.getAttemptId() == null) {
    return null;
  }

  String taskTrackerName =
    HostUtil.convertTrackerNameToHostName(
      attempt.getTrackerName());
  return HostUtil.getTaskLogUrl(scheme, taskTrackerName,
      Integer.toString(attempt.getHttpPort()),
      attempt.getAttemptId().toString());
}