diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2022-07-26 19:30:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-26 19:30:04 (GMT) |
commit | d0739f13c131fd8d85c4b3247c26ca2bca515ece (patch) | |
tree | a70ce4e47b6689ae6b9aa5d47c9e143347998a97 /java/src/hdf | |
parent | 6eaa59d2f83a89e9b4808f04caa48d313e658df1 (diff) | |
download | hdf5-d0739f13c131fd8d85c4b3247c26ca2bca515ece.zip hdf5-d0739f13c131fd8d85c4b3247c26ca2bca515ece.tar.gz hdf5-d0739f13c131fd8d85c4b3247c26ca2bca515ece.tar.bz2 |
Revert "1.12 eliminate unnecessary errors in the error stack (#1880)" (#1935)
This reverts commit f6997681335f0b5fe2e8904f9108a71c5200fb2d.
Diffstat (limited to 'java/src/hdf')
-rw-r--r-- | java/src/hdf/hdf5lib/H5.java | 50 | ||||
-rw-r--r-- | java/src/hdf/hdf5lib/HDF5Constants.java | 65 |
2 files changed, 90 insertions, 25 deletions
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 133cd2c..25a1f8d 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -1242,6 +1242,10 @@ public class H5 implements java.io.Serializable { log.trace("H5Aread_string type"); status = H5Aread_string(attr_id, mem_type_id, (String[])obj); } + else if (H5.H5Tget_class(mem_type_id) == HDF5Constants.H5T_VLEN) { + log.trace("H5AreadVL type"); + status = H5AreadVL(attr_id, mem_type_id, (Object[])obj); + } else { // Create a data buffer to hold the data into a Java Array HDFArray theArray = new HDFArray(obj); @@ -1788,6 +1792,10 @@ public class H5 implements java.io.Serializable { log.trace("H5Dwrite_string type"); status = H5Awrite_string(attr_id, mem_type_id, (String[])obj); } + else if (H5.H5Tget_class(mem_type_id) == HDF5Constants.H5T_VLEN) { + log.trace("H5AwriteVL type"); + status = H5AwriteVL(attr_id, mem_type_id, (Object[])obj); + } else { HDFArray theArray = new HDFArray(obj); byte[] buf = theArray.byteify(); @@ -2772,6 +2780,11 @@ public class H5 implements java.io.Serializable { status = H5Dread_string(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, (String[])obj); } + else if (H5.H5Tget_class(mem_type_id) == HDF5Constants.H5T_VLEN) { + log.trace("H5DreadVL type"); + status = + H5DreadVL(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, (Object[])obj); + } else { // Create a data buffer to hold the data into a Java Array HDFArray theArray = new HDFArray(obj); @@ -3450,6 +3463,11 @@ public class H5 implements java.io.Serializable { status = H5Dwrite_string(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, (String[])obj); } + else if (H5.H5Tget_class(mem_type_id) == HDF5Constants.H5T_VLEN) { + log.trace("H5DwriteVL type"); + status = H5DwriteVL(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, + (Object[])obj); + } else { HDFArray theArray = new HDFArray(obj); byte[] buf = theArray.byteify(); @@ -9356,9 +9374,8 @@ public class H5 implements java.io.Serializable { byte[] buf = theArray.emptyBytes(); int status = H5Pget_fill_value(plist_id, type_id, buf); - if (status >= 0) { + if (status >= 0) obj = theArray.arrayify(buf); - } return status; } @@ -11018,8 +11035,6 @@ public class H5 implements java.io.Serializable { public synchronized static native void H5Rdestroy(byte[] ref_ptr) throws HDF5LibraryException, NullPointerException, IllegalArgumentException; - // Info // - /** * H5Rget_type retrieves the type of a reference. * @@ -11076,8 +11091,6 @@ public class H5 implements java.io.Serializable { public synchronized static native byte[] H5Rcopy(byte[] src_ref_ptr) throws HDF5LibraryException, NullPointerException, IllegalArgumentException; - // Dereference // - /** * H5Ropen_object opens that object and returns an identifier. * The object opened with this function should be closed when it is no longer needed @@ -11224,8 +11237,6 @@ public class H5 implements java.io.Serializable { public synchronized static native int H5Rget_obj_type3(byte[] ref_ptr, long rapl_id) throws HDF5LibraryException, NullPointerException, IllegalArgumentException; - // Get name // - /** * H5Rget_file_name retrieves the file name for the object, region or attribute reference pointed to. * @@ -11400,6 +11411,29 @@ public class H5 implements java.io.Serializable { throws HDF5LibraryException, NullPointerException, IllegalArgumentException; /** + * H5Rget_name_string retrieves a name for the object identified by ref. + * + * @param loc_id + * IN: Identifier for the dataset containing the reference or for the group that dataset is in. + * @param ref_type + * IN: Type of reference. + * @param ref + * IN: An object or dataset region reference. + * + * @return Returns the name if successful, returning null if no name is associated with + * the identifier. + * + * @exception HDF5LibraryException + * Error from the HDF-5 Library. + * @exception NullPointerException + * size is null. + * @exception IllegalArgumentException + * Argument is illegal. + **/ + public synchronized static native String H5Rget_name_string(long loc_id, int ref_type, byte[] ref) + throws HDF5LibraryException, NullPointerException, IllegalArgumentException; + + /** * H5Rget_obj_type Given a reference to an object ref, H5Rget_obj_type returns the type of the object * pointed to. * diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java index 1b85c1f..2f5ec91 100644 --- a/java/src/hdf/hdf5lib/HDF5Constants.java +++ b/java/src/hdf/hdf5lib/HDF5Constants.java @@ -16,7 +16,7 @@ package hdf.hdf5lib; import hdf.hdf5lib.structs.H5O_token_t; /** - * /** This class contains C constants and enumerated types of HDF5 library. The + * This class contains C constants and enumerated types of HDF5 library. The * values of these constants are obtained from the library by calling J2C(int * jconstant), where jconstant is any of the private constants which start their * name with "JH5" need to be converted. @@ -62,31 +62,62 @@ public class HDF5Constants { public static final int H5_ITER_NATIVE = H5_ITER_NATIVE(); /** Common iteration orders, Number of iteration orders */ public static final int H5_ITER_N = H5_ITER_N(); - /** */ + /** The version of the H5AC_cache_config_t in use */ public static final int H5AC_CURR_CACHE_CONFIG_VERSION = H5AC_CURR_CACHE_CONFIG_VERSION(); - /** */ + /** The maximum length of the trace file path */ public static final int H5AC_MAX_TRACE_FILE_NAME_LEN = H5AC_MAX_TRACE_FILE_NAME_LEN(); - /** */ + /** + * When metadata_write_strategy is set to this value, only process + * zero is allowed to write dirty metadata to disk. All other + * processes must retain dirty metadata until they are informed at + * a sync point that the dirty metadata in question has been written + * to disk. + */ public static final int H5AC_METADATA_WRITE_STRATEGY_PROCESS_ZERO_ONLY = H5AC_METADATA_WRITE_STRATEGY_PROCESS_ZERO_ONLY(); - /** */ + /** + * In the distributed metadata write strategy, process zero still makes + * the decisions as to what entries should be flushed, but the actual + * flushes are distributed across the processes in the computation to + * the extent possible. + */ public static final int H5AC_METADATA_WRITE_STRATEGY_DISTRIBUTED = H5AC_METADATA_WRITE_STRATEGY_DISTRIBUTED(); - /** */ + /** Don't attempt to increase the size of the cache automatically */ public static final int H5C_incr_off = H5C_incr_off(); - /** */ + /** + * Attempt to increase the size of the cache + * whenever the average hit rate over the last epoch drops + * below the value supplied in the lower_hr_threshold + * field + */ public static final int H5C_incr_threshold = H5C_incr_threshold(); - /** */ + /** Don't perform flash increases in the size of the cache */ public static final int H5C_flash_incr_off = H5C_flash_incr_off(); - /** */ + /** increase the current maximum cache size by x * flash_multiple less any free space in the cache */ public static final int H5C_flash_incr_add_space = H5C_flash_incr_add_space(); - /** */ + /** Don't attempt to decrease the size of the cache automatically */ public static final int H5C_decr_off = H5C_decr_off(); - /** */ + /** + * Attempt to decrease the size of the cache + * whenever the average hit rate over the last epoch rises + * above the value supplied in the upper_hr_threshold + * field + */ public static final int H5C_decr_threshold = H5C_decr_threshold(); - /** */ + /** + * At the end of each epoch, search the cache for + * entries that have not been accessed for at least the number + * of epochs specified in the epochs_before_eviction field, and + * evict these entries + */ public static final int H5C_decr_age_out = H5C_decr_age_out(); - /** */ + /** + * Same as age_out, but we only + * attempt to reduce the cache size when the hit rate observed + * over the last epoch exceeds the value provided in the + * upper_hr_threshold field + */ public static final int H5C_decr_age_out_with_threshold = H5C_decr_age_out_with_threshold(); /** */ public static final int H5D_CHUNK_IDX_BTREE = H5D_CHUNK_IDX_BTREE(); @@ -910,11 +941,11 @@ public class HDF5Constants { /** */ public static final int H5R_MAXTYPE = H5R_MAXTYPE(); /** */ - public static final int H5R_REF_BUF_SIZE = H5R_REF_BUF_SIZE(); + public static final int H5R_DSET_REG_REF_BUF_SIZE = H5R_DSET_REG_REF_BUF_SIZE(); /** */ public static final int H5R_OBJ_REF_BUF_SIZE = H5R_OBJ_REF_BUF_SIZE(); /** */ - public static final int H5R_DSET_REG_REF_BUF_SIZE = H5R_DSET_REG_REF_BUF_SIZE(); + public static final int H5R_REF_BUF_SIZE = H5R_REF_BUF_SIZE(); /** */ public static final int H5R_OBJECT = H5R_OBJECT(); /** */ @@ -2393,11 +2424,11 @@ public class HDF5Constants { private static native final int H5R_MAXTYPE(); - private static native final int H5R_REF_BUF_SIZE(); + private static native final int H5R_DSET_REG_REF_BUF_SIZE(); private static native final int H5R_OBJ_REF_BUF_SIZE(); - private static native final int H5R_DSET_REG_REF_BUF_SIZE(); + private static native final int H5R_REF_BUF_SIZE(); private static native final int H5R_OBJECT(); |