HDFS-8319 Jing Zhao raised some issues about ByteBuffer type input/output buffers for raw erasure coders:
- Should support ByteBuffers originated from ByteBuffer#slice calls;
- Should clearly spec in Javadoc that no mixing of on-heap buffers and direct buffers are allowed, and with necessary checking codes ensuring the same type of buffers are used.
HDFS-8319 patch by Jing Zhao there are some good refactoring codes that would be incorporated here.
As discussed open this to address the issues separately.