public static Runnable writeSnapshotCatalog ( String path , String nonce , boolean isTruncationSnapshot ) throws IOException { String filename = SnapshotUtil . constructCatalogFilenameForNonce ( nonce ) ; try { return VoltDB . instance ( ) . getCatalogContext ( ) . writeCatalogJarToFile ( path , filename , CatalogJarWriteMode . RECOVER ) ; } catch ( IOException ioe ) { if ( isTruncationSnapshot ) { VoltDB . crashLocalVoltDB ( "Unexpected exception while attempting to create Catalog file for truncation snapshot" , true , ioe ) ; } throw new IOException ( "Unable to write snapshot catalog to file: " + path + File . separator + filename , ioe ) ; } }
Write the current catalog associated with the database snapshot to the snapshot location