Package com.facebook.presto.split

Examples of com.facebook.presto.split.NativeSplit


            Iterable<Split> sampleIterable = Iterables.transform(nextBatch, new Function<Split, Split>()
            {
                @Override
                public Split apply(Split sourceSplit)
                {
                    NativeSplit writingSplit = new NativeSplit(UUID.randomUUID(), ImmutableList.<HostAddress>of());

                    String partition = "unpartitioned";
                    boolean lastSplit = false;
                    List<? extends PartitionKey> partitionKeys = ImmutableList.of();

                    if (sourceSplit instanceof PartitionedSplit) {
                        PartitionedSplit partitionedSplit = (PartitionedSplit) sourceSplit;
                        partition = partitionedSplit.getPartitionId();
                        lastSplit = partitionedSplit.isLastSplit();
                        partitionKeys = partitionedSplit.getPartitionKeys();
                    }

                    addPartitionShard(partition, lastSplit, partitionKeys, writingSplit.getShardUuid());
                    CollocatedSplit collocatedSplit = new CollocatedSplit(
                            ImmutableMap.of(
                                    planNodeId, sourceSplit,
                                    writerNode.getId(), writingSplit),
                            sourceSplit.getAddresses(),
View Full Code Here


        protected Split computeNext()
        {
            if (sourceIterator.hasNext()) {
                Split sourceSplit = sourceIterator.next();

                NativeSplit writingSplit = new NativeSplit(shardManager.allocateShard(tableWriterNode.getTable()), ImmutableList.<HostAddress>of());

                String partition = "unpartitioned";
                boolean lastSplit = false;
                List<? extends PartitionKey> partitionKeys = ImmutableList.of();

                if (sourceSplit instanceof PartitionedSplit) {
                    PartitionedSplit partitionedSplit = (PartitionedSplit) sourceSplit;
                    partition = partitionedSplit.getPartitionId();
                    lastSplit = partitionedSplit.isLastSplit();
                    partitionKeys = partitionedSplit.getPartitionKeys();
                }

                addPartitionShard(partition, lastSplit, partitionKeys, writingSplit.getShardId());
                CollocatedSplit collocatedSplit = new CollocatedSplit(
                        ImmutableMap.of(
                                planNodeId, sourceSplit,
                                tableWriterNode.getId(), writingSplit),
                        sourceSplit.getAddresses(),
View Full Code Here

        protected Split computeNext()
        {
            if (sourceIterator.hasNext()) {
                Split sourceSplit = sourceIterator.next();

                NativeSplit writingSplit = new NativeSplit(UUID.randomUUID(), ImmutableList.<HostAddress>of());

                String partition = "unpartitioned";
                boolean lastSplit = false;
                List<? extends PartitionKey> partitionKeys = ImmutableList.of();

                if (sourceSplit instanceof PartitionedSplit) {
                    PartitionedSplit partitionedSplit = (PartitionedSplit) sourceSplit;
                    partition = partitionedSplit.getPartitionId();
                    lastSplit = partitionedSplit.isLastSplit();
                    partitionKeys = partitionedSplit.getPartitionKeys();
                }

                addPartitionShard(partition, lastSplit, partitionKeys, writingSplit.getShardUuid());
                CollocatedSplit collocatedSplit = new CollocatedSplit(
                        ImmutableMap.of(
                                planNodeId, sourceSplit,
                                writerNode.getId(), writingSplit),
                        sourceSplit.getAddresses(),
View Full Code Here

TOP

Related Classes of com.facebook.presto.split.NativeSplit

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.