Examples of peekCounts()


Examples of com.pearson.entech.elasticsearch.search.facet.approx.date.internal.InternalCountingFacet.peekCounts()

    private void testSerializingCountingFacet(final TLongIntHashMap counts) throws Exception {
        final TLongIntHashMap sentCounts = new TLongIntHashMap(counts);
        final InternalCountingFacet toSend = new InternalCountingFacet("foo", sentCounts);
        final InternalCountingFacet toReceive = new InternalCountingFacet();
        serializeAndDeserialize(toSend, toReceive);
        final TLongIntHashMap receivedCounts = new TLongIntHashMap(toReceive.peekCounts());
        // Check against original counts as sentCounts may have been recycled
        compareCounts(counts, receivedCounts);
    }

    private void compareCounts(final TLongIntHashMap sentCounts, final TLongIntHashMap receivedCounts) {
View Full Code Here

Examples of com.pearson.entech.elasticsearch.search.facet.approx.date.internal.InternalDistinctFacet.peekCounts()

            final Map<Long, Integer> expectedCounts, final Map<Long, Integer> expectedCardinalities) throws Exception {
        final InternalDistinctFacet toSend = new InternalDistinctFacet("bar", counts);
        final InternalDistinctFacet toReceive = new InternalDistinctFacet();
        serializeAndDeserialize(toSend, toReceive);
        final ExtTLongObjectHashMap<DistinctCountPayload> receivedCounts =
                new ExtTLongObjectHashMap<DistinctCountPayload>(toReceive.peekCounts());
        compareDistinctCounts(expectedCounts, expectedCardinalities, receivedCounts);
    }

    private void compareDistinctCounts(final Map<Long, Integer> expectedCounts,
            final Map<Long, Integer> expectedCardinalities, final ExtTLongObjectHashMap<DistinctCountPayload> receivedCounts) {
View Full Code Here

Examples of com.pearson.entech.elasticsearch.search.facet.approx.date.internal.InternalSlicedDistinctFacet.peekCounts()

            final Map<Long, Map<BytesRef, Integer>> expectedCounts, final Map<Long, Map<BytesRef, Integer>> expectedCards) throws Exception {
        final InternalSlicedDistinctFacet toSend = new InternalSlicedDistinctFacet("baz", counts);
        final InternalSlicedDistinctFacet toReceive = new InternalSlicedDistinctFacet();
        serializeAndDeserialize(toSend, toReceive);
        final ExtTLongObjectHashMap<ExtTHashMap<BytesRef, DistinctCountPayload>> receivedCounts =
                new ExtTLongObjectHashMap<ExtTHashMap<BytesRef, DistinctCountPayload>>(toReceive.peekCounts());
        // Check against original counts as sentCounts may have been recycled
        compareSlicedDistinctCounts(expectedCounts, expectedCards, receivedCounts);
    }

    private void compareSlicedDistinctCounts(final Map<Long, Map<BytesRef, Integer>> expectedCounts,
View Full Code Here

Examples of com.pearson.entech.elasticsearch.search.facet.approx.date.internal.InternalSlicedFacet.peekCounts()

                deepCopySliced(counts);
        final InternalSlicedFacet toSend = new InternalSlicedFacet("qux", sentCounts);
        final InternalSlicedFacet toReceive = new InternalSlicedFacet();
        serializeAndDeserialize(toSend, toReceive);
        final ExtTLongObjectHashMap<TObjectIntHashMap<BytesRef>> receivedCounts =
                new ExtTLongObjectHashMap<TObjectIntHashMap<BytesRef>>(toReceive.peekCounts());
        // Check against original counts as sentCounts may have been recycled
        compareSlicedCounts(counts, receivedCounts);
    }

    private ExtTLongObjectHashMap<TObjectIntHashMap<BytesRef>> deepCopySliced(final ExtTLongObjectHashMap<TObjectIntHashMap<BytesRef>> counts) {
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.