gvprathyusha6 commented on code in PR #5939:
URL: https://github.com/apache/hbase/pull/5939#discussion_r1765427019
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java:
##########
@@ -1347,7 +1349,9 @@ public static HDFSBlocksDistribution
computeHDFSBlocksDistribution(Configuration
if (StoreFileInfo.isReference(p) || HFileLink.isHFileLink(p)) {
// Only construct StoreFileInfo object if its not a hfile, save obj
// creation
- StoreFileInfo storeFileInfo = new StoreFileInfo(conf, fs, status);
+ StoreFileTracker sft =
+ StoreFileTrackerFactory.create(conf, tableDescriptor, family,
regionFs);
+ StoreFileInfo storeFileInfo = sft.getStoreFileInfo(status,
status.getPath(), false);
Review Comment:
Yes, I was thinking the same too, now everytime we create new instance of
StoreFileTracker object, we would be loading the listfile again for that
instance.
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobFile.java:
##########
@@ -134,11 +135,13 @@ public void close() throws IOException {
* @param cacheConf The CacheConfig.
* @return An instance of the MobFile.
*/
- public static MobFile create(FileSystem fs, Path path, Configuration conf,
CacheConfig cacheConf)
- throws IOException {
- // XXX: primaryReplica is only used for constructing the key of block
cache so it is not a
- // critical problem if we pass the wrong value, so here we always pass
true. Need to fix later.
- HStoreFile sf = new HStoreFile(fs, path, conf, cacheConf, BloomType.NONE,
true);
+ public static MobFile create(FileSystem fs, Path path, Configuration conf,
CacheConfig cacheConf,
+ StoreFileTracker sft) throws IOException {
+ // XXX: primaryReplica is only used for constructing the key of block
cache so
Review Comment:
this came in with mvn:spotless apply, I can revert
--
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]