org.apache.hadoop.hdfs
Class DFSClient.DFSDataInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by java.io.DataInputStream
              extended by org.apache.hadoop.fs.FSDataInputStream
                  extended by org.apache.hadoop.hdfs.DFSClient.DFSDataInputStream
All Implemented Interfaces:
Closeable, DataInput, org.apache.hadoop.fs.PositionedReadable, org.apache.hadoop.fs.Seekable
Enclosing class:
DFSClient

@InterfaceAudience.Private
public static class DFSClient.DFSDataInputStream
extends org.apache.hadoop.fs.FSDataInputStream

The Hdfs implementation of FSDataInputStream


Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
DFSClient.DFSDataInputStream(org.apache.hadoop.hdfs.DFSInputStream in)
           
 
Method Summary
 Block getCurrentBlock()
          Returns the block containing the target position.
 DatanodeInfo getCurrentDatanode()
          Returns the datanode from which the stream is currently reading.
 long getVisibleLength()
           
 
Methods inherited from class org.apache.hadoop.fs.FSDataInputStream
getPos, read, readFully, readFully, seek, seekToNewSource
 
Methods inherited from class java.io.DataInputStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DFSClient.DFSDataInputStream

public DFSClient.DFSDataInputStream(org.apache.hadoop.hdfs.DFSInputStream in)
                             throws IOException
Throws:
IOException
Method Detail

getCurrentDatanode

public DatanodeInfo getCurrentDatanode()
Returns the datanode from which the stream is currently reading.


getCurrentBlock

public Block getCurrentBlock()
Returns the block containing the target position.


getVisibleLength

public long getVisibleLength()
                      throws IOException
Returns:
The visible length of the file.
Throws:
IOException


Copyright © 2009 The Apache Software Foundation