|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@InterfaceAudience.Public @InterfaceStability.Evolving public interface LoadCaster
An interface that provides cast implementations for load functions. For casts between bytearray objects and internal types, Pig relies on the load function that loaded the data to provide the cast. This is because Pig does not understand the binary representation of the data and thus cannot cast it. This interface provides functions to cast from bytearray to each of Pig's internal types.
Method Summary | |
---|---|
DataBag |
bytesToBag(byte[] b,
ResourceSchema.ResourceFieldSchema fieldSchema)
Cast data from bytearray to bag value. |
String |
bytesToCharArray(byte[] b)
Cast data from bytearray to chararray value. |
Double |
bytesToDouble(byte[] b)
Cast data from bytearray to double value. |
Float |
bytesToFloat(byte[] b)
Cast data from bytearray to float value. |
Integer |
bytesToInteger(byte[] b)
Cast data from bytearray to integer value. |
Long |
bytesToLong(byte[] b)
Cast data from bytearray to long value. |
Map<String,Object> |
bytesToMap(byte[] b)
Deprecated. |
Map<String,Object> |
bytesToMap(byte[] b,
ResourceSchema.ResourceFieldSchema fieldSchema)
Cast data from bytearray to map value. |
Tuple |
bytesToTuple(byte[] b,
ResourceSchema.ResourceFieldSchema fieldSchema)
Cast data from bytearray to tuple value. |
Method Detail |
---|
Long bytesToLong(byte[] b) throws IOException
b
- bytearray to be cast.
IOException
- if the value cannot be cast.Float bytesToFloat(byte[] b) throws IOException
b
- bytearray to be cast.
IOException
- if the value cannot be cast.Double bytesToDouble(byte[] b) throws IOException
b
- bytearray to be cast.
IOException
- if the value cannot be cast.Integer bytesToInteger(byte[] b) throws IOException
b
- bytearray to be cast.
IOException
- if the value cannot be cast.String bytesToCharArray(byte[] b) throws IOException
b
- bytearray to be cast.
IOException
- if the value cannot be cast.@Deprecated Map<String,Object> bytesToMap(byte[] b) throws IOException
b
- bytearray to be cast.
IOException
- if the value cannot be cast.Map<String,Object> bytesToMap(byte[] b, ResourceSchema.ResourceFieldSchema fieldSchema) throws IOException
b
- bytearray to be cast.fieldSchema
- field schema for the output map
IOException
- if the value cannot be cast.Tuple bytesToTuple(byte[] b, ResourceSchema.ResourceFieldSchema fieldSchema) throws IOException
b
- bytearray to be cast.fieldSchema
- field schema for the output tuple
IOException
- if the value cannot be cast.DataBag bytesToBag(byte[] b, ResourceSchema.ResourceFieldSchema fieldSchema) throws IOException
b
- bytearray to be cast.fieldSchema
- field schema for the output bag
IOException
- if the value cannot be cast.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |