Skip to content

Commit

Permalink
disable NetCDF metadata extraction for S3 direct upload #9601
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed May 23, 2023
1 parent bef00db commit 6838fdf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,7 @@ String getMainFileKey() throws IOException {
if (key == null) {
DataFile df = this.getDataFile();
// TODO: (?) - should we worry here about the datafile having null for the owner here?
// Yes, df.getOwner() can be null during S3 direct upload
key = getMainFileKey(df.getOwner(), df.getStorageIdentifier(), driverId);
}
return key;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,12 @@ public boolean fileMetadataExtractableFromNetcdf(DataFile dataFile, Path tempLoc
StorageIO<DataFile> storageIO;
try {
storageIO = dataFile.getStorageIO();
storageIO.open();
try {
storageIO.open();
} catch (Exception ex) {
logger.fine("fileMetadataExtractableFromNetcdf skipped because of exception calling dataFile.getStorageIO(): " + ex);
return false;
}
if (storageIO.isLocalFile()) {
localFile = storageIO.getFileSystemPath().toFile();
dataFileLocation = localFile.getAbsolutePath();
Expand Down

0 comments on commit 6838fdf

Please sign in to comment.