accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] jkrdev commented on a change in pull request #320: ACCUMULO-4730 Created EntryLengthSummarizer
Date Thu, 01 Jan 1970 00:00:00 GMT
jkrdev commented on a change in pull request #320: ACCUMULO-4730 Created EntryLengthSummarizer
URL: https://github.com/apache/accumulo/pull/320#discussion_r149952335
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/client/summary/summarizers/EntryLengthSummarizer.java
 ##########
 @@ -0,0 +1,329 @@
+/*
+ * 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.math.RoundingMode;
+
+import org.apache.accumulo.core.client.summary.Summarizer;
+import org.apache.accumulo.core.client.summary.SummarizerConfiguration;
+import org.apache.accumulo.core.data.Key;
+import org.apache.accumulo.core.data.Value;
+
+import com.google.common.math.IntMath;
+
+/**
+ * Summarizer that computes summary information about field lengths.
+ * Specifically key length, row length, family length, qualifier length, visibility length,
and value length.
+ * Incrementally computes minimum, maximum, count, sum, and log2 histogram of the lengths.
+ */
+public class EntryLengthSummarizer implements Summarizer {
+
+  public static final String MIN_KEY_STAT = "minKey";
+  public static final String MAX_KEY_STAT = "maxKey";
+  public static final String SUM_KEYS_STAT = "sumKeys";
+
+  public static final String MIN_ROW_STAT = "minRow";
+  public static final String MAX_ROW_STAT = "maxRow";
+  public static final String SUM_ROWS_STAT = "sumRows";
+
+  public static final String MIN_FAMILY_STAT = "minFamily";
+  public static final String MAX_FAMILY_STAT = "maxFamily";
+  public static final String SUM_FAMILIES_STAT = "sumFamilies";
+
+  public static final String MIN_QUALIFIER_STAT = "minQualifier";
+  public static final String MAX_QUALIFIER_STAT = "maxQualifier";
+  public static final String SUM_QUALIFIERS_STAT = "sumQualifiers";
+
+  public static final String MIN_VISIBILITY_STAT = "minVisibility";
+  public static final String MAX_VISIBILITY_STAT = "maxVisibility";
+  public static final String SUM_VISIBILITIES_STAT = "sumVisibilities";
+
+  public static final String MIN_VALUE_STAT = "minValue";
+  public static final String MAX_VALUE_STAT = "maxValue";
+  public static final String SUM_VALUES_STAT = "sumValues";
+
+  public static final String TOTAL_STAT = "total";// Total number of Keys
+
 
 Review comment:
   Thanks I will implement this, definitely will make the code cleaner.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message