code: protected static void batchWrite(Map<String, List<WriteRequest>> items, int backoff) {
  		if (items == null || items.isEmpty()) {
  			return;
  		}
  		try {
  			BatchWriteItemResult result = getClient().batchWriteItem(new BatchWriteItemRequest().
  					withReturnConsumedCapacity(ReturnConsumedCapacity.TOTAL).withRequestItems(items));
  			if (result == null) {
  				return;
  			}
  			logger.debug("batchWrite(): total {}, cc {}", items.size(), result.getConsumedCapacity());
  
  			if (result.getUnprocessedItems() != null && !result.getUnprocessedItems().isEmpty()) {
  				Thread.sleep((long) backoff * 1000L);
  				logger.warn("{} UNPROCESSED write requests!", result.getUnprocessedItems().size());
  				batchWrite(result.getUnprocessedItems(), backoff * 2);
  			}
  		} catch (Exception e) {
  			logger.error(null, e);
  			throwIfNecessary(e);
  		}
  	}
docs: Writes multiple items in batch.
  @param items a map of tables->write requests
  @param backoff backoff seconds