EPiC
Efficient Privacy-Preserving Counting for MapReduce
 All Classes Namespaces Functions Variables
Public Member Functions | Static Public Member Functions | Static Package Functions
mapred.Count Class Reference

EPiC MapReduce main class. More...

Inherits Configured, and Tool.

List of all members.

Public Member Functions

int run (String[] args) throws Exception
 Run the job.

Static Public Member Functions

static void main (String[] args) throws Exception
 Entry point of the class.

Static Package Functions

static DataInput getInput (Path[] files, String name)
 Returns the data input interface for a file with specified patterns among given file paths.

Detailed Description

EPiC MapReduce main class.

Based on provided parameters via command line, an appropriate MapReduce class is executed. Currently, there are two implementation of counting job that can be called via Count:

MapRedEpic
EPiC approach - counting on encrypted fields.
MapRedPlainCountOne
Plain-text counting.

Usage of Count via command-line:

hadoop jar <JARFILE> mapred.Count [options] <input> <output>

JARFILE
The JAR file containing EPiC.
input
A HDFS path to the directory containing the input data.
Note: Only input files in the specified directory which start with "data" are read.
output
A HDFS path to the directory containing the results.
Note: Existing output will be automatically removed when Count is started.

The options given to Hadoop must be prefixed by "-D". The following options are supported:

paramfile
Name of the encryption parameters file. Path to the parameters file must be relative to this class inside the the JAR file.
Example: -Dparamfile=params.txt
request
A HDFS path to the user's request file containing the counting query. The specified path is relative to the input directory.
Example: -Drequest=request
mapred
Specifies which MapReduce approach to be executed. Currently the following values are supported:
epic

Calling MapRedEpic to execute the query, which applies a variant version of the approach presented in the EPiC paper. Precisely, based on the provided request, which contains the encrypted coefficients of the queried indicator polynomial, the Mappers evaluate the indicator polynomial for each record by multiplying the monomials with the coefficients before adding them together. In the last step at the Reducer, those results from Mappers (now considered as the value of the indicator polynomial evaluated for the corresponding subsets) are added together to obtain the final results and return to the user.

The approach presented in the EPiC paper is implemented in MapRedEpicReducerEvaluate, in which the Mappers compute the monomials without multiplying with the coefficients. At the final step, the Reducer adds those results from the Mappers together and then multiplies with the given coefficients to yield the final results.

An older approach of EPiC (see MapRedNotSendCoeff) is to keep the coefficients at the user side. The Mappers and Reducers only need to compute the monomials and add them together, then return to the user, who will be responsible to multiply the results with the precomputed coefficients to obtain the counting result. This, however, requires much more communication for downloading the results, therefore, is impractical.

plain
Calling MapRedPlainCountOne to count on plain-text values of the multiple countable fields. This implementation does not support range counting, boolean expressions, etc. Another illustration of plain-text counting is implemented in MapRedPlainCountAll which counts all possible values in one MapReduce job.
Example: -Dmapred=epic
Author:
vohuudtr

Member Function Documentation

static DataInput mapred.Count.getInput ( Path[]  files,
String  name 
) [inline, static, package]

Returns the data input interface for a file with specified patterns among given file paths.

This method should be used inside the package only.

Parameters:
filesset of files.
namepattern that ends the files.
Returns:
the data input interface corresponding to the matched file.
static void mapred.Count.main ( String[]  args) throws Exception [inline, static]

Entry point of the class.

Parameters:
argscommand-line arguments provided to the class.
Exceptions:
Exceptionif errors occur.
int mapred.Count.run ( String[]  args) throws Exception [inline]

Run the job.

Parameters:
argsargument list for the running job.
Exceptions:
Exceptionif errors occur.

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