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

Hudson commented on HBASE-29709:
--------------------------------

Results for branch branch-3
        [build #496 on 
builds.a.o|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/496/]: 
(x) *{color:red}-1 overall{color}*
----
details (if available):

(/) {color:green}+1 general checks{color}
-- For more information [see general 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/496/General_20Nightly_20Build_20Report/]








(x) {color:red}-1 jdk17 hadoop3 checks{color}
-- For more information [see jdk17 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/496/JDK17_20Nightly_20Build_20Report_20_28Hadoop3_29/]














> NPE may occur when compacting table via RawAsyncHBaseAdmin
> ----------------------------------------------------------
>
>                 Key: HBASE-29709
>                 URL: https://issues.apache.org/jira/browse/HBASE-29709
>             Project: HBase
>          Issue Type: Bug
>          Components: asyncclient
>            Reporter: guluo
>            Priority: Minor
>              Labels: pull-request-available
>
> NPE may occur when calling RawAsyncHBaseAdmin.compact(), as follows:
>  
> {code:java}
> // RawAsyncHBaseAdmin.compact()
> if (locations == null || locations.isEmpty()) {
>     future.completeExceptionally(new TableNotFoundException(tableName));
> }
> CompletableFuture<?>[] compactFutures =
>     locations.stream().filter(l -> l.getRegion() != null)
>         .filter(l -> !l.getRegion().isOffline()).filter(l -> 
> l.getServerName() != null)
>         .map(l -> compact(l.getServerName(), l.getRegion(), major, 
> columnFamily))
>         .toArray(CompletableFuture<?>[]::new); {code}
> The issue is that after completing the future exceptionally when locations is 
> null or empty, there is no return statement. 
> This allows the execution to continue, which may lead to NPE issue when 
> locations.stream() is called.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to