if (resultArray == null) {
for (byte[] key : keysToLookup) {
KeyValue<Row> kv = new KeyValue<Row>();
kv.setKey(key);
kv.setValue(null);
ByteArray b = new ByteArray(key);
map.put(b, kv);
cache.cacheRow(cf, key, kv.getValue());
}
} else {
for (Result result : resultArray) {
List<org.apache.hadoop.hbase.KeyValue> hKeyValue = result.list();
KeyValue<Row> kv = new KeyValue<Row>();
if (hKeyValue!= null && !hKeyValue.isEmpty()) {
kv.setKey(result.getRow());
Row r = rowProvider.get();
processColumns(hKeyValue, r);
kv.setValue(r);
}
ByteArray b = new ByteArray(result.getRow());
map.put(b, kv);
cache.cacheRow(cf, result.getRow(), kv.getValue());
}
for (byte[] key : keysToLookup) {
ByteArray baKey = new ByteArray(key);
if (!map.containsKey(baKey)) {
KeyValue<Row> kv = new KeyValue<Row>();
kv.setKey(key);
kv.setValue(null);
map.put(baKey, kv);