class HBaseDataStore implements DataStore {

    @Override
    public void save(final Table table, Document document) throws DataStoreException {
        if (document == null || document.getData() == null || document.getId() == null) {
            throw new DataStoreException(DataStoreException.ErrorCode.STORE_INVALID_REQUEST, "Invalid Document");
        }
        HTableInterface hTable = null;
        try {
            hTable = tableWrapper.getTable(table);
            Stopwatch stopwatch = new Stopwatch();
            stopwatch.start();
            hTable.put(getPutForDocument(table, document));
            logger.error(String.format("HBASE put took : %d table : %s", stopwatch.elapsedMillis(), table));
        } catch (JsonProcessingException e) {
            throw new DataStoreException(DataStoreException.ErrorCode.STORE_INVALID_REQUEST,
                    e.getMessage(), e);
        } catch (IOException e) {
            throw new DataStoreException(DataStoreException.ErrorCode.STORE_SINGLE_SAVE,
                    e.getMessage(), e);
        } catch (Exception e) {
            throw new DataStoreException(DataStoreException.ErrorCode.STORE_SINGLE_SAVE,
                    e.getMessage(), e);
        } finally {
            if (null != hTable) {
                try {
                    hTable.close();
                } catch (IOException e) {
                    logger.error("Error closing table: ", e);
                }
            }
        }
    }

    public  HBaseDataStore(HbaseTableConnection tableWrapper, ObjectMapper mapper);

}