Class DefaultStoreFileTracker
java.lang.Object
org.apache.hadoop.hbase.regionserver.storefiletracker.StoreFileTrackerBase
org.apache.hadoop.hbase.regionserver.storefiletracker.DefaultStoreFileTracker
- All Implemented Interfaces:
StoreFileTracker
The default implementation for store file tracker, where we do not persist the store file list,
and use listing when loading store files.
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.regionserver.storefiletracker.StoreFileTrackerBase
conf, ctx, isPrimaryReplica
-
Constructor Summary
ConstructorDescriptionDefaultStoreFileTracker
(org.apache.hadoop.conf.Configuration conf, boolean isPrimaryReplica, StoreContext ctx) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doAddCompactionResults
(Collection<StoreFileInfo> compactedFiles, Collection<StoreFileInfo> newFiles) protected void
doAddNewStoreFiles
(Collection<StoreFileInfo> newFiles) protected List<StoreFileInfo>
doLoadStoreFiles
(boolean readOnly) For primary replica, we will call load once when opening a region, and the implementation could choose to do some cleanup work.protected void
doSetStoreFiles
(Collection<StoreFileInfo> files) getStoreFiles
(String familyName) Returns the store files available for the family.boolean
Whether the implementation of this tracker requires you to write to temp directory first, i.e, does not allow broken store files under the actual data directory.Methods inherited from class org.apache.hadoop.hbase.regionserver.storefiletracker.StoreFileTrackerBase
add, createReference, createWriter, getStoreFileInfo, getStoreFileInfo, getTrackerName, hasReferences, load, readReference, replace, set, updateWithTrackerConfigs
-
Field Details
-
LOG
-
-
Constructor Details
-
DefaultStoreFileTracker
public DefaultStoreFileTracker(org.apache.hadoop.conf.Configuration conf, boolean isPrimaryReplica, StoreContext ctx)
-
-
Method Details
-
requireWritingToTmpDirFirst
Description copied from interface:StoreFileTracker
Whether the implementation of this tracker requires you to write to temp directory first, i.e, does not allow broken store files under the actual data directory. -
doAddNewStoreFiles
- Specified by:
doAddNewStoreFiles
in classStoreFileTrackerBase
- Throws:
IOException
-
doAddCompactionResults
protected void doAddCompactionResults(Collection<StoreFileInfo> compactedFiles, Collection<StoreFileInfo> newFiles) throws IOException - Specified by:
doAddCompactionResults
in classStoreFileTrackerBase
- Throws:
IOException
-
doLoadStoreFiles
Description copied from class:StoreFileTrackerBase
For primary replica, we will call load once when opening a region, and the implementation could choose to do some cleanup work. So here we usereadOnly
to indicate that whether you are allowed to do the cleanup work. For secondary replicas, we will setreadOnly
totrue
.- Specified by:
doLoadStoreFiles
in classStoreFileTrackerBase
- Throws:
IOException
-
doSetStoreFiles
- Specified by:
doSetStoreFiles
in classStoreFileTrackerBase
- Throws:
IOException
-
getStoreFiles
Returns the store files available for the family. This methods performs the filtering based on the valid store files.- Parameters:
familyName
- Column Family Name- Returns:
- a set of
StoreFileInfo
for the specified family. - Throws:
IOException
-