EPiC
Efficient Privacy-Preserving Counting for MapReduce
 All Classes Namespaces Functions Variables
Public Member Functions
mapred.BigIntegerWritable Class Reference

Provides an immutable implementation of a big integer for use in Hadoop framework. More...

Inherits Writable.

List of all members.

Public Member Functions

 BigIntegerWritable ()
 Default constructor without initialization.
 BigIntegerWritable (int n)
 Constructs a BigIntegerWritable object from an integer.
 BigIntegerWritable (BigInteger n)
 Constructs a BigIntegerWritable object from a Java BigInteger object.
 BigIntegerWritable (DataInput in) throws IOException
 Constructs a BigIntegerWritable object from the input stream.
void readFields (DataInput in) throws IOException
 Initializes the object by reading data from the input stream.
void write (DataOutput out) throws IOException
 Writes the object into the specified output stream.
int getSize ()
 Returns the total size in bytes representing the value of the object.
BigIntegerWritable add (BigIntegerWritable a)
 Returns a new BigIntegerWritable object with value equal to the sum of this object's value and another object's value.
BigIntegerWritable multiply (BigIntegerWritable a)
 Returns a new BigIntegerWritable object with value equal to the product of this object's value and another object's value.
String toString ()
 Returns a string representing this object.

Detailed Description

Provides an immutable implementation of a big integer for use in Hadoop framework.

Similarly to the Java BigInteger class, this class supports two basic mathematical operations: addition and multiplication. Besides, it also implements the Writable interface to support reading and writing operations in Hadoop framework.

Author:
vohuudtr

Constructor & Destructor Documentation

Default constructor without initialization.

This constructor is needed for the iterator used in the reduce method of MapRed-classes. Therefore, one should manually initialize the value of this object after using this constructor.

Constructs a BigIntegerWritable object from an integer.

Parameters:
ninitialized value for the constructed object.

Constructs a BigIntegerWritable object from a Java BigInteger object.

Parameters:
ninitialized value for the constructed object.
mapred.BigIntegerWritable.BigIntegerWritable ( DataInput  in) throws IOException [inline]

Constructs a BigIntegerWritable object from the input stream.

This constructor is a short-hand for initializing the object with the default constructor and calling readFields(DataInput) to read the value from the input stream.

Parameters:
ininput stream
Exceptions:
IOExceptionif IO errors occur.
See also:
readFields(DataInput) for storing format of the object in the stream.

Member Function Documentation

Returns a new BigIntegerWritable object with value equal to the sum of this object's value and another object's value.

Parameters:
aanother object.
Returns:
result of the addition.

Returns the total size in bytes representing the value of the object.

Returns:
total size in bytes.

Returns a new BigIntegerWritable object with value equal to the product of this object's value and another object's value.

Parameters:
aanother object.
Returns:
result of the multiplication.
void mapred.BigIntegerWritable.readFields ( DataInput  in) throws IOException [inline]

Initializes the object by reading data from the input stream.

The object is stored in a stream as an ordered sequence of bytes:

  • First 4 bytes represents an integer which specifies the number of bytes used for storing the "big-integer" value of this object.
  • The value of the object as an array of bytes with the length specified in the above 4 bytes. The bytes storing order depends on the Java BigInteger implementation.
Parameters:
ininput stream.
Exceptions:
IOExceptionif IO errors occur.
void mapred.BigIntegerWritable.write ( DataOutput  out) throws IOException [inline]

Writes the object into the specified output stream.

The sequence of bytes representing the object is in the format described in readFields(DataInput).

Parameters:
outoutput stream.
Exceptions:
IOExceptionif IO errors occur.
See also:
readFields(DataInput) for storing format of the object in the stream.

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