LineRecordReader.next(LongWritable key, Text value)
LineReader.readLine(Text str, int maxLineLength, int maxBytesToConsume)
DataInputStream.read(byte b[]) /* DFSDataInputStream继承此方法 */
DFSInputStream.read(long position, byte[] buffer, int offset, int length)
DFSInputStream.fetchBlockByteRange(LocatedBlock block, long start,long end, byte[] buf, int offset)
BlockReader.readAll(byte[] buf, int offset, int len)
FSInputChecker.readFully(InputStream stm, byte[] buf, int offset, int len)
BlockReader.read(byte[] buf, int off, int len)
FSInputChecker.read(byte[] b, int off, int len)
FSInputChecker.read1(byte b[], int off, int len)
FSInputChecker.readChecksumChunk(byte b[], final int off, final int len)
BlockReader.readChunk(long pos, byte[] buf, int offset, int len, byte[] checksumBuf)
IOUtils.readFullyreadFully( InputStream in, byte buf[], int off, int len)
DataInputStream.read(byte b[], int off, int len)
BufferedInputStream.read(byte b[], int off, int len)
BufferedInputStream.read1(byte[] b, int off, int len)
org.apache.hadoop.net.SocketInputStream.read(byte[] b, int off, int len)
org.apache.hadoop.net.SocketInputStream.read(ByteBuffer dst)
org.apache.hadoop.net.SocketIOWithTimeout.doIO(ByteBuffer buf, int ops)
org.apache.hadoop.net.SocketInputStream.Reader.performIO(ByteBuffer buf)
sun.nio.ch.SocketChannelImpl.read(ByteBuffer buf)
sun.nio.ch.IOUtiil.read(FileDescriptor fd, ByteBuffer dst, long position, NativeDispatcher nd, Object lock)
sun.nio.ch.IOUtiil.readIntoNativeBuffer(FileDescriptor fd, ByteBuffer bb, long position, NativeDispatcher nd,Object lock)
sun.nio.ch.SocketDispatcher.read(FileDescriptor fd, long address, int len)
sun.nio.ch.SocketDispatcher.read0(FileDescriptor fd, long address, int len) /* Native Method,根据不同的JDK实现不同 */
hey! 我在源码里插标记测试了一下,好像并不会调用 DFSInputStream.read(long position, byte buffer, int offset, int length) 和 DFSInputStream.fetchBlockByteRange(LocatedBlock block, long start,long end, byte buf, int offset)
而是 DFSInputStream.read(byte buffer, int offset, int length) 。
也就是不指定position的read方法。 :)
我测试的源码是0.20.2的,不知楼主是哪个版本
这个问题也在困扰我,能否解答下?
如果jobconf指定的FS是本地的文件系统,不上传到HDFS中,那如何能够实现在各个节点实现分布式的计算?
从不会上传.
提交Job任务,输入文件的问题 通过它:FileInputFormat.addInputPath(jobconf, new Path(args)); 指定执行M/R作业的文件的路径。 这些文件可能有不同的来源,如本地文件系统,或者分布式文件系统。 1.最终都会上传到Hadoop的HDFS中吗? 2.这个过程是啥时候上传上去的? 3.如果数据来源已经存在了HDFS中,那么还会再上传一次吗?
嗯,:-)
人肉跟踪, 手工打出来的~
请问这个怎么弄出来的呢? :D