-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-26079 Use StoreFileTracker when splitting and merging #3617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
Apache9
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So here you also need to change the StoreFileTrackFactory class, mind taking a look at #3578 first?
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
Outdated
Show resolved
Hide resolved
...main/java/org/apache/hadoop/hbase/regionserver/storefiletracker/DefaultStoreFileTracker.java
Outdated
Show resolved
Hide resolved
| throw new IOException("Unable to rename " + mergedRegionTmpDir + " to " | ||
| + regionDir); | ||
| } | ||
| loadRegionFilesIntoStoreTracker(regionDir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should also get the file list from store file tracker instead of listing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These would not be in the tracker yet, as these are the links created in this split/merge operation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, when splitting/merging, we will create the linked store files in memory, we should just use them to insert to the tracker, so we do not need to list again.
...main/java/org/apache/hadoop/hbase/regionserver/storefiletracker/StoreFileTrackerFactory.java
Outdated
Show resolved
Hide resolved
Sorry, missed your ping there. Let me take a look. |
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
…racking logic Signed-off-by: Wellington Chevreuil <[email protected]>
Change-Id: I1801bd4d1078c5967e2f80646cb1d40be12d9829
Change-Id: I89326af60c4e19f6dff0a0c517b826b17947b264
…store trakcer Change-Id: If5431fea9326c30e932b74e563dabcabc2a82c2f
6d40c8d to
a66cecc
Compare
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
Change-Id: I144a978fa4d2d35cdade60d98f5e6e7d503a49de
e92f501 to
888f140
Compare
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
| trackerMap.computeIfAbsent(familyName, t -> { | ||
| ColumnFamilyDescriptorBuilder fDescBuilder = | ||
| ColumnFamilyDescriptorBuilder.newBuilder(Bytes.toBytes(familyName)); | ||
| return StoreFileTrackerFactory.create(conf, regionInfo.getTable(), true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here when creating StoreFileTracker, we should use the modified Configuration instance where we also include the configurations declared in table description and family description, as you can set StoreEngine per table or family.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Had changed this on latest commit.
| List<Path> mergedFiles = new ArrayList<>(); | ||
| for (ColumnFamilyDescriptor hcd : htd.getColumnFamilies()) { | ||
| String family = hcd.getNameAsString(); | ||
| final Collection<StoreFileInfo> storeFiles = regionFs.getStoreFiles(family); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here we should use StoreFileTracker to get the file list, instead of loading from HRegionFileSystem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and same thing on splits. Had changed this on latest commit.
1) Changes to load files to split/merge from tracker, instead of listing from FS; 2) UT for above; 3) Changed tracker factory to load traker impl from CF first, then Table, then Configuration; Change-Id: I3a09afd28afe5fe6297b28dafa5dec0eca4c323c
4af7ec4 to
c39ad64
Compare
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
No description provided.