org.apache.hadoop.hbase.zookeeper
Class ZKSplitLog
java.lang.Object
org.apache.hadoop.hbase.zookeeper.ZKSplitLog
@InterfaceAudience.Private
public class ZKSplitLog
- extends Object
Common methods and attributes used by SplitLogManager
and SplitLogWorker
running distributed splitting of WAL logs.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZKSplitLog
public ZKSplitLog()
getEncodedNodeName
public static String getEncodedNodeName(ZooKeeperWatcher zkw,
String filename)
- Gets the full path node name for the log file being split.
This method will url encode the filename.
- Parameters:
zkw
- zk referencefilename
- log file name (only the basename)
getFileName
public static String getFileName(String node)
getRescanNode
public static String getRescanNode(ZooKeeperWatcher zkw)
isRescanNode
public static boolean isRescanNode(String name)
- Parameters:
name
- the last part in path
- Returns:
- whether the node name represents a rescan node
isRescanNode
public static boolean isRescanNode(ZooKeeperWatcher zkw,
String path)
- Parameters:
zkw
- path
- the absolute path, starts with '/'
- Returns:
- whether the path represents a rescan node
isTaskPath
public static boolean isTaskPath(ZooKeeperWatcher zkw,
String path)
getSplitLogDir
public static org.apache.hadoop.fs.Path getSplitLogDir(org.apache.hadoop.fs.Path rootdir,
String tmpname)
getSplitLogDirTmpComponent
public static String getSplitLogDirTmpComponent(String worker,
String file)
markCorrupted
public static void markCorrupted(org.apache.hadoop.fs.Path rootdir,
String logFileName,
org.apache.hadoop.fs.FileSystem fs)
isCorrupted
public static boolean isCorrupted(org.apache.hadoop.fs.Path rootdir,
String logFileName,
org.apache.hadoop.fs.FileSystem fs)
throws IOException
- Throws:
IOException
Copyright © 2015 The Apache Software Foundation. All rights reserved.