From 2c18b196d0c0914eb43a80ac1b597ccf3a9a447b Mon Sep 17 00:00:00 2001 From: GeorgeC Date: Mon, 6 Jan 2025 14:31:10 -0500 Subject: [PATCH] Add dumpStatsAndColumnMeta call to LoadingStore Moved the dumpStatsAndColumnMeta execution from CSVLoaderNewSearch to LoadingStore for better encapsulation and responsibility alignment. This ensures metadata and statistics dumping is consistently handled within the store's lifecycle. --- .../hms/dbmi/avillach/hpds/etl/phenotype/CSVLoaderNewSearch.java | 1 - .../hms/dbmi/avillach/hpds/etl/phenotype/LoadingStore.java | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/etl/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/etl/phenotype/CSVLoaderNewSearch.java b/etl/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/etl/phenotype/CSVLoaderNewSearch.java index 575bf154..1c5e2d8a 100644 --- a/etl/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/etl/phenotype/CSVLoaderNewSearch.java +++ b/etl/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/etl/phenotype/CSVLoaderNewSearch.java @@ -41,7 +41,6 @@ public static void main(String[] args) throws IOException { store.allObservationsStore = new RandomAccessFile(HPDS_DIRECTORY + "allObservationsStore.javabin", "rw"); initialLoad(); store.saveStore(HPDS_DIRECTORY); - store.dumpStatsAndColumnMeta(HPDS_DIRECTORY); } private static void initialLoad() throws IOException { diff --git a/etl/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/etl/phenotype/LoadingStore.java b/etl/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/etl/phenotype/LoadingStore.java index 2373e80e..f857936e 100644 --- a/etl/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/etl/phenotype/LoadingStore.java +++ b/etl/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/etl/phenotype/LoadingStore.java @@ -124,6 +124,7 @@ public void saveStore(String hpdsDirectory) throws IOException { metaOut.close(); System.out.println("Closing Store"); allObservationsStore.close(); + dumpStatsAndColumnMeta(hpdsDirectory); } public void dumpStats() {