Class StructureCreator
- java.lang.Object
-
- com.Lomikel.Januser.JanusClient
-
- com.astrolabsoftware.FinkBrowser.Januser.StructureCreator
-
- All Implemented Interfaces:
ModifyingGremlinClient
public class StructureCreator extends JanusClient
StructureCreator
generates the network of higher level entities from the LSSTAlert
s.- Author:
- J.Hrivnac
-
-
Field Summary
Fields Modifier and Type Field Description private static org.apache.logging.log4j.Logger
log
Logging .
-
Constructor Summary
Constructors Constructor Description StructureCreator(java.lang.String properties)
Create with connection properties file.StructureCreator(java.lang.String hostname, int port, java.lang.String table)
Create with connection parameters.StructureCreator(java.lang.String hostname, int port, java.lang.String table, boolean batch)
Create with connection parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
Create JanusGraph structures from the HBase database.java.lang.String
populateGraphFromHBase(java.lang.String hbaseHost, int hbasePort, java.lang.String hbaseTable, java.lang.String tableSchema, java.lang.String label, java.lang.String rowkey, java.lang.String keyPrefixSearch, java.lang.String keyStart, java.lang.String keyStop, long start, long stop, int limit, int skip, int commitLimit, boolean reset, boolean getOrCreate, boolean fullFill, java.lang.String partialFill, java.lang.String geopoint)
Populate JanusGraph from HBase table.-
Methods inherited from class com.Lomikel.Januser.JanusClient
close, commit, g, open, open, reopen, timer, timerStart
-
-
-
-
Field Detail
-
log
private static org.apache.logging.log4j.Logger log
Logging .
-
-
Constructor Detail
-
StructureCreator
public StructureCreator(java.lang.String hostname, int port, java.lang.String table)
Create with connection parameters.- Parameters:
hostname
- The HBase hostname.port
- The HBase port.table
- The HBase table.
-
StructureCreator
public StructureCreator(java.lang.String hostname, int port, java.lang.String table, boolean batch)
Create with connection parameters.- Parameters:
hostname
- The HBase hostname.port
- The HBase port.table
- The HBase table.batch
- Whether open graph for batch loading.
-
StructureCreator
public StructureCreator(java.lang.String properties)
Create with connection properties file.- Parameters:
properties
- The file with the complete properties.
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
Create JanusGraph structures from the HBase database.- Parameters:
args
- [0] The operation to perform: populate.args
- [1] The file with the complete JanusGraph properties.args
- [2] The HBase hostname.args
- [3] The HBase port.args
- [4] The HBase table to replicate in Graph.args
- [5] The HBase table schema name.args
- [6] The label of newly created Vertexes.args
- [7] The row key name.args
- [8] The key prefix to limit replication to.args
- [9] The key to start search from (in ms), may be blank.args
- [10] The key to stop search at (in ms), may be blank.args
- [11] The time start search from, may be 0.args
- [12] The time stop search at, may be 0.args
- [13] The maximal number of entries to process (-1 means all entries).args
- [14] The number of entries to skip (-1 or 0 means no skipping).args
- [15] The number of events to commit in one step (-1 means commit only at the end).args
- [16] Whether remove allVertex
es with the define label before populating or check for each one and only create it if it doesn't exist yet.args
- [17] Whether check the existence of the vertex before creating it. (Index-based verification is disabled for speed.)args
- [18] Whether fill all variables or just rowkey and lbl. Overrides partialFill.args
- [19] List of (coma separated) HBase columns to fill besides the default column.args
- [20] List of (coma separated) geopoint property name and HBase columns representing lat and long in deg.- Throws:
LomikelException
- If anything goes wrong.java.lang.Exception
-
populateGraphFromHBase
public java.lang.String populateGraphFromHBase(java.lang.String hbaseHost, int hbasePort, java.lang.String hbaseTable, java.lang.String tableSchema, java.lang.String label, java.lang.String rowkey, java.lang.String keyPrefixSearch, java.lang.String keyStart, java.lang.String keyStop, long start, long stop, int limit, int skip, int commitLimit, boolean reset, boolean getOrCreate, boolean fullFill, java.lang.String partialFill, java.lang.String geopoint) throws LomikelException
Populate JanusGraph from HBase table.- Parameters:
hbaseHost
- The HBase hostname.hbasePort
- The HBase port.hbaseTable
- The HBase table to replicate in Graph.tableSchema
- The HBase table schema name.label
- The label of newly created Vertexes.rowkey
- The row key name.keyPrefixSearch
- The key prefix to limit replication to.keyStart
- The key to start search from, may be blank.keyStop
- The key to stop search at, may be blank.start
- The time start search from (in ms), may be 0.stop
- The time stop search at (in ms), may be 0.limit
- The maximal number of entries to process (-1 means all entries).skip
- The number of entries to skip (-1 or 0 means no skipping).commitLimit
- The number of events to commit in one step (-1 means commit only at the end).reset
- Whether remove allVertex
es with the define label before populating or check for each one and only create it if it doesn't exist yet.getOrCreate
- Whether check the existence of the vertex before creating it. (Index-based verification is disabled for speed.)fullFill
- Whether fill all variables or just rowkey and lbl. Overrides partialFill.partialFill
- List of (coma separated) HBase columns to fill besides the default column.geopoint
- List of (coma separated) geopoint property name and HBase columns representing lat and long in deg.- Returns:
- Blank if the population has been executed correctly, the last sucessfull key otherwise.
- Throws:
LomikelException
- If anything goes wrong.
-
-