test_class.declarator: elasticsearchServer
test_class.modifier: private
test_class.original_string: private MockElasticsearchServer elasticsearchServer;
test_class.type: MockElasticsearchServer
test_class.var_name: elasticsearchServer
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: elasticsearchConnection
test_class.modifier: private
test_class.original_string: private ElasticsearchConnection elasticsearchConnection;
test_class.type: ElasticsearchConnection
test_class.var_name: elasticsearchConnection
test_class.declarator: tableMapStore
test_class.modifier: private
test_class.original_string: private TableMapStore tableMapStore;
test_class.type: TableMapStore
test_class.var_name: tableMapStore
test_class.declarator: TEST_TABLE = "test-table"
test_class.modifier: public static final
test_class.original_string: public static final String TEST_TABLE = "test-table";
test_class.type: String
test_class.var_name: TEST_TABLE
test_class.declarator: TABLE_META_INDEX = "table-meta"
test_class.modifier: public static final
test_class.original_string: public static final String TABLE_META_INDEX = "table-meta";
test_class.type: String
test_class.var_name: TABLE_META_INDEX
test_class.declarator: TABLE_META_TYPE = "table-meta"
test_class.modifier: public static final
test_class.original_string: public static final String TABLE_META_TYPE = "table-meta";
test_class.type: String
test_class.var_name: TABLE_META_TYPE
test_class.file: real-time/foxtrot/foxtrot-core/src/test/java/com/flipkart/foxtrot/core/querystore/impl/TableMapStoreTest.java
test_class.identifier: TableMapStoreTest
test_case.body: @Test(expected = RuntimeException.class)
      public void testLoadKeyWithWrongJson() throws Exception {
          elasticsearchServer.getClient().prepareIndex()
                  .setIndex(TABLE_META_INDEX)
                  .setType(TABLE_META_TYPE)
                  .setConsistencyLevel(WriteConsistencyLevel.ALL)
                  .setSource("{ \"test\" : \"test\"}")
                  .setId(TEST_TABLE)
                  .setRefresh(true)
                  .execute()
                  .actionGet();
          tableMapStore.load(TEST_TABLE);
      }
test_case.class_method_signature: TableMapStoreTest.testLoadKeyWithWrongJson()
test_case.full_signature: @Test(expected = RuntimeException.class) public void testLoadKeyWithWrongJson()
test_case.identifier: testLoadKeyWithWrongJson
test_case.invocations: actionGet execute setRefresh setId setSource setConsistencyLevel setType setIndex prepareIndex getClient load
test_case.modifiers: @Test(expected = RuntimeException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testLoadKeyWithWrongJson()
focal_class.declarator: logger = LoggerFactory.getLogger(TableMapStore.class.getSimpleName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(TableMapStore.class.getSimpleName());
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: TABLE_META_INDEX = "table-meta"
focal_class.modifier: public static final
focal_class.original_string: public static final String TABLE_META_INDEX = "table-meta";
focal_class.type: String
focal_class.var_name: TABLE_META_INDEX
focal_class.declarator: TABLE_META_TYPE = "table-meta"
focal_class.modifier: public static final
focal_class.original_string: public static final String TABLE_META_TYPE = "table-meta";
focal_class.type: String
focal_class.var_name: TABLE_META_TYPE
focal_class.declarator: elasticsearchConnection
focal_class.modifier: private final
focal_class.original_string: private final ElasticsearchConnection elasticsearchConnection;
focal_class.type: ElasticsearchConnection
focal_class.var_name: elasticsearchConnection
focal_class.declarator: objectMapper
focal_class.modifier: private final
focal_class.original_string: private final ObjectMapper objectMapper;
focal_class.type: ObjectMapper
focal_class.var_name: objectMapper
focal_class.file: real-time/foxtrot/foxtrot-core/src/main/java/com/flipkart/foxtrot/core/querystore/impl/TableMapStore.java
focal_class.identifier: TableMapStore
focal_class.interfaces: implements MapStore<String, Table>
focal_class.class_method_signature: TableMapStore.factory(ElasticsearchConnection elasticsearchConnection)
focal_class.full_signature: public static Factory factory(ElasticsearchConnection elasticsearchConnection)
focal_class.identifier: factory
focal_class.modifiers: public static
focal_class.parameters: (ElasticsearchConnection elasticsearchConnection)
focal_class.return: Factory
focal_class.signature: Factory factory(ElasticsearchConnection elasticsearchConnection)
focal_class.class_method_signature: TableMapStore.TableMapStore(ElasticsearchConnection elasticsearchConnection)
focal_class.full_signature: public  TableMapStore(ElasticsearchConnection elasticsearchConnection)
focal_class.identifier: TableMapStore
focal_class.modifiers: public
focal_class.parameters: (ElasticsearchConnection elasticsearchConnection)
focal_class.signature:  TableMapStore(ElasticsearchConnection elasticsearchConnection)
focal_class.class_method_signature: TableMapStore.store(String key, Table value)
focal_class.full_signature: @Override public void store(String key, Table value)
focal_class.identifier: store
focal_class.modifiers: @Override public
focal_class.parameters: (String key, Table value)
focal_class.return: void
focal_class.signature: void store(String key, Table value)
focal_class.class_method_signature: TableMapStore.storeAll(Map<String, Table> map)
focal_class.full_signature: @Override public void storeAll(Map<String, Table> map)
focal_class.identifier: storeAll
focal_class.modifiers: @Override public
focal_class.parameters: (Map<String, Table> map)
focal_class.return: void
focal_class.signature: void storeAll(Map<String, Table> map)
focal_class.class_method_signature: TableMapStore.delete(String key)
focal_class.full_signature: @Override public void delete(String key)
focal_class.identifier: delete
focal_class.modifiers: @Override public
focal_class.parameters: (String key)
focal_class.return: void
focal_class.signature: void delete(String key)
focal_class.class_method_signature: TableMapStore.deleteAll(Collection<String> keys)
focal_class.full_signature: @Override public void deleteAll(Collection<String> keys)
focal_class.identifier: deleteAll
focal_class.modifiers: @Override public
focal_class.parameters: (Collection<String> keys)
focal_class.return: void
focal_class.signature: void deleteAll(Collection<String> keys)
focal_class.class_method_signature: TableMapStore.load(String key)
focal_class.full_signature: @Override public Table load(String key)
focal_class.identifier: load
focal_class.modifiers: @Override public
focal_class.parameters: (String key)
focal_class.return: Table
focal_class.signature: Table load(String key)
focal_class.class_method_signature: TableMapStore.loadAll(Collection<String> keys)
focal_class.full_signature: @Override public Map<String, Table> loadAll(Collection<String> keys)
focal_class.identifier: loadAll
focal_class.modifiers: @Override public
focal_class.parameters: (Collection<String> keys)
focal_class.return: Map<String, Table>
focal_class.signature: Map<String, Table> loadAll(Collection<String> keys)
focal_class.class_method_signature: TableMapStore.loadAllKeys()
focal_class.full_signature: @Override public Set<String> loadAllKeys()
focal_class.identifier: loadAllKeys
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Set<String>
focal_class.signature: Set<String> loadAllKeys()
focal_method.body: @Override
      public Table load(String key) {
          logger.info("Load called for: " + key);
          GetResponse response = elasticsearchConnection.getClient().prepareGet()
                  .setIndex(TABLE_META_INDEX)
                  .setType(TABLE_META_TYPE)
                  .setId(key)
                  .execute()
                  .actionGet();
          if (!response.isExists()) {
              return null;
          }
          try {
              return objectMapper.readValue(response.getSourceAsBytes(), Table.class);
          } catch (Exception e) {
              throw new RuntimeException("Error getting data for table: " + key);
          }
      }
focal_method.class_method_signature: TableMapStore.load(String key)
focal_method.full_signature: @Override public Table load(String key)
focal_method.identifier: load
focal_method.invocations: info actionGet execute setId setType setIndex prepareGet getClient isExists readValue getSourceAsBytes
focal_method.modifiers: @Override public
focal_method.parameters: (String key)
focal_method.return: Table
focal_method.signature: Table load(String key)