accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [accumulo] 01/01: Merge branch '1.9'
Date Thu, 05 Jul 2018 21:35:16 GMT
This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git

commit 86e66e7fdd5794b27c743b8550e5e9fa0d202119
Merge: 13a025d ee88055
Author: Christopher Tubbs <ctubbsii@apache.org>
AuthorDate: Thu Jul 5 17:18:21 2018 -0400

    Merge branch '1.9'

 .../org/apache/accumulo/core/util/AddressUtil.java     |  2 --
 .../org/apache/accumulo/core/util/ServerServices.java  |  2 --
 .../core/client/summary/CountingSummarizerTest.java    |  4 ----
 .../summarizers/EntryLengthSummarizersTest.java        |  1 -
 pom.xml                                                | 18 +++---------------
 .../accumulo/server/rpc/CustomNonBlockingServer.java   |  1 -
 .../accumulo/server/client/BulkImporterTest.java       |  1 -
 7 files changed, 3 insertions(+), 26 deletions(-)

diff --cc core/src/test/java/org/apache/accumulo/core/client/summary/CountingSummarizerTest.java
index d7aff9c,0000000..c9cb457
mode 100644,000000..100644
--- a/core/src/test/java/org/apache/accumulo/core/client/summary/CountingSummarizerTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/summary/CountingSummarizerTest.java
@@@ -1,262 -1,0 +1,258 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License"); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +
 +package org.apache.accumulo.core.client.summary;
 +
 +import static org.apache.accumulo.core.client.summary.CountingSummarizer.COUNTER_STAT_PREFIX;
 +import static org.apache.accumulo.core.client.summary.CountingSummarizer.DELETES_IGNORED_STAT;
 +import static org.apache.accumulo.core.client.summary.CountingSummarizer.EMITTED_STAT;
 +import static org.apache.accumulo.core.client.summary.CountingSummarizer.INGNORE_DELETES_OPT;
 +import static org.apache.accumulo.core.client.summary.CountingSummarizer.MAX_COUNTERS_OPT;
 +import static org.apache.accumulo.core.client.summary.CountingSummarizer.MAX_COUNTER_LEN_OPT;
 +import static org.apache.accumulo.core.client.summary.CountingSummarizer.SEEN_STAT;
 +import static org.apache.accumulo.core.client.summary.CountingSummarizer.TOO_LONG_STAT;
 +import static org.apache.accumulo.core.client.summary.CountingSummarizer.TOO_MANY_STAT;
 +
 +import java.util.Arrays;
 +import java.util.HashMap;
 +
- import org.apache.accumulo.core.client.summary.CounterSummary;
- import org.apache.accumulo.core.client.summary.CountingSummarizer;
- import org.apache.accumulo.core.client.summary.Summarizer;
 +import org.apache.accumulo.core.client.summary.Summarizer.Collector;
- import org.apache.accumulo.core.client.summary.SummarizerConfiguration;
 +import org.apache.accumulo.core.client.summary.summarizers.FamilySummarizer;
 +import org.apache.accumulo.core.client.summary.summarizers.VisibilitySummarizer;
 +import org.apache.accumulo.core.data.Key;
 +import org.apache.accumulo.core.data.Value;
 +import org.junit.Assert;
 +import org.junit.Test;
 +
 +public class CountingSummarizerTest {
 +
 +  public static class MultiSummarizer extends CountingSummarizer<String> {
 +    @Override
 +    protected Converter<String> converter() {
 +      return (k, v, c) -> {
 +        c.accept("rp:" + k.getRowData().subSequence(0, 2));
 +        c.accept("fp:" + k.getColumnFamilyData().subSequence(0, 2));
 +        c.accept("qp:" + k.getColumnQualifierData().subSequence(0, 2));
 +      };
 +    }
 +  }
 +
 +  @Test
 +  public void testMultipleEmit() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(MultiSummarizer.class).build();
 +    MultiSummarizer countSum = new MultiSummarizer();
 +
 +    Summarizer.Collector collector = countSum.collector(sc);
 +
 +    Value val = new Value("abc");
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +
 +    for (String row : new String[] {"ask", "asleep", "some", "soul"}) {
 +      for (String fam : new String[] {"hop", "hope", "nope", "noop"}) {
 +        for (String qual : new String[] {"mad", "lad", "lab", "map"}) {
 +          collector.accept(new Key(row, fam, qual), val);
 +
 +          expected.merge("rp:" + row.substring(0, 2), 1L, Long::sum);
 +          expected.merge("fp:" + fam.substring(0, 2), 1L, Long::sum);
 +          expected.merge("qp:" + qual.substring(0, 2), 1L, Long::sum);
 +        }
 +      }
 +    }
 +
 +    HashMap<String,Long> stats = new HashMap<>();
 +    collector.summarize((k, v) -> stats.put(k, v));
 +
 +    CounterSummary csum = new CounterSummary(stats);
 +    Assert.assertEquals(expected, csum.getCounters());
 +    Assert.assertEquals(64, csum.getSeen());
 +    Assert.assertEquals(3 * 64, csum.getEmitted());
 +    Assert.assertEquals(0, csum.getIgnored());
 +    Assert.assertEquals(0, csum.getDeletesIgnored());
 +  }
 +
 +  @Test
 +  public void testSummarizing() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(FamilySummarizer.class)
 +        .addOptions(MAX_COUNTERS_OPT, "5", MAX_COUNTER_LEN_OPT, "10").build();
 +    FamilySummarizer countSum = new FamilySummarizer();
 +
 +    Value val = new Value("abc");
 +
 +    Summarizer.Collector collector = countSum.collector(sc);
 +    for (String fam : Arrays.asList("f1", "f1", "f1", "f2", "f1", "f70000000000000000000",
 +        "f70000000000000000001", "f2", "f3", "f4", "f5", "f6", "f7", "f3", "f7")) {
 +      collector.accept(new Key("r", fam), val);
 +    }
 +
 +    Key dk = new Key("r", "f2");
 +    dk.setDeleted(true);
 +    collector.accept(dk, new Value(""));
 +
 +    HashMap<String,Long> stats = new HashMap<>();
 +    collector.summarize((k, v) -> stats.put(k, v));
 +
 +    String p = COUNTER_STAT_PREFIX;
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +    expected.put(p + "f1", 4L);
 +    expected.put(p + "f2", 2L);
 +    expected.put(p + "f3", 2L);
 +    expected.put(p + "f4", 1L);
 +    expected.put(p + "f5", 1L);
 +    expected.put(TOO_LONG_STAT, 2L);
 +    expected.put(TOO_MANY_STAT, 3L);
 +    expected.put(SEEN_STAT, 16L);
 +    expected.put(EMITTED_STAT, 15L);
 +    expected.put(DELETES_IGNORED_STAT, 1L);
 +
 +    Assert.assertEquals(expected, stats);
 +
 +    CounterSummary csum = new CounterSummary(stats);
 +    Assert.assertEquals(5, csum.getIgnored());
 +    Assert.assertEquals(3, csum.getTooMany());
 +    Assert.assertEquals(2, csum.getTooLong());
 +    Assert.assertEquals(16, csum.getSeen());
 +    Assert.assertEquals(15, csum.getEmitted());
 +    Assert.assertEquals(1, csum.getDeletesIgnored());
 +
 +    expected.clear();
 +    expected.put("f1", 4L);
 +    expected.put("f2", 2L);
 +    expected.put("f3", 2L);
 +    expected.put("f4", 1L);
 +    expected.put("f5", 1L);
 +    Assert.assertEquals(expected, csum.getCounters());
 +
 +  }
 +
 +  @Test
 +  public void testMerge() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(VisibilitySummarizer.class)
 +        .addOption(MAX_COUNTERS_OPT, "5").build();
 +    VisibilitySummarizer countSum = new VisibilitySummarizer();
 +
 +    String p = COUNTER_STAT_PREFIX;
 +
 +    HashMap<String,Long> sm1 = new HashMap<>();
 +    sm1.put(p + "f001", 9L);
 +    sm1.put(p + "f002", 4L);
 +    sm1.put(p + "f003", 2L);
 +    sm1.put(p + "f004", 1L);
 +    sm1.put(p + "f005", 19L);
 +    sm1.put(EMITTED_STAT, 15L);
 +    sm1.put(SEEN_STAT, 5L);
 +    sm1.put(DELETES_IGNORED_STAT, 1L);
 +
 +    HashMap<String,Long> sm2 = new HashMap<>();
 +    sm2.put(p + "f001", 1L);
 +    sm2.put(p + "f002", 2L);
 +    sm2.put(p + "f00a", 7L);
 +    sm2.put(p + "f00b", 1L);
 +    sm2.put(p + "f00c", 17L);
 +    sm2.put(EMITTED_STAT, 18L);
 +    sm2.put(SEEN_STAT, 6L);
 +    sm2.put(DELETES_IGNORED_STAT, 2L);
 +
 +    countSum.combiner(sc).merge(sm1, sm2);
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +    expected.put(p + "f001", 10L);
 +    expected.put(p + "f002", 6L);
 +    expected.put(p + "f005", 19L);
 +    expected.put(p + "f00a", 7L);
 +    expected.put(p + "f00c", 17L);
 +    expected.put(TOO_LONG_STAT, 0L);
 +    expected.put(TOO_MANY_STAT, 4L);
 +    expected.put(EMITTED_STAT, 18L + 15L);
 +    expected.put(SEEN_STAT, 6L + 5L);
 +    expected.put(DELETES_IGNORED_STAT, 3L);
 +
 +    Assert.assertEquals(expected, sm1);
 +
 +    sm2.clear();
 +    sm2.put(p + "f001", 19L);
 +    sm2.put(p + "f002", 2L);
 +    sm2.put(p + "f003", 3L);
 +    sm2.put(p + "f00b", 13L);
 +    sm2.put(p + "f00c", 2L);
 +    sm2.put(TOO_LONG_STAT, 1L);
 +    sm2.put(TOO_MANY_STAT, 3L);
 +    sm2.put(EMITTED_STAT, 21L);
 +    sm2.put(SEEN_STAT, 7L);
 +    sm2.put(DELETES_IGNORED_STAT, 5L);
 +
 +    countSum.combiner(sc).merge(sm1, sm2);
 +
 +    expected.clear();
 +    expected.put(p + "f001", 29L);
 +    expected.put(p + "f002", 8L);
 +    expected.put(p + "f005", 19L);
 +    expected.put(p + "f00b", 13L);
 +    expected.put(p + "f00c", 19L);
 +    expected.put(TOO_LONG_STAT, 1L);
 +    expected.put(TOO_MANY_STAT, 17L);
 +    expected.put(EMITTED_STAT, 21L + 18 + 15);
 +    expected.put(SEEN_STAT, 7L + 6 + 5);
 +    expected.put(DELETES_IGNORED_STAT, 8L);
 +  }
 +
 +  @Test
 +  public void testCountDeletes() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(FamilySummarizer.class)
 +        .addOptions(INGNORE_DELETES_OPT, "false").build();
 +    FamilySummarizer countSum = new FamilySummarizer();
 +
 +    Key k1 = new Key("r1", "f1");
 +    Key k2 = new Key("r1", "f1");
 +    k2.setDeleted(true);
 +    Key k3 = new Key("r1", "f2");
 +
 +    Collector collector = countSum.collector(sc);
 +    collector.accept(k1, new Value(""));
 +    collector.accept(k2, new Value(""));
 +    collector.accept(k3, new Value(""));
 +
 +    String p = COUNTER_STAT_PREFIX;
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +    expected.put(p + "f1", 2L);
 +    expected.put(p + "f2", 1L);
 +    expected.put(TOO_LONG_STAT, 0L);
 +    expected.put(TOO_MANY_STAT, 0L);
 +    expected.put(SEEN_STAT, 3L);
 +    expected.put(EMITTED_STAT, 3L);
 +    expected.put(DELETES_IGNORED_STAT, 0L);
 +
 +    HashMap<String,Long> stats = new HashMap<>();
 +    collector.summarize(stats::put);
 +    Assert.assertEquals(expected, stats);
 +
 +    CounterSummary csum = new CounterSummary(stats);
 +    Assert.assertEquals(0, csum.getIgnored());
 +    Assert.assertEquals(0, csum.getTooMany());
 +    Assert.assertEquals(0, csum.getTooLong());
 +    Assert.assertEquals(3, csum.getSeen());
 +    Assert.assertEquals(3, csum.getEmitted());
 +    Assert.assertEquals(0, csum.getDeletesIgnored());
 +
 +    expected.clear();
 +    expected.put("f1", 2L);
 +    expected.put("f2", 1L);
 +    Assert.assertEquals(expected, csum.getCounters());
 +  }
 +}
diff --cc core/src/test/java/org/apache/accumulo/core/client/summary/summarizers/EntryLengthSummarizersTest.java
index 7d4a51c,0000000..456c42f
mode 100644,000000..100644
--- a/core/src/test/java/org/apache/accumulo/core/client/summary/summarizers/EntryLengthSummarizersTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/summary/summarizers/EntryLengthSummarizersTest.java
@@@ -1,1166 -1,0 +1,1165 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License");you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.accumulo.core.client.summary.summarizers;
 +
 +import java.util.HashMap;
 +
 +import org.apache.accumulo.core.client.summary.Summarizer.Collector;
 +import org.apache.accumulo.core.client.summary.Summarizer.Combiner;
 +import org.apache.accumulo.core.client.summary.SummarizerConfiguration;
- import org.apache.accumulo.core.client.summary.summarizers.EntryLengthSummarizer;
 +import org.apache.accumulo.core.data.Key;
 +import org.apache.accumulo.core.data.Value;
 +import org.junit.Assert;
 +import org.junit.Test;
 +
 +public class EntryLengthSummarizersTest {
 +
 +  /* COLLECTOR TEST */
 +  /* Basic Test: Each test adds to the next, all are simple lengths. */
 +
 +  @Test
 +  public void testEmpty() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(EntryLengthSummarizer.class)
 +        .build();
 +    EntryLengthSummarizer entrySum = new EntryLengthSummarizer();
 +
 +    Collector collector = entrySum.collector(sc);
 +
 +    HashMap<String,Long> stats = new HashMap<>();
 +    collector.summarize(stats::put);
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +    expected.put("key.min", 0L);
 +    expected.put("key.max", 0L);
 +    expected.put("key.sum", 0L);
 +
 +    expected.put("row.min", 0L);
 +    expected.put("row.max", 0L);
 +    expected.put("row.sum", 0L);
 +
 +    expected.put("family.min", 0L);
 +    expected.put("family.max", 0L);
 +    expected.put("family.sum", 0L);
 +
 +    expected.put("qualifier.min", 0L);
 +    expected.put("qualifier.max", 0L);
 +    expected.put("qualifier.sum", 0L);
 +
 +    expected.put("visibility.min", 0L);
 +    expected.put("visibility.max", 0L);
 +    expected.put("visibility.sum", 0L);
 +
 +    expected.put("value.min", 0L);
 +    expected.put("value.max", 0L);
 +    expected.put("value.sum", 0L);
 +
 +    expected.put("total", 0L);
 +
 +    Assert.assertEquals(expected, stats);
 +  }
 +
 +  @Test
 +  public void testBasicRow() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(EntryLengthSummarizer.class)
 +        .build();
 +    EntryLengthSummarizer entrySum = new EntryLengthSummarizer();
 +
 +    Key k1 = new Key("r1");
 +    Key k2 = new Key("r2");
 +    Key k3 = new Key("r3");
 +
 +    Collector collector = entrySum.collector(sc);
 +    collector.accept(k1, new Value(""));
 +    collector.accept(k2, new Value(""));
 +    collector.accept(k3, new Value(""));
 +
 +    HashMap<String,Long> stats = new HashMap<>();
 +    collector.summarize(stats::put);
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +    expected.put("key.min", 2L);
 +    expected.put("key.max", 2L);
 +    expected.put("key.sum", 6L);
 +
 +    // Log2 Histogram
 +    expected.put("key.logHist.1", 3L);
 +
 +    expected.put("row.min", 2L);
 +    expected.put("row.max", 2L);
 +    expected.put("row.sum", 6L);
 +
 +    // Log2 Histogram
 +    expected.put("row.logHist.1", 3L);
 +
 +    expected.put("family.min", 0L);
 +    expected.put("family.max", 0L);
 +    expected.put("family.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("family.logHist.0", 3L);
 +
 +    expected.put("qualifier.min", 0L);
 +    expected.put("qualifier.max", 0L);
 +    expected.put("qualifier.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("qualifier.logHist.0", 3L);
 +
 +    expected.put("visibility.min", 0L);
 +    expected.put("visibility.max", 0L);
 +    expected.put("visibility.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("visibility.logHist.0", 3L);
 +
 +    expected.put("value.min", 0L);
 +    expected.put("value.max", 0L);
 +    expected.put("value.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("value.logHist.0", 3L);
 +
 +    expected.put("total", 3L);
 +
 +    Assert.assertEquals(expected, stats);
 +  }
 +
 +  @Test
 +  public void testBasicFamily() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(EntryLengthSummarizer.class)
 +        .build();
 +    EntryLengthSummarizer entrySum = new EntryLengthSummarizer();
 +
 +    Key k1 = new Key("r1", "f1");
 +    Key k2 = new Key("r2", "f2");
 +    Key k3 = new Key("r3", "f3");
 +
 +    Collector collector = entrySum.collector(sc);
 +    collector.accept(k1, new Value(""));
 +    collector.accept(k2, new Value(""));
 +    collector.accept(k3, new Value(""));
 +
 +    HashMap<String,Long> stats = new HashMap<>();
 +    collector.summarize(stats::put);
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +    expected.put("key.min", 4L);
 +    expected.put("key.max", 4L);
 +    expected.put("key.sum", 12L);
 +
 +    // Log2 Histogram
 +    expected.put("key.logHist.2", 3L);
 +
 +    expected.put("row.min", 2L);
 +    expected.put("row.max", 2L);
 +    expected.put("row.sum", 6L);
 +
 +    // Log2 Histogram
 +    expected.put("row.logHist.1", 3L);
 +
 +    expected.put("family.min", 2L);
 +    expected.put("family.max", 2L);
 +    expected.put("family.sum", 6L);
 +
 +    // Log2 Histogram
 +    expected.put("family.logHist.1", 3L);
 +
 +    expected.put("qualifier.min", 0L);
 +    expected.put("qualifier.max", 0L);
 +    expected.put("qualifier.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("qualifier.logHist.0", 3L);
 +
 +    expected.put("visibility.min", 0L);
 +    expected.put("visibility.max", 0L);
 +    expected.put("visibility.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("visibility.logHist.0", 3L);
 +
 +    expected.put("value.min", 0L);
 +    expected.put("value.max", 0L);
 +    expected.put("value.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("value.logHist.0", 3L);
 +
 +    expected.put("total", 3L);
 +
 +    Assert.assertEquals(expected, stats);
 +  }
 +
 +  @Test
 +  public void testBasicQualifier() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(EntryLengthSummarizer.class)
 +        .build();
 +    EntryLengthSummarizer entrySum = new EntryLengthSummarizer();
 +
 +    Key k1 = new Key("r1", "f1", "q1");
 +    Key k2 = new Key("r2", "f2", "q2");
 +    Key k3 = new Key("r3", "f3", "q3");
 +
 +    Collector collector = entrySum.collector(sc);
 +    collector.accept(k1, new Value(""));
 +    collector.accept(k2, new Value(""));
 +    collector.accept(k3, new Value(""));
 +
 +    HashMap<String,Long> stats = new HashMap<>();
 +    collector.summarize(stats::put);
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +    expected.put("key.min", 6L);
 +    expected.put("key.max", 6L);
 +    expected.put("key.sum", 18L);
 +
 +    // Log2 Histogram
 +    expected.put("key.logHist.3", 3L);
 +
 +    expected.put("row.min", 2L);
 +    expected.put("row.max", 2L);
 +    expected.put("row.sum", 6L);
 +
 +    // Log2 Histogram
 +    expected.put("row.logHist.1", 3L);
 +
 +    expected.put("family.min", 2L);
 +    expected.put("family.max", 2L);
 +    expected.put("family.sum", 6L);
 +
 +    // Log2 Histogram
 +    expected.put("family.logHist.1", 3L);
 +
 +    expected.put("qualifier.min", 2L);
 +    expected.put("qualifier.max", 2L);
 +    expected.put("qualifier.sum", 6L);
 +
 +    // Log2 Histogram
 +    expected.put("qualifier.logHist.1", 3L);
 +
 +    expected.put("visibility.min", 0L);
 +    expected.put("visibility.max", 0L);
 +    expected.put("visibility.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("visibility.logHist.0", 3L);
 +
 +    expected.put("value.min", 0L);
 +    expected.put("value.max", 0L);
 +    expected.put("value.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("value.logHist.0", 3L);
 +
 +    expected.put("total", 3L);
 +
 +    Assert.assertEquals(expected, stats);
 +  }
 +
 +  @Test
 +  public void testBasicVisibility() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(EntryLengthSummarizer.class)
 +        .build();
 +    EntryLengthSummarizer entrySum = new EntryLengthSummarizer();
 +
 +    Key k1 = new Key("r1", "f1", "q1", "v1");
 +    Key k2 = new Key("r2", "f2", "q2", "v2");
 +    Key k3 = new Key("r3", "f3", "q3", "v3");
 +
 +    Collector collector = entrySum.collector(sc);
 +    collector.accept(k1, new Value(""));
 +    collector.accept(k2, new Value(""));
 +    collector.accept(k3, new Value(""));
 +
 +    HashMap<String,Long> stats = new HashMap<>();
 +    collector.summarize(stats::put);
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +    expected.put("key.min", 8L);
 +    expected.put("key.max", 8L);
 +    expected.put("key.sum", 24L);
 +
 +    // Log2 Histogram
 +    expected.put("key.logHist.3", 3L);
 +
 +    expected.put("row.min", 2L);
 +    expected.put("row.max", 2L);
 +    expected.put("row.sum", 6L);
 +
 +    // Log2 Histogram
 +    expected.put("row.logHist.1", 3L);
 +
 +    expected.put("family.min", 2L);
 +    expected.put("family.max", 2L);
 +    expected.put("family.sum", 6L);
 +
 +    // Log2 Histogram
 +    expected.put("family.logHist.1", 3L);
 +
 +    expected.put("qualifier.min", 2L);
 +    expected.put("qualifier.max", 2L);
 +    expected.put("qualifier.sum", 6L);
 +
 +    // Log2 Histogram
 +    expected.put("qualifier.logHist.1", 3L);
 +
 +    expected.put("visibility.min", 2L);
 +    expected.put("visibility.max", 2L);
 +    expected.put("visibility.sum", 6L);
 +
 +    // Log2 Histogram
 +    expected.put("visibility.logHist.1", 3L);
 +
 +    expected.put("value.min", 0L);
 +    expected.put("value.max", 0L);
 +    expected.put("value.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("value.logHist.0", 3L);
 +
 +    expected.put("total", 3L);
 +
 +    Assert.assertEquals(expected, stats);
 +  }
 +
 +  @Test
 +  public void testBasicValue() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(EntryLengthSummarizer.class)
 +        .build();
 +    EntryLengthSummarizer entrySum = new EntryLengthSummarizer();
 +
 +    Key k1 = new Key("r1", "f1", "q1", "v1");
 +    Key k2 = new Key("r2", "f2", "q2", "v2");
 +    Key k3 = new Key("r3", "f3", "q3", "v3");
 +
 +    Collector collector = entrySum.collector(sc);
 +    collector.accept(k1, new Value("v1"));
 +    collector.accept(k2, new Value("v2"));
 +    collector.accept(k3, new Value("v3"));
 +
 +    HashMap<String,Long> stats = new HashMap<>();
 +    collector.summarize(stats::put);
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +    expected.put("key.min", 8L);
 +    expected.put("key.max", 8L);
 +    expected.put("key.sum", 24L);
 +
 +    // Log2 Histogram
 +    expected.put("key.logHist.3", 3L);
 +
 +    expected.put("row.min", 2L);
 +    expected.put("row.max", 2L);
 +    expected.put("row.sum", 6L);
 +
 +    // Log2 Histogram
 +    expected.put("row.logHist.1", 3L);
 +
 +    expected.put("family.min", 2L);
 +    expected.put("family.max", 2L);
 +    expected.put("family.sum", 6L);
 +
 +    // Log2 Histogram
 +    expected.put("family.logHist.1", 3L);
 +
 +    expected.put("qualifier.min", 2L);
 +    expected.put("qualifier.max", 2L);
 +    expected.put("qualifier.sum", 6L);
 +
 +    // Log2 Histogram
 +    expected.put("qualifier.logHist.1", 3L);
 +
 +    expected.put("visibility.min", 2L);
 +    expected.put("visibility.max", 2L);
 +    expected.put("visibility.sum", 6L);
 +
 +    // Log2 Histogram
 +    expected.put("visibility.logHist.1", 3L);
 +
 +    expected.put("value.min", 2L);
 +    expected.put("value.max", 2L);
 +    expected.put("value.sum", 6L);
 +
 +    // Log2 Histogram
 +    expected.put("value.logHist.1", 3L);
 +
 +    expected.put("total", 3L);
 +
 +    Assert.assertEquals(expected, stats);
 +  }
 +
 +  /* Complex Test: Each test adds to the next, all are mixed lengths. */
 +
 +  @Test
 +  public void testComplexRow() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(EntryLengthSummarizer.class)
 +        .build();
 +    EntryLengthSummarizer entrySum = new EntryLengthSummarizer();
 +
 +    Key k1 = new Key("r1");
 +    Key k2 = new Key("row2");
 +    Key k3 = new Key("columnRow3");
 +
 +    Collector collector = entrySum.collector(sc);
 +    collector.accept(k1, new Value(""));
 +    collector.accept(k2, new Value(""));
 +    collector.accept(k3, new Value(""));
 +
 +    HashMap<String,Long> stats = new HashMap<>();
 +    collector.summarize(stats::put);
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +    expected.put("key.min", 2L);
 +    expected.put("key.max", 10L);
 +    expected.put("key.sum", 16L);
 +
 +    // Log2 Histogram
 +    expected.put("key.logHist.1", 1L);
 +    expected.put("key.logHist.2", 1L);
 +    expected.put("key.logHist.3", 1L);
 +
 +    expected.put("row.min", 2L);
 +    expected.put("row.max", 10L);
 +    expected.put("row.sum", 16L);
 +
 +    // Log2 Histogram
 +    expected.put("row.logHist.1", 1L);
 +    expected.put("row.logHist.2", 1L);
 +    expected.put("row.logHist.3", 1L);
 +
 +    expected.put("family.min", 0L);
 +    expected.put("family.max", 0L);
 +    expected.put("family.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("family.logHist.0", 3L);
 +
 +    expected.put("qualifier.min", 0L);
 +    expected.put("qualifier.max", 0L);
 +    expected.put("qualifier.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("qualifier.logHist.0", 3L);
 +
 +    expected.put("visibility.min", 0L);
 +    expected.put("visibility.max", 0L);
 +    expected.put("visibility.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("visibility.logHist.0", 3L);
 +
 +    expected.put("value.min", 0L);
 +    expected.put("value.max", 0L);
 +    expected.put("value.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("value.logHist.0", 3L);
 +
 +    expected.put("total", 3L);
 +
 +    Assert.assertEquals(expected, stats);
 +  }
 +
 +  @Test
 +  public void testComplexFamily() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(EntryLengthSummarizer.class)
 +        .build();
 +    EntryLengthSummarizer entrySum = new EntryLengthSummarizer();
 +
 +    Key k1 = new Key("r1", "family1");
 +    Key k2 = new Key("row2", "columnFamily2");
 +    Key k3 = new Key("columnRow3", "f3");
 +
 +    Collector collector = entrySum.collector(sc);
 +    collector.accept(k1, new Value(""));
 +    collector.accept(k2, new Value(""));
 +    collector.accept(k3, new Value(""));
 +
 +    HashMap<String,Long> stats = new HashMap<>();
 +    collector.summarize(stats::put);
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +    expected.put("key.min", 9L);
 +    expected.put("key.max", 17L);
 +    expected.put("key.sum", 38L);
 +
 +    // Log2 Histogram
 +    expected.put("key.logHist.3", 1L);
 +    expected.put("key.logHist.4", 2L);
 +
 +    expected.put("row.min", 2L);
 +    expected.put("row.max", 10L);
 +    expected.put("row.sum", 16L);
 +
 +    // Log2 Histogram
 +    expected.put("row.logHist.1", 1L);
 +    expected.put("row.logHist.2", 1L);
 +    expected.put("row.logHist.3", 1L);
 +
 +    expected.put("family.min", 2L);
 +    expected.put("family.max", 13L);
 +    expected.put("family.sum", 22L);
 +
 +    // Log2 Histogram
 +    expected.put("family.logHist.1", 1L);
 +    expected.put("family.logHist.3", 1L);
 +    expected.put("family.logHist.4", 1L);
 +
 +    expected.put("qualifier.min", 0L);
 +    expected.put("qualifier.max", 0L);
 +    expected.put("qualifier.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("qualifier.logHist.0", 3L);
 +
 +    expected.put("visibility.min", 0L);
 +    expected.put("visibility.max", 0L);
 +    expected.put("visibility.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("visibility.logHist.0", 3L);
 +
 +    expected.put("value.min", 0L);
 +    expected.put("value.max", 0L);
 +    expected.put("value.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("value.logHist.0", 3L);
 +
 +    expected.put("total", 3L);
 +
 +    Assert.assertEquals(expected, stats);
 +  }
 +
 +  @Test
 +  public void testComplexQualifier() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(EntryLengthSummarizer.class)
 +        .build();
 +    EntryLengthSummarizer entrySum = new EntryLengthSummarizer();
 +
 +    Key k1 = new Key("r1", "family1", "columnQualifier1");
 +    Key k2 = new Key("row2", "columnFamily2", "q2");
 +    Key k3 = new Key("columnRow3", "f3", "qualifier3");
 +
 +    Collector collector = entrySum.collector(sc);
 +    collector.accept(k1, new Value(""));
 +    collector.accept(k2, new Value(""));
 +    collector.accept(k3, new Value(""));
 +
 +    HashMap<String,Long> stats = new HashMap<>();
 +    collector.summarize(stats::put);
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +    expected.put("key.min", 19L);
 +    expected.put("key.max", 25L);
 +    expected.put("key.sum", 66L);
 +
 +    // Log2 Histogram
 +    expected.put("key.logHist.4", 2L);
 +    expected.put("key.logHist.5", 1L);
 +
 +    expected.put("row.min", 2L);
 +    expected.put("row.max", 10L);
 +    expected.put("row.sum", 16L);
 +
 +    // Log2 Histogram
 +    expected.put("row.logHist.1", 1L);
 +    expected.put("row.logHist.2", 1L);
 +    expected.put("row.logHist.3", 1L);
 +
 +    expected.put("family.min", 2L);
 +    expected.put("family.max", 13L);
 +    expected.put("family.sum", 22L);
 +
 +    // Log2 Histogram
 +    expected.put("family.logHist.1", 1L);
 +    expected.put("family.logHist.3", 1L);
 +    expected.put("family.logHist.4", 1L);
 +
 +    expected.put("qualifier.min", 2L);
 +    expected.put("qualifier.max", 16L);
 +    expected.put("qualifier.sum", 28L);
 +
 +    // Log2 Histogram
 +    expected.put("qualifier.logHist.1", 1L);
 +    expected.put("qualifier.logHist.3", 1L);
 +    expected.put("qualifier.logHist.4", 1L);
 +
 +    expected.put("visibility.min", 0L);
 +    expected.put("visibility.max", 0L);
 +    expected.put("visibility.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("visibility.logHist.0", 3L);
 +
 +    expected.put("value.min", 0L);
 +    expected.put("value.max", 0L);
 +    expected.put("value.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("value.logHist.0", 3L);
 +
 +    expected.put("total", 3L);
 +
 +    Assert.assertEquals(expected, stats);
 +  }
 +
 +  @Test
 +  public void testComplexVisibility() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(EntryLengthSummarizer.class)
 +        .build();
 +    EntryLengthSummarizer entrySum = new EntryLengthSummarizer();
 +
 +    Key k1 = new Key("r1", "family1", "columnQualifier1", "v1");
 +    Key k2 = new Key("row2", "columnFamily2", "q2", "visibility2");
 +    Key k3 = new Key("columnRow3", "f3", "qualifier3", "columnVisibility3");
 +
 +    Collector collector = entrySum.collector(sc);
 +    collector.accept(k1, new Value(""));
 +    collector.accept(k2, new Value(""));
 +    collector.accept(k3, new Value(""));
 +
 +    HashMap<String,Long> stats = new HashMap<>();
 +    collector.summarize(stats::put);
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +    expected.put("key.min", 27L);
 +    expected.put("key.max", 39L);
 +    expected.put("key.sum", 96L);
 +
 +    // Log2 Histogram
 +    expected.put("key.logHist.5", 3L);
 +
 +    expected.put("row.min", 2L);
 +    expected.put("row.max", 10L);
 +    expected.put("row.sum", 16L);
 +
 +    // Log2 Histogram
 +    expected.put("row.logHist.1", 1L);
 +    expected.put("row.logHist.2", 1L);
 +    expected.put("row.logHist.3", 1L);
 +
 +    expected.put("family.min", 2L);
 +    expected.put("family.max", 13L);
 +    expected.put("family.sum", 22L);
 +
 +    // Log2 Histogram
 +    expected.put("family.logHist.1", 1L);
 +    expected.put("family.logHist.3", 1L);
 +    expected.put("family.logHist.4", 1L);
 +
 +    expected.put("qualifier.min", 2L);
 +    expected.put("qualifier.max", 16L);
 +    expected.put("qualifier.sum", 28L);
 +
 +    // Log2 Histogram
 +    expected.put("qualifier.logHist.1", 1L);
 +    expected.put("qualifier.logHist.3", 1L);
 +    expected.put("qualifier.logHist.4", 1L);
 +
 +    expected.put("visibility.min", 2L);
 +    expected.put("visibility.max", 17L);
 +    expected.put("visibility.sum", 30L);
 +
 +    // Log2 Histogram
 +    expected.put("visibility.logHist.1", 1L);
 +    expected.put("visibility.logHist.3", 1L);
 +    expected.put("visibility.logHist.4", 1L);
 +
 +    expected.put("value.min", 0L);
 +    expected.put("value.max", 0L);
 +    expected.put("value.sum", 0L);
 +
 +    // Log2 Histogram
 +    expected.put("value.logHist.0", 3L);
 +
 +    expected.put("total", 3L);
 +
 +    Assert.assertEquals(expected, stats);
 +  }
 +
 +  @Test
 +  public void testComplexValue() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(EntryLengthSummarizer.class)
 +        .build();
 +    EntryLengthSummarizer entrySum = new EntryLengthSummarizer();
 +
 +    Key k1 = new Key("r1", "family1", "columnQualifier1", "v1");
 +    Key k2 = new Key("row2", "columnFamily2", "q2", "visibility2");
 +    Key k3 = new Key("columnRow3", "f3", "qualifier3", "columnVisibility3");
 +
 +    Collector collector = entrySum.collector(sc);
 +    collector.accept(k1, new Value("v1"));
 +    collector.accept(k2, new Value("value2"));
 +    collector.accept(k3, new Value("keyValue3"));
 +
 +    HashMap<String,Long> stats = new HashMap<>();
 +    collector.summarize(stats::put);
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +    expected.put("key.min", 27L);
 +    expected.put("key.max", 39L);
 +    expected.put("key.sum", 96L);
 +
 +    // Log2 Histogram
 +    expected.put("key.logHist.5", 3L);
 +
 +    expected.put("row.min", 2L);
 +    expected.put("row.max", 10L);
 +    expected.put("row.sum", 16L);
 +
 +    // Log2 Histogram
 +    expected.put("row.logHist.1", 1L);
 +    expected.put("row.logHist.2", 1L);
 +    expected.put("row.logHist.3", 1L);
 +
 +    expected.put("family.min", 2L);
 +    expected.put("family.max", 13L);
 +    expected.put("family.sum", 22L);
 +
 +    // Log2 Histogram
 +    expected.put("family.logHist.1", 1L);
 +    expected.put("family.logHist.3", 1L);
 +    expected.put("family.logHist.4", 1L);
 +
 +    expected.put("qualifier.min", 2L);
 +    expected.put("qualifier.max", 16L);
 +    expected.put("qualifier.sum", 28L);
 +
 +    // Log2 Histogram
 +    expected.put("qualifier.logHist.1", 1L);
 +    expected.put("qualifier.logHist.3", 1L);
 +    expected.put("qualifier.logHist.4", 1L);
 +
 +    expected.put("visibility.min", 2L);
 +    expected.put("visibility.max", 17L);
 +    expected.put("visibility.sum", 30L);
 +
 +    // Log2 Histogram
 +    expected.put("visibility.logHist.1", 1L);
 +    expected.put("visibility.logHist.3", 1L);
 +    expected.put("visibility.logHist.4", 1L);
 +
 +    expected.put("value.min", 2L);
 +    expected.put("value.max", 9L);
 +    expected.put("value.sum", 17L);
 +
 +    // Log2 Histogram
 +    expected.put("value.logHist.1", 1L);
 +    expected.put("value.logHist.3", 2L);
 +
 +    expected.put("total", 3L);
 +
 +    Assert.assertEquals(expected, stats);
 +  }
 +
 +  /* Miscellaneous Test */
 +
 +  @Test
 +  public void testAll() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(EntryLengthSummarizer.class)
 +        .build();
 +    EntryLengthSummarizer entrySum = new EntryLengthSummarizer();
 +
 +    Key k1 = new Key("maximumnoqualifier", "f1", "q", "vis1");
 +    Key k2 = new Key("minKey", "fam2", "q2", "visibility2");
 +    Key k3 = new Key("row3", "f3", "qualifier3", "v3");
 +    Key k4 = new Key("r4", "family4", "qual4", "vis4");
 +    Key k5 = new Key("fifthrow", "thirdfamily", "q5", "v5");
 +    Key k6 = new Key("r6", "sixthfamily", "qual6", "visibi6");
 +
 +    Collector collector = entrySum.collector(sc);
 +    collector.accept(k1, new Value("v1"));
 +    collector.accept(k2, new Value("value2"));
 +    collector.accept(k3, new Value("val3"));
 +    collector.accept(k4, new Value("fourthvalue"));
 +    collector.accept(k5, new Value(""));
 +    collector.accept(k6, new Value("value6"));
 +
 +    HashMap<String,Long> stats = new HashMap<>();
 +    collector.summarize(stats::put);
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +    expected.put("key.min", 18L);
 +    expected.put("key.max", 25L);
 +    expected.put("key.sum", 132L);
 +
 +    // Log2 Histogram
 +    expected.put("key.logHist.4", 2L);
 +    expected.put("key.logHist.5", 4L);
 +
 +    expected.put("row.min", 2L);
 +    expected.put("row.max", 18L);
 +    expected.put("row.sum", 40L);
 +
 +    // Log2 Histogram
 +    expected.put("row.logHist.1", 2L);
 +    expected.put("row.logHist.2", 1L);
 +    expected.put("row.logHist.3", 2L);
 +    expected.put("row.logHist.4", 1L);
 +
 +    expected.put("family.min", 2L);
 +    expected.put("family.max", 11L);
 +    expected.put("family.sum", 37L);
 +
 +    // Log2 Histogram
 +    expected.put("family.logHist.1", 2L);
 +    expected.put("family.logHist.2", 1L);
 +    expected.put("family.logHist.3", 3L);
 +
 +    expected.put("qualifier.min", 1L);
 +    expected.put("qualifier.max", 10L);
 +    expected.put("qualifier.sum", 25L);
 +
 +    // Log2 Histogram
 +    expected.put("qualifier.logHist.0", 1L);
 +    expected.put("qualifier.logHist.1", 2L);
 +    expected.put("qualifier.logHist.2", 2L);
 +    expected.put("qualifier.logHist.3", 1L);
 +
 +    expected.put("visibility.min", 2L);
 +    expected.put("visibility.max", 11L);
 +    expected.put("visibility.sum", 30L);
 +
 +    // Log2 Histogram
 +    expected.put("visibility.logHist.1", 2L);
 +    expected.put("visibility.logHist.2", 2L);
 +    expected.put("visibility.logHist.3", 2L);
 +
 +    expected.put("value.min", 0L);
 +    expected.put("value.max", 11L);
 +    expected.put("value.sum", 29L);
 +
 +    // Log2 Histogram
 +    expected.put("value.logHist.0", 1L);
 +    expected.put("value.logHist.1", 1L);
 +    expected.put("value.logHist.2", 1L);
 +    expected.put("value.logHist.3", 3L);
 +
 +    expected.put("total", 6L);
 +
 +    Assert.assertEquals(expected, stats);
 +  }
 +
 +  @Test
 +  public void testLog2Histogram() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(EntryLengthSummarizer.class)
 +        .build();
 +    EntryLengthSummarizer entrySum = new EntryLengthSummarizer();
 +
 +    Key k1 = new Key("row1");
 +    Key k2 = new Key("row2");
 +    Key k3 = new Key("row3");
 +
 +    Collector collector = entrySum.collector(sc);
 +    collector.accept(k1, new Value("01"));
 +    collector.accept(k2, new Value("012345678"));
 +    collector.accept(k3, new Value("012345679"));
 +
 +    HashMap<String,Long> stats = new HashMap<>();
 +    collector.summarize(stats::put);
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +    expected.put("key.min", 4L);
 +    expected.put("key.max", 4L);
 +    expected.put("key.sum", 12L);
 +
 +    // Log2 Histogram for Key
 +    expected.put("key.logHist.2", 3L);
 +
 +    expected.put("row.min", 4L);
 +    expected.put("row.max", 4L);
 +    expected.put("row.sum", 12L);
 +
 +    // Log2 Histogram for Row
 +    expected.put("row.logHist.2", 3L);
 +
 +    expected.put("family.min", 0L);
 +    expected.put("family.max", 0L);
 +    expected.put("family.sum", 0L);
 +
 +    // Log2 Histogram for Family
 +    expected.put("family.logHist.0", 3L);
 +
 +    expected.put("qualifier.min", 0L);
 +    expected.put("qualifier.max", 0L);
 +    expected.put("qualifier.sum", 0L);
 +
 +    // Log2 Histogram for Qualifier
 +    expected.put("qualifier.logHist.0", 3L);
 +
 +    expected.put("visibility.min", 0L);
 +    expected.put("visibility.max", 0L);
 +    expected.put("visibility.sum", 0L);
 +
 +    // Log2 Histogram for Visibility
 +    expected.put("visibility.logHist.0", 3L);
 +
 +    expected.put("value.min", 2L);
 +    expected.put("value.max", 9L);
 +    expected.put("value.sum", 20L);
 +
 +    // Log2 Histogram for Value
 +    expected.put("value.logHist.1", 1L);
 +    expected.put("value.logHist.3", 2L);
 +
 +    expected.put("total", 3L);
 +
 +    Assert.assertEquals(expected, stats);
 +  }
 +
 +  /* COMBINER TEST */
 +
 +  @Test
 +  public void testCombine() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(EntryLengthSummarizer.class)
 +        .build();
 +    EntryLengthSummarizer entrySum = new EntryLengthSummarizer();
 +
 +    Collector collector1 = entrySum.collector(sc);
 +    collector1.accept(new Key("1", "f1", "q1"), new Value("v1"));
 +    collector1.accept(new Key("1234", "f1", "q1"), new Value("v111"));
 +    collector1.accept(new Key("12345678", "f1", "q1"), new Value("v111111"));
 +
 +    HashMap<String,Long> stats1 = new HashMap<>();
 +    collector1.summarize(stats1::put);
 +
 +    Collector collector2 = entrySum.collector(sc);
 +    collector2.accept(new Key("5432", "f11", "q12"), new Value("2"));
 +    collector2.accept(new Key("12", "f11", "q1234"), new Value("12"));
 +    collector2.accept(new Key("12", "f11", "q11234567"), new Value("4444"));
 +
 +    HashMap<String,Long> stats2 = new HashMap<>();
 +    collector2.summarize(stats2::put);
 +
 +    Combiner combiner = entrySum.combiner(sc);
 +    combiner.merge(stats1, stats2);
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +    expected.put("key.min", 5L);
 +    expected.put("key.max", 14L);
 +    expected.put("key.sum", 59L);
 +
 +    // Log2 Histogram for Key
 +    expected.put("key.logHist.2", 1L);
 +    expected.put("key.logHist.3", 3L);
 +    expected.put("key.logHist.4", 2L);
 +
 +    expected.put("row.min", 1L);
 +    expected.put("row.max", 8L);
 +    expected.put("row.sum", 21L);
 +
 +    // Log2 Histogram for Row
 +    expected.put("row.logHist.0", 1L);
 +    expected.put("row.logHist.1", 2L);
 +    expected.put("row.logHist.2", 2L);
 +    expected.put("row.logHist.3", 1L);
 +
 +    expected.put("family.min", 2L);
 +    expected.put("family.max", 3L);
 +    expected.put("family.sum", 15L);
 +
 +    // Log2 Histogram for Family
 +    expected.put("family.logHist.1", 3L);
 +    expected.put("family.logHist.2", 3L);
 +
 +    expected.put("qualifier.min", 2L);
 +    expected.put("qualifier.max", 9L);
 +    expected.put("qualifier.sum", 23L);
 +
 +    // Log2 Histogram for Qualifier
 +    expected.put("qualifier.logHist.1", 3L);
 +    expected.put("qualifier.logHist.2", 2L);
 +    expected.put("qualifier.logHist.3", 1L);
 +
 +    expected.put("visibility.min", 0L);
 +    expected.put("visibility.max", 0L);
 +    expected.put("visibility.sum", 0L);
 +
 +    // Log2 Histogram for Visibility
 +    expected.put("visibility.logHist.0", 6L);
 +
 +    expected.put("value.min", 1L);
 +    expected.put("value.max", 7L);
 +    expected.put("value.sum", 20L);
 +
 +    // Log2 Histogram for Value
 +    expected.put("value.logHist.0", 1L);
 +    expected.put("value.logHist.1", 2L);
 +    expected.put("value.logHist.2", 2L);
 +    expected.put("value.logHist.3", 1L);
 +
 +    expected.put("total", 6L);
 +
 +    Assert.assertEquals(expected, stats1);
 +  }
 +
 +  @Test
 +  public void testCombine2() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(EntryLengthSummarizer.class)
 +        .build();
 +    EntryLengthSummarizer entrySum = new EntryLengthSummarizer();
 +
 +    Collector collector1 = entrySum.collector(sc);
 +    collector1.accept(new Key("12345678901234567890", "f12345", "q123456"),
 +        new Value("value1234567890"));
 +
 +    HashMap<String,Long> stats1 = new HashMap<>();
 +    collector1.summarize(stats1::put);
 +
 +    Collector collector2 = entrySum.collector(sc);
 +    collector2.accept(new Key("5432", "f11", "q12"), new Value("2"));
 +    collector2.accept(new Key("12", "f11", "q1234"), new Value("12"));
 +    collector2.accept(new Key("12", "f11", "q11234567"), new Value("4444"));
 +
 +    HashMap<String,Long> stats2 = new HashMap<>();
 +    collector2.summarize(stats2::put);
 +
 +    Combiner combiner = entrySum.combiner(sc);
 +    combiner.merge(stats1, stats2);
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +    expected.put("key.min", 10L);
 +    expected.put("key.max", 33L);
 +    expected.put("key.sum", 67L);
 +
 +    // Log2 Histogram for Key
 +    expected.put("key.logHist.3", 2L);
 +    expected.put("key.logHist.4", 1L);
 +    expected.put("key.logHist.5", 1L);
 +
 +    expected.put("row.min", 2L);
 +    expected.put("row.max", 20L);
 +    expected.put("row.sum", 28L);
 +
 +    // Log2 Histogram for Row
 +    expected.put("row.logHist.1", 2L);
 +    expected.put("row.logHist.2", 1L);
 +    expected.put("row.logHist.4", 1L);
 +
 +    expected.put("family.min", 3L);
 +    expected.put("family.max", 6L);
 +    expected.put("family.sum", 15L);
 +
 +    // Log2 Histogram for Family
 +    expected.put("family.logHist.2", 3L);
 +    expected.put("family.logHist.3", 1L);
 +
 +    expected.put("qualifier.min", 3L);
 +    expected.put("qualifier.max", 9L);
 +    expected.put("qualifier.sum", 24L);
 +
 +    // Log2 Histogram for Qualifier
 +    expected.put("qualifier.logHist.2", 2L);
 +    expected.put("qualifier.logHist.3", 2L);
 +
 +    expected.put("visibility.min", 0L);
 +    expected.put("visibility.max", 0L);
 +    expected.put("visibility.sum", 0L);
 +
 +    // Log2 Histogram for Visibility
 +    expected.put("visibility.logHist.0", 4L);
 +
 +    expected.put("value.min", 1L);
 +    expected.put("value.max", 15L);
 +    expected.put("value.sum", 22L);
 +
 +    // Log2 Histogram for Value
 +    expected.put("value.logHist.0", 1L);
 +    expected.put("value.logHist.1", 1L);
 +    expected.put("value.logHist.2", 1L);
 +    expected.put("value.logHist.4", 1L);
 +
 +    expected.put("total", 4L);
 +
 +    Assert.assertEquals(expected, stats1);
 +  }
 +
 +  @Test
 +  public void testCombine3() {
 +    SummarizerConfiguration sc = SummarizerConfiguration.builder(EntryLengthSummarizer.class)
 +        .build();
 +    EntryLengthSummarizer entrySum = new EntryLengthSummarizer();
 +
 +    Collector collector1 = entrySum.collector(sc);
 +    collector1.accept(new Key("r1", "f1"), new Value("v1"));
 +
 +    HashMap<String,Long> stats1 = new HashMap<>();
 +    collector1.summarize(stats1::put);
 +
 +    Collector collector2 = entrySum.collector(sc);
 +    collector2.accept(new Key("row1", "family1", "q1"), new Value(""));
 +
 +    HashMap<String,Long> stats2 = new HashMap<>();
 +    collector2.summarize(stats2::put);
 +
 +    Combiner combiner = entrySum.combiner(sc);
 +    combiner.merge(stats1, stats2);
 +
 +    HashMap<String,Long> expected = new HashMap<>();
 +    expected.put("key.min", 4L);
 +    expected.put("key.max", 13L);
 +    expected.put("key.sum", 17L);
 +
 +    // Log2 Histogram for Key
 +    expected.put("key.logHist.2", 1L);
 +    expected.put("key.logHist.4", 1L);
 +
 +    expected.put("row.min", 2L);
 +    expected.put("row.max", 4L);
 +    expected.put("row.sum", 6L);
 +
 +    // Log2 Histogram for Row
 +    expected.put("row.logHist.1", 1L);
 +    expected.put("row.logHist.2", 1L);
 +
 +    expected.put("family.min", 2L);
 +    expected.put("family.max", 7L);
 +    expected.put("family.sum", 9L);
 +
 +    // Log2 Histogram for Family
 +    expected.put("family.logHist.1", 1L);
 +    expected.put("family.logHist.3", 1L);
 +
 +    expected.put("qualifier.min", 0L);
 +    expected.put("qualifier.max", 2L);
 +    expected.put("qualifier.sum", 2L);
 +
 +    // Log2 Histogram for Qualifier
 +    expected.put("qualifier.logHist.0", 1L);
 +    expected.put("qualifier.logHist.1", 1L);
 +
 +    expected.put("visibility.min", 0L);
 +    expected.put("visibility.max", 0L);
 +    expected.put("visibility.sum", 0L);
 +
 +    // Log2 Histogram for Visibility
 +    expected.put("visibility.logHist.0", 2L);
 +
 +    expected.put("value.min", 0L);
 +    expected.put("value.max", 2L);
 +    expected.put("value.sum", 2L);
 +
 +    // Log2 Histogram for Value
 +    expected.put("value.logHist.0", 1L);
 +    expected.put("value.logHist.1", 1L);
 +
 +    expected.put("total", 2L);
 +
 +    Assert.assertEquals(expected, stats1);
 +  }
 +}
diff --cc pom.xml
index 2831346,cddbc98..dc347aa
--- a/pom.xml
+++ b/pom.xml
@@@ -1012,9 -811,22 +1012,9 @@@
            <version>1.2.0</version>
          </plugin>
          <plugin>
 -          <groupId>org.apache.rat</groupId>
 -          <artifactId>apache-rat-plugin</artifactId>
 -          <configuration>
 -            <excludes combine.children="append">
 -              <exclude>src/main/resources/META-INF/services/*</exclude>
 -              <exclude>nbproject/**</exclude>
 -              <exclude>nb-configuration.xml</exclude>
 -              <exclude>nbactions.xml</exclude>
 -            </excludes>
 -          </configuration>
 -        </plugin>
 -        <plugin>
 -          <!-- this plugin requires java 1.8 and should only be used in a jdk8 profile -->
            <groupId>net.revelc.code.formatter</groupId>
            <artifactId>formatter-maven-plugin</artifactId>
-           <version>2.7.3</version>
+           <version>2.7.4</version>
            <configuration>
              <configFile>${eclipseFormatterStyle}</configFile>
              <compilerCompliance>${maven.compiler.source}</compilerCompliance>
@@@ -1034,27 -846,12 +1034,28 @@@
            </configuration>
          </plugin>
          <plugin>
 -          <!-- this plugin requires java 1.8 and should only be used in a jdk8 profile -->
 +          <groupId>org.apache.rat</groupId>
 +          <artifactId>apache-rat-plugin</artifactId>
 +          <configuration>
 +            <excludes combine.children="append">
 +              <exclude>src/main/resources/META-INF/services/*</exclude>
 +              <exclude>nbproject/**</exclude>
 +              <exclude>nb-configuration.xml</exclude>
 +              <exclude>nbactions.xml</exclude>
 +            </excludes>
 +          </configuration>
 +        </plugin>
 +        <plugin>
 +          <groupId>net.revelc.code</groupId>
 +          <artifactId>warbucks-maven-plugin</artifactId>
 +          <version>1.0.0</version>
 +        </plugin>
 +        <plugin>
            <groupId>net.revelc.code</groupId>
            <artifactId>impsort-maven-plugin</artifactId>
-           <version>1.0.1</version>
+           <version>1.2.0</version>
            <configuration>
+             <removeUnused>true</removeUnused>
              <groups>java.,javax.,org.,com.</groups>
              <excludes>
                <exclude>**/thrift/*.java</exclude>


Mime
View raw message