use of org.apache.ignite.spi.systemview.view.MetastorageView in project ignite by apache.
the class SqlViewExporterSpiTest method testDistributedMetastorage.
/**
*/
@Test
public void testDistributedMetastorage() throws Exception {
DistributedMetaStorage dms = ignite0.context().distributedMetastorage();
SystemView<MetastorageView> distributedMetaStoreView = ignite0.context().systemView().view(DISTRIBUTED_METASTORE_VIEW);
assertNotNull(distributedMetaStoreView);
String name = "test-distributed-key";
String val = "test-distributed-value";
dms.write(name, val);
assertEquals(1, execute(ignite0, "SELECT * FROM SYS.DISTRIBUTED_METASTORAGE WHERE name = ? AND value = ?", name, val).size());
assertTrue(waitForCondition(() -> execute(ignite1, "SELECT * FROM SYS.DISTRIBUTED_METASTORAGE WHERE name = ? AND value = ?", name, val).size() == 1, getTestTimeout()));
}
Aggregations