types.h

One new API is defined in this header file.

/**
 * Inline function to initialize a hb_cell_t
 */
inline int32_t
hb_cell_t_init(hb_cell_t *cell) {
  if (cell) {
    memset(cell, 0, sizeof(hb_cell_t));
    cell->ts = HBASE_LATEST_TIMESTAMP;
    return 0;
  }
  return EINVAL;
}

When an application puts a value into a cell and needs to specify that the value is the most recent version, the application must call hb_cell_t_init(), passing in the name on the cell object.

After creating a new cell object, call hb_cell_t_init(). The cell timestamp will be initialized with HBASE_LATEST_TIMESTAMP. At the time of the put, the current timestamp on the server will be used for the version.

If the application does not call hb_cell_t_init(), the timestamp for the version will non-deterministic.