@InterfaceAudience.Private public class ZKSplitLog extends Object
SplitLogManager
and
SplitLogWorker
running distributed splitting of WAL logs.Modifier and Type | Field and Description |
---|---|
private static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
ZKSplitLog() |
Modifier and Type | Method and Description |
---|---|
(package private) static String |
decode(String s) |
static void |
deleteRecoveringRegionZNodes(ZooKeeperWatcher watcher,
List<String> regions) |
(package private) static String |
encode(String s) |
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 org.apache.hadoop.hbase.protobuf.generated.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 org.apache.hadoop.fs.Path |
getSplitLogDir(org.apache.hadoop.fs.Path rootdir,
String tmpname) |
static String |
getSplitLogDirTmpComponent(String worker,
String file) |
static boolean |
isCorrupted(org.apache.hadoop.fs.Path rootdir,
String logFileName,
org.apache.hadoop.fs.FileSystem fs) |
static boolean |
isRegionMarkedRecoveringInZK(ZooKeeperWatcher zkw,
String regionEncodedName)
check if /hbase/recovering-regions/<current region encoded name>
exists.
|
static boolean |
isRescanNode(String name) |
static boolean |
isRescanNode(ZooKeeperWatcher zkw,
String path) |
static boolean |
isTaskPath(ZooKeeperWatcher zkw,
String path) |
static void |
markCorrupted(org.apache.hadoop.fs.Path rootdir,
String logFileName,
org.apache.hadoop.fs.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 org.apache.hadoop.fs.Path getSplitLogDir(org.apache.hadoop.fs.Path rootdir, String tmpname)
public static String getSplitLogDirTmpComponent(String worker, String file)
public static void markCorrupted(org.apache.hadoop.fs.Path rootdir, String logFileName, org.apache.hadoop.fs.FileSystem fs)
public static boolean isCorrupted(org.apache.hadoop.fs.Path rootdir, String logFileName, org.apache.hadoop.fs.FileSystem fs) throws IOException
IOException
public static boolean isRegionMarkedRecoveringInZK(ZooKeeperWatcher zkw, String regionEncodedName) throws org.apache.zookeeper.KeeperException
zkw
- regionEncodedName
- region encode nameorg.apache.zookeeper.KeeperException
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 org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.RegionStoreSequenceIds getRegionFlushedSequenceId(ZooKeeperWatcher zkw, String serverName, String encodedRegionName) throws IOException
zkw
- serverName
- encodedRegionName
- serverName
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.