Search in sources :

Example 1 with InstanceType

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;
}
Also used : AccumuloMergeConfiguration(org.apache.rya.export.api.conf.AccumuloMergeConfiguration) InstanceType(org.apache.rya.export.InstanceType) MongoRyaStatementStore(org.apache.rya.export.mongo.MongoRyaStatementStore) AccumuloRyaStatementStore(org.apache.rya.export.accumulo.AccumuloRyaStatementStore) TimestampPolicyAccumuloRyaStatementStore(org.apache.rya.export.accumulo.policy.TimestampPolicyAccumuloRyaStatementStore) RyaStatementStore(org.apache.rya.export.api.store.RyaStatementStore) TimestampPolicyMongoRyaStatementStore(org.apache.rya.export.mongo.policy.TimestampPolicyMongoRyaStatementStore)

Example 2 with InstanceType

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;
    }
}
Also used : InstanceType(org.apache.rya.export.InstanceType)

Example 3 with InstanceType

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;
    }
}
Also used : InstanceType(org.apache.rya.export.InstanceType)

Aggregations

InstanceType (org.apache.rya.export.InstanceType)3 AccumuloRyaStatementStore (org.apache.rya.export.accumulo.AccumuloRyaStatementStore)1 TimestampPolicyAccumuloRyaStatementStore (org.apache.rya.export.accumulo.policy.TimestampPolicyAccumuloRyaStatementStore)1 AccumuloMergeConfiguration (org.apache.rya.export.api.conf.AccumuloMergeConfiguration)1 RyaStatementStore (org.apache.rya.export.api.store.RyaStatementStore)1 MongoRyaStatementStore (org.apache.rya.export.mongo.MongoRyaStatementStore)1 TimestampPolicyMongoRyaStatementStore (org.apache.rya.export.mongo.policy.TimestampPolicyMongoRyaStatementStore)1