public class AccumuloRowSerializer extends Object
ColumnMappings| Constructor and Description |
|---|
AccumuloRowSerializer(int primaryKeyOffset,
LazySerDeParameters serDeParams,
List<ColumnMapping> mappings,
org.apache.accumulo.core.security.ColumnVisibility visibility,
AccumuloRowIdFactory rowIdFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
getSerializedValue(ObjectInspector fieldObjectInspector,
Object value,
ByteStream.Output output,
ColumnMapping mapping)
Compute the serialized value from the given element and object inspectors.
|
protected org.apache.accumulo.core.security.ColumnVisibility |
getVisibility() |
org.apache.accumulo.core.data.Mutation |
serialize(Object obj,
ObjectInspector objInspector) |
protected void |
serializeColumnMapping(HiveAccumuloColumnMapping columnMapping,
ObjectInspector fieldObjectInspector,
Object value,
org.apache.accumulo.core.data.Mutation mutation) |
protected void |
serializeColumnMapping(HiveAccumuloMapColumnMapping columnMapping,
ObjectInspector fieldObjectInspector,
Object value,
org.apache.accumulo.core.data.Mutation mutation)
Serialize the Hive Map into an Accumulo row
|
protected byte[] |
serializeRowId(Object rowId,
StructField rowIdField,
ColumnMapping rowIdMapping)
Serialize an Accumulo rowid
|
protected void |
writeBinary(ByteStream.Output output,
Object value,
PrimitiveObjectInspector inspector) |
protected void |
writeSerializedPrimitive(PrimitiveObjectInspector objectInspector,
ByteStream.Output output,
Object value,
ColumnEncoding encoding)
Serialize the given primitive to the given output buffer, using the provided encoding
mechanism.
|
protected void |
writeString(ByteStream.Output output,
Object value,
PrimitiveObjectInspector inspector) |
protected void |
writeWithLevel(ObjectInspector oi,
Object value,
ByteStream.Output output,
ColumnMapping mapping,
int level)
Recursively serialize an Object using its
ObjectInspector, respecting the
separators defined by the LazySerDeParameters. |
public AccumuloRowSerializer(int primaryKeyOffset,
LazySerDeParameters serDeParams,
List<ColumnMapping> mappings,
org.apache.accumulo.core.security.ColumnVisibility visibility,
AccumuloRowIdFactory rowIdFactory)
public org.apache.accumulo.core.data.Mutation serialize(Object obj, ObjectInspector objInspector) throws SerDeException, IOException
SerDeExceptionIOExceptionprotected void serializeColumnMapping(HiveAccumuloColumnMapping columnMapping, ObjectInspector fieldObjectInspector, Object value, org.apache.accumulo.core.data.Mutation mutation) throws IOException
IOExceptionprotected void serializeColumnMapping(HiveAccumuloMapColumnMapping columnMapping, ObjectInspector fieldObjectInspector, Object value, org.apache.accumulo.core.data.Mutation mutation) throws IOException
IOExceptionprotected byte[] serializeRowId(Object rowId, StructField rowIdField, ColumnMapping rowIdMapping) throws IOException
IOExceptionprotected byte[] getSerializedValue(ObjectInspector fieldObjectInspector, Object value, ByteStream.Output output, ColumnMapping mapping) throws IOException
fieldObjectInspector - ObjectInspector for the column value being serializedvalue - The Object itself being serializedoutput - A temporary buffer to reduce object creationIOException - An error occurred when performing IO to serialize the dataprotected void writeWithLevel(ObjectInspector oi, Object value, ByteStream.Output output, ColumnMapping mapping, int level) throws IOException
ObjectInspector, respecting the
separators defined by the LazySerDeParameters.oi - ObjectInspector for the current objectvalue - The current objectoutput - A buffer output is written tomapping - The mapping for this Hive columnlevel - The current level/offset for the SerDe separatorIOExceptionprotected void writeSerializedPrimitive(PrimitiveObjectInspector objectInspector, ByteStream.Output output, Object value, ColumnEncoding encoding) throws IOException
objectInspector - The PrimitiveObjectInspector for this Objectoutput - A buffer to write the serialized value tovalue - The Object being serializedencoding - The means in which the Object should be serializedIOExceptionprotected void writeBinary(ByteStream.Output output, Object value, PrimitiveObjectInspector inspector) throws IOException
IOExceptionprotected void writeString(ByteStream.Output output, Object value, PrimitiveObjectInspector inspector) throws IOException
IOExceptionprotected org.apache.accumulo.core.security.ColumnVisibility getVisibility()
Copyright © 2017 The Apache Software Foundation. All rights reserved.