class HBaseDataStore implements DataStore {

    @Override
    @Timed
    public List<Document> saveAll(final Table table, List<Document> documents) {
        if(documents == null || documents.isEmpty()) {
            throw FoxtrotExceptions.createBadRequestException(table.getName(), "null/empty document list not allowed");
        }
        List<Put> puts = new ArrayList<>();
        ImmutableList.Builder<Document> translatedDocuments = ImmutableList.builder();
        List<String> errorMessages = new ArrayList<>();
        try {
            for(int i = 0; i < documents.size(); i++) {
                Document document = documents.get(i);
                if(!isValidDocument(document, errorMessages, i)) {
                    continue;
                }
                Document translatedDocument = translator.translate(table, document);
                puts.add(getPutForDocument(translatedDocument));
                translatedDocuments.add(translatedDocument);
            }
        } catch (JsonProcessingException e) {
            throw FoxtrotExceptions.createBadRequestException(table, e);
        }
        if(!errorMessages.isEmpty()) {
            throw FoxtrotExceptions.createBadRequestException(table.getName(), errorMessages);
        }

        try (org.apache.hadoop.hbase.client.Table hTable = tableWrapper.getTable(table)) {
            hTable.put(puts);
        } catch (IOException e) {
            logger.error("Error occurred while ingesting event in HBase : ", e);
            throw FoxtrotExceptions.createConnectionException(table, e);
        }
        return translatedDocuments.build();
    }

    @Inject public  HBaseDataStore(HbaseTableConnection tableWrapper, ObjectMapper mapper, DocumentTranslator translator);

}