keith-turner commented on a change in pull request #300: ACCUMULO-4708 Limit 
RFile block size to 2GB
URL: https://github.com/apache/accumulo/pull/300#discussion_r139694924
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java
 ##########
 @@ -426,6 +426,12 @@ public void append(Key key, Value value) throws 
IOException {
         throw new IllegalArgumentException("Keys appended out-of-order.  New 
key " + key + ", previous key " + prevKey);
       }
 
+      // 5 bytes of overhead for fields: value, row, colFamily, colQualifier, 
colVisibility, and 8 for the long timestamp
+      if (((long) key.getSize() + (long) value.getSize() + (5L * 5L + 8L)) >= 
Integer.MAX_VALUE) {
+        throw new IllegalArgumentException("Key/value pair is too large (" + 
((long) key.getSize() + (long) value.getSize())
 
 Review comment:
   I would separate the key and val sizes in the message... something like the 
following with a space between... gives a little more info.
   
   ```
   throw new IllegalArgumentException("Key/value pair is too large (" + ((long) 
key.getSize() +" " + (long) value.getSize())
   ```
 
----------------------------------------------------------------
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