ctubbsii commented on a change in pull request #373: ACCUMULO-4709 sanity check 
in Mutation
URL: https://github.com/apache/accumulo/pull/373#discussion_r165636004
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/data/Mutation.java
 ##########
 @@ -66,18 +68,44 @@
    */
   static final int VALUE_SIZE_COPY_CUTOFF = 1 << 15;
 
+  /**
+   * Maximum size of a mutation (2GB).
+   */
+  static final long MAX_MUTATION_SIZE = 2l * (1 << 30);
+
   /**
    * Formats available for serializing Mutations. The formats are described in 
a <a href="doc-files/mutation-serialization.html">separate document</a>.
    */
   public static enum SERIALIZED_FORMAT {
     VERSION1, VERSION2
   }
 
+  final class MutationSize {
+    private int entries = 0;
+    private long sizeInBytes = 0;
+
+    private MutationSize() {}
+
+    private MutationSize(long rowLength) {
+      sizeInBytes = rowLength;
+    }
+
+    private MutationSize(int entries, long sizeInBytes) {
+      this.entries = entries;
+      this.sizeInBytes = sizeInBytes;
+    }
+
+    void update(long entrySize) {
 
 Review comment:
   `update` could be renamed to `addEntryWithSize` or something else more 
descriptive.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to