@InterfaceAudience.Private public class ZKSplitLog extends Object
SplitLogManager
and
SplitLogWorker
running distributed splitting of WAL logs.Constructor and Description |
---|
ZKSplitLog() |
Modifier and Type | Method and Description |
---|---|
static void |
deleteRecoveringRegionZNodes(ZooKeeperWatcher watcher,
List<String> regions) |
static String |
getEncodedNodeName(ZooKeeperWatcher zkw,
String filename)
Gets the full path node name for the log file being split.
|
static String |
getFileName(String node) |
static ClusterStatusProtos.RegionStoreSequenceIds |
getRegionFlushedSequenceId(ZooKeeperWatcher zkw,
String serverName,
String encodedRegionName)
This function is used in distributedLogReplay to fetch last flushed sequence id from ZK
|
static String |
getRescanNode(ZooKeeperWatcher zkw) |
static Path |
getSplitLogDir(Path rootdir,
String tmpname) |
static String |
getSplitLogDirTmpComponent(String worker,
String file) |
static boolean |
isCorrupted(Path rootdir,
String logFileName,
FileSystem fs) |
static boolean |
isRegionMarkedRecoveringInZK(ZooKeeperWatcher zkw,
String regionEncodedName)
check if /hbase/recovering-regions/
|
static boolean |
isRescanNode(String name) |
static boolean |
isRescanNode(ZooKeeperWatcher zkw,
String path) |
static boolean |
isTaskPath(ZooKeeperWatcher zkw,
String path) |
static void |
markCorrupted(Path rootdir,
String logFileName,
FileSystem fs) |
static long |
parseLastFlushedSequenceIdFrom(byte[] bytes) |
public static String getEncodedNodeName(ZooKeeperWatcher zkw, String filename)
zkw
- zk referencefilename
- log file name (only the basename)public static String getRescanNode(ZooKeeperWatcher zkw)
public static boolean isRescanNode(String name)
name
- the last part in pathpublic static boolean isRescanNode(ZooKeeperWatcher zkw, String path)
zkw
- path
- the absolute path, starts with '/'public static boolean isTaskPath(ZooKeeperWatcher zkw, String path)
public static Path getSplitLogDir(Path rootdir, String tmpname)
public static String getSplitLogDirTmpComponent(String worker, String file)
public static void markCorrupted(Path rootdir, String logFileName, FileSystem fs)
public static boolean isCorrupted(Path rootdir, String logFileName, FileSystem fs) throws IOException
IOException
public static boolean isRegionMarkedRecoveringInZK(ZooKeeperWatcher zkw, String regionEncodedName) throws KeeperException
zkw
- regionEncodedName
- region encode nameKeeperException
public static long parseLastFlushedSequenceIdFrom(byte[] bytes)
bytes
- - Content of a failed region server or recovering region znode.public static void deleteRecoveringRegionZNodes(ZooKeeperWatcher watcher, List<String> regions)
public static ClusterStatusProtos.RegionStoreSequenceIds getRegionFlushedSequenceId(ZooKeeperWatcher zkw, String serverName, String encodedRegionName) throws IOException
zkw
- serverName
- encodedRegionName
- serverName
IOException