Constructor and Description |
---|
Builder(ReduceOp defaultOp)
Create a Reducer builder, and set the default column reduction operation.
|
Modifier and Type | Method and Description |
---|---|
Reducer.Builder |
appendColumns(String... columns)
Reduce the specified columns by taking the concatenation of all content
Beware, the output will be huge!
|
Reducer |
build() |
Reducer.Builder |
conditionalReduction(String column,
List<String> outputNames,
List<ReduceOp> reductions,
Condition condition)
Conditional reduction: apply the reduces on a specified column, where the reduction occurs *only* on those
examples where the condition returns true.
|
Reducer.Builder |
conditionalReduction(String column,
String outputName,
ReduceOp reduction,
Condition condition)
Conditional reduction: apply the reduces on a specified column, where the reduction occurs *only* on those
examples where the condition returns true.
|
Reducer.Builder |
countColumns(String... columns)
Reduce the specified columns by counting the number of values
|
Reducer.Builder |
countUniqueColumns(String... columns)
Reduce the specified columns by counting the number of unique values
|
Reducer.Builder |
customReduction(String column,
AggregableColumnReduction columnReduction)
Reduce the specified column using a custom column reduction functionality.
|
Reducer.Builder |
keyColumns(String... keyColumns)
Specify the key columns.
|
Reducer.Builder |
maxColumn(String... columns)
Reduce the specified columns by taking the maximum value
|
Reducer.Builder |
meanColumns(String... columns)
Reduce the specified columns by taking the mean of the values
|
Reducer.Builder |
minColumns(String... columns)
Reduce the specified columns by taking the minimum value
|
Reducer.Builder |
multipleOpColmumns(List<ReduceOp> ops,
String... columns) |
Reducer.Builder |
populationVariance(String... columns)
Reduce the specified columns by taking the population variance of the values
|
Reducer.Builder |
prependColumns(String... columns)
Reduce the specified columns by taking the concatenation of all content in the reverse order
Beware, the output will be huge!
|
Reducer.Builder |
prodColumns(String... columns)
Reduce the specified columns by taking the product of values
|
Reducer.Builder |
rangeColumns(String... columns)
Reduce the specified columns by taking the range (max-min) of the values
|
Reducer.Builder |
setIgnoreInvalid(String... columns)
When doing the reduction: set the specified columns to ignore any invalid values.
|
Reducer.Builder |
stdevColumns(String... columns)
Reduce the specified columns by taking the standard deviation of the values
|
Reducer.Builder |
sumColumns(String... columns)
Reduce the specified columns by taking the sum of values
|
Reducer.Builder |
takeFirstColumns(String... columns)
Reduce the specified columns by taking the first value
|
Reducer.Builder |
takeLastColumns(String... columns)
Reduce the specified columns by taking the last value
|
Reducer.Builder |
uncorrectedStdevColumns(String... columns)
Reduce the specified columns by taking the uncorrected standard deviation of the values
|
Reducer.Builder |
variance(String... columns)
Reduce the specified columns by taking the variance of the values
|
public Builder(ReduceOp defaultOp)
defaultOp
- Default reduction operation to performpublic Reducer.Builder keyColumns(String... keyColumns)
keyColumns
- Columns that will make up the keypublic Reducer.Builder multipleOpColmumns(List<ReduceOp> ops, String... columns)
public Reducer.Builder minColumns(String... columns)
public Reducer.Builder maxColumn(String... columns)
public Reducer.Builder sumColumns(String... columns)
public Reducer.Builder prodColumns(String... columns)
public Reducer.Builder meanColumns(String... columns)
public Reducer.Builder stdevColumns(String... columns)
public Reducer.Builder uncorrectedStdevColumns(String... columns)
public Reducer.Builder variance(String... columns)
public Reducer.Builder populationVariance(String... columns)
public Reducer.Builder countColumns(String... columns)
public Reducer.Builder rangeColumns(String... columns)
public Reducer.Builder countUniqueColumns(String... columns)
public Reducer.Builder takeFirstColumns(String... columns)
public Reducer.Builder takeLastColumns(String... columns)
public Reducer.Builder appendColumns(String... columns)
public Reducer.Builder prependColumns(String... columns)
public Reducer.Builder customReduction(String column, AggregableColumnReduction columnReduction)
column
- Column to execute the custom reduction functionality oncolumnReduction
- Column reduction to execute on that columnpublic Reducer.Builder conditionalReduction(String column, List<String> outputNames, List<ReduceOp> reductions, Condition condition)
column
- Name of the column to execute the conditional reduction onoutputName
- Name of the column, after the reduction has been executedreductions
- Reductions to executecondition
- Condition to use in the reductionspublic Reducer.Builder conditionalReduction(String column, String outputName, ReduceOp reduction, Condition condition)
column
- Name of the column to execute the conditional reduction onoutputName
- Name of the column, after the reduction has been executedreductions
- Reductions to executecondition
- Condition to use in the reductionspublic Reducer.Builder setIgnoreInvalid(String... columns)
ColumnMetaData.isValid(Writable)
.
For numerical columns, this typically means being unable to parse the Writable. For example, Writable.toLong() failing for a Long column.
If the column has any restrictions (min/max values, regex for Strings etc) these will also be taken into account.columns
- Columns to set 'ignore invalid' forpublic Reducer build()
Copyright © 2018. All rights reserved.