Package com.facebook.presto.operator

Examples of com.facebook.presto.operator.PagesIndex


            this.indexChannels = indexChannels;

            // create operator context to track this the memory of the index
            OperatorContext snapshotOperatorContext = pipelineContext.addDriverContext().addOperatorContext(snapshotOperatorId, IndexLoader.class.getSimpleName());

            this.pagesIndex = new PagesIndex(pagesIndexOutput.getTypes(), expectedPositions, snapshotOperatorContext);
            pagesIndexOutput.setPagesIndex(pagesIndex);

            ImmutableList.Builder<Type> missingKeysTypes = ImmutableList.builder();
            ImmutableList.Builder<Integer> missingKeysChannels = ImmutableList.builder();
            for (int i = 0; i < indexChannels.size(); i++) {
                Integer outputIndexChannel = indexChannels.get(i);
                missingKeysTypes.add(pagesIndexOutput.getTypes().get(outputIndexChannel));
                missingKeysChannels.add(i);
            }
            this.missingKeysIndex = new PagesIndex(missingKeysTypes.build(), expectedPositions, snapshotOperatorContext);
            this.missingKeysChannels = missingKeysChannels.build();
            this.missingKeys = new EmptyLookupSource(indexChannels.size());
        }
View Full Code Here


        @Override
        public Operator createOperator(DriverContext driverContext)
        {
            checkState(!closed, "Factory is already closed");

            PagesIndex pagesIndex = pagesIndexReference.get();
            checkState(pagesIndex != null, "Pages index has not been set");

            OperatorContext operatorContext = driverContext.addOperatorContext(operatorId, PagesIndexBuilderOperator.class.getSimpleName());
            return new PagesIndexBuilderOperator(
                    types,
View Full Code Here

            this.indexChannels = indexChannels;

            // create operator context to track this the memory of the index
            OperatorContext snapshotOperatorContext = pipelineContext.addDriverContext().addOperatorContext(snapshotOperatorId, IndexLoader.class.getSimpleName());

            this.pagesIndex = new PagesIndex(pagesIndexOutput.getTypes(), expectedPositions, snapshotOperatorContext);
            pagesIndexOutput.setPagesIndex(pagesIndex);

            ImmutableList.Builder<Type> missingKeysTypes = ImmutableList.builder();
            ImmutableList.Builder<Integer> missingKeysChannels = ImmutableList.builder();
            for (int i = 0; i < indexChannels.size(); i++) {
                Integer outputIndexChannel = indexChannels.get(i);
                missingKeysTypes.add(pagesIndexOutput.getTypes().get(outputIndexChannel));
                missingKeysChannels.add(i);
            }
            this.missingKeysIndex = new PagesIndex(missingKeysTypes.build(), expectedPositions, snapshotOperatorContext);
            this.missingKeysChannels = missingKeysChannels.build();
            this.missingKeys = new EmptyLookupSource(indexChannels.size());
        }
View Full Code Here

            this.indexChannels = indexChannels;

            // create operator context to track this the memory of the index
            OperatorContext snapshotOperatorContext = pipelineContext.addDriverContext().addOperatorContext(snapshotOperatorId, IndexLoader.class.getSimpleName());

            this.pagesIndex = new PagesIndex(pagesIndexOutput.getTypes(), expectedPositions, snapshotOperatorContext);
            pagesIndexOutput.setPagesIndex(pagesIndex);

            ImmutableList.Builder<Type> missingKeysTypes = ImmutableList.builder();
            ImmutableList.Builder<Integer> missingKeysChannels = ImmutableList.builder();
            for (int i = 0; i < indexChannels.size(); i++) {
                Integer outputIndexChannel = indexChannels.get(i);
                missingKeysTypes.add(pagesIndexOutput.getTypes().get(outputIndexChannel));
                missingKeysChannels.add(i);
            }
            this.missingKeysIndex = new PagesIndex(missingKeysTypes.build(), expectedPositions, snapshotOperatorContext);
            this.missingKeysChannels = missingKeysChannels.build();
            this.missingKeys = new EmptyLookupSource(indexChannels.size());
        }
View Full Code Here

        this.bogusOperatorContext = new TaskContext(driverContext.getTaskId(), driverContext.getExecutor(), driverContext.getSession(), new DataSize(Long.MAX_VALUE, Unit.BYTE))
                .addPipelineContext(true, true)
                .addDriverContext()
                .addOperatorContext(0, "operator");

        this.outputPagesIndex = new PagesIndex(outputTypes, expectedPositions, bogusOperatorContext);
        this.missingKeysIndex = new PagesIndex(missingKeysTypes.build(), expectedPositions, bogusOperatorContext);
        this.missingKeys = missingKeysIndex.createLookupSource(this.missingKeysChannels);
    }
View Full Code Here

    public void reset()
    {
        memoryInBytes = 0;
        pages.clear();
        outputPagesIndex = new PagesIndex(outputTypes, expectedPositions, bogusOperatorContext);
        missingKeysIndex = new PagesIndex(missingKeysTypes, expectedPositions, bogusOperatorContext);
    }
View Full Code Here

        this.bogusOperatorContext = new TaskContext(driverContext.getTaskId(), driverContext.getExecutor(), driverContext.getSession(), new DataSize(Long.MAX_VALUE, Unit.BYTE))
                .addPipelineContext(true, true)
                .addDriverContext()
                .addOperatorContext(0, "operator");

        this.outputPagesIndex = new PagesIndex(outputTypes, expectedPositions, bogusOperatorContext);
        this.missingKeysIndex = new PagesIndex(missingKeysTypes.build(), expectedPositions, bogusOperatorContext);
        this.missingKeys = missingKeysIndex.createLookupSource(this.missingKeysChannels);
    }
View Full Code Here

    public void reset()
    {
        memoryInBytes = 0;
        pages.clear();
        outputPagesIndex = new PagesIndex(outputTypes, expectedPositions, bogusOperatorContext);
        missingKeysIndex = new PagesIndex(missingKeysTypes, expectedPositions, bogusOperatorContext);
    }
View Full Code Here

TOP

Related Classes of com.facebook.presto.operator.PagesIndex

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.