use of org.bboxdb.storage.entity.TupleStoreMetaData in project bboxdb by jnidzwetzki.
the class TestSSTableMetadataBuilder method readFromNonEstingFile.
/**
* Read from non existing file
*/
@Test()
public void readFromNonEstingFile() {
final File tmpFile = new File("/tmp/medatadafile");
final TupleStoreMetaData metaDataRead = TupleStoreMetaData.importFromYamlFile(tmpFile);
Assert.assertTrue(metaDataRead == null);
}
use of org.bboxdb.storage.entity.TupleStoreMetaData in project bboxdb by jnidzwetzki.
the class TestSSTableMetadataBuilder method testDumpAndReadFromYamlFile1.
/**
* Dump the index to yaml file and reread the data - zero tuples
* @throws IOException
*/
@Test(timeout = 60000)
public void testDumpAndReadFromYamlFile1() throws IOException {
final SSTableMetadataBuilder ssTableIndexBuilder = new SSTableMetadataBuilder();
final File tmpFile = File.createTempFile("test", ".tmp");
final TupleStoreMetaData metaData = ssTableIndexBuilder.getMetaData();
metaData.exportToYamlFile(tmpFile);
final TupleStoreMetaData metaDataRead = TupleStoreMetaData.importFromYamlFile(tmpFile);
Assert.assertEquals(metaData, metaDataRead);
tmpFile.delete();
}
use of org.bboxdb.storage.entity.TupleStoreMetaData in project bboxdb by jnidzwetzki.
the class SSTableWriter method writeMetadata.
/**
* Write the meta data to yaml info file
* @throws IOException
*/
private void writeMetadata() throws IOException {
final TupleStoreMetaData metadata = metadataBuilder.getMetaData();
metadata.exportToYamlFile(metadatafile);
}
Aggregations