/** {@inheritDoc} */ @Override public void put(List<Put> puts) throws IOException { LOG.trace("put(List<Put>)"); if (puts == null || puts.isEmpty()) { return; } else if (puts.size() == 1) { try { put(puts.get(0)); } catch (IOException e) { throw createRetriesExhaustedWithDetailsException(e, puts.get(0)); } } else { getBatchExecutor().batch(puts); } }
/** {@inheritDoc} */ @Override public void put(List<Put> puts) throws IOException { LOG.trace("put(List<Put>)"); if (puts == null || puts.isEmpty()) { return; } else if (puts.size() == 1) { try { put(puts.get(0)); } catch (IOException e) { throw createRetriesExhaustedWithDetailsException(e, puts.get(0)); } } else { getBatchExecutor().batch(puts); } }
/** {@inheritDoc} */ @Override public Result[] get(List<Get> gets) throws IOException { LOG.trace("get(List<>)"); if (gets == null || gets.isEmpty()) { return new Result[0]; } else if (gets.size() == 1) { try { return new Result[] { get(gets.get(0)) }; } catch(IOException e) { throw createRetriesExhaustedWithDetailsException(e, gets.get(0)); } } else { try (Scope scope = TRACER.spanBuilder("BigtableTable.get").startScopedSpan()) { addBatchSizeAnnotation(gets); return getBatchExecutor().batch(gets); } } }
/** {@inheritDoc} */ @Override public Result[] get(List<Get> gets) throws IOException { LOG.trace("get(List<>)"); if (gets == null || gets.isEmpty()) { return new Result[0]; } else if (gets.size() == 1) { try { return new Result[] { get(gets.get(0)) }; } catch(IOException e) { throw createRetriesExhaustedWithDetailsException(e, gets.get(0)); } } else { try (Scope scope = TRACER.spanBuilder("BigtableTable.get").startScopedSpan()) { addBatchSizeAnnotation(gets); return getBatchExecutor().batch(gets); } } }