public class GraphAssembler extends DistributedAssembler
The assembly is triggered by calling the
GraphAssembler#assemble(Result resultRow) method which recursively
reads HBase keys and values re-constituting the data graph. The assembly
traversal is driven by HBase column values representing the original edges or
containment structure of the graph.
Since every column key in HBase must be unique, and a data graph may contain any number of nodes, a column key factory is used both to persist as well as re-constitute a graph. A minimal amount of "state" information is therefore stored with each graph which maps user readable sequence numbers (which are used in column keys) to UUID values. The nodes of the resulting data graph are re-created with the original UUID values.
StatefullColumnKeyFactorydistributedReadercharset, graph, keyFactories, root, rootTableReader, rootType, selection, snapshotDate| Constructor and Description |
|---|
GraphAssembler(org.plasma.sdo.PlasmaType rootType,
org.plasma.query.collector.Selection selection,
DistributedReader distributedReader,
Timestamp snapshotDate)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
assemble(org.plasma.sdo.PlasmaDataObject target,
long targetSequence,
EdgeReader sourceCollection,
org.plasma.sdo.PlasmaDataObject source,
org.plasma.sdo.PlasmaProperty sourceProperty,
RowReader rowReader,
int level)
Populates the given data object target, recursively fetching data for and
linking related data objects which make up the resulting directed graph.
|
protected void |
assembleEdges(org.plasma.sdo.PlasmaDataObject source,
long sourceSequence,
org.plasma.sdo.PlasmaProperty sourceProp,
EdgeReader collection,
RowReader rowReader,
TableReader childTableReader,
RowReader childRowReader,
int level) |
protected void |
assembleExternalEdges(org.plasma.sdo.PlasmaDataObject source,
long sourceSequence,
org.plasma.sdo.PlasmaProperty sourceProp,
EdgeReader collection,
RowReader rowReader,
TableReader childTableReader,
int level)
Assembles a given set of edges where the target is a different row, within
this table or another.
|
assemble, assembleEdge, assembleExternalEdge, clearassembleData, assembleUUID, createChild, createChild, createChild, createRoot, fetchGraph, fetchRootType, fetchRootUUID, fetchType, fetchUUID, findMetaDataColumnValue, findMetaDataColumnValue, findRootType, findRootUUID, getDataColumnValue, getDataColumnValue, getDataGraph, getKeyFactory, getMetaDataColumnValue, getMetaDataColumnValue, getProperties, getProperties, linkpublic GraphAssembler(org.plasma.sdo.PlasmaType rootType,
org.plasma.query.collector.Selection selection,
DistributedReader distributedReader,
Timestamp snapshotDate)
rootType - the SDO root type for the result data graphselection - selected SDO properties. Properties are mapped by selected types
required in the result graph.snapshotDate - the query snapshot date which is populated into every data object
in the result data graph.protected void assemble(org.plasma.sdo.PlasmaDataObject target,
long targetSequence,
EdgeReader sourceCollection,
org.plasma.sdo.PlasmaDataObject source,
org.plasma.sdo.PlasmaProperty sourceProperty,
RowReader rowReader,
int level)
throws IOException
DistributedAssemblerassemble in class DistributedAssemblertargetSequence - the current data object sequencesource - the source or parent data objectsourceProperty - the source (reference) propertyrowReader - the current row readerlevel - the current graph levelIOException - if a remote or network exception occurs.protected void assembleEdges(org.plasma.sdo.PlasmaDataObject source,
long sourceSequence,
org.plasma.sdo.PlasmaProperty sourceProp,
EdgeReader collection,
RowReader rowReader,
TableReader childTableReader,
RowReader childRowReader,
int level)
throws IOException
IOExceptionprotected void assembleExternalEdges(org.plasma.sdo.PlasmaDataObject source,
long sourceSequence,
org.plasma.sdo.PlasmaProperty sourceProp,
EdgeReader collection,
RowReader rowReader,
TableReader childTableReader,
int level)
throws IOException
source - the object source to which we link edgessourceProp - the edge propertyedges - the edgesrowReader - the row readerchildTableReader - the table reader for the child objectslevel - the assembly levelIOExceptionCopyright © 2021. All Rights Reserved.