Exemplo n.º 1
0
 public boolean hasRowKey(String tableName, byte[] rowKey) throws Exception {
   HTableInterface htable = dataSource.getConnection(tableName);
   boolean flag = htable.exists(new Get(rowKey));
   htable.close();
   log.info(tableName + " contained key " + Bytes.toString(rowKey) + " flag is -[" + flag + "");
   return flag;
 }
Exemplo n.º 2
0
 public boolean isProblematic(RowLogMessage message, String subscription) throws RowLogException {
   byte[] rowKey = createRowKey(message, subscription, true);
   try {
     return table.exists(new Get(rowKey));
   } catch (IOException e) {
     throw new RowLogException("Failed to check if message is problematic", e);
   }
 }