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

Hudson commented on HBASE-12583:
--------------------------------

FAILURE: Integrated in Jenkins build HBase-Trunk_matrix #4532 (See 
[https://builds.apache.org/job/HBase-Trunk_matrix/4532/])
HBASE-19703 Functionality added as part of HBASE-12583 is not working 
(chia7712: rev c5f86f2ce42eafc5d4b4f83f4471cacd372abae3)
* (edit) 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
* (edit) 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionSplitPolicy.java
* (edit) 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
* (edit) 
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java


> Allow creating reference files even the split row not lies in the storefile 
> range if required
> ---------------------------------------------------------------------------------------------
>
>                 Key: HBASE-12583
>                 URL: https://issues.apache.org/jira/browse/HBASE-12583
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: rajeshbabu
>            Assignee: rajeshbabu
>            Priority: Major
>              Labels: Phoenix
>             Fix For: 1.0.0, 2.0.0, 0.98.9
>
>         Attachments: HBASE-12583.patch, HBASE-12583_98.patch, 
> HBASE-12583_98_v2.patch, HBASE-12583_addendum.patch, 
> HBASE-12583_branch1.patch, HBASE-12583_branch1_v2.patch, 
> HBASE-12583_v2.patch, HBASE-12583_v3.patch
>
>
> Currently in HRegionFileSystem#splitStoreFile we are not creating reference 
> files if the split row not lies in the storefile range that means one of the 
> child region doesn't have any data.
> {code}
>    // Check whether the split row lies in the range of the store file
>     // If it is outside the range, return directly.
>     if (top) {
>       //check if larger than last key.
>       KeyValue splitKey = KeyValueUtil.createFirstOnRow(splitRow);
>       byte[] lastKey = f.createReader().getLastKey();
>       // If lastKey is null means storefile is empty.
>       if (lastKey == null) return null;
>       if (f.getReader().getComparator().compareFlatKey(splitKey.getBuffer(),
>           splitKey.getKeyOffset(), splitKey.getKeyLength(), lastKey, 0, 
> lastKey.length) > 0) {
>         return null;
>       }
>     } else {
>       //check if smaller than first key
>       KeyValue splitKey = KeyValueUtil.createLastOnRow(splitRow);
>       byte[] firstKey = f.createReader().getFirstKey();
>       // If firstKey is null means storefile is empty.
>       if (firstKey == null) return null;
>       if (f.getReader().getComparator().compareFlatKey(splitKey.getBuffer(),
>           splitKey.getKeyOffset(), splitKey.getKeyLength(), firstKey, 0, 
> firstKey.length) < 0) {
>         return null;
>       }
>     }
> {code}
> In some cases when split row should be compared with part of rowkey(in 
> composite rowkey) mainly for secondary index tables we need to create 
> reference files even when split row not lies in the storefile range so that 
> they can be rewritten to it's child regions by some custom half store file 
> reader which compare the part of row key with split row.
> The check of comparing split row with storefile range and returning directly 
> can be avoided by having special boolean attribute in table descriptor when 
> it set to true. Or else we can have coprocessor hooks so that in the hooks we 
> can create the references and bypass.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to