|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.gora.store.DataStoreFactory
public class DataStoreFactory
A Factory for DataStores. DataStoreFactory instances are thread-safe.
| Field Summary | |
|---|---|
static String |
AUTO_CREATE_SCHEMA
|
static String |
DATASTORE
|
static String |
GORA
|
static String |
GORA_DEFAULT_DATASTORE_KEY
|
static String |
GORA_DEFAULT_PROPERTIES_FILE
|
static String |
INPUT_PATH
|
static org.apache.commons.logging.Log |
log
|
static String |
MAPPING_FILE
|
static String |
OUTPUT_PATH
|
static Properties |
properties
Deprecated. |
static String |
SCHEMA_NAME
|
| Method Summary | ||
|---|---|---|
static
|
createDataStore(Class<D> dataStoreClass,
Class<K> keyClass,
Class<T> persistent,
org.apache.hadoop.conf.Configuration conf)
Instantiate a new DataStore. |
|
static
|
createDataStore(Class<D> dataStoreClass,
Class<K> keyClass,
Class<T> persistent,
org.apache.hadoop.conf.Configuration conf,
Properties properties)
Instantiate a new DataStore. |
|
static
|
createDataStore(Class<D> dataStoreClass,
Class<K> keyClass,
Class<T> persistent,
org.apache.hadoop.conf.Configuration conf,
Properties properties,
String schemaName)
Instantiate a new DataStore. |
|
static
|
createDataStore(Class<D> dataStoreClass,
Class<K> keyClass,
Class<T> persistent,
org.apache.hadoop.conf.Configuration conf,
String schemaName)
Instantiate a new DataStore. |
|
static Properties |
createProps()
Creates a new Properties. |
|
static boolean |
findBooleanProperty(Properties properties,
DataStore<?,?> store,
String baseKey,
String defaultValue)
|
|
static String |
findProperty(Properties properties,
DataStore<?,?> store,
String baseKey,
String defaultValue)
Tries to find a property with the given baseKey. |
|
static String |
findPropertyOrDie(Properties properties,
DataStore<?,?> store,
String baseKey)
Tries to find a property with the given baseKey. |
|
static boolean |
getAutoCreateSchema(Properties properties,
DataStore<?,?> store)
|
|
static
|
getDataStore(Class<D> dataStoreClass,
Class<K> keyClass,
Class<T> persistentClass,
org.apache.hadoop.conf.Configuration conf)
Instantiate a new DataStore. |
|
static
|
getDataStore(Class<K> keyClass,
Class<T> persistent,
org.apache.hadoop.conf.Configuration conf)
Instantiate the default DataStore. |
|
static
|
getDataStore(String dataStoreClass,
Class<K> keyClass,
Class<T> persistentClass,
org.apache.hadoop.conf.Configuration conf)
Instantiate a new DataStore. |
|
static
|
getDataStore(String dataStoreClass,
String keyClass,
String persistentClass,
org.apache.hadoop.conf.Configuration conf)
Instantiate a new DataStore. |
|
static String |
getDefaultSchemaName(Properties properties,
DataStore<?,?> store)
Gets the default schema name of a given store class |
|
static String |
getInputPath(Properties properties,
DataStore<?,?> store)
Returns the input path as read from the properties for file-backed data stores. |
|
static String |
getMappingFile(Properties properties,
DataStore<?,?> store,
String defaultValue)
|
|
static String |
getOutputPath(Properties properties,
DataStore<?,?> store)
Returns the output path as read from the properties for file-backed data stores. |
|
static
|
setDefaultSchemaName(Properties properties,
Class<D> dataStoreClass,
String schemaName)
Sets the default schema name to be used by the datastore of the given class |
|
static void |
setDefaultSchemaName(Properties properties,
String schemaName)
Sets the default schema name. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.commons.logging.Log log
public static final String GORA_DEFAULT_PROPERTIES_FILE
public static final String GORA_DEFAULT_DATASTORE_KEY
public static final String GORA
public static final String DATASTORE
public static final String AUTO_CREATE_SCHEMA
public static final String INPUT_PATH
public static final String OUTPUT_PATH
public static final String MAPPING_FILE
public static final String SCHEMA_NAME
@Deprecated public static final Properties properties
createProps() instead.
| Method Detail |
|---|
public static Properties createProps()
Properties. It adds the default gora configuration
resources. This properties object can be modified and used to instantiate
store instances. It is recommended to use a properties object for a single
store, because the properties object is passed on to store initialization
methods that are able to store the properties as a field.
public static <D extends DataStore<K,T>,K,T extends Persistent> D createDataStore(Class<D> dataStoreClass,
Class<K> keyClass,
Class<T> persistent,
org.apache.hadoop.conf.Configuration conf)
throws GoraException
DataStore. Uses default properties. Uses 'null' schema.
dataStoreClass - The datastore implementation class.keyClass - The key class.persistent - The value class.conf - Configuration to be used be the store.
GoraException
public static <D extends DataStore<K,T>,K,T extends Persistent> D createDataStore(Class<D> dataStoreClass,
Class<K> keyClass,
Class<T> persistent,
org.apache.hadoop.conf.Configuration conf,
String schemaName)
throws GoraException
DataStore. Uses default properties.
dataStoreClass - The datastore implementation class.keyClass - The key class.persistent - The value class.conf - Configuration to be used be the store.schemaName - A default schemaname that will be put on the properties.
GoraException
public static <D extends DataStore<K,T>,K,T extends Persistent> D createDataStore(Class<D> dataStoreClass,
Class<K> keyClass,
Class<T> persistent,
org.apache.hadoop.conf.Configuration conf,
Properties properties,
String schemaName)
throws GoraException
DataStore.
dataStoreClass - The datastore implementation class.keyClass - The key class.persistent - The value class.conf - Configuration to be used be the store.properties - The properties to be used be the store.schemaName - A default schemaname that will be put on the properties.
GoraException
public static <D extends DataStore<K,T>,K,T extends Persistent> D createDataStore(Class<D> dataStoreClass,
Class<K> keyClass,
Class<T> persistent,
org.apache.hadoop.conf.Configuration conf,
Properties properties)
throws GoraException
DataStore. Uses 'null' schema.
dataStoreClass - The datastore implementation class.keyClass - The key class.persistent - The value class.conf - Configuration to be used be the store.properties - The properties to be used be the store.
GoraException
public static <D extends DataStore<K,T>,K,T extends Persistent> D getDataStore(Class<D> dataStoreClass,
Class<K> keyClass,
Class<T> persistentClass,
org.apache.hadoop.conf.Configuration conf)
throws GoraException
DataStore. Uses default properties. Uses 'null' schema.
dataStoreClass - The datastore implementation class.keyClass - The key class.persistent - The value class.conf - Configuration to be used be the store.
GoraException
public static <K,T extends Persistent> DataStore<K,T> getDataStore(String dataStoreClass,
Class<K> keyClass,
Class<T> persistentClass,
org.apache.hadoop.conf.Configuration conf)
throws GoraException
DataStore. Uses default properties. Uses 'null' schema.
dataStoreClass - The datastore implementation class as string.keyClass - The key class.persistent - The value class.conf - Configuration to be used be the store.
GoraException
public static <K,T extends Persistent> DataStore<K,T> getDataStore(String dataStoreClass,
String keyClass,
String persistentClass,
org.apache.hadoop.conf.Configuration conf)
throws GoraException
DataStore. Uses default properties. Uses 'null' schema.
dataStoreClass - The datastore implementation class as string.keyClass - The key class as string.persistent - The value class as string.conf - Configuration to be used be the store.
GoraException
public static <K,T extends Persistent> DataStore<K,T> getDataStore(Class<K> keyClass,
Class<T> persistent,
org.apache.hadoop.conf.Configuration conf)
throws GoraException
DataStore. Uses default properties. Uses 'null' schema.
keyClass - The key class.persistent - The value class.conf - Configuration to be used be the store.
GoraException
public static String findProperty(Properties properties,
DataStore<?,?> store,
String baseKey,
String defaultValue)
public static String findPropertyOrDie(Properties properties,
DataStore<?,?> store,
String baseKey)
throws IOException
IOException
public static boolean findBooleanProperty(Properties properties,
DataStore<?,?> store,
String baseKey,
String defaultValue)
public static boolean getAutoCreateSchema(Properties properties,
DataStore<?,?> store)
public static String getInputPath(Properties properties,
DataStore<?,?> store)
public static String getOutputPath(Properties properties,
DataStore<?,?> store)
public static String getMappingFile(Properties properties,
DataStore<?,?> store,
String defaultValue)
public static String getDefaultSchemaName(Properties properties,
DataStore<?,?> store)
public static void setDefaultSchemaName(Properties properties,
String schemaName)
public static <D extends DataStore<K,T>,K,T extends Persistent> void setDefaultSchemaName(Properties properties,
Class<D> dataStoreClass,
String schemaName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||