Create StoredTabletFile to use in different situations#1519
Create StoredTabletFile to use in different situations#1519milleruntime merged 7 commits intoapache:masterfrom
Conversation
| tablet.putTime(time); | ||
| estSizes.forEach(tablet::putFile); | ||
|
|
||
| // TODO check to see if we need to delete.. putBulkFile does an insert |
There was a problem hiding this comment.
Should resolve this before merge, or create follow-on task.
There was a problem hiding this comment.
I think this is OK since it is only called by the 2 bulk import methods. And each has a corresponding CleanupBulkImport FATE operations which callsMetadataTableUtil.removeBulkLoadEntries()
core/src/main/java/org/apache/accumulo/core/metadata/TabletFile.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/accumulo/core/metadata/TabletFile.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/accumulo/core/metadata/TabletFile.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/accumulo/core/metadata/TabletFile.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/accumulo/core/metadata/TabletFile.java
Outdated
Show resolved
Hide resolved
* Created methods for read/insert/updateDel and have them called throughout the code for the appropriate situation * Throw exception if we try to get metadata for update or delete and one does not exist * Call inserted() method on TabletFile to update metadata entry when a file is new and inserted * Drop FileUtil.toPathStrings() and use object collections instead * Replace String path with TabletFile in FileUtil
Co-Authored-By: Keith Turner <kturner@apache.org>
def68d4 to
d80cc3e
Compare
|
@milleruntime I can't tell if you're still working on this or if it's ready for re-review. If you want a re-review, feel free to tag me. |
I am still working on this... I started another branch since these changes are involved. I will merge it with this branch and ping you when its ready. |
* New class that extends TabletFile for situations where we need to update or delete a TabletFile or read it directly from metadata
|
@ctubbsii I made the updates you and @keith-turner suggested so this PR can be reviewed. I know of at least 1 IT that is failing, SplitRecoveryIT that i am still trying to fix. |
keith-turner
left a comment
There was a problem hiding this comment.
The change to add the more specific type is nice.
|
@keith-turner I added a TODO to take a close look at the compaction code here. I noticed a difference in the order metadata is updated between minor and major compactions. During minor compactions, we update the metadata table first and then update the Tablet data in memory. Major compactions update the tablet data in memory first (with the tablet lock) then outside the lock wait for scans and then finally update the metadata table. Do you know why the metadata isn't updated first during major compaction? |
|
Seeing a failure in BadIteratorMincIT: |
ctubbsii
left a comment
There was a problem hiding this comment.
+1 overall; I like the TabletFile superclass / StoredTabletFile subclass mechanism.
core/src/test/java/org/apache/accumulo/core/metadata/schema/TabletMetadataTest.java
Show resolved
Hide resolved
* Replace remaining uses with Path objects and removed unnecessary wrapping of intermediate objects * Replaced with more specific types introduced in apache#1519 and apache#1501 * This class was confusing and ambiguous
* Replace remaining uses with Path objects and removed unnecessary wrapping of intermediate objects * Replaced with more specific types introduced in apache#1519 and apache#1501 * This class was confusing and ambiguous
* Drop FileRef class * Replace remaining uses with Path objects and removed unnecessary wrapping of intermediate objects * Replaced with more specific types introduced in #1519 and #1501 * This class was confusing and ambiguous * PR Feedback for #1726 (milleruntime#14) * Remove unneeded Ample interface (and unneeded 'public' keywords) * Update Ample.deleteBulkFile to use TabletFile (currently not used by any code, but presumably, this will make it easier to update existing code to use this method when it is migrated to use Ample) * Use HashSet instead of HashMap in CopyFailed.java * Remove unnecessary toString in CopyFailed.java Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
* Revert some changes to FileUtil that used TabletFile. If a tablet is splitting and exceeds the tserver.tablet.split.midpoint.files.max then we will reduce the number of index files using temporary files. These temporary files don't conform to standard TabletFile directories so just use strings in this special case.
* Revert some changes to FileUtil that used TabletFile. If a tablet is splitting and exceeds the tserver.tablet.split.midpoint.files.max then we will reduce the number of index files using temporary files. These temporary files don't conform to standard TabletFile directories so just use strings in this special case. * Closes apache#2977
* Revert some changes to FileUtil that used TabletFile. If a tablet is splitting and exceeds the tserver.tablet.split.midpoint.files.max then we will reduce the number of index files using temporary files. These temporary files don't conform to standard TabletFile directories so just use strings in this special case. * Closes #2977
throughout the code for the appropriate situation
does not exist
file is new and inserted