SnapshotWritePlan plan;
if (format == SnapshotFormat.NATIVE) {
plan = new NativeSnapshotWritePlan();
}
else if (format == SnapshotFormat.CSV) {
plan = new CSVSnapshotWritePlan();
}
else if (format == SnapshotFormat.STREAM) {
plan = new StreamSnapshotWritePlan();
}
else if (format == SnapshotFormat.INDEX) {