summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-01-02 20:38:30 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-01-02 20:38:30 (GMT)
commitc820502e69b8c3222bbf1162d21820bebcf71202 (patch)
treeaa5e272e4a5c02a43bdb38ee18fc650537a3de7d
parentc70498f7a919644000966616c3ff152dcedf3392 (diff)
parented0c468902409ae7fa8fb91c5f5a3a3093846736 (diff)
downloadhdf5-c820502e69b8c3222bbf1162d21820bebcf71202.zip
hdf5-c820502e69b8c3222bbf1162d21820bebcf71202.tar.gz
hdf5-c820502e69b8c3222bbf1162d21820bebcf71202.tar.bz2
Merge pull request #1421 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'ed0c468902409ae7fa8fb91c5f5a3a3093846736': HDFFV-10664 add check for state before set call HDFFV-10546 refactor variable name HDFFV-10664 minimized dataset headers for java interface
-rw-r--r--config/cmake/HDF5UseFortran.cmake16
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake142
-rw-r--r--config/cmake_ext_mod/HDFUseCXX.cmake4
-rw-r--r--config/cmake_ext_mod/HDFUseFortran.cmake4
-rw-r--r--java/src/hdf/hdf5lib/H5.java60
-rw-r--r--java/src/jni/h5fImp.c44
-rw-r--r--java/src/jni/h5fImp.h18
-rw-r--r--java/src/jni/h5pImp.c45
-rw-r--r--java/src/jni/h5pImp.h18
-rw-r--r--java/test/TestH5Dplist.java20
-rw-r--r--java/test/TestH5Fbasic.java17
-rw-r--r--java/test/testfiles/JUnit-TestH5Dplist.txt3
-rw-r--r--java/test/testfiles/JUnit-TestH5Fbasic.txt3
13 files changed, 307 insertions, 87 deletions
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
index 157befd..a24b2e1 100644
--- a/config/cmake/HDF5UseFortran.cmake
+++ b/config/cmake/HDF5UseFortran.cmake
@@ -18,16 +18,6 @@ ENABLE_LANGUAGE (Fortran)
set (HDF_PREFIX "H5")
include (CheckFortranFunctionExists)
-## Check for non-standard extenstion quadmath.h
-
-CHECK_INCLUDE_FILES(quadmath.h C_HAVE_QUADMATH)
-
-if (${C_HAVE_QUADMATH})
- set(${HDF_PREFIX}_HAVE_QUADMATH_H 1)
-else ()
- set(${HDF_PREFIX}_HAVE_QUADMATH_H 0)
-endif ()
-
# The provided CMake Fortran macros don't provide a general compile/run function
# so this one is used.
#-----------------------------------------------------------------------------
@@ -40,7 +30,7 @@ macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1
TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90
- LINK_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}"
+ LINK_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}"
)
if (${COMPILE_RESULT_VAR})
@@ -367,9 +357,9 @@ ENABLE_LANGUAGE (C)
#-----------------------------------------------------------------------------
macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR)
message (STATUS "Detecting C ${FUNCTION_NAME}")
- if (CMAKE_REQUIRED_LIBRARIES)
+ if (HDF5_REQUIRED_LIBRARIES)
set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+ "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}")
else ()
set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
endif ()
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index 40f1440..0424ed6 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -70,7 +70,7 @@ if (WIN32)
set (CMAKE_REQUIRED_FLAGS "-DWIN32_LEAN_AND_MEAN=1 -DNOGDI=1")
endif ()
set (${HDF_PREFIX}_HAVE_WIN32_API 1)
- set (CMAKE_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib")
+ set (HDF5_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib")
if (NOT UNIX AND NOT MINGW)
set (WINDOWS 1)
set (CMAKE_REQUIRED_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1")
@@ -109,6 +109,78 @@ endif ()
# END of WINDOWS Hard code Values
# ----------------------------------------------------------------------
+if (NOT WINDOWS)
+ TEST_BIG_ENDIAN (${HDF_PREFIX}_WORDS_BIGENDIAN)
+endif ()
+
+#-----------------------------------------------------------------------------
+# Check IF header file exists and add it to the list.
+#-----------------------------------------------------------------------------
+macro (CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
+ CHECK_INCLUDE_FILES ("${USE_INCLUDES};${FILE}" ${VARIABLE})
+ if (${VARIABLE})
+ set (USE_INCLUDES ${USE_INCLUDES} ${FILE})
+ endif ()
+endmacro ()
+
+#-----------------------------------------------------------------------------
+# Check for the existence of certain header files
+#-----------------------------------------------------------------------------
+CHECK_INCLUDE_FILE_CONCAT ("sys/file.h" ${HDF_PREFIX}_HAVE_SYS_FILE_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/ioctl.h" ${HDF_PREFIX}_HAVE_SYS_IOCTL_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/resource.h" ${HDF_PREFIX}_HAVE_SYS_RESOURCE_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/socket.h" ${HDF_PREFIX}_HAVE_SYS_SOCKET_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/stat.h" ${HDF_PREFIX}_HAVE_SYS_STAT_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/time.h" ${HDF_PREFIX}_HAVE_SYS_TIME_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/types.h" ${HDF_PREFIX}_HAVE_SYS_TYPES_H)
+CHECK_INCLUDE_FILE_CONCAT ("features.h" ${HDF_PREFIX}_HAVE_FEATURES_H)
+CHECK_INCLUDE_FILE_CONCAT ("dirent.h" ${HDF_PREFIX}_HAVE_DIRENT_H)
+CHECK_INCLUDE_FILE_CONCAT ("setjmp.h" ${HDF_PREFIX}_HAVE_SETJMP_H)
+CHECK_INCLUDE_FILE_CONCAT ("stddef.h" ${HDF_PREFIX}_HAVE_STDDEF_H)
+CHECK_INCLUDE_FILE_CONCAT ("stdint.h" ${HDF_PREFIX}_HAVE_STDINT_H)
+CHECK_INCLUDE_FILE_CONCAT ("unistd.h" ${HDF_PREFIX}_HAVE_UNISTD_H)
+
+# Darwin
+CHECK_INCLUDE_FILE_CONCAT ("mach/mach_time.h" ${HDF_PREFIX}_HAVE_MACH_MACH_TIME_H)
+
+# Windows
+CHECK_INCLUDE_FILE_CONCAT ("io.h" ${HDF_PREFIX}_HAVE_IO_H)
+if (NOT CYGWIN)
+ CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" ${HDF_PREFIX}_HAVE_WINSOCK2_H)
+endif ()
+CHECK_INCLUDE_FILE_CONCAT ("sys/timeb.h" ${HDF_PREFIX}_HAVE_SYS_TIMEB_H)
+
+if (CMAKE_SYSTEM_NAME MATCHES "OSF")
+ CHECK_INCLUDE_FILE_CONCAT ("sys/sysinfo.h" ${HDF_PREFIX}_HAVE_SYS_SYSINFO_H)
+ CHECK_INCLUDE_FILE_CONCAT ("sys/proc.h" ${HDF_PREFIX}_HAVE_SYS_PROC_H)
+else ()
+ set (${HDF_PREFIX}_HAVE_SYS_SYSINFO_H "" CACHE INTERNAL "" FORCE)
+ set (${HDF_PREFIX}_HAVE_SYS_PROC_H "" CACHE INTERNAL "" FORCE)
+endif ()
+
+CHECK_INCLUDE_FILE_CONCAT ("globus/common.h" ${HDF_PREFIX}_HAVE_GLOBUS_COMMON_H)
+CHECK_INCLUDE_FILE_CONCAT ("pdb.h" ${HDF_PREFIX}_HAVE_PDB_H)
+CHECK_INCLUDE_FILE_CONCAT ("pthread.h" ${HDF_PREFIX}_HAVE_PTHREAD_H)
+CHECK_INCLUDE_FILE_CONCAT ("srbclient.h" ${HDF_PREFIX}_HAVE_SRBCLIENT_H)
+CHECK_INCLUDE_FILE_CONCAT ("string.h" ${HDF_PREFIX}_HAVE_STRING_H)
+CHECK_INCLUDE_FILE_CONCAT ("strings.h" ${HDF_PREFIX}_HAVE_STRINGS_H)
+CHECK_INCLUDE_FILE_CONCAT ("stdlib.h" ${HDF_PREFIX}_HAVE_STDLIB_H)
+CHECK_INCLUDE_FILE_CONCAT ("memory.h" ${HDF_PREFIX}_HAVE_MEMORY_H)
+CHECK_INCLUDE_FILE_CONCAT ("dlfcn.h" ${HDF_PREFIX}_HAVE_DLFCN_H)
+CHECK_INCLUDE_FILE_CONCAT ("inttypes.h" ${HDF_PREFIX}_HAVE_INTTYPES_H)
+CHECK_INCLUDE_FILE_CONCAT ("netinet/in.h" ${HDF_PREFIX}_HAVE_NETINET_IN_H)
+# _Bool type support
+CHECK_INCLUDE_FILE_CONCAT (stdbool.h ${HDF_PREFIX}_HAVE_STDBOOL_H)
+
+## Check for non-standard extenstion quadmath.h
+
+CHECK_INCLUDE_FILES(quadmath.h C_HAVE_QUADMATH)
+if (${C_HAVE_QUADMATH})
+ set(${HDF_PREFIX}_HAVE_QUADMATH_H 1)
+else ()
+ set(${HDF_PREFIX}_HAVE_QUADMATH_H 0)
+endif ()
+
if (CYGWIN)
set (${HDF_PREFIX}_HAVE_LSEEK64 0)
endif ()
@@ -127,17 +199,13 @@ endif ()
CHECK_LIBRARY_EXISTS_CONCAT ("ucb" gethostname ${HDF_PREFIX}_HAVE_LIBUCB)
# For other tests to use the same libraries
-set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${LINK_LIBS})
+set (HDF5_REQUIRED_LIBRARIES ${HDF5_REQUIRED_LIBRARIES} ${LINK_LIBS})
set (USE_INCLUDES "")
if (WINDOWS)
set (USE_INCLUDES ${USE_INCLUDES} "windows.h")
endif ()
-if (NOT WINDOWS)
- TEST_BIG_ENDIAN (${HDF_PREFIX}_WORDS_BIGENDIAN)
-endif ()
-
# For other specific tests, use this MACRO.
macro (HDF_FUNCTION_TEST OTHER_TEST)
if (NOT DEFINED ${HDF_PREFIX}_${OTHER_TEST})
@@ -165,7 +233,7 @@ macro (HDF_FUNCTION_TEST OTHER_TEST)
${CMAKE_BINARY_DIR}
${HDF_RESOURCES_EXT_DIR}/HDFTests.c
COMPILE_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS}"
- LINK_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}"
+ LINK_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT
)
if (${OTHER_TEST})
@@ -188,63 +256,6 @@ endmacro ()
HDF_FUNCTION_TEST (STDC_HEADERS)
#-----------------------------------------------------------------------------
-# Check IF header file exists and add it to the list.
-#-----------------------------------------------------------------------------
-macro (CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
- CHECK_INCLUDE_FILES ("${USE_INCLUDES};${FILE}" ${VARIABLE})
- if (${VARIABLE})
- set (USE_INCLUDES ${USE_INCLUDES} ${FILE})
- endif ()
-endmacro ()
-
-#-----------------------------------------------------------------------------
-# Check for the existence of certain header files
-#-----------------------------------------------------------------------------
-CHECK_INCLUDE_FILE_CONCAT ("sys/file.h" ${HDF_PREFIX}_HAVE_SYS_FILE_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/ioctl.h" ${HDF_PREFIX}_HAVE_SYS_IOCTL_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/resource.h" ${HDF_PREFIX}_HAVE_SYS_RESOURCE_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/socket.h" ${HDF_PREFIX}_HAVE_SYS_SOCKET_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/stat.h" ${HDF_PREFIX}_HAVE_SYS_STAT_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/time.h" ${HDF_PREFIX}_HAVE_SYS_TIME_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/types.h" ${HDF_PREFIX}_HAVE_SYS_TYPES_H)
-CHECK_INCLUDE_FILE_CONCAT ("features.h" ${HDF_PREFIX}_HAVE_FEATURES_H)
-CHECK_INCLUDE_FILE_CONCAT ("dirent.h" ${HDF_PREFIX}_HAVE_DIRENT_H)
-CHECK_INCLUDE_FILE_CONCAT ("setjmp.h" ${HDF_PREFIX}_HAVE_SETJMP_H)
-CHECK_INCLUDE_FILE_CONCAT ("stddef.h" ${HDF_PREFIX}_HAVE_STDDEF_H)
-CHECK_INCLUDE_FILE_CONCAT ("stdint.h" ${HDF_PREFIX}_HAVE_STDINT_H)
-CHECK_INCLUDE_FILE_CONCAT ("unistd.h" ${HDF_PREFIX}_HAVE_UNISTD_H)
-
-# Darwin
-CHECK_INCLUDE_FILE_CONCAT ("mach/mach_time.h" ${HDF_PREFIX}_HAVE_MACH_MACH_TIME_H)
-
-# Windows
-CHECK_INCLUDE_FILE_CONCAT ("io.h" ${HDF_PREFIX}_HAVE_IO_H)
-if (NOT CYGWIN)
- CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" ${HDF_PREFIX}_HAVE_WINSOCK2_H)
-endif ()
-CHECK_INCLUDE_FILE_CONCAT ("sys/timeb.h" ${HDF_PREFIX}_HAVE_SYS_TIMEB_H)
-
-if (CMAKE_SYSTEM_NAME MATCHES "OSF")
- CHECK_INCLUDE_FILE_CONCAT ("sys/sysinfo.h" ${HDF_PREFIX}_HAVE_SYS_SYSINFO_H)
- CHECK_INCLUDE_FILE_CONCAT ("sys/proc.h" ${HDF_PREFIX}_HAVE_SYS_PROC_H)
-else ()
- set (${HDF_PREFIX}_HAVE_SYS_SYSINFO_H "" CACHE INTERNAL "" FORCE)
- set (${HDF_PREFIX}_HAVE_SYS_PROC_H "" CACHE INTERNAL "" FORCE)
-endif ()
-
-CHECK_INCLUDE_FILE_CONCAT ("globus/common.h" ${HDF_PREFIX}_HAVE_GLOBUS_COMMON_H)
-CHECK_INCLUDE_FILE_CONCAT ("pdb.h" ${HDF_PREFIX}_HAVE_PDB_H)
-CHECK_INCLUDE_FILE_CONCAT ("pthread.h" ${HDF_PREFIX}_HAVE_PTHREAD_H)
-CHECK_INCLUDE_FILE_CONCAT ("srbclient.h" ${HDF_PREFIX}_HAVE_SRBCLIENT_H)
-CHECK_INCLUDE_FILE_CONCAT ("string.h" ${HDF_PREFIX}_HAVE_STRING_H)
-CHECK_INCLUDE_FILE_CONCAT ("strings.h" ${HDF_PREFIX}_HAVE_STRINGS_H)
-CHECK_INCLUDE_FILE_CONCAT ("stdlib.h" ${HDF_PREFIX}_HAVE_STDLIB_H)
-CHECK_INCLUDE_FILE_CONCAT ("memory.h" ${HDF_PREFIX}_HAVE_MEMORY_H)
-CHECK_INCLUDE_FILE_CONCAT ("dlfcn.h" ${HDF_PREFIX}_HAVE_DLFCN_H)
-CHECK_INCLUDE_FILE_CONCAT ("inttypes.h" ${HDF_PREFIX}_HAVE_INTTYPES_H)
-CHECK_INCLUDE_FILE_CONCAT ("netinet/in.h" ${HDF_PREFIX}_HAVE_NETINET_IN_H)
-
-#-----------------------------------------------------------------------------
# Check for large file support
#-----------------------------------------------------------------------------
@@ -408,7 +419,6 @@ endif ()
#-----------------------------------------------------------------------------
# _Bool type support
-CHECK_INCLUDE_FILE_CONCAT (stdbool.h ${HDF_PREFIX}_HAVE_STDBOOL_H)
if (HAVE_STDBOOL_H)
set (CMAKE_EXTRA_INCLUDE_FILES stdbool.h)
HDF_CHECK_TYPE_SIZE (bool ${HDF_PREFIX}_SIZEOF_BOOL)
@@ -580,7 +590,7 @@ if (WINDOWS)
${CMAKE_BINARY_DIR}
${HDF_RESOURCES_EXT_DIR}/HDFTests.c
COMPILE_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} ${MACRO_CHECK_FUNCTION_DEFINITIONS}"
- LINK_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}"
+ LINK_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}"
CMAKE_FLAGS "${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES} -DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH}"
COMPILE_OUTPUT_VARIABLE OUTPUT
)
diff --git a/config/cmake_ext_mod/HDFUseCXX.cmake b/config/cmake_ext_mod/HDFUseCXX.cmake
index f293ec5..efaa556 100644
--- a/config/cmake_ext_mod/HDFUseCXX.cmake
+++ b/config/cmake_ext_mod/HDFUseCXX.cmake
@@ -48,8 +48,8 @@ macro (HDF_CXX_FUNCTION_TEST OTHER_TEST)
if (NOT DEFINED ${OTHER_TEST})
set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}")
set (OTHER_TEST_ADD_LIBRARIES)
- if (CMAKE_REQUIRED_LIBRARIES)
- set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+ if (HDF5_REQUIRED_LIBRARIES)
+ set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}")
endif ()
foreach (def
diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake
index f8f3cea..c68c921 100644
--- a/config/cmake_ext_mod/HDFUseFortran.cmake
+++ b/config/cmake_ext_mod/HDFUseFortran.cmake
@@ -48,9 +48,9 @@ set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) ${CMAKE_MATCH_1}")
#-----------------------------------------------------------------------------
macro (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
message (STATUS "Testing Fortran ${FUNCTION}")
- if (CMAKE_REQUIRED_LIBRARIES)
+ if (HDF5_REQUIRED_LIBRARIES)
set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+ "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}")
else ()
set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
endif ()
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java
index e354207..deeda49 100644
--- a/java/src/hdf/hdf5lib/H5.java
+++ b/java/src/hdf/hdf5lib/H5.java
@@ -3229,6 +3229,34 @@ public class H5 implements java.io.Serializable {
public synchronized static native void H5Fget_mdc_logging_status(long file_id, boolean[] mdc_logging_status)
throws HDF5LibraryException, NullPointerException;
+ /**
+ * H5Fget_dset_no_attrs_hint gets the file-level setting to create minimized dataset object headers.
+ *
+ * @param file_id
+ * IN: Identifier of the target file.
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ **/
+ public synchronized static native boolean H5Fget_dset_no_attrs_hint(long file_id)
+ throws HDF5LibraryException;
+
+
+ /**
+ * H5Fset_dset_no_attrs_hint sets the file-level setting to create minimized dataset object headers.
+ *
+ * @param file_id
+ * IN: Identifier of the target file.
+ *
+ * @param minimize
+ * the minimize hint setting
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ **/
+ public synchronized static native void H5Fset_dset_no_attrs_hint(long file_id, boolean minimize)
+ throws HDF5LibraryException;
+
// /////// unimplemented ////////
// herr_t H5Fget_eoa(hid_t file_id, haddr_t *eoa);
// herr_t H5Fincrement_filesize(hid_t file_id, hsize_t increment);
@@ -6922,8 +6950,6 @@ public class H5 implements java.io.Serializable {
public synchronized static native int H5Pset_fill_time(long plist_id, int fill_time) throws HDF5LibraryException,
NullPointerException;
- // /////// Dataset creation property list (DCPL) routines ///////
-
/**
* H5Pset_chunk_opts Sets the edge chunk option in a dataset creation property list.
*
@@ -6952,6 +6978,36 @@ public class H5 implements java.io.Serializable {
**/
public synchronized static native int H5Pget_chunk_opts(long dcpl_id) throws HDF5LibraryException;
+ /**
+ * H5Pget_dset_no_attrs_hint accesses the flag for whether or not datasets created by the given dcpl
+ * will be created with a "minimized" object header.
+ *
+ * @param dcpl_id
+ * IN: Dataset creation property list
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ **/
+ public synchronized static native boolean H5Pget_dset_no_attrs_hint(long dcpl_id)
+ throws HDF5LibraryException;
+
+
+ /**
+ * H5Pset_dset_no_attrs_hint sets the dcpl to minimize (or explicitly to not minimized) dataset object
+ * headers upon creation.
+ *
+ * @param dcpl_id
+ * IN: Dataset creation property list
+ *
+ * @param minimize
+ * the minimize hint setting
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ **/
+ public synchronized static native void H5Pset_dset_no_attrs_hint(long dcpl_id, boolean minimize)
+ throws HDF5LibraryException;
+
// /////// Dataset access property list (DAPL) routines ///////
/**
diff --git a/java/src/jni/h5fImp.c b/java/src/jni/h5fImp.c
index 248e654..7f10ca5 100644
--- a/java/src/jni/h5fImp.c
+++ b/java/src/jni/h5fImp.c
@@ -636,6 +636,50 @@ Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status
} /* end else */
} /* end Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status */
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Fset_dset_no_attrs_hint
+ * Signature: (JZ)V
+ */
+JNIEXPORT void JNICALL
+Java_hdf_hdf5lib_H5_H5Fset_1dset_1no_1attrs_1hint
+(JNIEnv *env, jclass clss, jlong file_id, jboolean minimize)
+{
+ herr_t retVal = -1;
+ hbool_t minimize_val;
+
+ if (minimize == JNI_TRUE)
+ minimize_val = TRUE;
+ else
+ minimize_val = FALSE;
+
+ retVal = H5Fset_dset_no_attrs_hint((hid_t)file_id, (hbool_t)minimize_val);
+ if (retVal < 0)
+ h5libraryError(env);
+}
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Fget_dset_no_attrs_hint
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_hdf_hdf5lib_H5_H5Fget_1dset_1no_1attrs_1hint
+(JNIEnv *env, jclass clss, jlong file_id)
+{
+ hbool_t minimize = FALSE;
+ jboolean bval = JNI_FALSE;
+
+ if (H5Fget_dset_no_attrs_hint((hid_t)file_id, (hbool_t *)&minimize) < 0) {
+ h5libraryError(env);
+ }
+ else {
+ if (minimize == TRUE)
+ bval = JNI_TRUE;
+ } /* end else */
+
+ return bval;
+}
#ifdef __cplusplus
diff --git a/java/src/jni/h5fImp.h b/java/src/jni/h5fImp.h
index af0fa1d..f1b4f04 100644
--- a/java/src/jni/h5fImp.h
+++ b/java/src/jni/h5fImp.h
@@ -255,6 +255,24 @@ JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status
(JNIEnv *, jclass, jlong, jbooleanArray);
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Fset_dset_no_attrs_hint
+ * Signature: (JZ)V
+ */
+JNIEXPORT void JNICALL
+Java_hdf_hdf5lib_H5_H5Fset_1dset_1no_1attrs_1hint
+ (JNIEnv *, jclass, jlong, jboolean);
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Fget_dset_no_attrs_hint
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_hdf_hdf5lib_H5_H5Fget_1dset_1no_1attrs_1hint
+ (JNIEnv *, jclass, jlong);
+
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
diff --git a/java/src/jni/h5pImp.c b/java/src/jni/h5pImp.c
index 52008ce..19f9640 100644
--- a/java/src/jni/h5pImp.c
+++ b/java/src/jni/h5pImp.c
@@ -5946,6 +5946,51 @@ Java_hdf_hdf5lib_H5_H5Pget_1chunk_1opts
return (jint)opts;
} /* end Java_hdf_hdf5lib_H5_H5Pget_1chunk_1opts */
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Pset_dset_no_attrs_hint
+ * Signature: (JZ)V
+ */
+JNIEXPORT void JNICALL
+Java_hdf_hdf5lib_H5_H5Pset_1dset_1no_1attrs_1hint
+(JNIEnv *env, jclass clss, jlong dcpl_id, jboolean minimize)
+{
+ herr_t retVal = -1;
+ hbool_t minimize_val;
+
+ if (minimize == JNI_TRUE)
+ minimize_val = TRUE;
+ else
+ minimize_val = FALSE;
+
+ retVal = H5Pset_dset_no_attrs_hint((hid_t)dcpl_id, (hbool_t)minimize_val);
+ if (retVal < 0)
+ h5libraryError(env);
+}
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Pget_dset_no_attrs_hint
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_hdf_hdf5lib_H5_H5Pget_1dset_1no_1attrs_1hint
+(JNIEnv *env, jclass clss, jlong dcpl_id)
+{
+ hbool_t minimize = FALSE;
+ jboolean bval = JNI_FALSE;
+
+ if (H5Pget_dset_no_attrs_hint((hid_t)dcpl_id, (hbool_t *)&minimize) < 0) {
+ h5libraryError(env);
+ }
+ else {
+ if (minimize == TRUE)
+ bval = JNI_TRUE;
+ } /* end else */
+
+ return bval;
+}
+
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
diff --git a/java/src/jni/h5pImp.h b/java/src/jni/h5pImp.h
index 1d12e3d..0a603f7 100644
--- a/java/src/jni/h5pImp.h
+++ b/java/src/jni/h5pImp.h
@@ -1614,6 +1614,24 @@ JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Pget_1chunk_1opts
(JNIEnv *, jclass, jlong);
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Pset_dset_no_attrs_hint
+ * Signature: (JZ)V
+ */
+JNIEXPORT void JNICALL
+Java_hdf_hdf5lib_H5_H5Pset_1dset_1no_1attrs_1hint
+ (JNIEnv *, jclass, jlong, jboolean);
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Pget_dset_no_attrs_hint
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_hdf_hdf5lib_H5_H5Pget_1dset_1no_1attrs_1hint
+ (JNIEnv *, jclass, jlong);
+
#ifdef __cplusplus
} /* end extern "C" */
diff --git a/java/test/TestH5Dplist.java b/java/test/TestH5Dplist.java
index 406a1d3..1b5acfa 100644
--- a/java/test/TestH5Dplist.java
+++ b/java/test/TestH5Dplist.java
@@ -13,6 +13,7 @@
package test;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -211,4 +212,23 @@ public class TestH5Dplist {
assertTrue("testH5Dset_extent - H5.H5Dread: ", extend_dset_data[4][8] == 99);
}
+ @Test
+ public void testH5P_dset_no_attrs_hint() {
+ boolean ret_val_id = true;
+
+ _createPDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DATASET_CREATE);
+
+ try {
+ ret_val_id = H5.H5Pget_dset_no_attrs_hint(H5dcpl_id);
+ assertFalse("H5P_dset_no_attrs_hint", ret_val_id);
+ H5.H5Pset_dset_no_attrs_hint(H5dcpl_id, true);
+ ret_val_id = H5.H5Pget_dset_no_attrs_hint(H5dcpl_id);
+ assertTrue("H5P_dset_no_attrs_hint", ret_val_id);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("H5P_dset_no_attrs_hint: " + err);
+ }
+ }
+
}
diff --git a/java/test/TestH5Fbasic.java b/java/test/TestH5Fbasic.java
index a5afb6e..fff9523 100644
--- a/java/test/TestH5Fbasic.java
+++ b/java/test/TestH5Fbasic.java
@@ -14,6 +14,7 @@
package test;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -328,4 +329,20 @@ public class TestH5Fbasic {
fail("H5.H5Freset_mdc_hit_rate_stats: " + err);
}
}
+
+ @Test
+ public void testH5F_dset_no_attrs_hint() {
+ boolean ret_val_id = true;
+ try {
+ ret_val_id = H5.H5Fget_dset_no_attrs_hint(H5fid);
+ assertFalse("H5F_dset_no_attrs_hint", ret_val_id);
+ H5.H5Fset_dset_no_attrs_hint(H5fid, true);
+ ret_val_id = H5.H5Fget_dset_no_attrs_hint(H5fid);
+ assertTrue("H5F_dset_no_attrs_hint", ret_val_id);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("H5F_dset_no_attrs_hint: " + err);
+ }
+ }
}
diff --git a/java/test/testfiles/JUnit-TestH5Dplist.txt b/java/test/testfiles/JUnit-TestH5Dplist.txt
index 1dfbed1..64e924a 100644
--- a/java/test/testfiles/JUnit-TestH5Dplist.txt
+++ b/java/test/testfiles/JUnit-TestH5Dplist.txt
@@ -1,7 +1,8 @@
JUnit version 4.11
+.testH5P_dset_no_attrs_hint
.testH5Dset_extent
Time: XXXX
-OK (1 test)
+OK (2 tests)
diff --git a/java/test/testfiles/JUnit-TestH5Fbasic.txt b/java/test/testfiles/JUnit-TestH5Fbasic.txt
index 2654624..05504de 100644
--- a/java/test/testfiles/JUnit-TestH5Fbasic.txt
+++ b/java/test/testfiles/JUnit-TestH5Fbasic.txt
@@ -2,6 +2,7 @@ JUnit version 4.11
.testH5Fget_mdc_size
.testH5Fget_mdc_hit_rate
.testH5Fis_hdf5
+.testH5F_dset_no_attrs_hint
.testH5Fget_freespace
.testH5Fclose
.testH5Fget_filesize
@@ -18,5 +19,5 @@ JUnit version 4.11
Time: XXXX
-OK (16 tests)
+OK (17 tests)