You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Zhijie Shen (JIRA)" <ji...@apache.org> on 2013/10/25 01:09:02 UTC
[jira] [Commented] (MAPREDUCE-5392) "mapred job -history all"
command throws IndexOutOfBoundsException
[ https://issues.apache.org/jira/browse/MAPREDUCE-5392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13804789#comment-13804789 ]
Zhijie Shen commented on MAPREDUCE-5392:
----------------------------------------
The essential problem is that the method of constructing the link to the log file is out-of-date. The method seems to work. Here're some detailed comments on the patch:
1. convertTrackerNameToHostName seems no longer to be not necessary, because the trackerName is supposed to be the node hostname, right?
{code}
HostUtil.convertTrackerNameToHostName(
attempt.getTrackerName());
{code}
2. It seems that the original getTaskLogUrl is not use as well.
{code}
public static String getTaskLogUrl(String taskTrackerHostName,
String httpPort, String taskAttemptID) {
{code}
3. JHAdminConfig has already defined MR_HISTORY_WEBAPP_ADDRESS
{code}
+ String hsAddress =
+ config.get("mapreduce.jobhistory.webapp.address", "localhost:19888");
{code}
> "mapred job -history all" command throws IndexOutOfBoundsException
> ------------------------------------------------------------------
>
> Key: MAPREDUCE-5392
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-5392
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: mrv2
> Affects Versions: 3.0.0, 2.0.5-alpha
> Reporter: Shinichi Yamashita
> Assignee: Shinichi Yamashita
> Priority: Minor
> Fix For: 3.0.0
>
> Attachments: MAPREDUCE-5392.patch, MAPREDUCE-5392.patch, MAPREDUCE-5392.patch, MAPREDUCE-5392.patch
>
>
> When I use an "all" option by "mapred job -history" comamnd, the following exceptions are displayed and do not work.
> {code}
> Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -3
> at java.lang.String.substring(String.java:1875)
> at org.apache.hadoop.mapreduce.util.HostUtil.convertTrackerNameToHostName(HostUtil.java:49)
> at org.apache.hadoop.mapreduce.jobhistory.HistoryViewer.getTaskLogsUrl(HistoryViewer.java:459)
> at org.apache.hadoop.mapreduce.jobhistory.HistoryViewer.printAllTaskAttempts(HistoryViewer.java:235)
> at org.apache.hadoop.mapreduce.jobhistory.HistoryViewer.print(HistoryViewer.java:117)
> at org.apache.hadoop.mapreduce.tools.CLI.viewHistory(CLI.java:472)
> at org.apache.hadoop.mapreduce.tools.CLI.run(CLI.java:313)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
> at org.apache.hadoop.mapred.JobClient.main(JobClient.java:1233)
> {code}
> This is because a node name recorded in History file is not given "tracker_". Therefore it makes modifications to be able to read History file even if a node name is not given by "tracker_".
> In addition, it fixes the URL of displayed task log.
--
This message was sent by Atlassian JIRA
(v6.1#6144)