nyl3532016 commented on a change in pull request #3468:
URL: https://github.com/apache/hbase/pull/3468#discussion_r688384735
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
##########
@@ -344,14 +344,27 @@ private StoreContext
initializeStoreContext(ColumnFamilyDescriptor family) throw
}
private InetSocketAddress[] getFavoredNodes() {
- InetSocketAddress[] favoredNodes = null;
if (region.getRegionServerServices() != null) {
- favoredNodes = region.getRegionServerServices().getFavoredNodesForRegion(
- region.getRegionInfo().getEncodedName());
+ return region.getRegionServerServices()
+ .getFavoredNodesForRegion(region.getRegionInfo().getEncodedName());
}
return favoredNodes;
}
+ // Favored nodes used by compaction offload
+ private InetSocketAddress[] favoredNodes = null;
Review comment:
Not thread safe, but only called once after `initializeStoreContext` and
before real do compaction.For we initialize a new store everytime for a
compaction request.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]