Search in sources :

Example 1 with DbKvsGetCandidateCellsForSweeping

use of com.palantir.atlasdb.keyvalue.dbkvs.impl.sweep.DbKvsGetCandidateCellsForSweeping in project atlasdb by palantir.

the class DbKvs method createOracle.

private static DbKvs createOracle(ExecutorService executor, OracleDdlConfig oracleDdlConfig, SqlConnectionSupplier connections) {
    OracleTableNameGetter tableNameGetter = new OracleTableNameGetter(oracleDdlConfig);
    OraclePrefixedTableNames prefixedTableNames = new OraclePrefixedTableNames(tableNameGetter);
    TableValueStyleCache valueStyleCache = new TableValueStyleCache();
    OverflowValueLoader overflowValueLoader = new OracleOverflowValueLoader(oracleDdlConfig, tableNameGetter);
    DbKvsGetRange getRange = new OracleGetRange(connections, overflowValueLoader, tableNameGetter, valueStyleCache, oracleDdlConfig);
    CellTsPairLoader cellTsPageLoader = new OracleCellTsPageLoader(connections, tableNameGetter, valueStyleCache, oracleDdlConfig);
    return new DbKvs(executor, oracleDdlConfig, new OracleDbTableFactory(oracleDdlConfig, tableNameGetter, prefixedTableNames, valueStyleCache, PTExecutors.newSingleThreadScheduledExecutor()), connections, new ImmediateSingleBatchTaskRunner(), overflowValueLoader, getRange, new DbKvsGetCandidateCellsForSweeping(cellTsPageLoader));
}
Also used : DbKvsGetRange(com.palantir.atlasdb.keyvalue.dbkvs.impl.ranges.DbKvsGetRange) OracleTableNameGetter(com.palantir.atlasdb.keyvalue.dbkvs.OracleTableNameGetter) DbKvsGetCandidateCellsForSweeping(com.palantir.atlasdb.keyvalue.dbkvs.impl.sweep.DbKvsGetCandidateCellsForSweeping) OracleOverflowValueLoader(com.palantir.atlasdb.keyvalue.dbkvs.impl.oracle.OracleOverflowValueLoader) OracleOverflowValueLoader(com.palantir.atlasdb.keyvalue.dbkvs.impl.oracle.OracleOverflowValueLoader) OracleCellTsPageLoader(com.palantir.atlasdb.keyvalue.dbkvs.impl.oracle.OracleCellTsPageLoader) OracleGetRange(com.palantir.atlasdb.keyvalue.dbkvs.impl.oracle.OracleGetRange) CellTsPairLoader(com.palantir.atlasdb.keyvalue.dbkvs.impl.sweep.CellTsPairLoader) ImmediateSingleBatchTaskRunner(com.palantir.atlasdb.keyvalue.dbkvs.impl.batch.ImmediateSingleBatchTaskRunner)

Example 2 with DbKvsGetCandidateCellsForSweeping

use of com.palantir.atlasdb.keyvalue.dbkvs.impl.sweep.DbKvsGetCandidateCellsForSweeping in project atlasdb by palantir.

the class DbKvs method createPostgres.

private static DbKvs createPostgres(ExecutorService executor, PostgresDdlConfig config, SqlConnectionSupplier connections) {
    PostgresPrefixedTableNames prefixedTableNames = new PostgresPrefixedTableNames(config);
    DbTableFactory tableFactory = new PostgresDbTableFactory(config, prefixedTableNames);
    TableMetadataCache tableMetadataCache = new TableMetadataCache(tableFactory);
    CellTsPairLoader cellTsPairLoader = new PostgresCellTsPageLoader(prefixedTableNames, connections);
    return new DbKvs(executor, config, tableFactory, connections, new ParallelTaskRunner(newFixedThreadPool(config.poolSize()), config.fetchBatchSize()), // no overflow on postgres
    (conns, tbl, ids) -> Collections.emptyMap(), new PostgresGetRange(prefixedTableNames, connections, tableMetadataCache), new DbKvsGetCandidateCellsForSweeping(cellTsPairLoader));
}
Also used : PostgresPrefixedTableNames(com.palantir.atlasdb.keyvalue.dbkvs.impl.postgres.PostgresPrefixedTableNames) CellTsPairLoader(com.palantir.atlasdb.keyvalue.dbkvs.impl.sweep.CellTsPairLoader) DbKvsGetCandidateCellsForSweeping(com.palantir.atlasdb.keyvalue.dbkvs.impl.sweep.DbKvsGetCandidateCellsForSweeping) PostgresCellTsPageLoader(com.palantir.atlasdb.keyvalue.dbkvs.impl.postgres.PostgresCellTsPageLoader) ParallelTaskRunner(com.palantir.atlasdb.keyvalue.dbkvs.impl.batch.ParallelTaskRunner) PostgresGetRange(com.palantir.atlasdb.keyvalue.dbkvs.impl.postgres.PostgresGetRange)

Aggregations

CellTsPairLoader (com.palantir.atlasdb.keyvalue.dbkvs.impl.sweep.CellTsPairLoader)2 DbKvsGetCandidateCellsForSweeping (com.palantir.atlasdb.keyvalue.dbkvs.impl.sweep.DbKvsGetCandidateCellsForSweeping)2 OracleTableNameGetter (com.palantir.atlasdb.keyvalue.dbkvs.OracleTableNameGetter)1 ImmediateSingleBatchTaskRunner (com.palantir.atlasdb.keyvalue.dbkvs.impl.batch.ImmediateSingleBatchTaskRunner)1 ParallelTaskRunner (com.palantir.atlasdb.keyvalue.dbkvs.impl.batch.ParallelTaskRunner)1 OracleCellTsPageLoader (com.palantir.atlasdb.keyvalue.dbkvs.impl.oracle.OracleCellTsPageLoader)1 OracleGetRange (com.palantir.atlasdb.keyvalue.dbkvs.impl.oracle.OracleGetRange)1 OracleOverflowValueLoader (com.palantir.atlasdb.keyvalue.dbkvs.impl.oracle.OracleOverflowValueLoader)1 PostgresCellTsPageLoader (com.palantir.atlasdb.keyvalue.dbkvs.impl.postgres.PostgresCellTsPageLoader)1 PostgresGetRange (com.palantir.atlasdb.keyvalue.dbkvs.impl.postgres.PostgresGetRange)1 PostgresPrefixedTableNames (com.palantir.atlasdb.keyvalue.dbkvs.impl.postgres.PostgresPrefixedTableNames)1 DbKvsGetRange (com.palantir.atlasdb.keyvalue.dbkvs.impl.ranges.DbKvsGetRange)1