|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<V>
org.terrier.structures.collections.FSArrayFile<V>
V - Type of Writablepublic class FSArrayFile<V extends org.apache.hadoop.io.Writable>
A file for accessing Writable classes written on disk. These must be of fixed size. This implementation is read-only, but does implement the List interface.
| Nested Class Summary | |
|---|---|
static class |
FSArrayFile.ArrayFileIterator<V extends org.apache.hadoop.io.Writable>
ArrayFileIterator class |
static interface |
FSArrayFile.ArrayFileWriter
interface ArrayFileWriter |
| Field Summary | |
|---|---|
protected RandomDataInput |
dataFile
actual underlying data file |
protected java.lang.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 java.lang.String |
USUAL_EXTENSION
USUAL_EXTENSION |
protected FixedSizeWriteableFactory<V> |
valueFactory
|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
protected |
FSArrayFile()
|
|
FSArrayFile(Index index,
java.lang.String structureName)
constructor |
|
FSArrayFile(java.lang.String filename,
boolean updateable,
FixedSizeWriteableFactory<V> _valueFactory)
default constructor |
| Method Summary | |
|---|---|
void |
close()
|
V |
get(int entryNumber)
|
java.util.Iterator<V> |
iterator()
|
int |
size()
|
static FSArrayFile.ArrayFileWriter |
writeFSArrayFile(java.lang.String filename)
writeFSArrayFile |
| Methods inherited from class java.util.AbstractList |
|---|
add, add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Field Detail |
|---|
public static final java.lang.String USUAL_EXTENSION
protected FixedSizeWriteableFactory<V extends org.apache.hadoop.io.Writable> valueFactory
protected int numberOfEntries
protected int entrySize
protected RandomDataInput dataFile
protected java.lang.String dataFilename
| Constructor Detail |
|---|
protected FSArrayFile()
public FSArrayFile(Index index,
java.lang.String structureName)
throws java.io.IOException
index - structureName -
java.io.IOException
public FSArrayFile(java.lang.String filename,
boolean updateable,
FixedSizeWriteableFactory<V> _valueFactory)
throws java.io.IOException
filename - updateable - _valueFactory -
java.io.IOException| Method Detail |
|---|
public int size()
size in interface java.util.Collection<V extends org.apache.hadoop.io.Writable>size in interface java.util.List<V extends org.apache.hadoop.io.Writable>size in class java.util.AbstractCollection<V extends org.apache.hadoop.io.Writable>public V get(int entryNumber)
get in interface java.util.List<V extends org.apache.hadoop.io.Writable>get in class java.util.AbstractList<V extends org.apache.hadoop.io.Writable>public java.util.Iterator<V> iterator()
iterator in interface java.lang.Iterable<V extends org.apache.hadoop.io.Writable>iterator in interface java.util.Collection<V extends org.apache.hadoop.io.Writable>iterator in interface java.util.List<V extends org.apache.hadoop.io.Writable>iterator in class java.util.AbstractList<V extends org.apache.hadoop.io.Writable>
public static FSArrayFile.ArrayFileWriter writeFSArrayFile(java.lang.String filename)
throws java.io.IOException
filename -
java.io.IOException
public void close()
throws java.io.IOException
close in interface java.io.Closeablejava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||