@InterfaceAudience.Private public class StripeStoreFileManager extends Object implements StoreFileManager, StripeCompactionPolicy.StripeInformationProvider
| 限定符和类型 | 字段和说明 |
|---|---|
static byte[] |
OPEN_KEY
The key value used for range boundary, indicating that the boundary is open (i.e.
|
static byte[] |
STRIPE_END_KEY |
static byte[] |
STRIPE_START_KEY
The file metadata fields that contain the stripe information.
|
| 构造器和说明 |
|---|
StripeStoreFileManager(KeyValue.KVComparator kvComparator,
org.apache.hadoop.conf.Configuration conf,
StripeStoreConfig config) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addCompactionResults(Collection<StoreFile> compactedFiles,
Collection<StoreFile> results)
Adds only the new compaction results into the structure.
|
com.google.common.collect.ImmutableCollection<StoreFile> |
clearCompactedFiles()
Clears all the compacted files and returns them.
|
com.google.common.collect.ImmutableCollection<StoreFile> |
clearFiles()
Clears all the files currently in use and returns them.
|
Iterator<StoreFile> |
getCandidateFilesForRowKeyBefore(KeyValue targetKey)
See
StoreFileManager.getCandidateFilesForRowKeyBefore(KeyValue)
for details on this methods. |
Collection<StoreFile> |
getCompactedfiles()
List of compacted files inside this store that needs to be excluded in reads
because further new reads will be using only the newly created files out of compaction.
|
double |
getCompactionPressure() |
byte[] |
getEndRow(int stripeIndex)
Gets the end row for a given stripe.
|
Collection<StoreFile> |
getFilesForScanOrGet(byte[] startRow,
boolean includeStartRow,
byte[] stopRow,
boolean includeStopRow)
Gets the store files to scan for a Scan or Get request.
|
List<StoreFile> |
getLevel0Files() |
byte[] |
getSplitPoint()
Gets the split point for the split of this set of store files (approx. middle).
|
byte[] |
getStartRow(int stripeIndex)
Gets the start row for a given stripe.
|
int |
getStoreCompactionPriority() |
Comparator<StoreFile> |
getStoreFileComparator() |
int |
getStorefileCount()
Returns the number of files currently in use.
|
Collection<StoreFile> |
getStorefiles()
Gets the snapshot of the store files currently in use.
|
List<byte[]> |
getStripeBoundaries() |
int |
getStripeCount() |
ArrayList<com.google.common.collect.ImmutableList<StoreFile>> |
getStripes() |
Collection<StoreFile> |
getUnneededFiles(long maxTs,
List<StoreFile> filesCompacting) |
void |
insertNewFiles(Collection<StoreFile> sfs)
Adds new files, either for from MemStore flush or bulk insert, into the structure.
|
void |
loadFiles(List<StoreFile> storeFiles)
Loads the initial store files into empty StoreFileManager.
|
void |
removeCompactedFiles(Collection<StoreFile> compactedFiles)
Remove the compacted files
|
Iterator<StoreFile> |
updateCandidateFilesForRowKeyBefore(Iterator<StoreFile> candidateFiles,
KeyValue targetKey,
Cell candidate)
See
StoreFileManager.getCandidateFilesForRowKeyBefore(KeyValue) and
StoreFileManager.updateCandidateFilesForRowKeyBefore(Iterator, KeyValue, Cell)
for details on this methods. |
public static final byte[] STRIPE_START_KEY
public static final byte[] STRIPE_END_KEY
public static final byte[] OPEN_KEY
public StripeStoreFileManager(KeyValue.KVComparator kvComparator, org.apache.hadoop.conf.Configuration conf, StripeStoreConfig config)
public void loadFiles(List<StoreFile> storeFiles)
StoreFileManagerloadFiles 在接口中 StoreFileManagerstoreFiles - The files to load.public Collection<StoreFile> getStorefiles()
StoreFileManagergetStorefiles 在接口中 StripeCompactionPolicy.StripeInformationProvidergetStorefiles 在接口中 StoreFileManagerpublic Collection<StoreFile> getCompactedfiles()
StoreFileManagergetCompactedfiles 在接口中 StoreFileManagerpublic void insertNewFiles(Collection<StoreFile> sfs) throws IOException
StoreFileManagerinsertNewFiles 在接口中 StoreFileManagersfs - New store files.IOExceptionpublic com.google.common.collect.ImmutableCollection<StoreFile> clearFiles()
StoreFileManagerclearFiles 在接口中 StoreFileManagerpublic com.google.common.collect.ImmutableCollection<StoreFile> clearCompactedFiles()
StoreFileManagerclearCompactedFiles 在接口中 StoreFileManagerpublic int getStorefileCount()
StoreFileManagergetStorefileCount 在接口中 StoreFileManagerpublic Iterator<StoreFile> getCandidateFilesForRowKeyBefore(KeyValue targetKey)
StoreFileManager.getCandidateFilesForRowKeyBefore(KeyValue)
for details on this methods.getCandidateFilesForRowKeyBefore 在接口中 StoreFileManagertargetKey - The key that is the basis of the search.public Iterator<StoreFile> updateCandidateFilesForRowKeyBefore(Iterator<StoreFile> candidateFiles, KeyValue targetKey, Cell candidate)
StoreFileManager.getCandidateFilesForRowKeyBefore(KeyValue) and
StoreFileManager.updateCandidateFilesForRowKeyBefore(Iterator, KeyValue, Cell)
for details on this methods.updateCandidateFilesForRowKeyBefore 在接口中 StoreFileManagercandidateFiles - The candidate files not yet checked for better candidates - return
value from StoreFileManager.getCandidateFilesForRowKeyBefore(KeyValue),
with some files already removed.targetKey - The key to search for.candidate - The current best candidate found.public byte[] getSplitPoint()
throws IOException
StoreFileManagergetSplitPoint 在接口中 StoreFileManagerIOExceptionpublic Collection<StoreFile> getFilesForScanOrGet(byte[] startRow, boolean includeStartRow, byte[] stopRow, boolean includeStopRow)
StoreFileManagergetFilesForScanOrGet 在接口中 StoreFileManagerstartRow - Start row of the request.stopRow - Stop row of the request.public void addCompactionResults(Collection<StoreFile> compactedFiles, Collection<StoreFile> results) throws IOException
StoreFileManageraddCompactionResults 在接口中 StoreFileManagercompactedFiles - The input files for the compaction.results - The resulting files for the compaction.IOExceptionpublic void removeCompactedFiles(Collection<StoreFile> compactedFiles) throws IOException
StoreFileManagerremoveCompactedFiles 在接口中 StoreFileManagercompactedFiles - the list of compacted filesIOExceptionpublic int getStoreCompactionPriority()
getStoreCompactionPriority 在接口中 StoreFileManagerpublic final byte[] getStartRow(int stripeIndex)
getStartRow 在接口中 StripeCompactionPolicy.StripeInformationProviderstripeIndex - Stripe index.public final byte[] getEndRow(int stripeIndex)
getEndRow 在接口中 StripeCompactionPolicy.StripeInformationProviderstripeIndex - Stripe index.public List<StoreFile> getLevel0Files()
getLevel0Files 在接口中 StripeCompactionPolicy.StripeInformationProviderpublic List<byte[]> getStripeBoundaries()
getStripeBoundaries 在接口中 StripeCompactionPolicy.StripeInformationProviderpublic ArrayList<com.google.common.collect.ImmutableList<StoreFile>> getStripes()
getStripes 在接口中 StripeCompactionPolicy.StripeInformationProviderpublic int getStripeCount()
getStripeCount 在接口中 StripeCompactionPolicy.StripeInformationProviderpublic Collection<StoreFile> getUnneededFiles(long maxTs, List<StoreFile> filesCompacting)
getUnneededFiles 在接口中 StoreFileManagermaxTs - Maximum expired timestamp.filesCompacting - Files that are currently compacting.public double getCompactionPressure()
getCompactionPressure 在接口中 StoreFileManagerStore.getCompactionPressure()public Comparator<StoreFile> getStoreFileComparator()
getStoreFileComparator 在接口中 StoreFileManagerStoreFile.getMaxSequenceId() is the first priority.Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.