org.apache.pig
Interface LoadCaster

All Known Implementing Classes:
BinStorage, TextLoader, Utf8StorageConverter

public interface LoadCaster


Method Summary
 DataBag bytesToBag(byte[] b, ResourceSchema.ResourceFieldSchema fieldSchema)
          Cast data from bytes to bag value.
 String bytesToCharArray(byte[] b)
          Cast data from bytes to chararray value.
 Double bytesToDouble(byte[] b)
          Cast data from bytes to double value.
 Float bytesToFloat(byte[] b)
          Cast data from bytes to float value.
 Integer bytesToInteger(byte[] b)
          Cast data from bytes to integer value.
 Long bytesToLong(byte[] b)
          Cast data from bytes to long value.
 Map<String,Object> bytesToMap(byte[] b)
          Cast data from bytes to map value.
 Tuple bytesToTuple(byte[] b, ResourceSchema.ResourceFieldSchema fieldSchema)
          Cast data from bytes to tuple value.
 

Method Detail

bytesToLong

Long bytesToLong(byte[] b)
                 throws IOException
Cast data from bytes to long value.

Parameters:
b - byte array to be cast.
Returns:
Long value.
Throws:
IOException - if the value cannot be cast.

bytesToFloat

Float bytesToFloat(byte[] b)
                   throws IOException
Cast data from bytes to float value.

Parameters:
b - byte array to be cast.
Returns:
Float value.
Throws:
IOException - if the value cannot be cast.

bytesToDouble

Double bytesToDouble(byte[] b)
                     throws IOException
Cast data from bytes to double value.

Parameters:
b - byte array to be cast.
Returns:
Double value.
Throws:
IOException - if the value cannot be cast.

bytesToInteger

Integer bytesToInteger(byte[] b)
                       throws IOException
Cast data from bytes to integer value.

Parameters:
b - byte array to be cast.
Returns:
Double value.
Throws:
IOException - if the value cannot be cast.

bytesToCharArray

String bytesToCharArray(byte[] b)
                        throws IOException
Cast data from bytes to chararray value.

Parameters:
b - byte array to be cast.
Returns:
String value.
Throws:
IOException - if the value cannot be cast.

bytesToMap

Map<String,Object> bytesToMap(byte[] b)
                              throws IOException
Cast data from bytes to map value.

Parameters:
b - byte array to be cast.
Returns:
Map value.
Throws:
IOException - if the value cannot be cast.

bytesToTuple

Tuple bytesToTuple(byte[] b,
                   ResourceSchema.ResourceFieldSchema fieldSchema)
                   throws IOException
Cast data from bytes to tuple value.

Parameters:
b - byte array to be cast.
fieldSchema - field schema for the output tuple
Returns:
Tuple value.
Throws:
IOException - if the value cannot be cast.

bytesToBag

DataBag bytesToBag(byte[] b,
                   ResourceSchema.ResourceFieldSchema fieldSchema)
                   throws IOException
Cast data from bytes to bag value.

Parameters:
b - byte array to be cast.
fieldSchema - field schema for the output bag
Returns:
Bag value.
Throws:
IOException - if the value cannot be cast.


Copyright © ${year} The Apache Software Foundation