org.apache.hadoop.hbase.zookeeper
Class ZKSplitLog

java.lang.Object
  extended by 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.


Constructor Summary
ZKSplitLog()
           
 
Method Summary
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 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 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZKSplitLog

public ZKSplitLog()
Method Detail

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 reference
filename - 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(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 © 2013 The Apache Software Foundation. All Rights Reserved.