EPiC
Efficient Privacy-Preserving Counting for MapReduce
 All Classes Namespaces Functions Variables
Public Member Functions | Static Public Attributes
common.Record Class Reference

Definition of a record used by the application. More...

Inherits Writable.

List of all members.

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.

Detailed Description

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.

Author:
vohuudtr

Constructor & Destructor Documentation

common.Record.Record ( int  numFields) [inline]

Initializes the record with a given number of fields.

Parameters:
numFieldsnumber of fields.

Member Function Documentation

Return values of the specified field.

Parameters:
iindex of the field.
Returns:
value of the field.
int common.Record.getNumFields ( ) [inline]

Returns the number of fields in the record (not considering random bytes of the rest).

Returns:
number of fields.
int common.Record.getSize ( ) [inline]

Returns total size in bytes of all fields in the record, not including the rest of random bytes.

Returns:
total size.
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:

  • First 4 bytes represent an integer, which specifies the number of fields (2m).
  • Field 1 (i.e. encrypted field 1).
  • Field 2 (i.e. plain-text field 1).
  • Field 3 (i.e. encrypted field 2).
  • Field 4 (i.e. plain-text field 2).
  • ...
  • Field 2m (i.e. encrypted field m).
  • Field 2m+1 (i.e. plain-text field m).
  • Remaining random bytes for other fields that are not considered.

All fields are in BigIntegerWritable format.

void common.Record.setField ( int  i,
BigIntegerWritable  value 
) [inline]

Set value of the specified field.

Parameters:
iindex of the field.
valuevalue of the field.

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables