Examples of buckets()


Examples of org.locationtech.geogig.api.RevTree.buckets()

        for (int i = 0; i < RevTree.NORMALIZED_SIZE_LIMIT; i++) {
            builder.remove(String.valueOf(i));
        }
        changed = builder.build();
        assertEquals(RevTree.NORMALIZED_SIZE_LIMIT, changed.size());
        assertFalse(changed.buckets().isPresent());

        assertEquals(RevTree.NORMALIZED_SIZE_LIMIT, count(bucketsFeatureTree, changed)
                .featureCount());
        assertEquals(RevTree.NORMALIZED_SIZE_LIMIT, count(changed, bucketsFeatureTree)
                .featureCount());
View Full Code Here

Examples of org.locationtech.geogig.api.RevTree.buckets()

    public void testBucketChildrenDeeperBuckets() {

        final RevTree deepTree = createFeaturesTree("", 20000 + RevTree.NORMALIZED_SIZE_LIMIT)
                .build();
        // sanity check
        assertTrue(deepTree.buckets().isPresent());

        {// sanity check to ensure we're testing with a tree with depth > 1 (i.e. at least two
         // levels of buckets)
            final int maxDepth = depth(deepTree, 0);
            assertTrue(maxDepth > 1);
View Full Code Here

Examples of org.locationtech.geogig.api.RevTree.buckets()

        }
        RevTree changed = builder.build();
        assertEquals(RevTree.NORMALIZED_SIZE_LIMIT, changed.size());
        // sanity check
        assertTrue(changed.features().isPresent());
        assertFalse(changed.buckets().isPresent());

        final long expected = deepTree.size() - changed.size();

        assertEquals(expected, count(deepTree, changed).featureCount());
        assertEquals(expected, count(changed, deepTree).featureCount());
View Full Code Here

Examples of org.locationtech.geogig.api.RevTree.buckets()

            } else {
                throw new IllegalStateException(node.getType().toString());
            }
            verifyMetadata(node);
        }
        if (tree.buckets().isPresent()) {
            ImmutableCollection<Bucket> buckets = tree.buckets().get().values();
            for (Bucket b : buckets) {
                ObjectId bucketTreeId = b.id();
                verifyRepositoryTree(path + "/" + bucketTreeId.toString().substring(0, 8),
                        bucketTreeId);
View Full Code Here

Examples of org.locationtech.geogig.api.RevTree.buckets()

                throw new IllegalStateException(node.getType().toString());
            }
            verifyMetadata(node);
        }
        if (tree.buckets().isPresent()) {
            ImmutableCollection<Bucket> buckets = tree.buckets().get().values();
            for (Bucket b : buckets) {
                ObjectId bucketTreeId = b.id();
                verifyRepositoryTree(path + "/" + bucketTreeId.toString().substring(0, 8),
                        bucketTreeId);
            }
View Full Code Here

Examples of org.locationtech.geogig.api.RevTree.buckets()

        int numChildren = RevTree.NORMALIZED_SIZE_LIMIT * 2;
        RevTree tree = createTree(numChildren);
        CharSequence desc = geogig.command(CatObject.class).setObject(Suppliers.ofInstance(tree))
                .call();
        String[] lines = desc.toString().split("\n");
        assertEquals(tree.buckets().get().size() + 4, lines.length);
        for (int i = 4; i < lines.length; i++) {
            String[] tokens = lines[i].split("\t");
            assertEquals(tokens[0].trim(), "BUCKET");
        }
    }
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.