Search in sources :

Example 1 with LexicoderRowSerializer

use of com.facebook.presto.accumulo.serializers.LexicoderRowSerializer in project presto by prestodb.

the class AccumuloQueryRunner method createAccumuloQueryRunner.

public static synchronized DistributedQueryRunner createAccumuloQueryRunner(Map<String, String> extraProperties) throws Exception {
    DistributedQueryRunner queryRunner = new DistributedQueryRunner(createSession(), 4, extraProperties);
    queryRunner.installPlugin(new TpchPlugin());
    queryRunner.createCatalog("tpch", "tpch");
    queryRunner.installPlugin(new AccumuloPlugin());
    Map<String, String> accumuloProperties = ImmutableMap.<String, String>builder().put(AccumuloConfig.INSTANCE, connector.getInstance().getInstanceName()).put(AccumuloConfig.ZOOKEEPERS, connector.getInstance().getZooKeepers()).put(AccumuloConfig.USERNAME, MAC_USER).put(AccumuloConfig.PASSWORD, MAC_PASSWORD).put(AccumuloConfig.ZOOKEEPER_METADATA_ROOT, "/presto-accumulo-test").build();
    queryRunner.createCatalog("accumulo", "accumulo", accumuloProperties);
    if (!tpchLoaded) {
        copyTpchTables(queryRunner, "tpch", TINY_SCHEMA_NAME, createSession(), TpchTable.getTables());
        connector.tableOperations().addSplits("tpch.orders", ImmutableSortedSet.of(new Text(new LexicoderRowSerializer().encode(BIGINT, 7500L))));
        tpchLoaded = true;
    }
    return queryRunner;
}
Also used : DistributedQueryRunner(com.facebook.presto.tests.DistributedQueryRunner) TpchPlugin(com.facebook.presto.tpch.TpchPlugin) LexicoderRowSerializer(com.facebook.presto.accumulo.serializers.LexicoderRowSerializer) Text(org.apache.hadoop.io.Text)

Aggregations

LexicoderRowSerializer (com.facebook.presto.accumulo.serializers.LexicoderRowSerializer)1 DistributedQueryRunner (com.facebook.presto.tests.DistributedQueryRunner)1 TpchPlugin (com.facebook.presto.tpch.TpchPlugin)1 Text (org.apache.hadoop.io.Text)1