public class OldStorageManager extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static Map<String,Class<? extends Appender>> |
APPENDER_HANDLER_CACHE
Cache of appender handlers for each storage type.
|
protected static Map<Class<?>,Constructor<?>> |
CONSTRUCTOR_CACHE
Cache of constructors for each class.
|
protected static Map<String,Class<? extends Scanner>> |
SCANNER_HANDLER_CACHE
Cache of scanner handlers for each storage type.
|
| Constructor and Description |
|---|
OldStorageManager() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
clearCache()
Clear all class cache
|
static Tablespace |
getStorageManager(TajoConf tajoConf,
String dataFormat)
Returns the proper Tablespace instance according to the dataFormat.
|
static Tablespace |
getStorageManager(TajoConf tajoConf,
URI uri,
String dataFormat)
Returns the proper Tablespace instance according to the dataFormat
|
static <T> T |
newAppenderInstance(Class<T> theClass,
org.apache.hadoop.conf.Configuration conf,
TaskAttemptId taskAttemptId,
TableMeta meta,
Schema schema,
org.apache.hadoop.fs.Path workDir)
Creates a scanner instance.
|
static <T> T |
newScannerInstance(Class<T> theClass,
org.apache.hadoop.conf.Configuration conf,
Schema schema,
TableMeta meta,
Fragment fragment)
Creates a scanner instance.
|
static void |
shutdown()
Close Tablespace
|
protected static final Map<String,Class<? extends Scanner>> SCANNER_HANDLER_CACHE
protected static final Map<String,Class<? extends Appender>> APPENDER_HANDLER_CACHE
protected static Map<Class<?>,Constructor<?>> CONSTRUCTOR_CACHE
protected static void clearCache()
public static void shutdown()
throws IOException
IOExceptionpublic static Tablespace getStorageManager(TajoConf tajoConf, String dataFormat) throws IOException
tajoConf - Tajo system property.dataFormat - Storage typeIOExceptionpublic static Tablespace getStorageManager(TajoConf tajoConf, URI uri, String dataFormat) throws IOException
tajoConf - Tajo system property.uri - Key that can identify each storage manager(may be a path)dataFormat - Storage typeIOExceptionpublic static <T> T newScannerInstance(Class<T> theClass, org.apache.hadoop.conf.Configuration conf, Schema schema, TableMeta meta, Fragment fragment)
T - theClass - Concrete class of scannerconf - System propertyschema - Input schemameta - Table meta datafragment - The fragment for scanningpublic static <T> T newAppenderInstance(Class<T> theClass, org.apache.hadoop.conf.Configuration conf, TaskAttemptId taskAttemptId, TableMeta meta, Schema schema, org.apache.hadoop.fs.Path workDir)
T - theClass - Concrete class of scannerconf - System propertytaskAttemptId - Task idmeta - Table meta dataschema - Input schemaworkDir - Working directoryCopyright © 2016 Apache Software Foundation. All Rights Reserved.