org.apache.datasketches.pig.sampling

## Class ArrayOfTuplesSerDe

- java.lang.Object
- - org.apache.datasketches.ArrayOfItemsSerDe<org.apache.pig.data.Tuple>
  - - org.apache.datasketches.pig.sampling.ArrayOfTuplesSerDe

    public class ArrayOfTuplesSerDe
    extends org.apache.datasketches.ArrayOfItemsSerDe<org.apache.pig.data.Tuple>

This `ArrayOfItemsSerDe` implementation takes advantage of the Pig methods used in Pig's own BinStorage to serialize arbitrary `Tuple` data.

Author:
  Jon Malkin

### Constructor Summary

Constructors
Constructor and Description
`ArrayOfTuplesSerDe()`

### Method Summary

All Methods Instance Methods Concrete Methods
`org.apache.pig.data.Tuple[]` `deserializeFromMemory(org.apache.datasketches.memory.Memory mem, int numItems)`
`byte[]` `serializeToByteArray(org.apache.pig.data.Tuple[] items)`

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

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

### Constructor Detail

#### ArrayOfTuplesSerDe

    public ArrayOfTuplesSerDe()

### Method Detail

#### serializeToByteArray

    public byte[] serializeToByteArray(org.apache.pig.data.Tuple[] items)

Specified by:
  `serializeToByteArray` in class `org.apache.datasketches.ArrayOfItemsSerDe<org.apache.pig.data.Tuple>`

#### deserializeFromMemory

    public org.apache.pig.data.Tuple[] deserializeFromMemory(org.apache.datasketches.memory.Memory mem,
                                                             int numItems)

Specified by:
  `deserializeFromMemory` in class `org.apache.datasketches.ArrayOfItemsSerDe<org.apache.pig.data.Tuple>`