/** * Delete the passed <code>deletes</code> from the <code>hbase:meta</code> table. * @param connection connection we're using * @param deletes Deletes to add to hbase:meta This list should support #remove. */ private static void deleteFromMetaTable(final Connection connection, final List<Delete> deletes) throws IOException { try (Table t = getMetaHTable(connection)) { debugLogMutations(deletes); t.delete(deletes); } }
/** * Put the passed <code>ps</code> to the <code>hbase:meta</code> table. * @param connection connection we're using * @param ps Put to add to hbase:meta */ public static void putsToMetaTable(final Connection connection, final List<Put> ps) throws IOException { if (ps.isEmpty()) { return; } try (Table t = getMetaHTable(connection)) { debugLogMutations(ps); // the implementation for putting a single Put is much simpler so here we do a check first. if (ps.size() == 1) { t.put(ps.get(0)); } else { t.put(ps); } } }
/** * Execute the passed <code>mutations</code> against <code>hbase:meta</code> table. * @param connection connection we're using * @param mutations Puts and Deletes to execute on hbase:meta * @throws IOException */ public static void mutateMetaTable(final Connection connection, final List<Mutation> mutations) throws IOException { Table t = getMetaHTable(connection); try { debugLogMutations(mutations); t.batch(mutations, null); } catch (InterruptedException e) { InterruptedIOException ie = new InterruptedIOException(e.getMessage()); ie.initCause(e); throw ie; } finally { t.close(); } }
debugLogMutations(mutations); Batch.Call<MultiRowMutationService, MutateRowsResponse> callable = new Batch.Call<MultiRowMutationService, MutateRowsResponse>() {
/** * Delete the passed <code>deletes</code> from the <code>hbase:meta</code> table. * @param connection connection we're using * @param deletes Deletes to add to hbase:meta This list should support #remove. */ private static void deleteFromMetaTable(final Connection connection, final List<Delete> deletes) throws IOException { try (Table t = getMetaHTable(connection)) { debugLogMutations(deletes); t.delete(deletes); } }
/** * Put the passed <code>ps</code> to the <code>hbase:meta</code> table. * @param connection connection we're using * @param ps Put to add to hbase:meta */ public static void putsToMetaTable(final Connection connection, final List<Put> ps) throws IOException { if (ps.isEmpty()) { return; } try (Table t = getMetaHTable(connection)) { debugLogMutations(ps); // the implementation for putting a single Put is much simpler so here we do a check first. if (ps.size() == 1) { t.put(ps.get(0)); } else { t.put(ps); } } }
/** * Execute the passed <code>mutations</code> against <code>hbase:meta</code> table. * @param connection connection we're using * @param mutations Puts and Deletes to execute on hbase:meta * @throws IOException */ public static void mutateMetaTable(final Connection connection, final List<Mutation> mutations) throws IOException { Table t = getMetaHTable(connection); try { debugLogMutations(mutations); t.batch(mutations, null); } catch (InterruptedException e) { InterruptedIOException ie = new InterruptedIOException(e.getMessage()); ie.initCause(e); throw ie; } finally { t.close(); } }
/** * Put the passed <code>ps</code> to the <code>hbase:meta</code> table. * @param connection connection we're using * @param ps Put to add to hbase:meta */ public static void putsToMetaTable(final Connection connection, final List<Put> ps) throws IOException { try (Table t = getMetaHTable(connection)) { debugLogMutations(ps); t.put(ps); } }
/** * Delete the passed <code>deletes</code> from the <code>hbase:meta</code> table. * @param connection connection we're using * @param deletes Deletes to add to hbase:meta This list should support #remove. */ private static void deleteFromMetaTable(final Connection connection, final List<Delete> deletes) throws IOException { try (Table t = getMetaHTable(connection)) { debugLogMutations(deletes); t.delete(deletes); } }
/** * Execute the passed <code>mutations</code> against <code>hbase:meta</code> table. * @param connection connection we're using * @param mutations Puts and Deletes to execute on hbase:meta * @throws IOException */ public static void mutateMetaTable(final Connection connection, final List<Mutation> mutations) throws IOException { Table t = getMetaHTable(connection); try { debugLogMutations(mutations); t.batch(mutations, null); } catch (InterruptedException e) { InterruptedIOException ie = new InterruptedIOException(e.getMessage()); ie.initCause(e); throw ie; } finally { t.close(); } }
final List<Mutation> mutations) throws IOException { debugLogMutations(mutations);