public class GraphRowWriter extends DefaultRowOperation implements RowWriter
Acts as a single component within a TableWriter container and
encapsulates the HBase client Put and Put operations for use in write operations across multiple logical
entities within a graph row.
TableWritercolumnKeyFactory, graphConfig, ROOT_TYPE_DELIM, rootDataObject, rowKey, sequenceMappingROW_ATTR_NAME_CONCURRENT_FAM_BYTES, ROW_ATTR_NAME_CONCURRENT_QUAL_BYTES, ROW_ATTR_NAME_CONCURRENT_VALUE_BYTES, ROW_ATTR_NAME_IS_CONCURRENT_BOOL| Constructor and Description |
|---|
GraphRowWriter(byte[] rowKey,
commonj.sdo.DataObject rootDataObject,
TableWriter tableWriter,
StoreMappingContext mappingContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSequence(commonj.sdo.DataObject dataObject,
long sequence)
Maps an edge sequence within the writer for the given data object
|
boolean |
containsSequence(commonj.sdo.DataObject dataObject)
Returns whether the writer has a mapping the the given data object.
|
protected SequenceGenerator |
createSequenceMapping(byte[] rowKey,
commonj.sdo.DataObject dataObject,
commonj.sdo.ChangeSummary changeSummary)
Initializes a graph state by querying for a row based on the given row key
and either creating a new (empty) graph state for an entirely new graph, or
otherwise initializing a graph state based on state or state and management
columns in the existing returned row.
|
void |
deleteRow()
Creates a new row delete mutation, is not exists.
|
void |
deleteRowData(byte[] fam,
byte[] qualifier) |
void |
deleteRowData(org.plasma.sdo.PlasmaDataObject dataObject,
long sequence,
org.plasma.sdo.PlasmaProperty property) |
void |
deleteRowEntityMetaData(org.plasma.sdo.PlasmaDataObject dataObject,
long sequence) |
static byte[] |
encode(org.plasma.sdo.PlasmaType type) |
byte[] |
encodeRootType() |
byte[] |
encodeType(org.plasma.sdo.PlasmaType type) |
byte[] |
fetchColumnValue(org.plasma.sdo.PlasmaDataObject dataObject,
org.plasma.sdo.PlasmaProperty property)
Returns a single column value for this row given a context data object and
property.
|
GraphStatefullColumnKeyFactory |
getColumnKeyFactory() |
EdgeWriter |
getEdgeWriter(org.plasma.sdo.PlasmaDataObject dataObject,
org.plasma.sdo.PlasmaProperty property,
long sequence)
Returns an existing or new edge writer for the given data object, sequence
and source edge property
|
StoreMappingContext |
getMappingContext() |
long |
getSequence(commonj.sdo.DataObject dataObject)
Returs the sequence number for the given data object if exists.
|
SequenceGenerator |
getSequenceMapping() |
TableWriter |
getTableWriter()
Returns the container for this writer.
|
Mutations |
getWriteOperations()
Return the write operations for a row.
|
boolean |
hasRowDelete()
Returns whether there is an existing row delete mutation.
|
void |
incrementRowData(org.plasma.sdo.PlasmaDataObject dataObject,
long sequence,
org.plasma.sdo.PlasmaProperty property,
long value) |
boolean |
isRootCreated()
Returns whether the root data object for this writer is created.
|
boolean |
isRootDeleted()
Returns whether the root data object for this writer is deleted.
|
long |
newSequence(org.plasma.sdo.PlasmaDataObject dataObject) |
byte[] |
readRowAttribute(String name) |
void |
writeRowAttribute(String name,
byte[] value) |
void |
writeRowData(byte[] fam,
byte[] qualifier,
byte[] value) |
void |
writeRowData(org.plasma.sdo.PlasmaDataObject dataObject,
long sequence,
org.plasma.sdo.PlasmaProperty property,
byte[] value) |
void |
writeRowEntityMetaData(org.plasma.sdo.PlasmaDataObject dataObject,
long sequence) |
addDataObject, addDataObject, contains, contains, contains, contains, getDataGraph, getDataObject, getDataObject, getHashCode, getHashCode, getHashCode, getHashCode, getHashCode, getHashCode, getRootDataObject, getRootType, getRowKeyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddDataObject, addDataObject, contains, contains, contains, contains, getDataGraph, getDataObject, getDataObject, getRootDataObject, getRootType, getRowKeypublic GraphRowWriter(byte[] rowKey,
commonj.sdo.DataObject rootDataObject,
TableWriter tableWriter,
StoreMappingContext mappingContext)
public StoreMappingContext getMappingContext()
getMappingContext in interface RowOperationpublic SequenceGenerator getSequenceMapping() throws IOException
getSequenceMapping in interface RowStategetSequenceMapping in class GraphRowIOExceptionpublic GraphStatefullColumnKeyFactory getColumnKeyFactory() throws IOException
getColumnKeyFactory in interface RowStategetColumnKeyFactory in class GraphRowIOExceptionpublic void deleteRow()
RowWriterpublic boolean hasRowDelete()
hasRowDelete in interface RowWriterpublic byte[] fetchColumnValue(org.plasma.sdo.PlasmaDataObject dataObject,
org.plasma.sdo.PlasmaProperty property)
throws IOException
fetchColumnValue in interface RowWriterdataObject - the context data objectproperty - the context propertyIOExceptionStatefullColumnKeyFactorypublic TableWriter getTableWriter()
RowWritergetTableWriter in interface RowWriterpublic boolean isRootCreated()
isRootCreated in interface RowWriterpublic boolean isRootDeleted()
isRootDeleted in interface RowWriterpublic Mutations getWriteOperations()
RowWritergetWriteOperations in interface RowWriterprotected SequenceGenerator createSequenceMapping(byte[] rowKey, commonj.sdo.DataObject dataObject, commonj.sdo.ChangeSummary changeSummary) throws IOException
rowKey - the row keydataGraph - the data graphchangeSummary - the change summaryIOExceptionDuplicateRowException - for a new graph if a row already exists for the given row keyGraphServiceException - where except for a new graph, if no row exists for the given row
keypublic EdgeWriter getEdgeWriter(org.plasma.sdo.PlasmaDataObject dataObject, org.plasma.sdo.PlasmaProperty property, long sequence) throws IOException
RowWritergetEdgeWriter in interface RowWriterdataObject - the data objectproperty - the source edge propertysequence - the sequence for the given data object type, unique within the
graph/rowIOExceptionpublic long newSequence(org.plasma.sdo.PlasmaDataObject dataObject)
throws IOException
newSequence in interface RowWriterIOExceptionpublic void writeRowEntityMetaData(org.plasma.sdo.PlasmaDataObject dataObject,
long sequence)
throws IOException
writeRowEntityMetaData in interface RowWriterIOExceptionpublic void deleteRowEntityMetaData(org.plasma.sdo.PlasmaDataObject dataObject,
long sequence)
throws IOException
deleteRowEntityMetaData in interface RowWriterIOExceptionpublic void writeRowData(org.plasma.sdo.PlasmaDataObject dataObject,
long sequence,
org.plasma.sdo.PlasmaProperty property,
byte[] value)
throws IOException
writeRowData in interface RowWriterIOExceptionpublic void writeRowData(byte[] fam,
byte[] qualifier,
byte[] value)
throws IOException
writeRowData in interface RowWriterIOExceptionpublic void writeRowAttribute(String name, byte[] value) throws IOException
writeRowAttribute in interface RowWriterIOExceptionpublic byte[] readRowAttribute(String name) throws IOException
readRowAttribute in interface RowWriterIOExceptionpublic void deleteRowData(org.plasma.sdo.PlasmaDataObject dataObject,
long sequence,
org.plasma.sdo.PlasmaProperty property)
throws IOException
deleteRowData in interface RowWriterIOExceptionpublic void deleteRowData(byte[] fam,
byte[] qualifier)
throws IOException
deleteRowData in interface RowWriterIOExceptionpublic void incrementRowData(org.plasma.sdo.PlasmaDataObject dataObject,
long sequence,
org.plasma.sdo.PlasmaProperty property,
long value)
throws IOException
incrementRowData in interface RowWriterIOExceptionpublic void addSequence(commonj.sdo.DataObject dataObject,
long sequence)
RowWriteraddSequence in interface RowWriterpublic boolean containsSequence(commonj.sdo.DataObject dataObject)
RowWritercontainsSequence in interface RowWriterpublic long getSequence(commonj.sdo.DataObject dataObject)
RowWritergetSequence in interface RowWriterpublic byte[] encodeRootType()
encodeRootType in interface RowWriterpublic byte[] encodeType(org.plasma.sdo.PlasmaType type)
encodeType in interface RowWriterpublic static byte[] encode(org.plasma.sdo.PlasmaType type)
Copyright © 2021. All Rights Reserved.