Package org.apache.spark.streaming.util
Class HdfsUtils
Object
org.apache.spark.streaming.util.HdfsUtils
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckFileExists(String path, org.apache.hadoop.conf.Configuration conf) Check if the file exists at the given path.static voidcheckState(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.FileSystemgetFileSystemForPath(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf) static org.apache.hadoop.fs.FSDataInputStreamgetInputStream(String path, org.apache.hadoop.conf.Configuration conf) static org.apache.hadoop.fs.FSDataOutputStreamgetOutputStream(String path, org.apache.hadoop.conf.Configuration conf)  
- 
Constructor Details
- 
HdfsUtils
public HdfsUtils() 
 - 
 - 
Method Details
- 
getOutputStream
public static org.apache.hadoop.fs.FSDataOutputStream getOutputStream(String path, org.apache.hadoop.conf.Configuration conf)  - 
getInputStream
public static org.apache.hadoop.fs.FSDataInputStream getInputStream(String path, org.apache.hadoop.conf.Configuration conf)  - 
checkState
 - 
getFileSegmentLocations
public 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. - 
getFileSystemForPath
public static org.apache.hadoop.fs.FileSystem getFileSystemForPath(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)  - 
checkFileExists
Check if the file exists at the given path. 
 -