Query query = new Query();
query.addEqualsCondition("source", record.toBytes());
Set<Pair<FieldedLink, SchemaId>> result = new HashSet<Pair<FieldedLink, SchemaId>>();
QueryResult qr = forwardIndex.performQuery(query);
byte[] id;
while ((id = qr.next()) != null) {
SchemaId sourceField = getIdGenerator().getSchemaId(qr.getData(SOURCE_FIELD_KEY));
SchemaId vtag = getIdGenerator().getSchemaId(qr.getData(VTAG_KEY));
result.add(
new Pair<FieldedLink, SchemaId>(new FieldedLink(getIdGenerator().absoluteFromBytes(id), sourceField), vtag));
}
Closer.close(
qr); // Not closed in finally block: avoid HBase contact when there could be connection problems.