public final class Utils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
addS3Credentials(org.apache.hadoop.conf.Configuration conf)
Adds S3 keys to the given Hadoop Configuration object if the user has specified them using
System properties, and they're not already set.
|
static org.apache.hadoop.fs.Path |
getHDFSPath(TachyonURI path,
String ufsAddress)
Returns an HDFS path for the given Tachyon path and under filesystem address.
|
static String |
getPathWithoutScheme(org.apache.hadoop.fs.Path path)
Given a
Path path, it returns the path component of its URI, which has the form
scheme://authority/path. |
static String |
getTachyonFileName(String path)
Given a
String path, returns an equivalent Tachyon path. |
static String |
toStringHadoopFileSplit(org.apache.hadoop.mapred.FileSplit fs)
Returns a string representation of a Hadoop
FileSplit . |
static String |
toStringHadoopFileStatus(org.apache.hadoop.fs.FileStatus fs)
Returns a string representation of a Hadoop
FileStatus . |
static String |
toStringHadoopInputSplit(org.apache.hadoop.mapred.InputSplit is)
Returns a string representation of a
InputSplit . |
public static org.apache.hadoop.fs.Path getHDFSPath(TachyonURI path, String ufsAddress)
path
- Tachyon pathufsAddress
- under filesystem addresspublic static String getPathWithoutScheme(org.apache.hadoop.fs.Path path)
Path
path, it returns the path component of its URI, which has the form
scheme://authority/path.path
- an HDFS Path
Path
URIpublic static String getTachyonFileName(String path)
String
path, returns an equivalent Tachyon path.path
- the path to parsepublic static String toStringHadoopFileSplit(org.apache.hadoop.mapred.FileSplit fs)
FileSplit
.fs
- Hadoop FileSplit
public static String toStringHadoopFileStatus(org.apache.hadoop.fs.FileStatus fs)
FileStatus
.fs
- Hadoop FileStatus
public static String toStringHadoopInputSplit(org.apache.hadoop.mapred.InputSplit is)
InputSplit
.is
- Hadoop InputSplit
public static void addS3Credentials(org.apache.hadoop.conf.Configuration conf)
conf
- Hadoop configurationCopyright © 2015. All Rights Reserved.