org.apache.hadoop.hbase.zookeeper
Class ZKSplitLog
java.lang.Object
org.apache.hadoop.hbase.zookeeper.ZKSplitLog
public class ZKSplitLog
- extends Object
Common methods and attributes used by SplitLogManager
and
SplitLogWorker
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_TIMEOUT
public static final int DEFAULT_TIMEOUT
- See Also:
- Constant Field Values
DEFAULT_ZK_RETRIES
public static final int DEFAULT_ZK_RETRIES
- See Also:
- Constant Field Values
DEFAULT_MAX_RESUBMIT
public static final int DEFAULT_MAX_RESUBMIT
- See Also:
- Constant Field Values
DEFAULT_UNASSIGNED_TIMEOUT
public static final int DEFAULT_UNASSIGNED_TIMEOUT
- See Also:
- Constant Field Values
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)
encode
public static String encode(String s)
decode
public static String decode(String s)
getRescanNode
public static String getRescanNode(ZooKeeperWatcher zkw)
isRescanNode
public static boolean isRescanNode(ZooKeeperWatcher zkw,
String path)
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 © 2014 The Apache Software Foundation. All Rights Reserved.