/** * Compare two BinSedesTuples as raw bytes. We assume the Tuples are NOT PigNullableWritable, so client classes * need to deal with Null and Index. */ @Override public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) { int rc = 0; ByteBuffer bb1 = ByteBuffer.wrap(b1, s1, l1); ByteBuffer bb2 = ByteBuffer.wrap(b2, s2, l2); try { rc = compareBinSedesTuple(bb1, bb2); } catch (IOException ioe) { mLog.error("I/O error during tuple comparison: " + ioe.getMessage()); throw new RuntimeException(ioe.getMessage(), ioe); } return rc; }