Class FinkGremlinRecipies
java.lang.Object
com.Lomikel.Januser.GremlinRecipies
com.astrolabsoftware.FinkBrowser.Januser.FinkGremlinRecipies
FinkGremlinRecipies provides various recipies to handle
and modify Gremlin Graphs for Fink.- Author:
- J.Hrivnac
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate and attach toModifyingGremlinClient.Create and attach toGraphTraversalSource. -
Method Summary
Modifier and TypeMethodDescriptionvoidclassifySource(Classifier classifier, String objectId) Classify object.voidclassifySource(Classifier classifier, String objectId, String hbaseUrl) Classify object.voidclassifySources(Classifier[] classifiers, Set<String> oids, String hbaseUrl) Classify object .voidcleanOCol(Classifier classifier, String cls) Clean tree under OCol.fhclient()Get existingFinkHBaseClient.Create a newFinkHBaseClient.voidgenerateCorrelations(Classifier... classifiers) Generate overlaps Edges between OCol.hbaseUrl()Give HBase url.voidregisterOCol(Classifier classifier, String cls, String objectId, double weight, String instancesS, String weightsS) Register object in OCol.voidregisterOCol(Classifier classifier, String cls, String objectId, double weight, List<String> instances, List<Double> weights) Register object in OCol.voidregisterOCol(Classifier classifier, String cls, String objectId, Map<String, String> attributes, boolean replace) Register object in OCol.Methods inherited from class com.Lomikel.Januser.GremlinRecipies
addEdge, addEdge, addEdge, allV, attachDataLink, checkEdge, client, commit, created, createMetaSchema, drop, g, getEdge, getOrCreate, getOrCreate, gimme, graph
-
Field Details
-
_fhclient
-
_fhclientUrl
-
_now
-
FINK_OBJECTS_WS
-
FINK_LATESTS_WS
-
FINK_ANOMALY_WS
-
log
Logging .
-
-
Constructor Details
-
FinkGremlinRecipies
Create and attach toGraphTraversalSource.- Parameters:
g- The attachedGraphTraversalSource.
-
FinkGremlinRecipies
Create and attach toModifyingGremlinClient.- Parameters:
client- The attachedModifyingGremlinClient.
-
-
Method Details
-
classifySources
public void classifySources(Classifier[] classifiers, Set<String> oids, String hbaseUrl) throws LomikelException Classify object .- Parameters:
classifiers- TheClassifiers to be used.oids- TheSetof objectIds of object to be added.hbaseUrl- The url of HBase with alerts as ip:port:table:schema.- Throws:
LomikelException- If anything fails.
-
classifySource
public void classifySource(Classifier classifier, String objectId, String hbaseUrl) throws LomikelException Classify object.- Parameters:
classifier- TheClassifierto be used.objectId- The objectId of object to be added.hbaseUrl- The url of HBase with alerts as ip:port:table:schema.- Throws:
LomikelException- If anything fails.
-
classifySource
Classify object.- Parameters:
classifier- TheClassifierto be used.objectId- The objectId of object to be added.- Throws:
LomikelException- If anything fails.
-
registerOCol
public void registerOCol(Classifier classifier, String cls, String objectId, double weight, String instancesS, String weightsS) Register object in OCol.- Parameters:
classifier- TheClassifierto be used.cls- The type (class) of OColVertex. It will be created if not yet exists.objectId- The objectId of the new SourceVertex. It will be created if not yet exists.weight- The weight of the connection. Usualy the number of Alerts of this type.instanceS- The jd of related Alerts as strings separated by comma. Potential square brackets are removed. May be null or empty.
-
registerOCol
public void registerOCol(Classifier classifier, String cls, String objectId, double weight, List<String> instances, List<Double> weights) Register object in OCol. Replace possible existing registration.- Parameters:
classifier- TheClassifierto be used.cls- The type (class) of OColVertex. It will be created if not yet exists.objectId- The objectId of the new SourceVertex. It will be created if not yet exists.weight- The total weight of the connection. Usualy the number of Alerts of this type.instances- The jd of related Alerts.weights- The weights of related Alerts.
-
registerOCol
public void registerOCol(Classifier classifier, String cls, String objectId, Map<String, String> attributes, boolean replace) Register object in OCol.- Parameters:
classifier- TheClassifierto be used.cls- The type (class) of OColVertex. It will be created if not yet exists.objectId- The objectId of the new SourceVertex. It will be created if not yet exists.attributes- The additionalEdgeattributes.replace- Whether to replace existing resistration.
-
cleanOCol
Clean tree under OCol. Drop alerts. Alerts are dropped even if they have otherEdges.- Parameters:
classifier- TheClassifierto be used. All its flavors are handled.cls- The type (class) of OCol.- Throws:
LomikelException- If anything goes wrong.
-
generateCorrelations
Generate overlaps Edges between OCol. Possibly between twoClassifiers.- Parameters:
classifier- TheClassifiers to be used.
-
fhclient
Create a newFinkHBaseClient. Singleton when url unchanged.- Parameters:
hbaseUrl- The HBase url as ip:port:table[:schema].- Returns:
- The corresponding
FinkHBaseClient, created and initialised if needed. - Throws:
LomikelException- If cannot be created.
-
fhclient
Get existingFinkHBaseClient.- Returns:
- The corresponding
FinkHBaseClient. - Throws:
LomikelException- If not yet created.
-
hbaseUrl
Give HBase url.- Returns:
- The HBase url as ip:port:table[:schema].
-