@InterfaceAudience.Private abstract class StoreFileTrackerBase extends Object implements StoreFileTracker
Modifier and Type | Field and Description |
---|---|
private boolean |
cacheOnWriteLogged |
protected org.apache.hadoop.conf.Configuration |
conf |
protected StoreContext |
ctx |
protected boolean |
isPrimaryReplica |
private static org.slf4j.Logger |
LOG |
Modifier | Constructor and Description |
---|---|
protected |
StoreFileTrackerBase(org.apache.hadoop.conf.Configuration conf,
boolean isPrimaryReplica,
StoreContext ctx) |
Modifier and Type | Method and Description |
---|---|
void |
add(Collection<StoreFileInfo> newFiles)
Add new store files.
|
private HFileContext |
createFileContext(Compression.Algorithm compression,
boolean includeMVCCReadpoint,
boolean includesTag,
Encryption.Context encryptionContext) |
StoreFileWriter |
createWriter(CreateStoreFileWriterParams params)
Create a writer for writing new store files.
|
protected abstract void |
doAddCompactionResults(Collection<StoreFileInfo> compactedFiles,
Collection<StoreFileInfo> newFiles) |
protected abstract void |
doAddNewStoreFiles(Collection<StoreFileInfo> newFiles) |
protected abstract 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 abstract void |
doSetStoreFiles(Collection<StoreFileInfo> files) |
protected String |
getTrackerName() |
List<StoreFileInfo> |
load()
Load the store files list when opening a region.
|
void |
replace(Collection<StoreFileInfo> compactedFiles,
Collection<StoreFileInfo> newFiles)
Add new store files and remove compacted store files after compaction.
|
void |
set(List<StoreFileInfo> files)
Set the store files.
|
TableDescriptorBuilder |
updateWithTrackerConfigs(TableDescriptorBuilder builder)
Adds StoreFileTracker implementations specific configurations into the table descriptor.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
requireWritingToTmpDirFirst
private static final org.slf4j.Logger LOG
protected final org.apache.hadoop.conf.Configuration conf
protected final boolean isPrimaryReplica
protected final StoreContext ctx
private volatile boolean cacheOnWriteLogged
protected StoreFileTrackerBase(org.apache.hadoop.conf.Configuration conf, boolean isPrimaryReplica, StoreContext ctx)
public final List<StoreFileInfo> load() throws IOException
StoreFileTracker
load
in interface StoreFileTracker
IOException
public final void add(Collection<StoreFileInfo> newFiles) throws IOException
StoreFileTracker
add
in interface StoreFileTracker
IOException
public final void replace(Collection<StoreFileInfo> compactedFiles, Collection<StoreFileInfo> newFiles) throws IOException
StoreFileTracker
replace
in interface StoreFileTracker
IOException
public final void set(List<StoreFileInfo> files) throws IOException
StoreFileTracker
set
in interface StoreFileTracker
IOException
public TableDescriptorBuilder updateWithTrackerConfigs(TableDescriptorBuilder builder)
StoreFileTracker
updateWithTrackerConfigs
in interface StoreFileTracker
builder
- The table descriptor builder for the given table.protected final String getTrackerName()
private HFileContext createFileContext(Compression.Algorithm compression, boolean includeMVCCReadpoint, boolean includesTag, Encryption.Context encryptionContext)
public final StoreFileWriter createWriter(CreateStoreFileWriterParams params) throws IOException
StoreFileTracker
createWriter
in interface StoreFileTracker
IOException
protected abstract List<StoreFileInfo> doLoadStoreFiles(boolean readOnly) throws IOException
readOnly
to indicate that whether you
are allowed to do the cleanup work. For secondary replicas, we will set readOnly
to
true
.IOException
protected abstract void doAddNewStoreFiles(Collection<StoreFileInfo> newFiles) throws IOException
IOException
protected abstract void doAddCompactionResults(Collection<StoreFileInfo> compactedFiles, Collection<StoreFileInfo> newFiles) throws IOException
IOException
protected abstract void doSetStoreFiles(Collection<StoreFileInfo> files) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.