Package org.apache.iceberg.hadoop
Class HadoopInputFile
java.lang.Object
org.apache.iceberg.hadoop.HadoopInputFile
- All Implemented Interfaces:
NativelyEncryptedFile,InputFile
InputFile implementation using the Hadoop FileSystem API.
This class is based on Parquet's HadoopInputFile.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanexists()Checks whether the file exists.static HadoopInputFilefromLocation(CharSequence location, long length, org.apache.hadoop.conf.Configuration conf) static HadoopInputFilefromLocation(CharSequence location, long length, org.apache.hadoop.fs.FileSystem fs) static HadoopInputFilefromLocation(CharSequence location, org.apache.hadoop.conf.Configuration conf) static HadoopInputFilefromLocation(CharSequence location, org.apache.hadoop.fs.FileSystem fs) static HadoopInputFilefromPath(org.apache.hadoop.fs.Path path, long length, org.apache.hadoop.conf.Configuration conf) static HadoopInputFilefromPath(org.apache.hadoop.fs.Path path, long length, org.apache.hadoop.fs.FileSystem fs) static HadoopInputFilefromPath(org.apache.hadoop.fs.Path path, long length, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration conf) static HadoopInputFilefromPath(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf) static HadoopInputFilefromPath(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.FileSystem fs) static HadoopInputFilefromPath(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration conf) static HadoopInputFilefromStatus(org.apache.hadoop.fs.FileStatus stat, org.apache.hadoop.conf.Configuration conf) static HadoopInputFilefromStatus(org.apache.hadoop.fs.FileStatus stat, org.apache.hadoop.fs.FileSystem fs) static HadoopInputFilefromStatus(org.apache.hadoop.fs.FileStatus stat, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration conf) String[]getBlockLocations(long start, long end) org.apache.hadoop.conf.ConfigurationgetConf()org.apache.hadoop.fs.FileSystemlongReturns the total length of the file, in bytesorg.apache.hadoop.fs.PathgetPath()org.apache.hadoop.fs.FileStatusgetStat()location()The fully-qualified location of the input file as a String.Opens a newSeekableInputStreamfor the underlying data filevoidsetNativeCryptoParameters(NativeFileCryptoParameters nativeCryptoParameters) toString()
-
Field Details
-
NO_LOCATION_PREFERENCE
-
-
Method Details
-
fromLocation
public static HadoopInputFile fromLocation(CharSequence location, org.apache.hadoop.conf.Configuration conf) -
fromLocation
public static HadoopInputFile fromLocation(CharSequence location, long length, org.apache.hadoop.conf.Configuration conf) -
fromLocation
public static HadoopInputFile fromLocation(CharSequence location, org.apache.hadoop.fs.FileSystem fs) -
fromLocation
public static HadoopInputFile fromLocation(CharSequence location, long length, org.apache.hadoop.fs.FileSystem fs) -
fromPath
public static HadoopInputFile fromPath(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf) -
fromPath
public static HadoopInputFile fromPath(org.apache.hadoop.fs.Path path, long length, org.apache.hadoop.conf.Configuration conf) -
fromPath
public static HadoopInputFile fromPath(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.FileSystem fs) -
fromPath
public static HadoopInputFile fromPath(org.apache.hadoop.fs.Path path, long length, org.apache.hadoop.fs.FileSystem fs) -
fromPath
public static HadoopInputFile fromPath(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration conf) -
fromPath
public static HadoopInputFile fromPath(org.apache.hadoop.fs.Path path, long length, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration conf) -
fromStatus
public static HadoopInputFile fromStatus(org.apache.hadoop.fs.FileStatus stat, org.apache.hadoop.conf.Configuration conf) -
fromStatus
public static HadoopInputFile fromStatus(org.apache.hadoop.fs.FileStatus stat, org.apache.hadoop.fs.FileSystem fs) -
fromStatus
public static HadoopInputFile fromStatus(org.apache.hadoop.fs.FileStatus stat, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration conf) -
getLength
public long getLength()Description copied from interface:InputFileReturns the total length of the file, in bytes -
newStream
Description copied from interface:InputFileOpens a newSeekableInputStreamfor the underlying data file -
getConf
public org.apache.hadoop.conf.Configuration getConf() -
getFileSystem
public org.apache.hadoop.fs.FileSystem getFileSystem() -
getStat
public org.apache.hadoop.fs.FileStatus getStat() -
getPath
public org.apache.hadoop.fs.Path getPath() -
getBlockLocations
-
location
Description copied from interface:InputFileThe fully-qualified location of the input file as a String. -
exists
public boolean exists()Description copied from interface:InputFileChecks whether the file exists. -
nativeCryptoParameters
- Specified by:
nativeCryptoParametersin interfaceNativelyEncryptedFile
-
setNativeCryptoParameters
- Specified by:
setNativeCryptoParametersin interfaceNativelyEncryptedFile
-
toString
-