Package com.facebook.presto.raptor

Examples of com.facebook.presto.raptor.RaptorPartitionKey


        UUID shardUuid4 = UUID.randomUUID();

        shardManager.commitPartition(
                tableHandle,
                "ds=1",
                ImmutableList.<PartitionKey>of(new RaptorPartitionKey("ds=1", "ds", VARCHAR, "1")),
                ImmutableMap.<UUID, String>builder()
                        .put(shardUuid1, nodeName)
                        .put(shardUuid2, nodeName)
                        .put(shardUuid3, nodeName)
                        .build());

        shardManager.commitPartition(
                tableHandle,
                "ds=2",
                ImmutableList.<PartitionKey>of(new RaptorPartitionKey("ds=2", "ds", VARCHAR, "2")),
                ImmutableMap.<UUID, String>builder()
                        .put(shardUuid4, nodeName)
                        .build());

        raptorSplitManager = new RaptorSplitManager(connectorId, nodeManager, shardManager, metadata);
View Full Code Here


        String partitionName1 = "foo=bar";

        dao.insertPartition(tableId0, partitionName0);
        dao.insertPartition(tableId1, partitionName1);

        PartitionKey testKey0 = new RaptorPartitionKey(partitionName0, "ds", VARCHAR, "2013-06-01");
        PartitionKey testKey1 = new RaptorPartitionKey(partitionName1, "foo", VARCHAR, "bar");

        long keyId0 = dao.insertPartitionKey(tableId0, partitionName0, testKey0.getName(), testKey0.getType().toString(), testKey0.getValue());

        long keyId1 = dao.insertPartitionKey(tableId0, partitionName0, testKey1.getName(), testKey1.getType().toString(), testKey1.getValue());
        assertNotEquals(keyId1, keyId0);

        long keyId2 = dao.insertPartitionKey(tableId1, partitionName1, testKey1.getName(), testKey1.getType().toString(), testKey1.getValue());
        assertNotEquals(keyId2, keyId0);

        Set<RaptorPartitionKey> filteredKeys = ImmutableSet.copyOf(Collections2.filter(dao.getPartitionKeys(tableId1), RaptorPartitionKey.partitionNamePredicate(partitionName1)));
        assertEquals(filteredKeys.size(), 1);
View Full Code Here

TOP

Related Classes of com.facebook.presto.raptor.RaptorPartitionKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.