public final class ModelLoader extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
MODEL_CACHE_SIZE
The Constant MODEL_CACHE_SIZE.
|
static long |
MODEL_CACHE_TIMEOUT
The Constant MODEL_CACHE_TIMEOUT.
|
static String |
MODEL_PATH_BASE_DIR
The Constant MODEL_PATH_BASE_DIR.
|
static String |
MODEL_PATH_BASE_DIR_DEFAULT
The Constant MODEL_PATH_BASE_DIR_DEFAULT.
|
static String |
TEST_REPORT_BASE_DIR
The Constant TEST_REPORT_BASE_DIR.
|
static String |
TEST_REPORT_BASE_DIR_DEFAULT
The Constant TEST_REPORT_BASE_DIR_DEFAULT.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
clearCache()
Clear cache.
|
static void |
deleteModel(org.apache.hadoop.hive.conf.HiveConf conf,
String algorithm,
String modelID)
Delete model.
|
static void |
deleteTestReport(org.apache.hadoop.hive.conf.HiveConf conf,
String algorithm,
String reportID)
Delete test report.
|
static org.apache.hadoop.fs.Path |
getModelLocation(org.apache.hadoop.conf.Configuration conf,
String algorithm,
String modelID)
Gets the model location.
|
static org.apache.hadoop.fs.Path |
getTestReportPath(org.apache.hadoop.conf.Configuration conf,
String algorithm,
String report)
Gets the test report path.
|
static MLModel |
loadModel(org.apache.hadoop.conf.Configuration conf,
String algorithm,
String modelID)
Load model.
|
static MLTestReport |
loadReport(org.apache.hadoop.conf.Configuration conf,
String algorithm,
String reportID)
Load report.
|
static void |
saveTestReport(org.apache.hadoop.conf.Configuration conf,
MLTestReport report)
Save test report.
|
public static final String MODEL_PATH_BASE_DIR
public static final String MODEL_PATH_BASE_DIR_DEFAULT
public static final String TEST_REPORT_BASE_DIR
public static final String TEST_REPORT_BASE_DIR_DEFAULT
public static final long MODEL_CACHE_SIZE
public static final long MODEL_CACHE_TIMEOUT
public static org.apache.hadoop.fs.Path getModelLocation(org.apache.hadoop.conf.Configuration conf,
String algorithm,
String modelID)
conf - the confalgorithm - the algorithmmodelID - the model idpublic static MLModel loadModel(org.apache.hadoop.conf.Configuration conf, String algorithm, String modelID) throws IOException
conf - the confalgorithm - the algorithmmodelID - the model idIOException - Signals that an I/O exception has occurred.public static void clearCache()
public static org.apache.hadoop.fs.Path getTestReportPath(org.apache.hadoop.conf.Configuration conf,
String algorithm,
String report)
conf - the confalgorithm - the algorithmreport - the reportpublic static void saveTestReport(org.apache.hadoop.conf.Configuration conf,
MLTestReport report)
throws IOException
conf - the confreport - the reportIOException - Signals that an I/O exception has occurred.public static MLTestReport loadReport(org.apache.hadoop.conf.Configuration conf, String algorithm, String reportID) throws IOException
conf - the confalgorithm - the algorithmreportID - the report idIOException - Signals that an I/O exception has occurred.public static void deleteModel(org.apache.hadoop.hive.conf.HiveConf conf,
String algorithm,
String modelID)
throws IOException
conf - the confalgorithm - the algorithmmodelID - the model idIOException - Signals that an I/O exception has occurred.public static void deleteTestReport(org.apache.hadoop.hive.conf.HiveConf conf,
String algorithm,
String reportID)
throws IOException
conf - the confalgorithm - the algorithmreportID - the report idIOException - Signals that an I/O exception has occurred.Copyright © 2014–2018 Apache Software Foundation. All rights reserved.