/** * Verify the SnapshotFormatter by running it on a known file. */ @Test public void testSnapshotFormatter() throws Exception { File snapDir = new File(testData, "invalidsnap"); File snapfile = new File(new File(snapDir, "version-2"), "snapshot.272"); String[] args = {snapfile.getCanonicalFile().toString()}; SnapshotFormatter.main(args); }
/** * Verify the SnapshotFormatter by running it on a known file with one null data. */ @Test public void testSnapshotFormatterWithNull() throws Exception { File snapDir = new File(testData, "invalidsnap"); File snapfile = new File(new File(snapDir, "version-2"), "snapshot.273"); String[] args = {snapfile.getCanonicalFile().toString()}; SnapshotFormatter.main(args); }
public static void main(String[] args) throws Exception { String snapshotFile = "/var/lib/zookeeper/data/server1/version-2/snapshot.3000109f7"; SnapshotFormatter.main(new String[]{snapshotFile}); }