Examples of total()


Examples of org.apache.cassandra.db.context.CounterContext.total()

            state2.moveToNext();
        }

        // Check that if we merge old and clean on another node, we keep the right count
        ByteBuffer onRemote = ctx.merge(ctx.clearAllDelta(state.context), ctx.clearAllDelta(cleaned), HeapAllocator.instance);
        assert ctx.total(onRemote) == 11;
    }
}
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.sender.RetryListOfCollectors.total()

    hosts.add("host3");
    hosts.add("host4");
    Configuration conf = new Configuration();
    RetryListOfCollectors rloc = new RetryListOfCollectors(hosts, conf);
    rloc.shuffleList();
    assertEquals(hosts.size(), rloc.total());

    for (int i = 0; i < hosts.size(); ++i) {
      assertTrue(rloc.hasNext());
      String s = rloc.next();
      assertTrue(s != null);
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.sender.RetryListOfCollectors.total()

    hosts.add("host1");
    hosts.add("host2");
    hosts.add("host3");
    hosts.add("host4");
    RetryListOfCollectors rloc = new RetryListOfCollectors(hosts, 2000);
    assertEquals(hosts.size(), rloc.total());
   
    for(int i = 0; i < hosts.size(); ++i) {
      assertTrue(rloc.hasNext());
      String s =  rloc.next();
      assertTrue(s != null);
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.sender.RetryListOfCollectors.total()

    hosts.add("host1");
    hosts.add("host2");
    hosts.add("host3");
    hosts.add("host4");
    RetryListOfCollectors rloc = new RetryListOfCollectors(hosts, 2000);
    assertEquals(hosts.size(), rloc.total());

    for (int i = 0; i < hosts.size(); ++i) {
      assertTrue(rloc.hasNext());
      String s = rloc.next();
      assertTrue(s != null);
View Full Code Here

Examples of org.elasticsearch.search.facet.statistical.StatisticalFacet.total()

            assertThat(searchResponse.failedShards(), equalTo(0));

            StatisticalFacet facet = searchResponse.facets().facet("stats1");
            assertThat(facet.name(), equalTo(facet.name()));
            assertThat(facet.count(), equalTo(2l));
            assertThat(facet.total(), equalTo(3d));
            assertThat(facet.min(), equalTo(1d));
            assertThat(facet.max(), equalTo(2d));
            assertThat(facet.mean(), equalTo(1.5d));
            assertThat(facet.sumOfSquares(), equalTo(5d));
View Full Code Here

Examples of org.elasticsearch.search.facet.statistical.StatisticalFacet.total()

            assertThat(facet.sumOfSquares(), equalTo(5d));

            facet = searchResponse.facets().facet("stats2");
            assertThat(facet.name(), equalTo(facet.name()));
            assertThat(facet.count(), equalTo(4l));
            assertThat(facet.total(), equalTo(10d));
            assertThat(facet.min(), equalTo(1d));
            assertThat(facet.max(), equalTo(4d));
            assertThat(facet.mean(), equalTo(2.5d));

            facet = searchResponse.facets().facet("stats3");
View Full Code Here

Examples of org.elasticsearch.search.facet.statistical.StatisticalFacet.total()

            assertThat(facet.mean(), equalTo(2.5d));

            facet = searchResponse.facets().facet("stats3");
            assertThat(facet.name(), equalTo(facet.name()));
            assertThat(facet.count(), equalTo(2l));
            assertThat(facet.total(), equalTo(6d));
            assertThat(facet.min(), equalTo(2d));
            assertThat(facet.max(), equalTo(4d));
            assertThat(facet.mean(), equalTo(3d));
            assertThat(facet.sumOfSquares(), equalTo(20d));
View Full Code Here

Examples of org.elasticsearch.search.facet.statistical.StatisticalFacet.total()


            facet = searchResponse.facets().facet("stats");
            assertThat(facet.name(), equalTo(facet.name()));
            assertThat(facet.count(), equalTo(6l));
            assertThat(facet.total(), equalTo(13d));
            assertThat(facet.min(), equalTo(1d));
            assertThat(facet.max(), equalTo(4d));
            assertThat(facet.mean(), equalTo(13d / 6d));
            assertThat(facet.sumOfSquares(), equalTo(35d));
View Full Code Here

Examples of org.elasticsearch.search.facet.statistical.StatisticalFacet.total()


            facet = searchResponse.facets().facet("stats");
            assertThat(facet.name(), equalTo(facet.name()));
            assertThat(facet.count(), equalTo(6l));
            assertThat(facet.total(), equalTo(13d));
            assertThat(facet.min(), equalTo(1d));
            assertThat(facet.max(), equalTo(4d));
            assertThat(facet.mean(), equalTo(13d / 6d));
            assertThat(facet.sumOfSquares(), equalTo(35d));
        }
View Full Code Here

Examples of org.jboss.aerogear.controller.router.rest.pagination.PaginationProperties.total()

    @Test
    public void offset() {
        final PaginationProperties params = new PaginationProperties(10, 25, 100);
        assertThat(params.offset()).isEqualTo(10);
        assertThat(params.limit()).isEqualTo(25);
        assertThat(params.total().get()).isEqualTo(100);
    }

    @Test
    public void nextOffset() {
        final PaginationProperties params = new PaginationProperties(14, 10, 30);
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.