@InterfaceAudience.Private public final class WALSplitUtil extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
WALSplitUtil.MutationReplay
A struct used by getMutationsFromWALEntry
|
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
finishSplitLogFile(String logfile,
org.apache.hadoop.conf.Configuration conf)
Completes the work done by splitLogFile by archiving logs
It is invoked by SplitLogManager once it knows that one of the SplitLogWorkers have completed
the splitLogFile() part.
|
static long |
getMaxRegionSequenceId(org.apache.hadoop.conf.Configuration conf,
RegionInfo region,
ConcurrentMapUtils.IOExceptionSupplier<org.apache.hadoop.fs.FileSystem> rootFsSupplier,
ConcurrentMapUtils.IOExceptionSupplier<org.apache.hadoop.fs.FileSystem> walFsSupplier)
已过时。
Only for compatibility, will be removed in 4.0.0.
|
static long |
getMaxRegionSequenceId(org.apache.hadoop.fs.FileSystem walFS,
org.apache.hadoop.fs.Path regionDir)
Get the max sequence id which is stored in the region directory. -1 if none.
|
static List<WALSplitUtil.MutationReplay> |
getMutationsFromWALEntry(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.WALEntry entry,
CellScanner cells,
Pair<WALKey,WALEdit> logEntry,
Durability durability)
This function is used to construct mutations from a WALEntry.
|
static org.apache.hadoop.fs.Path |
getRegionDirRecoveredEditsDir(org.apache.hadoop.fs.Path regionDir) |
static NavigableSet<org.apache.hadoop.fs.Path> |
getSplitEditFilesSorted(org.apache.hadoop.fs.FileSystem walFS,
org.apache.hadoop.fs.Path regionDir)
Returns sorted set of edit files made by splitter, excluding files with '.temp' suffix.
|
static boolean |
hasRecoveredEdits(org.apache.hadoop.conf.Configuration conf,
RegionInfo regionInfo)
Check whether there is recovered.edits in the region dir
|
static boolean |
isSequenceIdFile(org.apache.hadoop.fs.Path file)
Is the given file a region open sequence id file.
|
static org.apache.hadoop.fs.Path |
moveAsideBadEditsFile(org.apache.hadoop.fs.FileSystem walFS,
org.apache.hadoop.fs.Path edits)
Move aside a bad edits file.
|
static void |
writeRegionSequenceIdFile(org.apache.hadoop.fs.FileSystem walFS,
org.apache.hadoop.fs.Path regionDir,
long newMaxSeqId)
Create a file with name as region's max sequence id
|
public static void finishSplitLogFile(String logfile, org.apache.hadoop.conf.Configuration conf) throws IOException
It is invoked by SplitLogManager once it knows that one of the SplitLogWorkers have completed the splitLogFile() part. If the master crashes then this function might get called multiple times.
logfile - conf - IOExceptionpublic static org.apache.hadoop.fs.Path getRegionDirRecoveredEditsDir(org.apache.hadoop.fs.Path regionDir)
regionDir - This regions directory in the filesystem.regionDirpublic static boolean hasRecoveredEdits(org.apache.hadoop.conf.Configuration conf,
RegionInfo regionInfo)
throws IOException
conf - confregionInfo - the region to checkIOException@Deprecated public static long getMaxRegionSequenceId(org.apache.hadoop.conf.Configuration conf, RegionInfo region, ConcurrentMapUtils.IOExceptionSupplier<org.apache.hadoop.fs.FileSystem> rootFsSupplier, ConcurrentMapUtils.IOExceptionSupplier<org.apache.hadoop.fs.FileSystem> walFsSupplier) throws IOException
getMaxRegionSequenceId(FileSystem, Path) until 4.0.0 release.IOExceptionpublic static NavigableSet<org.apache.hadoop.fs.Path> getSplitEditFilesSorted(org.apache.hadoop.fs.FileSystem walFS, org.apache.hadoop.fs.Path regionDir) throws IOException
walFS - WAL FileSystem used to retrieving split edits files.regionDir - WAL region dir to look for recovered edits files under.regionDir as a sorted set.IOExceptionpublic static org.apache.hadoop.fs.Path moveAsideBadEditsFile(org.apache.hadoop.fs.FileSystem walFS,
org.apache.hadoop.fs.Path edits)
throws IOException
walFS - WAL FileSystem used to rename bad edits file.edits - Edits file to move aside.IOExceptionpublic static boolean isSequenceIdFile(org.apache.hadoop.fs.Path file)
public static long getMaxRegionSequenceId(org.apache.hadoop.fs.FileSystem walFS,
org.apache.hadoop.fs.Path regionDir)
throws IOException
IOExceptionpublic static void writeRegionSequenceIdFile(org.apache.hadoop.fs.FileSystem walFS,
org.apache.hadoop.fs.Path regionDir,
long newMaxSeqId)
throws IOException
IOExceptionpublic static List<WALSplitUtil.MutationReplay> getMutationsFromWALEntry(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.WALEntry entry, CellScanner cells, Pair<WALKey,WALEdit> logEntry, Durability durability) throws IOException
entry - cells - logEntry - pair of WALKey and WALEdit instance stores WALKey and WALEdit instances
extracted from the passed in WALEntry.IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.