Package org.lilyproject.hbaseindex

Examples of org.lilyproject.hbaseindex.Query$RangeCondition


     * @param parentRecordId record id of the record to find dependencies for
     * @param vtag     vtag of the record to find dependencies for
     * @return the record ids and vtags on which the given record depends
     */
    Set<DependencyEntry> findDependencies(AbsoluteRecordId parentRecordId, SchemaId vtag) throws IOException {
        final Query query = new Query();
        query.addEqualsCondition("dependant_recordid", parentRecordId.toBytes());
        query.addEqualsCondition("dependant_vtag", vtag.getBytes());

        final Set<DependencyEntry> result;

        final QueryResult queryResult = forwardDerefIndex.performQuery(query);
        if (queryResult.next() != null) {
View Full Code Here


    public DependantRecordIdsIterator findDependantsOf(AbsoluteRecordId parentRecordId, Set<SchemaId> fields,
                                                       SchemaId vtag) throws IOException {

        final RecordId master = parentRecordId.getRecordId().getMaster();

        final Query query = new Query();
        query.addEqualsCondition("dependency_masterrecordid", master.toBytes());
        if (vtag != null) {
            query.addEqualsCondition("dependant_vtag", vtag.getBytes());
        }

        query.setIndexFilter(new DerefMapIndexFilter(parentRecordId.getRecordId().getVariantProperties(), fields));

        return new DependantRecordIdsIteratorImpl(backwardDerefIndex.performQuery(query), this.serializationUtil);
    }
View Full Code Here

    private class SingleFieldEqualsQuery implements Runnable {
        @Override
        public void run() {
            try {
                Query query = new Query();
                query.addEqualsCondition("word", Words.get());

                int resultCount = 0;

                long before = System.nanoTime();
                QueryResult result = index.performQuery(query);
View Full Code Here

                    word = Words.get();
                }

                String prefix = word.substring(0, 3);

                Query query = new Query();
                query.setRangeCondition("word", prefix, prefix, true, true);

                int resultCount = 0;

                long before = System.nanoTime();
                QueryResult result = index.performQuery(query);
View Full Code Here

    public Set<AbsoluteRecordId> getAbsoluteReferrers(AbsoluteRecordId record, SchemaId vtag, SchemaId sourceField)
            throws LinkIndexException, InterruptedException {
        long before = System.currentTimeMillis();
        try {
            Query query = new Query();
            query.addEqualsCondition("target", record.toBytes());
            if (vtag != null) {
                query.addEqualsCondition("vtag", vtag.getBytes());
            }
            if (sourceField != null) {
                query.addEqualsCondition("sourcefield", sourceField.getBytes());
            }

            Set<AbsoluteRecordId> result = Sets.newHashSet();

            QueryResult qr = backwardIndex.performQuery(query);
View Full Code Here

    public Set<FieldedLink> getFieldedReferrers(RecordId record, SchemaId vtag)
            throws LinkIndexException, InterruptedException {
        long before = System.currentTimeMillis();
        try {
            Query query = new Query();
            query.addEqualsCondition("target", record.toBytes());
            if (vtag != null) {
                query.addEqualsCondition("vtag", vtag.getBytes());
            }

            Set<FieldedLink> result = new HashSet<FieldedLink>();

            QueryResult qr = backwardIndex.performQuery(query);
View Full Code Here

    public Set<Pair<FieldedLink, SchemaId>> getAllForwardLinks(AbsoluteRecordId record)
            throws LinkIndexException, InterruptedException {
        long before = System.currentTimeMillis();
        try {
            Query query = new Query();
            query.addEqualsCondition("source", record.toBytes());

            Set<Pair<FieldedLink, SchemaId>> result = new HashSet<Pair<FieldedLink, SchemaId>>();

            QueryResult qr = forwardIndex.performQuery(query);
            byte[] id;
View Full Code Here

    public Set<AbsoluteRecordId> getForwardLinks(AbsoluteRecordId record, SchemaId vtag, SchemaId sourceField)
            throws LinkIndexException, InterruptedException {
        long before = System.currentTimeMillis();
        try {
            Query query = new Query();
            query.addEqualsCondition("source", record.toBytes());
            if (vtag != null) {
                query.addEqualsCondition("vtag", vtag.getBytes());
            }
            if (sourceField != null) {
                query.addEqualsCondition("sourcefield", sourceField.getBytes());
            }

            Set<AbsoluteRecordId> result = new HashSet<AbsoluteRecordId>();

            QueryResult qr = forwardIndex.performQuery(query);
View Full Code Here

    public Set<FieldedLink> getFieldedForwardLinks(AbsoluteRecordId record, SchemaId vtag)
            throws LinkIndexException, InterruptedException {
        long before = System.currentTimeMillis();
        try {
            Query query = new Query();
            query.addEqualsCondition("source", record.toBytes());
            if (vtag != null) {
                query.addEqualsCondition("vtag", vtag.getBytes());
            }

            Set<FieldedLink> result = new HashSet<FieldedLink>();

            QueryResult qr = forwardIndex.performQuery(query);
View Full Code Here

TOP

Related Classes of org.lilyproject.hbaseindex.Query$RangeCondition

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.