Examples of RaptorColumnHandle


Examples of com.facebook.presto.raptor.RaptorColumnHandle

        UUID shardUuid = UUID.randomUUID();
        assertFalse(storageManager.shardExists(shardUuid));

        List<RaptorColumnHandle> columnHandles = ImmutableList.of(
                new RaptorColumnHandle("test", "column_7", 7L, VARCHAR),
                new RaptorColumnHandle("test", "column_11", 11L, BIGINT));

        List<Page> pages = rowPagesBuilder(types)
                .row("alice", 0)
                .row("bob", 1)
                .row("charlie", 2)
View Full Code Here

Examples of com.facebook.presto.raptor.RaptorColumnHandle

    @Test
    public void testImportEmptySource()
            throws IOException
    {
        UUID shardUuid = UUID.randomUUID();
        List<RaptorColumnHandle> columnHandles = ImmutableList.of(new RaptorColumnHandle("test", "column_13", 13L, BIGINT));

        ColumnFileHandle fileHandles = storageManager.createStagingFileHandles(shardUuid, columnHandles);
        storageManager.commit(fileHandles);

        assertTrue(storageManager.shardExists(shardUuid));
View Full Code Here

Examples of com.facebook.presto.raptor.RaptorColumnHandle

        ImmutableList.Builder<Iterable<Block>> sourcesBuilder = ImmutableList.builder();
        ColumnFileHandle.Builder builder = ColumnFileHandle.builder(shardUuid, blockEncodingSerde);

        for (Map.Entry<ConnectorColumnHandle, File> entry : columnFileHandle.getFiles().entrySet()) {
            File file = entry.getValue();
            RaptorColumnHandle columnHandle = checkType(entry.getKey(), RaptorColumnHandle.class, "columnHandle");

            if (file.length() > 0) {
                Slice slice = mappedFileCache.getUnchecked(file.getAbsoluteFile());
                checkState(file.length() == slice.length(), "File %s, length %s was mapped to Slice length %s", file.getAbsolutePath(), file.length(), slice.length());
                // Compute optimal encoding from stats
View Full Code Here

Examples of com.facebook.presto.raptor.RaptorColumnHandle

        ImmutableList.Builder<Iterable<Block>> sourcesBuilder = ImmutableList.builder();
        ColumnFileHandle.Builder builder = ColumnFileHandle.builder(shardUuid, blockEncodingSerde);

        for (Map.Entry<ConnectorColumnHandle, File> entry : columnFileHandle.getFiles().entrySet()) {
            File file = entry.getValue();
            RaptorColumnHandle columnHandle = checkType(entry.getKey(), RaptorColumnHandle.class, "columnHandle");
            types.add(columnHandle.getColumnType());

            if (file.length() > 0) {
                Slice slice = mappedFileCache.getUnchecked(file.getAbsoluteFile());
                checkState(file.length() == slice.length(), "File %s, length %s was mapped to Slice length %s", file.getAbsolutePath(), file.length(), slice.length());
                // Compute optimal encoding from stats
View Full Code Here

Examples of com.facebook.presto.raptor.RaptorColumnHandle

    {
        UUID shardUuid = UUID.randomUUID();
        assertFalse(storageManager.shardExists(shardUuid));

        List<RaptorColumnHandle> columnHandles = ImmutableList.of(
                new RaptorColumnHandle("test", "column_7", 7L, VARCHAR),
                new RaptorColumnHandle("test", "column_11", 11L, BIGINT));

        List<Page> pages = rowPagesBuilder(VARCHAR, BIGINT)
                .row("alice", 0)
                .row("bob", 1)
                .row("charlie", 2)
View Full Code Here

Examples of com.facebook.presto.raptor.RaptorColumnHandle

    @Test
    public void testImportEmptySource()
            throws IOException
    {
        UUID shardUuid = UUID.randomUUID();
        List<RaptorColumnHandle> columnHandles = ImmutableList.of(new RaptorColumnHandle("test", "column_13", 13L, BIGINT));

        ColumnFileHandle fileHandles = storageManager.createStagingFileHandles(shardUuid, columnHandles);
        storageManager.commit(fileHandles);

        assertTrue(storageManager.shardExists(shardUuid));
View Full Code Here

Examples of com.facebook.presto.raptor.RaptorColumnHandle

    @Test
    public void testPartitionShardCommit()
            throws Exception
    {
        long tableId = 1;
        ConnectorTableHandle tableHandle = new RaptorTableHandle("test", "demo", "test", tableId, new RaptorColumnHandle("test", "foo", 1, BIGINT), null);
        UUID shardId1 = UUID.randomUUID();
        UUID shardId2 = UUID.randomUUID();

        assertNotEquals(shardId2, shardId1);
View Full Code Here

Examples of com.facebook.presto.raptor.RaptorColumnHandle

    {
        UUID shardUuid = UUID.randomUUID();
        assertFalse(storageManager.shardExists(shardUuid));

        List<ConnectorColumnHandle> columnHandles = ImmutableList.<ConnectorColumnHandle>of(
                new RaptorColumnHandle("test", "column_7", 7L),
                new RaptorColumnHandle("test", "column_11", 11L));

        List<Page> pages = rowPagesBuilder(VARCHAR, BIGINT)
                .row("alice", 0)
                .row("bob", 1)
                .row("charlie", 2)
View Full Code Here

Examples of com.facebook.presto.raptor.RaptorColumnHandle

    @Test
    public void testImportEmptySource()
            throws IOException
    {
        UUID shardUuid = UUID.randomUUID();
        List<ConnectorColumnHandle> columnHandles = ImmutableList.<ConnectorColumnHandle>of(new RaptorColumnHandle("test", "column_13", 13L));

        ColumnFileHandle fileHandles = storageManager.createStagingFileHandles(shardUuid, columnHandles);
        storageManager.commit(fileHandles);

        assertTrue(storageManager.shardExists(shardUuid));
View Full Code Here

Examples of com.facebook.presto.raptor.RaptorColumnHandle

        ImmutableList.Builder<Iterable<Block>> sourcesBuilder = ImmutableList.builder();
        ColumnFileHandle.Builder builder = ColumnFileHandle.builder(shardUuid, blockEncodingSerde);

        for (Map.Entry<ConnectorColumnHandle, File> entry : columnFileHandle.getFiles().entrySet()) {
            File file = entry.getValue();
            RaptorColumnHandle columnHandle = checkType(entry.getKey(), RaptorColumnHandle.class, "columnHandle");
            types.add(columnHandle.getColumnType());

            if (file.length() > 0) {
                Slice slice = mappedFileCache.getUnchecked(file.getAbsoluteFile());
                checkState(file.length() == slice.length(), "File %s, length %s was mapped to Slice length %s", file.getAbsolutePath(), file.length(), slice.length());
                // Compute optimal encoding from stats
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.