Package org.apache.spark.streaming.util
Class HdfsUtils
Object
org.apache.spark.streaming.util.HdfsUtils
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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- 
HdfsUtilspublic HdfsUtils()
 
- 
- 
Method Details- 
getOutputStreampublic static org.apache.hadoop.fs.FSDataOutputStream getOutputStream(String path, org.apache.hadoop.conf.Configuration conf) 
- 
getInputStreampublic static org.apache.hadoop.fs.FSDataInputStream getInputStream(String path, org.apache.hadoop.conf.Configuration conf) 
- 
checkState
- 
getFileSegmentLocationspublic 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.
- 
getFileSystemForPathpublic static org.apache.hadoop.fs.FileSystem getFileSystemForPath(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf) 
- 
checkFileExistsCheck if the file exists at the given path.
 
-