This project has retired. For details please refer to its Attic page.
BigDecimalSerializer (Sqoop 1.4.2 API)

com.cloudera.sqoop.lib
Class BigDecimalSerializer

java.lang.Object
  extended by com.cloudera.sqoop.lib.BigDecimalSerializer

Deprecated. use org.apache.sqoop.lib.BigDecimalSerializer instead.

public final class BigDecimalSerializer
extends java.lang.Object

Serialize BigDecimal classes to/from DataInput and DataOutput objects. BigDecimal is comprised of a BigInteger with an integer 'scale' field. The BigDecimal/BigInteger can also return itself as a 'long' value. We serialize in one of two formats: First, check whether the BigInt can fit in a long: boolean b = BigIntegerPart > LONG_MAX || BigIntegerPart < LONG_MIN [int: scale][boolean: b == false][long: BigInt-part] [int: scale][boolean: b == true][string: BigInt-part.toString()] TODO(aaron): Get this to work with Hadoop's Serializations framework.

See Also:
BigDecimalSerializer

Method Summary
static java.math.BigDecimal readFields(java.io.DataInput in)
          Deprecated.  
static void write(java.math.BigDecimal d, java.io.DataOutput out)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

write

public static void write(java.math.BigDecimal d,
                         java.io.DataOutput out)
                  throws java.io.IOException
Deprecated. 
Throws:
java.io.IOException

readFields

public static java.math.BigDecimal readFields(java.io.DataInput in)
                                       throws java.io.IOException
Deprecated. 
Throws:
java.io.IOException


Copyright © 2012 The Apache Software Foundation