BigDecimalSplitter (Hadoop 0.20.2-cdh3u1 API)
Date: 2011-07-18

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.mapreduce.lib.db
Class BigDecimalSplitter

    java.lang.Object
      org.apache.hadoop.mapreduce.lib.db.BigDecimalSplitter

All Implemented Interfaces:
  DBSplitter

Direct Known Subclasses:
  TextSplitter

    public class BigDecimalSplitter

extends Object
implements DBSplitter

Implement DBSplitter over BigDecimal values.

Constructor Summary
`BigDecimalSplitter()`

Method Summary
`List<InputSplit>` | `split(Configuration conf, ResultSet results, String colName)` Given a ResultSet containing one record (and already advanced to that record) with two columns (a low value, and a high value, both of the same type), determine a set of splits that span the given values.
`protected BigDecimal` | `tryDivide(BigDecimal numerator, BigDecimal denominator)` Divide numerator by denominator.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BigDecimalSplitter

    public BigDecimalSplitter()

Method Detail

### split

    public List<InputSplit> split(Configuration conf,
                                  ResultSet results,
                                  String colName)
                           throws SQLException

  Description copied from interface: `DBSplitter`
  Given a ResultSet containing one record (and already advanced to that record) with two columns (a low value, and a high value, both of the same type), determine a set of splits that span the given values.

  Specified by:
    `split` in interface `DBSplitter`
  Throws:
    `SQLException`

### tryDivide

    protected BigDecimal tryDivide(BigDecimal numerator,
                                   BigDecimal denominator)

  Divide numerator by denominator. If impossible in exact mode, use rounding.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation