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

Hudson commented on HBASE-14662:
--------------------------------

SUCCESS: Integrated in HBase-1.3 #289 (See 
[https://builds.apache.org/job/HBase-1.3/289/])
HBASE-14662 Fix NPE in HFileOutputFormat2 (Heng Chen) (stack: rev 
35c34ba84e592353e49aa6568f4bdac4c208cae9)
* 
hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java


> Fix NPE in HFileOutputFormat2
> -----------------------------
>
>                 Key: HBASE-14662
>                 URL: https://issues.apache.org/jira/browse/HBASE-14662
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Heng Chen
>            Assignee: Heng Chen
>             Fix For: 2.0.0, 1.3.0
>
>         Attachments: HBASE-14662.patch
>
>
> When i dig in HBASE-14659,  i run testWritingPEData. There are a lot of NPE 
> thrown and testcase run a long time. 
> The reason is that, in {{HFileOutputFormat2}}
> {code}
>             HRegionLocation loc = null;
>             String tableName = conf.get(OUTPUT_TABLE_NAME_CONF_KEY);
>             try (Connection connection = 
> ConnectionFactory.createConnection(conf);
>                    RegionLocator locator =
>                      
> connection.getRegionLocator(TableName.valueOf(tableName))) {
>               loc = locator.getRegionLocation(rowKey);
>             } catch (Throwable e) {
>               LOG.warn("there's something wrong when locating rowkey: " +
>                 Bytes.toString(rowKey), e);
>               loc = null;
>             }
> {code}
> Because we did not set {{OUTPUT_TABLE_NAME_CONF_KEY}}, So tableName is null,  
> So NPE thrown.
> And connection will be created which RegionLocator use to find region 
> location. Because zk is not start in this testcase, So it will retry many 
> times. 
> But all this actions are not required,  we can skip create connection by 
> check whether tableName is null



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to