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

huaxiang sun commented on HBASE-18004:
--------------------------------------

Thanks Stack. I think it is a minor as most of the case, getRegionLocations() 
is called against local meta cache, :)

Also found that the latest master got a compiling error, not sure if it is 
taken care of.

{code}
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
index ff7e60f..219b67b 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
@@ -536,13 +536,13 @@ public class SplitTableRegionProcedure
     final TableDescriptor htd = 
env.getMasterServices().getTableDescriptors().get(getTableName());
     for (Map.Entry<String, Collection<StoreFileInfo>>e: files.entrySet()) {
       byte [] familyName = Bytes.toBytes(e.getKey());
-      final HColumnDescriptor hcd = htd.getFamily(familyName);
+      final ColumnFamilyDescriptor hcd = htd.getColumnFamily(familyName);
       final Collection<StoreFileInfo> storeFiles = e.getValue();
       if (storeFiles != null && storeFiles.size() > 0) {
         final CacheConfig cacheConf = new CacheConfig(conf, hcd);
         for (StoreFileInfo storeFileInfo: storeFiles) {
           StoreFileSplitter sfs =
-              new StoreFileSplitter(regionFs, family.getBytes(), new 
HStoreFile(mfs.getFileSystem(),
+              new StoreFileSplitter(regionFs, familyName, new 
HStoreFile(mfs.getFileSystem(),
                   storeFileInfo, conf, cacheConf, hcd.getBloomFilterType(), 
true));
           futures.add(threadPool.submit(sfs));
         }
hsun-MBP:hbase hsun$ 

{code}

> getRegionLocations  needs to be called once in 
> ScannerCallableWithReplicas#call()
> ---------------------------------------------------------------------------------
>
>                 Key: HBASE-18004
>                 URL: https://issues.apache.org/jira/browse/HBASE-18004
>             Project: HBase
>          Issue Type: Improvement
>          Components: Client
>    Affects Versions: 2.0.0
>            Reporter: huaxiang sun
>            Assignee: huaxiang sun
>            Priority: Minor
>         Attachments: HBASE-18004-master-001.patch, 
> HBASE-18004-master-002.patch
>
>
> Look at this line,
> https://github.com/apache/hbase/blob/master/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallableWithReplicas.java#L145
> It calls getRegionLocations() to get the primary region's locations. It's 
> usage is to figure out table's region replications. Since table's region 
> replication wont be changed until the table is disabled. It is safe to cache 
> this region replication.



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

Reply via email to