provider.exists("default", "old_1"));
}
@Test
public void testUpdate() throws IOException {
DatasetDescriptor updated = new DatasetDescriptor.Builder(descriptor)
.property("parquet.block.size", "1024")
.build();
DatasetDescriptor saved = provider.update("default", "old_2", updated);
Assert.assertNotNull("Should find saved metadata", saved);
Assert.assertEquals("Should update old dataset successfully",
updated.getProperty("parquet.block.size"),
saved.getProperty("parquet.block.size"));
DatasetDescriptor loaded = provider.load("default", "old_2");
Assert.assertNotNull("Should find saved metadata", loaded);
Assert.assertEquals("Should make changes on disk",
updated.getProperty("parquet.block.size"),
loaded.getProperty("parquet.block.size"));
Assert.assertFalse("Should not move metadata to new location",
local.exists(new Path(root, new Path("default", "old_2"))));
}