Class FeaturesClassifier
- java.lang.Object
-
- com.astrolabsoftware.FinkBrowser.Januser.FeaturesClassifier
-
- All Implemented Interfaces:
Classifier
public class FeaturesClassifier extends java.lang.Object implements Classifier
FeaturesClassifier
classifies sources according to HBase lc_features_* field.- Author:
- J.Hrivnac
-
-
Field Summary
Fields Modifier and Type Field Description private static HBaseClient
_client
private static java.lang.String
_dirName
private static ClusterFinder
_finder
private static org.apache.logging.log4j.Logger
log
Logging .
-
Constructor Summary
Constructors Constructor Description FeaturesClassifier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
classify(FinkGremlinRecipies recipies, java.lang.String oid, java.lang.String hbaseUrl, boolean enhance, java.lang.String columns)
Classify source and expand them to alerts (if requested).private HBaseClient
client(java.lang.String hbaseUrl)
GiveHBaseClient
to current database.private ClusterFinder
finder()
GiveClusterFinder
to current database.void
setModelDirectory(java.lang.String dirName)
Set the directory for model json files scaler_params.json, pca_params.json, cluster_centers.json.
-
-
-
Field Detail
-
_client
private static HBaseClient _client
-
_finder
private static ClusterFinder _finder
-
_dirName
private static java.lang.String _dirName
-
log
private static org.apache.logging.log4j.Logger log
Logging .
-
-
Constructor Detail
-
FeaturesClassifier
public FeaturesClassifier()
-
-
Method Detail
-
classify
public void classify(FinkGremlinRecipies recipies, java.lang.String oid, java.lang.String hbaseUrl, boolean enhance, java.lang.String columns) throws LomikelException
Description copied from interface:Classifier
Classify source and expand them to alerts (if requested). It should register classes corresponding to specified objectId usingFinkGremlinRecipies.registerSourcesOfInterest(Classifiers, String, String, double, String, String, boolean, String)
.- Specified by:
classify
in interfaceClassifier
- Parameters:
recipies
- TheFinkGremlinRecipies
caller.oid
- The objectId of source to be added.hbaseUrl
- The url of HBase with alerts as ip:port:table:schema.enhance
- Whether expand tree under all SourcesOfInterest with alerts possibly filled with requested HBase columns.columns
- The HBase columns to be copied into graph alerts. May be null.- Throws:
LomikelException
- If anything fails.
-
client
private HBaseClient client(java.lang.String hbaseUrl) throws LomikelException
GiveHBaseClient
to current database. Singleton.- Parameters:
hbaseUrl
- The full HBase url ip:port:table:schema.- Returns:
- The corresponding
HBaseClient
. - Throws:
LomikelExceltion
- IfHBaseClient
cannot be created.LomikelException
-
finder
private ClusterFinder finder() throws LomikelException
GiveClusterFinder
to current database. Singleton.- Returns:
- The corresponding
ClusterFinder
. - Throws:
LomikelExceltion
- IfClusterFinder
cannot be created.LomikelException
-
setModelDirectory
public void setModelDirectory(java.lang.String dirName)
Set the directory for model json files scaler_params.json, pca_params.json, cluster_centers.json. If not set, /tmp will be used.- Parameters:
dirName
- The directory for model json files.
-
-