Definition of a record used by the application. More...
Inherits Writable.
Public Member Functions | |
Record () | |
Initializes the record with zero fields. | |
Record (int numFields) | |
Initializes the record with a given number of fields. | |
void | readFields (DataInput in) throws IOException |
Re-initializes the record by reading from the input stream. | |
void | write (DataOutput out) throws IOException |
Writes the record to the given output stream using the format specified in readFields(DataInput). | |
int | getSize () |
Returns total size in bytes of all fields in the record, not including the rest of random bytes. | |
BigIntegerWritable | getField (int i) |
Return values of the specified field. | |
void | setField (int i, BigIntegerWritable value) |
Set value of the specified field. | |
int | getNumFields () |
Returns the number of fields in the record (not considering random bytes of the rest). | |
Static Public Attributes | |
static int | blocksize = 1000000 |
Specifies a fixed size in bytes for each 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.
common.Record.Record | ( | int | numFields | ) | [inline] |
Initializes the record with a given number of fields.
numFields | number of fields. |
BigIntegerWritable common.Record.getField | ( | int | i | ) | [inline] |
Return values of the specified field.
i | index of the field. |
int common.Record.getNumFields | ( | ) | [inline] |
Returns the number of fields in the record (not considering random bytes of the rest).
int common.Record.getSize | ( | ) | [inline] |
Returns total size in bytes of all fields in the record, not including the rest of random bytes.
void common.Record.readFields | ( | DataInput | in | ) | throws IOException [inline] |
Re-initializes the record by reading from the input stream.
Format of record in the input is as follows:
All fields are in BigIntegerWritable format.
void common.Record.setField | ( | int | i, |
BigIntegerWritable | value | ||
) | [inline] |
Set value of the specified field.
i | index of the field. |
value | value of the field. |