|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.structures.indexing.singlepass.hadoop.WritableByteArray
public class WritableByteArray
Represents a Writable Posting List. This can contain in addition to the posting list, the Document Frequency and Term Frequency. This class is needed because Hadoop must know how to write out the intermediate map output during indexing
Field Summary | |
---|---|
protected byte[] |
array
Posting List |
protected int |
arraylength
Size of the Posting List |
protected int |
DocumentFreq
Document Frequency |
protected int |
TermFreq
Term Frequency |
Constructor Summary | |
---|---|
WritableByteArray()
Empty Constructor |
|
WritableByteArray(int c)
Constructor - with Document Frequency |
|
WritableByteArray(int c,
int c2)
Constructor - with Document Frequency and Term Frequency |
Method Summary | |
---|---|
static WritableByteArray |
create_Hadoop_WritableByteArray(byte[] b)
Factory Method |
static WritableByteArray |
create_Hadoop_WritableByteArray(byte[] b,
int c)
Factory Method |
static WritableByteArray |
create_Hadoop_WritableByteArray(byte[] b,
int c,
int c2)
Factory Method |
byte[] |
getArray()
Gets the byte array |
int |
getDocumentFreq()
Get the document frequency |
int |
getTermFreq()
Get the term frequency |
void |
readFields(java.io.DataInput arg0)
Read this object from the input stream 'in' |
void |
setArray(byte[] b)
Sets the byte array |
void |
setDocumentFreq(int _DocumentFreq)
Set the document frequency |
void |
setTermFrequency(int _TermFreq)
Set the term frequency |
java.lang.String |
toString()
|
void |
write(java.io.DataOutput arg0)
Write this object to the output stream 'out' |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected byte[] array
protected int DocumentFreq
protected int TermFreq
protected int arraylength
Constructor Detail |
---|
public WritableByteArray()
public WritableByteArray(int c)
c
- - Document Frequencypublic WritableByteArray(int c, int c2)
c
- - Document Frequencyc2
- - Term FrequencyMethod Detail |
---|
public static WritableByteArray create_Hadoop_WritableByteArray(byte[] b) throws java.io.IOException
b
- - Posting List
java.io.IOException
public static WritableByteArray create_Hadoop_WritableByteArray(byte[] b, int c) throws java.io.IOException
b
- - Posting Listc
- - Document Frequency
java.io.IOException
public static WritableByteArray create_Hadoop_WritableByteArray(byte[] b, int c, int c2) throws java.io.IOException
b
- - Posting Listc
- - Document Frequencyc2
- - Term Frequency
java.io.IOException
public void readFields(java.io.DataInput arg0) throws java.io.IOException
readFields
in interface org.apache.hadoop.io.Writable
java.io.IOException
public void write(java.io.DataOutput arg0) throws java.io.IOException
write
in interface org.apache.hadoop.io.Writable
java.io.IOException
public void setArray(byte[] b)
public byte[] getArray()
public java.lang.String toString()
toString
in class java.lang.Object
public int getDocumentFreq()
public void setDocumentFreq(int _DocumentFreq)
public int getTermFreq()
public void setTermFrequency(int _TermFreq)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |