Package com.thinkaurelius.titan.diskstorage.keycolumnvalue

Examples of com.thinkaurelius.titan.diskstorage.keycolumnvalue.SliceQuery


    private static final SliceQuery DEFAULT_SLICE_QUERY = new SliceQuery(DEFAULT_COLUMN, DEFAULT_COLUMN);

    public static SliceQuery inputSlice(final VertexQueryFilter inputFilter, final TitanGraph graph) {
        if (inputFilter.limit == 0) {
            final StaticBuffer[] endPoints = IDHandler.getBounds(RelationType.PROPERTY);
            return new SliceQuery(endPoints[0], endPoints[1]).setLimit(Integer.MAX_VALUE);
        } else {
            return DEFAULT_SLICE_QUERY;
        }
    }
View Full Code Here


        this.config = config;
    }

    private SliceRange getSliceRange(final VertexQueryFilter inputFilter, final int limit) {
        final SliceQuery slice = TitanInputFormat.inputSlice(inputFilter, this.graph);
        final SliceRange sliceRange = new SliceRange();
        sliceRange.setStart(slice.getSliceStart().asByteBuffer());
        sliceRange.setFinish(slice.getSliceEnd().asByteBuffer());
        sliceRange.setCount(Math.min(limit, slice.getLimit()));
        return sliceRange;
    }
View Full Code Here

        // see rant about the reason of this limitation in Astyanax implementation of this method.
        if (!(partitioner instanceof AbstractByteOrderedPartitioner))
            throw new PermanentStorageException("This operation is only allowed when byte-ordered partitioner is used.");

        try {
            SliceQuery columnSlice = new SliceQuery(
                    keyRangeQuery.getSliceStart(), keyRangeQuery.getSliceEnd());
           
            return new KeyRangeIterator<Token<?>>(partitioner, columnSlice, storeManager.getPageSize(),
                    keyRangeQuery.getKeyStart().asByteBuffer(),
                    keyRangeQuery.getKeyEnd().asByteBuffer());
View Full Code Here

    }

    public SliceQuery getQuery(RelationType resultType) {
        Preconditions.checkNotNull(resultType);
        StaticBuffer[] bound = getBounds(resultType);
        return new SliceQuery(bound[0], bound[1]);
    }
View Full Code Here

                    default: throw new AssertionError(type.getSortOrder().toString());
                }
                sliceEnd = ByteBufferUtil.nextBiggerBuffer(sliceStart);
            }
        }
        return new SliceQuery(sliceStart, sliceEnd, isStatic);
    }
View Full Code Here

                            sortConstraints = new EdgeSerializer.TypedInterval[type.getSortKey().length];
                        }

                        boolean isFitted = !remainingConditions.hasChildren()
                                && vertexConstraint == vertexCon && sortConstraints == sortKeyConstraints;
                        SliceQuery q = serializer.getQuery(type, dir, sortConstraints, vertexCon);
                        q.setLimit(computeLimit(remainingConditions, sliceLimit));
                        queries.add(new BackendQueryHolder<SliceQuery>(q, isFitted, true, null));
                    }
                }
            }
            if (queries.isEmpty())
View Full Code Here

TOP

Related Classes of com.thinkaurelius.titan.diskstorage.keycolumnvalue.SliceQuery

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.