use of org.apache.rya.export.InstanceType in project incubator-rya by apache.
the class StatementStoreFactory method getBaseStatementStore.
/**
* @param isParent
* @param config
* These parameters are hacks until the Accumulo DAO only accepts a connector.
* Once that happens this will be much, much cleaner, and make the {@link AccumuloInstanceDriver}
* obsolete.
* @throws Exception
*/
private RyaStatementStore getBaseStatementStore(final DBType dbType, final String hostname, final int port, final String ryaInstancename, final String tablePrefix, final MergeConfiguration config, final boolean isParent) throws Exception {
RyaStatementStore store;
if (dbType == DBType.MONGO) {
store = getBaseMongoStore(hostname, port, ryaInstancename);
} else {
final AccumuloMergeConfiguration aConfig = (AccumuloMergeConfiguration) config;
final InstanceType type = isParent ? aConfig.getParentInstanceType() : aConfig.getChildInstanceType();
store = getBaseAccumuloStore(ryaInstancename, type, isParent, ryaInstancename, tablePrefix, tablePrefix, tablePrefix, tablePrefix);
}
return store;
}
use of org.apache.rya.export.InstanceType in project incubator-rya by apache.
the class AccumuloConfigurationAdapter method verifyChildInstanceType.
private void verifyChildInstanceType(final AccumuloMergeToolConfiguration aConfig) throws MergeConfigurationException {
final InstanceType type = aConfig.getChildInstanceType();
switch(type) {
case DISTRIBUTION:
final String auths = aConfig.getChildAuths();
if (auths == null) {
throw new MergeConfigurationException("Missing authorization level for child accumulo.");
}
final String zookeepers = aConfig.getChildZookeepers();
if (zookeepers == null) {
throw new MergeConfigurationException("Missing zookeeper location(s) for child accumulo.");
}
break;
case MINI:
case MOCK:
break;
}
}
use of org.apache.rya.export.InstanceType in project incubator-rya by apache.
the class AccumuloConfigurationAdapter method verifyParentInstanceType.
private void verifyParentInstanceType(final AccumuloMergeToolConfiguration aConfig) throws MergeConfigurationException {
final InstanceType type = aConfig.getParentInstanceType();
switch(type) {
case DISTRIBUTION:
final String auths = aConfig.getParentAuths();
if (auths == null) {
throw new MergeConfigurationException("Missing authorization level for parent accumulo.");
}
final String zookeepers = aConfig.getParentZookeepers();
if (zookeepers == null) {
throw new MergeConfigurationException("Missing zookeeper location(s) for parent accumulo.");
}
break;
case MINI:
case MOCK:
break;
}
}
Aggregations