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 source.voidclassifySource(Classifier classifier, String objectId, String hbaseUrl) Classify source.voidclassifySources(Classifier[] classifiers, Set<String> oids, String hbaseUrl) Classify source .voidcleanSoI(Classifier classifier, String cls) Clean tree under SoI.fhclient()Get existingFinkHBaseClient.Create a newFinkHBaseClient.voidfillSoI(Classifier[] classifiers, String filter, String hbaseUrl, int nLimit, int timeLimit, String[] clss) Fill graph with SoI.voidgenerateCorrelations(Classifier... classifiers) Generate overlaps Edges between SoI.hbaseUrl()Give HBase url.voidprocessSoI(Classifier[] classifiers, String filter, String hbaseUrl, int nLimit, int timeLimit, String[] clss) Execute full chain of new sources correlations analyses.voidregisterSoI(Classifier classifier, String cls, String objectId, double weight, String instancesS, String weightsS) Register source in SoI.voidregisterSoI(Classifier classifier, String cls, String objectId, double weight, List<String> instances, List<Double> weights) Register source in SoI.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
-
processSoI
public void processSoI(Classifier[] classifiers, String filter, String hbaseUrl, int nLimit, int timeLimit, String[] clss) throws LomikelException Execute full chain of new sources correlations analyses.- Parameters:
classifiers- TheClassifiers to be used. They can contain theClassifierflavor after = symbol.filter- The HBase evaluation formula to be applied. Ignored if clss are specified.hbaseUrl- The url of HBase with alerts as ip:port:table:schema.nLimit- The maximal number of alerts getting from HBase or Fink Portal. 0 means no limit.timeLimit- How far into the past the search should search (in minutes).clss- An array of classes taken fromFPC, if contains Anomaly, get anomalies fromFPC, if null, analyse sources from HBase database.- Throws:
LomikelException- If anything fails.
-
fillSoI
public void fillSoI(Classifier[] classifiers, String filter, String hbaseUrl, int nLimit, int timeLimit, String[] clss) throws LomikelException Fill graph with SoI.- Parameters:
classifiers- TheClassifiers to be used.filter- The HBase evaluation formula to be applied. Ignored if clss are specified.hbaseUrl- The url of HBase with alerts as ip:port:table:schema.nLimit- The maximal number of alerts getting from HBase or Fink Portal. 0 means no limit.timeLimit- How far into the past the search should search (in minutes).clss- An array of classes taken fromFPC, if contains Anomaly, get anomalies fromFPC, if null, analyse sources from HBase database.- Throws:
LomikelException- If anything fails.
-
classifySources
public void classifySources(Classifier[] classifiers, Set<String> oids, String hbaseUrl) throws LomikelException Classify source .- Parameters:
classifiers- TheClassifiers to be used.oids- TheSetof objectIds of source 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 source.- Parameters:
classifier- TheClassifierto be used.objectId- The objectId of source to be added.hbaseUrl- The url of HBase with alerts as ip:port:table:schema.- Throws:
LomikelException- If anything fails.
-
classifySource
Classify source.- Parameters:
classifier- TheClassifierto be used.objectId- The objectId of source to be added.- Throws:
LomikelException- If anything fails.
-
registerSoI
public void registerSoI(Classifier classifier, String cls, String objectId, double weight, String instancesS, String weightsS) Register source in SoI.- Parameters:
classifier- TheClassifierto be used.cls- The type (class) of SoIVertex. 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.
-
registerSoI
public void registerSoI(Classifier classifier, String cls, String objectId, double weight, List<String> instances, List<Double> weights) Register source in SoI.- Parameters:
classifier- TheClassifierto be used.cls- The type (class) of SoIVertex. 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.
-
cleanSoI
Clean tree under SoI. Drop alerts. Alerts are dropped even if they have otherEdges.- Parameters:
classifier- TheClassifierto be used.cls- The type (class) of SoI.- Throws:
LomikelException- If anything goes wrong.
-
generateCorrelations
Generate overlaps Edges between SoI. 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].
-