hadoop-mapreduce-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roman Gavryliuk (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MAPREDUCE-6737) HS: job history recovery fails with NumericFormatException if the job wasn't initted properly
Date Wed, 20 Jul 2016 09:56:20 GMT
Roman Gavryliuk created MAPREDUCE-6737:

             Summary: HS: job history recovery fails with NumericFormatException if the job
wasn't initted properly
                 Key: MAPREDUCE-6737
                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6737
             Project: Hadoop Map/Reduce
          Issue Type: Bug
          Components: jobhistoryserver
    Affects Versions: 2.5.1, 2.7.0
            Reporter: Roman Gavryliuk

The problem shows itself while recovering old apps information:
2016-07-18 16:08:35,031 WARN
org.apache.hadoop.mapreduce.v2.jobhistory.FileNameIndexUtils: Unable to parse
start time from job history file
: java.lang.NumberFormatException: For input string: 

The problem is in JobHistoryEventHandler.java class in the
following part of code:

//initialize the launchTime in the JobIndexInfo of MetaInfo
      if(event.getHistoryEvent().getEventType() == EventType.JOB_INITED ){
        JobInitedEvent jie = (JobInitedEvent) event.getHistoryEvent();

Because of job was not initialized properly, the 'if' statement takes value
'false' and .setJobStartTime() is not called.

In JobIndexInfo constructor, we have a default value for jobStartTime:
this.jobStartTime = -1;

When history server recovers any application's info, it passes all parameters
to array of strings jobDetails:
String[] jobDetails = fileName.split(DELIMITER);

Please note, DELIMETER is initialized in the following way:
static final String DELIMITER = "-";

So, jobDetails array has 10 elements - job ID, submit time, username, job name,
finish time, number of maps, number of reducers, job status, queue, and start
If jobStartTime = -1, the minus symbol is considered as delimeter and the code
will assign an empty string "" as a value for 9-th element in jobDetails array.

In org.apache.hadoop.mapreduce.v2.jobhistory.FileNameIndexUtils class a
NumberFormatException will appear while trying to parse empty string to long

The most simple fix is to change the value this.jobStartTime to 0 in
JobIndexInfo constructor.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: mapreduce-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: mapreduce-dev-help@hadoop.apache.org

View raw message