Skip to content

Instantly share code, notes, and snippets.

@dbergqvist
Created October 21, 2019 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbergqvist/8d713d6040542cd27b3d6bac9b8dbeb2 to your computer and use it in GitHub Desktop.
Save dbergqvist/8d713d6040542cd27b3d6bac9b8dbeb2 to your computer and use it in GitHub Desktop.
private static final byte[] COLUMN_FAMILY_NAME = Bytes.toBytes("cf");
private static final byte[] LAT_COLUMN_NAME = Bytes.toBytes("VehicleLocation.Latitude");
private static final byte[] LONG_COLUMN_NAME = Bytes.toBytes("VehicleLocation.Longitude");
String rowKey = "MTA/M86-SBS/1496275200000/NYCT_5824";
Result getResult =
table.get(
new Get(Bytes.toBytes(rowKey))
.addColumn(COLUMN_FAMILY_NAME, LAT_COLUMN_NAME)
.addColumn(COLUMN_FAMILY_NAME, LONG_COLUMN_NAME));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment