Skip to content

Instantly share code, notes, and snippets.

Created June 11, 2012 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/2912716 to your computer and use it in GitHub Desktop.
Save anonymous/2912716 to your computer and use it in GitHub Desktop.
ExampleRowKey.java
public class ExampleRowKey
{
long userId;
String applicationId;
public byte[] getBytes() throws IOException
{
ByteArrayOutputStream byteOutput = new ByteArrayOutputStream();
DataOutputStream data = new DataOutputStream(byteOutput);
data.writeLong(userId);
data.writeUTF(applicationId);
return byteOutput.toByteArray();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment