org.apache.datasketches.pig.sampling

## Class VarOptSampling.Final

- java.lang.Object
- - org.apache.pig.EvalFunc<org.apache.pig.data.DataBag>
  - - org.apache.datasketches.pig.sampling.VarOptSampling.Final

Enclosing class:
  VarOptSampling

    public static class VarOptSampling.Final
    extends org.apache.pig.EvalFunc<org.apache.pig.data.DataBag>

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.pig.EvalFunc

`org.apache.pig.EvalFunc.SchemaType`

### Field Summary

### Fields inherited from class org.apache.pig.EvalFunc

`log, pigLogger, reporter, returnType`

### Constructor Summary

Constructors
Constructor and Description
`Final()`
`Final(String kStr)` Reducer VarOpt sampling constructor.
`Final(String kStr, String weightIdxStr)` VarOpt sampling constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`org.apache.pig.data.DataBag` `exec(org.apache.pig.data.Tuple inputTuple)`

### Methods inherited from class org.apache.pig.EvalFunc

`allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, outputSchema, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### Final

    public Final()

#### Final

    public Final(String kStr)

Reducer VarOpt sampling constructor.

Parameters:
  `kStr` - String indicating the maximum number of desired samples to return.

#### Final

    public Final(String kStr,
                 String weightIdxStr)

VarOpt sampling constructor.

Parameters:
  `kStr` - String indicating the maximum number of desired samples to return.
  `weightIdxStr` - String indicating column index (0-based) of weight values

### Method Detail

#### exec

    public org.apache.pig.data.DataBag exec(org.apache.pig.data.Tuple inputTuple)
                                     throws IOException

Specified by:
  `exec` in class `org.apache.pig.EvalFunc<org.apache.pig.data.DataBag>`
Throws:
  `IOException`