DistributedTableMetadataManager implements TableMetadataManager { @Override public void save(Table table) throws Exception { logger.info(String.format("Saving Table : %s", table)); tableDataStore.put(table.getName(), table); tableDataStore.flush(); } DistributedTableMetadataManager(HazelcastConnection hazelcastConnection,
                                           ElasticsearchConnection elasticsearchConnection); @Override void save(Table table); @Override Table get(String tableName); @Override List<Table> get(); @Override boolean exists(String tableName); @Override void delete(String tableName); @Override void start(); @Override void stop(); static final String DATA_MAP; }
@Test public void testSave() throws Exception { Table table = new Table(); table.setName("TEST_TABLE"); table.setTtl(15); distributedTableMetadataManager.save(table); Table responseTable = distributedTableMetadataManager.get("TEST_TABLE"); assertEquals(table.getName(), responseTable.getName()); assertEquals(table.getTtl(), responseTable.getTtl()); }