phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Elser (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-4350) Replace deprecated or changed Region methods with new APIs
Date Tue, 07 Nov 2017 20:19:00 GMT

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

Josh Elser commented on PHOENIX-4350:
-------------------------------------

{code}
-                byte[] splitPoint = s.getSplitPoint();
+                Optional<byte[]> splitPoint = s.getSplitPoint();
                 long storeSize = s.getSize();
                 if (splitPoint != null && largestStoreSize < storeSize) {
-                    splitPointFromLargestStore = splitPoint;
+                    splitPointFromLargestStore = splitPoint.get();
{code}

This will throw an NPE if the Region is not allowed to split (it {{hasReferences()}}). Need
to change the conditional from {{splitPoint != null}} to {{splitPoint.isPresent()}}.

Also, {{IndexRegionSplitPolicy}} extends {{IncreasingToUpperBoundRegionSplitPolicy}} which
is marked as {{Private}}. Will file another issue to fix that later.

I see we're still blocked on other compilation stuff, so I'm +1 if you want to commit after
fixing the above, [~rajeshbabu]

> Replace deprecated or changed Region methods with new APIs
> ----------------------------------------------------------
>
>                 Key: PHOENIX-4350
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4350
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Rajeshbabu Chintaguntla
>            Assignee: Rajeshbabu Chintaguntla
>              Labels: HBase-2.0
>             Fix For: 4.14.0
>
>         Attachments: PHOENIX-4350.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message