@InterfaceAudience.Private public final class ZKSplitLog extends Object
Modifier and Type | Method and Description |
---|---|
static String |
getEncodedNodeName(ZKWatcher zkw,
String filename)
Gets the full path node name for the log file being split.
|
static String |
getFileName(String node) |
static String |
getRescanNode(ZKWatcher zkw) |
static org.apache.hadoop.fs.Path |
getSplitLogDir(org.apache.hadoop.fs.Path rootdir,
String tmpname) |
static boolean |
isCorrupted(org.apache.hadoop.fs.Path rootdir,
String logFileName,
org.apache.hadoop.fs.FileSystem fs) |
static boolean |
isRescanNode(String name) |
static boolean |
isRescanNode(ZKWatcher zkw,
String path)
Checks if the given path represents a rescan node.
|
static void |
markCorrupted(org.apache.hadoop.fs.Path rootdir,
String logFileName,
org.apache.hadoop.fs.FileSystem fs) |
public static String getEncodedNodeName(ZKWatcher zkw, String filename)
zkw
- zk referencefilename
- log file name (only the basename)public static boolean isRescanNode(String name)
name
- the last part in pathpublic static boolean isRescanNode(ZKWatcher zkw, String path)
zkw
- reference to the ZKWatcher
which also contains configuration and constantspath
- the absolute path, starts with '/'public static org.apache.hadoop.fs.Path getSplitLogDir(org.apache.hadoop.fs.Path rootdir, String tmpname)
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 © 2007–2019 Cloudera. All rights reserved.