本文整理汇总了Java中org.apache.gora.store.DataStoreFactory.createProps方法的典型用法代码示例。如果您正苦于以下问题:Java DataStoreFactory.createProps方法的具体用法?Java DataStoreFactory.createProps怎么用?Java DataStoreFactory.createProps使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.gora.store.DataStoreFactory
的用法示例。
在下文中一共展示了DataStoreFactory.createProps方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import org.apache.gora.store.DataStoreFactory; //导入方法依赖的package包/类
@Before
@SuppressWarnings("unchecked")
public void setUp() throws Exception {
cluster = new MiniAccumuloCluster(temporaryFolder.getRoot(), PASSWORD);
cluster.start();
Properties properties = DataStoreFactory.createProps();
properties.setProperty(
GORA_DATASTORE + AccumuloStore.MOCK_PROPERTY,
"false");
properties.setProperty(
GORA_DATASTORE + AccumuloStore.INSTANCE_NAME_PROPERTY,
cluster.getInstanceName());
properties.setProperty(
GORA_DATASTORE + AccumuloStore.ZOOKEEPERS_NAME_PROPERTY,
cluster.getZooKeepers());
properties.setProperty(
GORA_DATASTORE + AccumuloStore.PASSWORD_PROPERTY,
PASSWORD);
employeeStore = DataStoreFactory.createDataStore(
AccumuloStore.class,
String.class,
Employee.class,
new Configuration(),
properties);
}
示例2: init
import org.apache.gora.store.DataStoreFactory; //导入方法依赖的package包/类
/**
*
* Initialize class and create DataStore instance
*
* @param config component configuration
* @throws IOException
*/
private void init(final GoraConfiguration config) throws IOException {
this.goraProperties = DataStoreFactory.createProps();
this.dataStore = DataStoreFactory.getDataStore(goraProperties.getProperty(GORA_DEFAULT_DATASTORE_KEY,
config.getDataStoreClass()),
config.getKeyClass(),
config.getValueClass(),
this.configuration);
}
示例3: createDataStore
import org.apache.gora.store.DataStoreFactory; //导入方法依赖的package包/类
/**
* Creates a generic data store using the data store class.
* set using the class property
* @param <K> key class
* @param <T> value class
* @param keyClass key class used
* @param persistentClass persistent class used
* @return created data store
* @throws GoraException exception threw
*/
@SuppressWarnings("unchecked")
public static <K, T extends Persistent> DataStore<K, T>
createDataStore(Class<K> keyClass, Class<T> persistentClass)
throws GoraException {
DataStoreFactory.createProps();
DataStore<K, T> dataStore =
DataStoreFactory.createDataStore((Class<? extends DataStore<K, T>>)
DATASTORECLASS,
keyClass, persistentClass,
getConf());
return dataStore;
}
示例4: main
import org.apache.gora.store.DataStoreFactory; //导入方法依赖的package包/类
/**
* @param args
* @throws IOException
* @throws IllegalAccessException
* @throws InstantiationException
*/
public static void main(String[] args) throws InstantiationException, IllegalAccessException, IOException {
Properties props = DataStoreFactory.createProps();
ChefSoftwareProvisioning.performChefComputeServiceBootstrapping(props);
}
示例5: main
import org.apache.gora.store.DataStoreFactory; //导入方法依赖的package包/类
/**
* Right now the Rackspace Orchestration and Services Provisioning
* requires no arguments. It can be invoked from
* <code>$GORA_HOME/bin/gora goracisetup</code>
* @param args
* @throws IllegalAccessException
* @throws InstantiationException
* @throws NoSuchElementException
*/
public static void main(String[] args) throws NoSuchElementException, InstantiationException, IllegalAccessException, IOException {
Properties properties = DataStoreFactory.createProps();
performRackspaceOrchestration(properties);
}