public class HdfsUtils
extends Object
Constructor and Description |
---|
HdfsUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
checkFileExists(String path,
org.apache.hadoop.conf.Configuration conf)
Check if the file exists at the given path.
|
static void |
checkState(boolean state,
scala.Function0<String> errorMsg) |
static String[] |
getFileSegmentLocations(String path,
long offset,
long length,
org.apache.hadoop.conf.Configuration conf)
Get the locations of the HDFS blocks containing the given file segment.
|
static org.apache.hadoop.fs.FileSystem |
getFileSystemForPath(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf) |
static org.apache.hadoop.fs.FSDataInputStream |
getInputStream(String path,
org.apache.hadoop.conf.Configuration conf) |
static org.apache.hadoop.fs.FSDataOutputStream |
getOutputStream(String path,
org.apache.hadoop.conf.Configuration conf) |
public static org.apache.hadoop.fs.FSDataOutputStream getOutputStream(String path, org.apache.hadoop.conf.Configuration conf)
public static org.apache.hadoop.fs.FSDataInputStream getInputStream(String path, org.apache.hadoop.conf.Configuration conf)
public static void checkState(boolean state, scala.Function0<String> errorMsg)
public static String[] getFileSegmentLocations(String path, long offset, long length, org.apache.hadoop.conf.Configuration conf)
public static org.apache.hadoop.fs.FileSystem getFileSystemForPath(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)
public static boolean checkFileExists(String path, org.apache.hadoop.conf.Configuration conf)