Search in sources :

Example 1 with TimestampPolicyAccumuloRyaStatementStore

use of org.apache.rya.export.accumulo.policy.TimestampPolicyAccumuloRyaStatementStore in project incubator-rya by apache.

the class StatementStoreFactory method getMergePolicyStatementStore.

private RyaStatementStore getMergePolicyStatementStore(final RyaStatementStore store, final MergePolicy policy, final String ryaInstanceName, final DBType dbType) {
    RyaStatementStore policyStore = null;
    if (policy == MergePolicy.TIMESTAMP) {
        final TimestampPolicyMergeConfiguration timeConfig = (TimestampPolicyMergeConfiguration) configuration;
        final Date timestamp = timeConfig.getToolStartTime();
        if (dbType == DBType.MONGO) {
            policyStore = new TimestampPolicyMongoRyaStatementStore((MongoRyaStatementStore) store, timestamp, ryaInstanceName);
        } else {
            policyStore = new TimestampPolicyAccumuloRyaStatementStore((AccumuloRyaStatementStore) store, timestamp);
        }
    }
    return policyStore == null ? store : policyStore;
}
Also used : TimestampPolicyMergeConfiguration(org.apache.rya.export.api.conf.policy.TimestampPolicyMergeConfiguration) TimestampPolicyAccumuloRyaStatementStore(org.apache.rya.export.accumulo.policy.TimestampPolicyAccumuloRyaStatementStore) AccumuloRyaStatementStore(org.apache.rya.export.accumulo.AccumuloRyaStatementStore) TimestampPolicyAccumuloRyaStatementStore(org.apache.rya.export.accumulo.policy.TimestampPolicyAccumuloRyaStatementStore) 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) TimestampPolicyMongoRyaStatementStore(org.apache.rya.export.mongo.policy.TimestampPolicyMongoRyaStatementStore) MongoRyaStatementStore(org.apache.rya.export.mongo.MongoRyaStatementStore) TimestampPolicyMongoRyaStatementStore(org.apache.rya.export.mongo.policy.TimestampPolicyMongoRyaStatementStore) Date(java.util.Date)

Example 2 with TimestampPolicyAccumuloRyaStatementStore

use of org.apache.rya.export.accumulo.policy.TimestampPolicyAccumuloRyaStatementStore in project incubator-rya by apache.

the class StoreToStoreIT method getParentAccumulo.

private static TimestampPolicyAccumuloRyaStatementStore getParentAccumulo() throws Exception {
    final AccumuloInstanceDriver driver = new AccumuloInstanceDriver(RYA_INSTANCE, type, true, false, true, "TEST1", PASSWORD, RYA_INSTANCE, tablePrefix, auths, "");
    driver.setUp();
    final AccumuloRyaStatementStore store = new AccumuloRyaStatementStore(driver.getDao(), tablePrefix, RYA_INSTANCE);
    drivers.add(driver);
    return new TimestampPolicyAccumuloRyaStatementStore(store, currentDate);
}
Also used : AccumuloInstanceDriver(org.apache.rya.export.accumulo.util.AccumuloInstanceDriver) AccumuloRyaStatementStore(org.apache.rya.export.accumulo.AccumuloRyaStatementStore) TimestampPolicyAccumuloRyaStatementStore(org.apache.rya.export.accumulo.policy.TimestampPolicyAccumuloRyaStatementStore) TimestampPolicyAccumuloRyaStatementStore(org.apache.rya.export.accumulo.policy.TimestampPolicyAccumuloRyaStatementStore)

Aggregations

AccumuloRyaStatementStore (org.apache.rya.export.accumulo.AccumuloRyaStatementStore)2 TimestampPolicyAccumuloRyaStatementStore (org.apache.rya.export.accumulo.policy.TimestampPolicyAccumuloRyaStatementStore)2 Date (java.util.Date)1 AccumuloInstanceDriver (org.apache.rya.export.accumulo.util.AccumuloInstanceDriver)1 TimestampPolicyMergeConfiguration (org.apache.rya.export.api.conf.policy.TimestampPolicyMergeConfiguration)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