Page tree

Creating and manipulating HDF5 datasets to support append- and read-only operations on table data

  • H5PT_APPENDAppends packets to the end of a packet table.
  • H5PT_CLOSECloses an open packet table.
  • H5PT_CREATECreates a packet table to store fixed-length or variable-length packets.
  • H5PT_CREATE_FLCreates a packet table to store fixed-length packets.
  • H5PT_CREATE_INDEXResets a packet table's index to the first packet.
  • H5PT_FREE_VLEN_BUFFReleases memory allocated in the process of reading variable-length packets.
  • H5PT_GET_DATASETReturns the backend dataset of this packet table.
  • H5PT_GET_NEXTReads packets from a packet table starting at the current index.
  • H5PT_GET_NUM_PACKETSReturns the number of packets in a packet table.
  • H5PT_GET_TYPEReturns the backend datatype of this packet table.
  • H5PT_IS_VALIDDetermines whether an indentifier points to a packet table.
  • H5PT_IS_VARLENDetermines whether a packet table contains variable-length or fixed-length packets.
  • H5PT_OPENOpens an existing packet table.
  • H5PT_READ_PACKETSReads a number of packets from a packet table.
  • H5PT_SET_INDEXSets a packet table's index.

The HDF5 Packet Table API is designed to allow records to be appended to and read from a table. Packet Table datasets are chunked, allowing them to grow as needed.

The Packet Table API, with the H5PT prefix, is not to be confused with the H5TB Table API (H5TB prefix). The H5TB APIs are stateless (H5TB Tables do not need to be opened or closed) but H5PT Packet Tables require less performance overhead. Also, H5TB Tables support insertions and deletions, while H5PT Packet Tables support only append operations. H5TB functions should not be called on tables created with the H5PT API, or vice versa.

Packet Tables are datasets in an HDF5 file, so while their contents should not be changed outside of the H5PT API calls, the datatypes of Packet Tables can be queried using H5Dget_type. Packet Tables can also be given attributes using the normal HDF5 APIs.

Programming Hint:

The following line includes the HDF5 Packet Table package, H5PT, in C applications: 
         #include "hdf5_hl.h" 
Without this include, an application will not have access to these functions.

--- Last Modified: November 16, 2017 | 07:48 AM