V
- Type of Writablepublic class FSArrayFile<V extends org.apache.hadoop.io.Writable> extends AbstractList<V> implements Closeable
Modifier and Type | Class and Description |
---|---|
static class |
FSArrayFile.ArrayFileIterator<V extends org.apache.hadoop.io.Writable>
ArrayFileIterator class
|
static interface |
FSArrayFile.ArrayFileWriter
interface ArrayFileWriter
|
Modifier and Type | Field and Description |
---|---|
protected RandomDataInput |
dataFile
actual underlying data file
|
protected String |
dataFilename
filename of the underlying file
|
protected int |
entrySize
total size of one key,value pair
|
protected int |
numberOfEntries
The number of entries in the file.
|
static String |
USUAL_EXTENSION
USUAL_EXTENSION
|
protected FixedSizeWriteableFactory<V> |
valueFactory |
modCount
Modifier | Constructor and Description |
---|---|
protected |
FSArrayFile() |
|
FSArrayFile(IndexOnDisk index,
String structureName)
constructor
|
|
FSArrayFile(String filename,
boolean updateable,
FixedSizeWriteableFactory<V> _valueFactory)
default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
V |
get(int entryNumber) |
Iterator<V> |
iterator() |
int |
size() |
static FSArrayFile.ArrayFileWriter |
writeFSArrayFile(String filename)
writeFSArrayFile
|
add, add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
public static final String USUAL_EXTENSION
protected FixedSizeWriteableFactory<V extends org.apache.hadoop.io.Writable> valueFactory
protected int numberOfEntries
protected int entrySize
protected RandomDataInput dataFile
protected String dataFilename
protected FSArrayFile()
public FSArrayFile(IndexOnDisk index, String structureName) throws IOException
index
- structureName
- IOException
public FSArrayFile(String filename, boolean updateable, FixedSizeWriteableFactory<V> _valueFactory) throws IOException
filename
- updateable
- _valueFactory
- IOException
public int size()
size
in interface Collection<V extends org.apache.hadoop.io.Writable>
size
in interface List<V extends org.apache.hadoop.io.Writable>
size
in class AbstractCollection<V extends org.apache.hadoop.io.Writable>
public V get(int entryNumber)
public Iterator<V> iterator()
iterator
in interface Iterable<V extends org.apache.hadoop.io.Writable>
iterator
in interface Collection<V extends org.apache.hadoop.io.Writable>
iterator
in interface List<V extends org.apache.hadoop.io.Writable>
iterator
in class AbstractList<V extends org.apache.hadoop.io.Writable>
public static FSArrayFile.ArrayFileWriter writeFSArrayFile(String filename) throws IOException
filename
- IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Terrier 4.0. Copyright © 2004-2014 University of Glasgow