org.apache.accumulo.examples.simple.filedata
Class ChunkInputStream
java.lang.Object
java.io.InputStream
org.apache.accumulo.examples.simple.filedata.ChunkInputStream
- All Implemented Interfaces:
- Closeable
public class ChunkInputStream
- extends InputStream
An input stream that reads file data stored in one or more Accumulo values. Used by ChunkInputFormat
to present input streams to a mapper.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
source
protected PeekingIterator<Map.Entry<Key,Value>> source
currentKey
protected Key currentKey
currentVis
protected Set<org.apache.hadoop.io.Text> currentVis
currentChunk
protected int currentChunk
currentChunkSize
protected int currentChunkSize
gotEndMarker
protected boolean gotEndMarker
buf
protected byte[] buf
count
protected int count
pos
protected int pos
ChunkInputStream
public ChunkInputStream()
ChunkInputStream
public ChunkInputStream(PeekingIterator<Map.Entry<Key,Value>> in)
throws IOException
- Throws:
IOException
setSource
public void setSource(PeekingIterator<Map.Entry<Key,Value>> in)
throws IOException
- Throws:
IOException
getVisibilities
public Set<org.apache.hadoop.io.Text> getVisibilities()
read
public int read()
throws IOException
- Specified by:
read
in class InputStream
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read
in class InputStream
- Throws:
IOException
clear
public void clear()
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class InputStream
- Throws:
IOException
Copyright © 2013 Apache Accumulo Project. All Rights Reserved.