hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Honghua Feng (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-10705) CompactionRequest#toString() may throw NullPointerException
Date Thu, 03 Apr 2014 09:47:15 GMT

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

Honghua Feng commented on HBASE-10705:
--------------------------------------

LGTM. But seems below method in the same file has the same problem?
{code}
private void recalculateSize() {
  long sz = 0;
  for (StoreFile sf : this.filesToCompact) {
    sz += sf.getReader().length();
  }
  this.totalSize = sz;
}
{code}

> CompactionRequest#toString() may throw NullPointerException
> -----------------------------------------------------------
>
>                 Key: HBASE-10705
>                 URL: https://issues.apache.org/jira/browse/HBASE-10705
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.96.0
>            Reporter: Ted Yu
>            Assignee: Rekha Joshi
>            Priority: Minor
>             Fix For: 0.96.0
>
>         Attachments: HBASE-10705.1.patch
>
>
> I found the following in hbase-server/target/surefire-reports/org.apache.hadoop.hbase.util.TestMergeTable-output.txt
:
> {code}
> 2014-03-08 01:22:35,311 INFO  [IPC Server handler 0 on 39151] blockmanagement.BlockManager(1009):
BLOCK* addToInvalidates: blk_1073741852_1028 127.0.0.1:58684
> 2014-03-08 01:22:35,312 INFO  [RS:0;kiyo:45971-shortCompactions-1394241753752] regionserver.HRegion(1393):
compaction interrupted
> java.io.InterruptedIOException: Aborting compaction of store contents in region test,,1394241738901.edbcdf3be9dd27c52b1fca1b09a5a582.
because it was interrupted.
>         at org.apache.hadoop.hbase.regionserver.compactions.DefaultCompactor.compact(DefaultCompactor.java:81)
>         at org.apache.hadoop.hbase.regionserver.DefaultStoreEngine$DefaultCompactionContext.compact(DefaultStoreEngine.java:109)
>         at org.apache.hadoop.hbase.regionserver.HStore.compact(HStore.java:1131)
>         at org.apache.hadoop.hbase.regionserver.HRegion.compact(HRegion.java:1390)
>         at org.apache.hadoop.hbase.regionserver.CompactSplitThread$CompactionRunner.run(CompactSplitThread.java:475)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:724)
> 2014-03-08 01:22:35,314 DEBUG [RS_CLOSE_REGION-kiyo:45971-0] regionserver.HRegion(1069):
Updates disabled for region test,,1394241738901.edbcdf3be9dd27c52b1fca1b09a5a582.
> 2014-03-08 01:22:35,316 INFO  [StoreCloserThread-test,,1394241738901.edbcdf3be9dd27c52b1fca1b09a5a582.-1]
regionserver.HStore(793): Closed contents
> 2014-03-08 01:22:35,316 ERROR [RS:0;kiyo:45971-shortCompactions-1394241753752] regionserver.CompactSplitThread$CompactionRunner(496):
Compaction failed Request = regionName=test,,1394241738901.edbcdf3be9dd27c52b1fca1b09a5a582.,
storeName=contents, fileCount=7, fileSize=71.3 M (10.2 M, 10.2 M, 10.2 M, 10.2 M, 10.2 M),
priority=3, time=8144240699213330
> java.lang.NullPointerException
>         at org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest$2.apply(CompactionRequest.java:213)
>         at org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest$2.apply(CompactionRequest.java:211)
>         at com.google.common.collect.Iterators$9.transform(Iterators.java:845)
>         at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
>         at com.google.common.base.Joiner.appendTo(Joiner.java:125)
>         at com.google.common.base.Joiner.appendTo(Joiner.java:186)
>         at com.google.common.base.Joiner.join(Joiner.java:243)
>         at com.google.common.base.Joiner.join(Joiner.java:232)
>         at org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest.toString(CompactionRequest.java:204)
>         at java.lang.String.valueOf(String.java:2854)
>         at java.lang.StringBuilder.append(StringBuilder.java:128)
>         at org.apache.hadoop.hbase.regionserver.CompactSplitThread$CompactionRunner.toString(CompactSplitThread.java:425)
>         at java.lang.String.valueOf(String.java:2854)
>         at java.lang.StringBuilder.append(StringBuilder.java:128)
>         at org.apache.hadoop.hbase.regionserver.CompactSplitThread$CompactionRunner.run(CompactSplitThread.java:477)
> {code}
> The exception came from apply() method:
> {code}
>           }), new Function<StoreFile, String>() {
>             public String apply(StoreFile sf) {
>               return StringUtils.humanReadableInt(sf.getReader().length());
>             }
>           }));
> {code}
> Looks like sf.getReader() might become null when StringUtils.humanReadableInt() is called



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message