use of org.apache.rya.export.api.conf.AccumuloMergeConfiguration 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.api.conf.AccumuloMergeConfiguration in project incubator-rya by apache.
the class AccumuloRyaStatementStoreTest method createAccumuloMergeConfiguration.
private static AccumuloMergeConfiguration createAccumuloMergeConfiguration() {
final AccumuloMergeConfiguration accumuloMergeConfiguration = mock(AccumuloMergeConfiguration.class);
when(accumuloMergeConfiguration.getParentRyaInstanceName()).thenReturn(INSTANCE_NAME);
when(accumuloMergeConfiguration.getParentUsername()).thenReturn(USER_NAME);
when(accumuloMergeConfiguration.getParentPassword()).thenReturn(PASSWORD);
when(accumuloMergeConfiguration.getParentInstanceType()).thenReturn(INSTANCE_TYPE);
when(accumuloMergeConfiguration.getParentTablePrefix()).thenReturn(RYA_TABLE_PREFIX);
when(accumuloMergeConfiguration.getParentAuths()).thenReturn(AUTHS);
// Other
when(accumuloMergeConfiguration.getMergePolicy()).thenReturn(MergePolicy.TIMESTAMP);
return accumuloMergeConfiguration;
}
Aggregations