test_class.declarator: HBaseDataStore
test_class.modifier: private
test_class.original_string: private HBaseDataStore HBaseDataStore;
test_class.type: HBaseDataStore
test_class.var_name: HBaseDataStore
test_class.declarator: tableInterface
test_class.modifier: private
test_class.original_string: private HTableInterface tableInterface;
test_class.type: HTableInterface
test_class.var_name: tableInterface
test_class.declarator: hBaseTableConnection
test_class.modifier: private
test_class.original_string: private HbaseTableConnection hBaseTableConnection;
test_class.type: HbaseTableConnection
test_class.var_name: hBaseTableConnection
test_class.declarator: mapper = new ObjectMapper()
test_class.modifier: private
test_class.original_string: private ObjectMapper mapper = new ObjectMapper();
test_class.type: ObjectMapper
test_class.var_name: mapper
test_class.declarator: COLUMN_FAMILY = Bytes.toBytes("d")
test_class.modifier: private static final
test_class.original_string: private static final byte[] COLUMN_FAMILY = Bytes.toBytes("d");
test_class.type: byte[]
test_class.var_name: COLUMN_FAMILY
test_class.declarator: DATA_FIELD_NAME = Bytes.toBytes("data")
test_class.modifier: private static final
test_class.original_string: private static final byte[] DATA_FIELD_NAME = Bytes.toBytes("data");
test_class.type: byte[]
test_class.var_name: DATA_FIELD_NAME
test_class.declarator: TEST_APP_NAME = "test-app"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_APP_NAME = "test-app";
test_class.type: String
test_class.var_name: TEST_APP_NAME
test_class.declarator: TEST_APP = new Table(TEST_APP_NAME, 7)
test_class.modifier: private static final
test_class.original_string: private static final Table TEST_APP = new Table(TEST_APP_NAME, 7);
test_class.type: Table
test_class.var_name: TEST_APP
test_class.file: real-time/foxtrot/foxtrot-core/src/test/java/com/flipkart/foxtrot/core/datastore/impl/hbase/HBaseDataStoreTest.java
test_class.identifier: HBaseDataStoreTest
test_case.body: @Test
      public void testSaveBulk() throws Exception {
          List<Document> documents = new Vector<Document>();
          for (int i = 0; i < 10; i++) {
              documents.add(new Document(UUID.randomUUID().toString(),
                      System.currentTimeMillis(),
                      mapper.valueToTree(Collections.singletonMap("TEST_NAME", "SINGLE_SAVE_TEST"))));
          }
          HBaseDataStore.save(TEST_APP, documents);
          for (Document document : documents) {
              validateSave(document);
          }
      }
test_case.class_method_signature: HBaseDataStoreTest.testSaveBulk()
test_case.full_signature: @Test public void testSaveBulk()
test_case.identifier: testSaveBulk
test_case.invocations: add toString randomUUID currentTimeMillis valueToTree singletonMap save validateSave
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSaveBulk()
focal_class.declarator: logger = LoggerFactory.getLogger(HBaseDataStore.class.getSimpleName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(HBaseDataStore.class.getSimpleName());
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: COLUMN_FAMILY = Bytes.toBytes("d")
focal_class.modifier: private static final
focal_class.original_string: private static final byte[] COLUMN_FAMILY = Bytes.toBytes("d");
focal_class.type: byte[]
focal_class.var_name: COLUMN_FAMILY
focal_class.declarator: DATA_FIELD_NAME = Bytes.toBytes("data")
focal_class.modifier: private static final
focal_class.original_string: private static final byte[] DATA_FIELD_NAME = Bytes.toBytes("data");
focal_class.type: byte[]
focal_class.var_name: DATA_FIELD_NAME
focal_class.declarator: TIMESTAMP_FIELD_NAME = Bytes.toBytes("timestamp")
focal_class.modifier: private static final
focal_class.original_string: private static final byte[] TIMESTAMP_FIELD_NAME = Bytes.toBytes("timestamp");
focal_class.type: byte[]
focal_class.var_name: TIMESTAMP_FIELD_NAME
focal_class.declarator: tableWrapper
focal_class.modifier: private final
focal_class.original_string: private final HbaseTableConnection tableWrapper;
focal_class.type: HbaseTableConnection
focal_class.var_name: tableWrapper
focal_class.declarator: mapper
focal_class.modifier: private final
focal_class.original_string: private final ObjectMapper mapper;
focal_class.type: ObjectMapper
focal_class.var_name: mapper
focal_class.file: real-time/foxtrot/foxtrot-core/src/main/java/com/flipkart/foxtrot/core/datastore/impl/hbase/HBaseDataStore.java
focal_class.identifier: HBaseDataStore
focal_class.interfaces: implements DataStore
focal_class.class_method_signature: HBaseDataStore.HBaseDataStore(HbaseTableConnection tableWrapper, ObjectMapper mapper)
focal_class.full_signature: public  HBaseDataStore(HbaseTableConnection tableWrapper, ObjectMapper mapper)
focal_class.identifier: HBaseDataStore
focal_class.modifiers: public
focal_class.parameters: (HbaseTableConnection tableWrapper, ObjectMapper mapper)
focal_class.signature:  HBaseDataStore(HbaseTableConnection tableWrapper, ObjectMapper mapper)
focal_class.class_method_signature: HBaseDataStore.save(final Table table, Document document)
focal_class.full_signature: @Override public void save(final Table table, Document document)
focal_class.identifier: save
focal_class.modifiers: @Override public
focal_class.parameters: (final Table table, Document document)
focal_class.return: void
focal_class.signature: void save(final Table table, Document document)
focal_class.class_method_signature: HBaseDataStore.save(final Table table, List<Document> documents)
focal_class.full_signature: @Override public void save(final Table table, List<Document> documents)
focal_class.identifier: save
focal_class.modifiers: @Override public
focal_class.parameters: (final Table table, List<Document> documents)
focal_class.return: void
focal_class.signature: void save(final Table table, List<Document> documents)
focal_class.class_method_signature: HBaseDataStore.get(final Table table, String id)
focal_class.full_signature: @Override public Document get(final Table table, String id)
focal_class.identifier: get
focal_class.modifiers: @Override public
focal_class.parameters: (final Table table, String id)
focal_class.return: Document
focal_class.signature: Document get(final Table table, String id)
focal_class.class_method_signature: HBaseDataStore.get(final Table table, List<String> ids)
focal_class.full_signature: @Override public List<Document> get(final Table table, List<String> ids)
focal_class.identifier: get
focal_class.modifiers: @Override public
focal_class.parameters: (final Table table, List<String> ids)
focal_class.return: List<Document>
focal_class.signature: List<Document> get(final Table table, List<String> ids)
focal_class.class_method_signature: HBaseDataStore.getPutForDocument(final Table table, Document document)
focal_class.full_signature: public Put getPutForDocument(final Table table, Document document)
focal_class.identifier: getPutForDocument
focal_class.modifiers: public
focal_class.parameters: (final Table table, Document document)
focal_class.return: Put
focal_class.signature: Put getPutForDocument(final Table table, Document document)
focal_method.body: @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);
                  }
              }
          }
      }
focal_method.class_method_signature: HBaseDataStore.save(final Table table, Document document)
focal_method.full_signature: @Override public void save(final Table table, Document document)
focal_method.identifier: save
focal_method.invocations: getData getId getTable start put getPutForDocument error format elapsedMillis getMessage getMessage getMessage close error
focal_method.modifiers: @Override public
focal_method.parameters: (final Table table, Document document)
focal_method.return: void
focal_method.signature: void save(final Table table, Document document)