use of org.apache.hadoop.hbase.wal.WALKey in project phoenix by apache.
the class SystemCatalogWALEntryFilterIT method getEntry.
public WAL.Entry getEntry(TableName tableName, Get get) throws IOException {
WAL.Entry entry = null;
try (Connection conn = ConnectionFactory.createConnection(getUtility().getConfiguration())) {
Table htable = conn.getTable(tableName);
Result result = htable.get(get);
WALEdit edit = new WALEdit();
if (result != null) {
List<Cell> cellList = result.listCells();
Assert.assertNotNull("Didn't retrieve any cells from SYSTEM.CATALOG", cellList);
for (Cell c : cellList) {
edit.add(c);
}
}
Assert.assertTrue("Didn't retrieve any cells from SYSTEM.CATALOG", edit.getCells().size() > 0);
WALKey key = new WALKey(REGION, tableName, 0, 0, uuid);
entry = new WAL.Entry(key, edit);
}
return entry;
}
Aggregations