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 testStoreAllSomeNullKeyValues() throws Exception {
          Map<String, Table> tables = new HashMap<String, Table>();
          for (int i = 0; i < 10; i++) {
              Table table = new Table();
              table.setName(UUID.randomUUID().toString());
              table.setTtl(20);
              tables.put(table.getName(), table);
          }
          tables.put(null, null);
          tableMapStore.storeAll(tables);
      }
test_case.class_method_signature: TableMapStoreTest.testStoreAllSomeNullKeyValues()
test_case.full_signature: @Test(expected = RuntimeException.class) public void testStoreAllSomeNullKeyValues()
test_case.identifier: testStoreAllSomeNullKeyValues
test_case.invocations: setName toString randomUUID setTtl put getName put storeAll
test_case.modifiers: @Test(expected = RuntimeException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testStoreAllSomeNullKeyValues()
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 void storeAll(Map<String, Table> map) {
          if (map == null) {
              throw new RuntimeException("Illegal Store Request - Null Map");
          }
          if (map.containsKey(null)) {
              throw new RuntimeException("Illegal Store Request - Null Key is Present");
          }
  
          logger.info("Store all called for multiple values");
          BulkRequestBuilder bulkRequestBuilder = elasticsearchConnection.getClient().prepareBulk().setConsistencyLevel(WriteConsistencyLevel.ALL).setRefresh(true);
          for (Map.Entry<String, Table> mapEntry : map.entrySet()) {
              try {
                  if (mapEntry.getValue() == null) {
                      throw new RuntimeException(String.format("Illegal Store Request - Object is Null for Table - %s", mapEntry.getKey()));
                  }
                  bulkRequestBuilder.add(elasticsearchConnection.getClient()
                          .prepareIndex(TABLE_META_INDEX, TABLE_META_TYPE, mapEntry.getKey())
                          .setSource(objectMapper.writeValueAsString(mapEntry.getValue())));
              } catch (JsonProcessingException e) {
                  throw new RuntimeException("Error bulk saving meta: ", e);
              }
          }
          bulkRequestBuilder.execute().actionGet();
      }
focal_method.class_method_signature: TableMapStore.storeAll(Map<String, Table> map)
focal_method.full_signature: @Override public void storeAll(Map<String, Table> map)
focal_method.identifier: storeAll
focal_method.invocations: containsKey info setRefresh setConsistencyLevel prepareBulk getClient entrySet getValue format getKey add setSource prepareIndex getClient getKey writeValueAsString getValue actionGet execute
focal_method.modifiers: @Override public
focal_method.parameters: (Map<String, Table> map)
focal_method.return: void
focal_method.signature: void storeAll(Map<String, Table> map)