hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-1391) NPE in TableInputFormatBase$TableRecordReader.restart if zoo.cfg is wrong on tasktrackers
Date Mon, 11 May 2009 16:09:45 GMT

    [ https://issues.apache.org/jira/browse/HBASE-1391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708094#action_12708094

stack commented on HBASE-1391:

Looking at code, there should have been complaint earlier in log when we tried create table
in first place coming out of the configure:

  public void configure(JobConf job) {
    Path[] tableNames = FileInputFormat.getInputPaths(job);
    String colArg = job.get(COLUMN_LIST);
    String[] colNames = colArg.split(" ");
    byte [][] m_cols = new byte[colNames.length][];
    for (int i = 0; i < m_cols.length; i++) {
      m_cols[i] = Bytes.toBytes(colNames[i]);
    try {
      setHTable(new HTable(new HBaseConfiguration(job), tableNames[0].getName()));
    } catch (Exception e) {

We should have triggered the LOG.error.

The NPE happens when we try to use null table to get a scanner.

Would my throwing an NPE inside in setHTable be enough?  We'd still log the error in configure
and continue, but then when the job tried to run, inside in getRecordReader, the job would
fail because of a null table.

The failure would be earlier.  Its not a complaint about missing zoo.cfg though.  We need

> NPE in TableInputFormatBase$TableRecordReader.restart if zoo.cfg is wrong on tasktrackers
> -----------------------------------------------------------------------------------------
>                 Key: HBASE-1391
>                 URL: https://issues.apache.org/jira/browse/HBASE-1391
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: mapred
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>            Priority: Minor
>             Fix For: 0.20.0
> Minor nit. If zoo.cfg is missing or incorrect on the task trackers, you'll get this NPE
when the child task starts:
> 09/05/08 02:46:15 INFO mapred.JobClient: Task Id : attempt_200905080240_0002_m_000000_2,
Status : FAILED
> java.lang.NullPointerException
>         at org.apache.hadoop.hbase.mapred.TableInputFormatBase$TableRecordReader.restart(TableInputFormatBase.java:117)
>         at org.apache.hadoop.hbase.mapred.TableInputFormatBase$TableRecordReader.init(TableInputFormatBase.java:128)
>         at org.apache.hadoop.hbase.mapred.TableInputFormatBase.getRecordReader(TableInputFormatBase.java:249)
>         at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:336)
>         at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
>         at org.apache.hadoop.mapred.Child.main(Child.java:170)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message