public class ZKSplitLog extends Object
SplitLogManager
and
SplitLogWorker
Modifier and Type | Class and Description |
---|---|
static class |
ZKSplitLog.Counters |
static class |
ZKSplitLog.TaskState |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_RESUBMIT |
static int |
DEFAULT_TIMEOUT |
static int |
DEFAULT_UNASSIGNED_TIMEOUT |
static int |
DEFAULT_ZK_RETRIES |
Constructor and Description |
---|
ZKSplitLog() |
Modifier and Type | Method and Description |
---|---|
static String |
decode(String s) |
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 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) |
public static final int DEFAULT_TIMEOUT
public static final int DEFAULT_ZK_RETRIES
public static final int DEFAULT_MAX_RESUBMIT
public static final int DEFAULT_UNASSIGNED_TIMEOUT
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(ZooKeeperWatcher zkw, String path)
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
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.