Created
July 25, 2011 21:55
-
-
Save electrum/1105335 to your computer and use it in GitHub Desktop.
Decode Text in Hadoop WritableComparator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static String decodeText(byte[] bytes, int start, int len) | |
| throws CharacterCodingException | |
| { | |
| int n = WritableUtils.decodeVIntSize(bytes[start]); | |
| return Text.decode(bytes, start + n, len - n); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment