Skip to content

Commit 228e7f5

Browse files
authored
Merge pull request #2114 from DennisHeimbigner/zarrs3.dmh
Significantly Improve Amazon S3 Cloud Storage Support
2 parents 783dc54 + 2da684f commit 228e7f5

87 files changed

Lines changed: 2237 additions & 1445 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,7 @@ ENDIF(ENABLE_NCZARR_S3)
11481148

11491149
IF(NOT ENABLE_S3_SDK)
11501150
IF(ENABLE_NCZARR_S3 OR ENABLE_NCZARR_S3_TESTS)
1151-
message(FATAL_ERROR "AWS S3 libraries not found; please specify option DENABLE_NCZARR_S3=NO")
1151+
message(FATAL_ERROR "S3 support library not found; please specify option DENABLE_NCZARR_S3=NO")
11521152
SET(ENABLE_NCZARR_S3 OFF CACHE BOOL "NCZARR S3 support" FORCE)
11531153
SET(ENABLE_NCZARR_S3_TESTS OFF CACHE BOOL "S3 tests" FORCE)
11541154
ENDIF()

Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ endif
113113
# and run. ncgen must come before ncdump, because their tests
114114
# depend on it.
115115
SUBDIRS = include $(H5_TEST_DIR) libdispatch libsrc $(LIBSRC4_DIR) \
116-
$(LIBSRCP) $(LIBHDF4) $(LIBHDF5) $(OCLIB) $(DAP2) ${DAP4} ${NCPOCO} ${ZARR} liblib \
116+
$(LIBSRCP) $(LIBHDF4) $(LIBHDF5) $(OCLIB) $(DAP2) ${DAP4} \
117+
${NCPOCO} ${ZARR} liblib \
117118
$(NCGEN3) $(NCGEN) $(NCDUMP) ${PLUGIN_DIR} $(TESTDIRS) docs \
118119
$(EXAMPLES)
119120

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This file contains a high-level description of this package's evolution. Release
77

88
## 4.8.2 - TBD
99

10+
* [Enhancement] Support Amazon S3 access for NCZarr. Also support use of the existing Amazon SDK credentials system. See [Github #2114](https://github.com/Unidata/netcdf-c/pull/2114)
1011
* [Bug Fix] Fix string allocation error in H5FDhttp.c. See [Github #2127](https://github.com/Unidata/netcdf-c/pull/2127).
1112
* [Bug Fix] Apply patches for ezxml and for selected oss-fuzz detected errors. See [Github #2125](https://github.com/Unidata/netcdf-c/pull/2125).
1213
* [Bug Fix] Ensure that internal Fortran APIs are always defined. See [Github #2098](https://github.com/Unidata/netcdf-c/pull/2098).

configure.ac

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -642,25 +642,27 @@ AC_MSG_RESULT($enable_nczarr_s3)
642642
# Note we check for the library after checking for enable_nczarr_s3
643643
# because for some reason this screws up if we unconditionally test for sdk
644644
# and it is not available. Fix someday
645-
have_aws=no
645+
enable_s3_sdk=no
646646
if test "x$enable_nczarr_s3" = xyes ; then
647647
# See if we have the s3 aws library
648648
# Check for the AWS S3 SDK library
649649
AC_LANG_PUSH([C++])
650-
AC_SEARCH_LIBS([aws_allocator_is_valid],[aws-c-common aws-cpp-sdk-s3 aws-cpp-sdk-core], [have_aws=yes],[have_aws=no])
650+
AC_SEARCH_LIBS([aws_allocator_is_valid],[aws-c-common aws-cpp-sdk-s3 aws-cpp-sdk-core], [enable_s3_sdk=yes],[enable_s3_sdk=no])
651651
AC_LANG_POP
652652
fi
653653

654654
AC_MSG_CHECKING([whether AWS S3 SDK library is available])
655-
AC_MSG_RESULT([$have_aws])
655+
AC_MSG_RESULT([$enable_s3_sdk])
656656

657-
if test "x$have_aws" = xno ; then
658-
AC_MSG_WARN([AWS SDK not found; disabling S3 support])
657+
if test "x$enable_s3_sdk" = xno ; then
658+
AC_MSG_WARN([No S3 library available; disabling S3 support])
659659
enable_nczarr_s3=no
660-
else
660+
fi
661+
662+
if test "x$enable_s3_sdk" = xyes ; then
661663
AC_DEFINE([ENABLE_S3_SDK], [1], [If true, then S3 sdk was found])
662664
fi
663-
AM_CONDITIONAL(ENABLE_S3_SDK, [test "x$have_aws" = xyes])
665+
AM_CONDITIONAL(ENABLE_S3_SDK, [test "x$enable_s3_sdk" = xyes])
664666

665667
# Check for enabling S3 testing
666668
AC_MSG_CHECKING([whether netcdf zarr S3 testing should be enabled])
@@ -1265,10 +1267,10 @@ if test "x$enable_hdf5" = xyes; then
12651267

12661268
# Check for the main hdf5 and hdf5_hl library.
12671269

1268-
AC_SEARCH_LIBS([H5Fflush], [hdf5dll hdf5], [],
1270+
AC_SEARCH_LIBS([H5Fflush], [hdf5 hdf5.dll], [],
1271+
[AC_MSG_ERROR([Can't find or link to the hdf5 library. Use --disable-hdf5, or see config.log for errors.])])
1272+
AC_SEARCH_LIBS([H5DSis_scale], [hdf5_hl hdf5_hl.dll], [],
12691273
[AC_MSG_ERROR([Can't find or link to the hdf5 library. Use --disable-hdf5, or see config.log for errors.])])
1270-
AC_SEARCH_LIBS([H5DSis_scale], [hdf5_hldll hdf5_hl], [],
1271-
[AC_MSG_ERROR([Can't find or link to the hdf5 high-level. Use --disable-hdf5, or see config.log for errors.])])
12721274

12731275
AC_CHECK_HEADERS([hdf5.h], [], [AC_MSG_ERROR([Compiling a test with HDF5 failed. Either hdf5.h cannot be found, or config.log should be checked for other reason.])])
12741276

@@ -1600,7 +1602,7 @@ AM_CONDITIONAL(ENABLE_BYTERANGE, [test "x$enable_byterange" = xyes])
16001602
AM_CONDITIONAL(RELAX_COORD_BOUND, [test "xyes" = xyes])
16011603
AM_CONDITIONAL(HAS_PAR_FILTERS, [test x$hdf5_supports_par_filters = xyes ])
16021604
AM_CONDITIONAL(ENABLE_NCZARR, [test "x$enable_nczarr" = xyes])
1603-
AM_CONDITIONAL(HAVE_AWS, [test "x$have_aws" = xyes])
1605+
AM_CONDITIONAL(ENABLE_S3_SDK, [test "x$enable_s3_sdk" = xyes])
16041606
AM_CONDITIONAL(HAS_MULTIFILTERS, [test "x$has_multifilters" = xyes])
16051607
AM_CONDITIONAL(ENABLE_BLOSC, [test "x$enable_blosc" = xyes])
16061608
AM_CONDITIONAL(ENABLE_SZIP, [test "x$enable_szip" = xyes])

dap4_test/baselinethredds/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# See netcdf-c/COPYRIGHT file for more info.
77

88

9+
FILE(REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/GOES16_CONUS_20170821_020218_0.47_1km_33.3N_91.4W.nc4.thredds)
910
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*)
1011
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE)
1112

docs/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@ obsolete/fan_utils.html bestpractices.md filters.md indexing.md
9292
inmemory.md DAP2.dox attribute_conventions.md FAQ.md
9393
file_format_specifications.md known_problems.md
9494
COPYRIGHT.dox user_defined_formats.md DAP4.md DAP4.dox
95-
testserver.dox byterange.dox filters.md nczarr.md)
95+
testserver.dox byterange.dox filters.md nczarr.md auth.md)
9696

9797
ADD_EXTRA_DIST("${CUR_EXTRA_DIST}")

docs/Doxyfile.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,8 +742,9 @@ INPUT = \
742742
@abs_top_srcdir@/docs/windows-binaries.md \
743743
@abs_top_srcdir@/docs/attribute_conventions.md \
744744
@abs_top_srcdir@/docs/file_format_specifications.md \
745-
@abs_top_srcdir@/docs/byterange.dox \
746745
@abs_top_srcdir@/docs/inmemory.md \
746+
@abs_top_srcdir@/docs/filters.md \
747+
@abs_top_srcdir@/docs/byterange.dox \
747748
@abs_top_srcdir@/docs/auth.md \
748749
@abs_top_srcdir@/docs/nczarr.md \
749750
@abs_top_srcdir@/docs/notes.md \

docs/Doxyfile.user

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,7 @@ INPUT = \
751751
./docs/byterange.dox \
752752
./docs/inmemory.md \
753753
./docs/auth.md \
754+
./docs/filters.md \
754755
./docs/notes.md \
755756
./docs/all-error-codes.md \
756757
./docs/building-with-cmake.md \

docs/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ EXTRA_DIST = netcdf.m4 DoxygenLayout.xml Doxyfile.in footer.html \
1111
mainpage.dox tutorial.dox cdl.dox \
1212
architecture.dox internal.dox windows-binaries.md \
1313
building-with-cmake.md CMakeLists.txt groups.dox notes.md \
14-
install-fortran.md all-error-codes.md credits.md auth.md \
14+
install-fortran.md all-error-codes.md credits.md auth.md filters.md \
1515
obsolete/fan_utils.html indexing.dox \
1616
inmemory.md attribute_conventions.md FAQ.md \
1717
file_format_specifications.md known_problems.md COPYRIGHT.md \

0 commit comments

Comments
 (0)