final byte[] row_key = new byte[TREE_ID_WIDTH + 1];
System.arraycopy(idToBytes(tree_id), 0, row_key, 0, TREE_ID_WIDTH);
row_key[TREE_ID_WIDTH] = COLLISION_ROW_SUFFIX;
final GetRequest get = new GetRequest(tsdb.treeTable(), row_key);
get.family(TREE_FAMILY);
// if the caller provided a list of TSUIDs, then we need to compile a list
// of qualifiers so we only fetch those columns.
if (tsuids != null && !tsuids.isEmpty()) {
final byte[][] qualifiers = new byte[tsuids.size()][];
int index = 0;
for (String tsuid : tsuids) {
final byte[] qualifier = new byte[COLLISION_PREFIX.length +
(tsuid.length() / 2)];
System.arraycopy(COLLISION_PREFIX, 0, qualifier, 0,
COLLISION_PREFIX.length);
final byte[] tsuid_bytes = UniqueId.stringToUid(tsuid);
System.arraycopy(tsuid_bytes, 0, qualifier, COLLISION_PREFIX.length,
tsuid_bytes.length);
qualifiers[index] = qualifier;
index++;
}
get.qualifiers(qualifiers);
}
/**
* Called after issuing the row get request to parse out the results and
* compile the list of collisions.