DistributedTableMetadataManager implements TableMetadataManager { @Override public boolean exists(String tableName) throws Exception { return tableDataStore.containsKey(tableName); } 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 testExists() throws Exception { Table table = new Table(); table.setName(TestUtils.TEST_TABLE_NAME); table.setTtl(15); distributedTableMetadataManager.save(table); assertTrue(distributedTableMetadataManager.exists(table.getName())); assertFalse(distributedTableMetadataManager.exists("DUMMY_TEST_NAME_NON_EXISTENT")); }