|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcommon.Record
public class Record
Definition of a record used by the application.
Each record has a fixed size that can be changed via blocksize
.
Each record also has a fixed number of fields.
Note: for convenient experiments, a generated record contains twice the number of countable fields defined in the parameter file, i.e. if the number of countable fields is m, the actual number of fields defined in each record is 2m, where an even-indexed 2k-th field contains the encrypted value of the k-th field, while an odd-indexed (2k+1)-th field contains the plain-text value of the k-th field.
Field Summary | |
---|---|
static int |
blocksize
Specifies a fixed size in bytes for each record. |
Constructor Summary | |
---|---|
Record()
Initializes the record with zero fields. |
|
Record(int numFields)
Initializes the record with a given number of fields. |
Method Summary | |
---|---|
BigIntegerWritable |
getField(int i)
Return values of the specified field. |
int |
getNumFields()
Returns the number of fields in the record (not considering random bytes of the rest). |
int |
getSize()
Returns total size in bytes of all fields in the record, not including the rest of random bytes. |
void |
readFields(java.io.DataInput in)
Re-initializes the record by reading from the input stream. |
void |
setField(int i,
BigIntegerWritable value)
Set value of the specified field. |
void |
write(java.io.DataOutput out)
Writes the record to the given output stream using the format specified in readFields(DataInput) . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int blocksize
Constructor Detail |
---|
public Record()
public Record(int numFields)
numFields
- number of fields.Method Detail |
---|
public void readFields(java.io.DataInput in) throws java.io.IOException
Format of record in the input is as follows:
BigIntegerWritable
format.
readFields
in interface org.apache.hadoop.io.Writable
java.io.IOException
public void write(java.io.DataOutput out) throws java.io.IOException
readFields(DataInput)
.
write
in interface org.apache.hadoop.io.Writable
java.io.IOException
public int getSize()
public BigIntegerWritable getField(int i)
i
- index of the field.
public void setField(int i, BigIntegerWritable value)
i
- index of the field.value
- value of the field.public int getNumFields()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |