jschmidt10 opened a new issue, #3348:
URL: https://github.com/apache/accumulo/issues/3348

   **Describe the bug**
   The SplitUtils.getRangeLength() method can return a negative number (due to 
overflow) for certain Ranges. This became a problem for us using Spark 3.2.x 
where the default behavior is to ignore empty splits - they actually drop 
InputSplits where getLength() returns < 0.
   
   **To Reproduce**
   Here's a sample range:
   ```
   Key begin = new Key("aaaaaaa");
   Key end = new Key(new byte[] {
     (byte) 0xFF,
     (byte) 0xFF,
     (byte) 0xFF,
     (byte) 0xFF,
     (byte) 0xFF,
     (byte) 0xFF,
     (byte) 0xFF
     });
   
   Range range = new Range(begin, end);
   
   System.out.println(SplitUtils.getRangeLength(range));
   ```
   
   That will print out an overflowed Long that has been flipped to a massively 
negative number.
   
   **Expected behavior**
   This should return a number > 0.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to