Skip to content

Commit

Permalink
make sure normalized data set does not already exist
Browse files Browse the repository at this point in the history
  • Loading branch information
trautmane committed Mar 13, 2024
1 parent f485215 commit 8ed4e44
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ public static void main(final String... args) throws IOException, InterruptedExc
final String outputDataset = options.n5DatasetInput + "_normalized" + invertedName;
final String fullScaleOutputDataset = outputDataset + "/s0";

if (n5Output.exists(fullScaleOutputDataset)) {
final String fullPath = options.n5PathInput + fullScaleOutputDataset;
throw new IllegalArgumentException("Normalized data set exists: " + fullPath);
}

n5Output.createDataset(fullScaleOutputDataset, dimensions, blockSize, DataType.UINT8, new GzipCompression());

final JavaRDD<long[][]> pGrid = sparkContext.parallelize(grid);
Expand Down

0 comments on commit 8ed4e44

Please sign in to comment.