Home » hive-0.5.0-dev » org.apache.hadoop.hive.ql.util.jdbm » [javadoc | source]
org.apache.hadoop.hive.ql.util.jdbm
public interface: RecordManager [javadoc | source]

All Known Implementing Classes:
    BaseRecordManager, CacheRecordManager

An interface to manages records, which are uninterpreted blobs of data.

The set of record operations is simple: fetch, insert, update and delete. Each record is identified using a "rowid" and contains a byte[] data block. Rowids are returned on inserts and you can store them someplace safe to be able to get back to them. Data blocks can be as long as you wish, and may have lengths different from the original when updating.

Field Summary
public static final  int NAME_DIRECTORY_ROOT    Reserved slot for name directory. 
Method from org.apache.hadoop.hive.ql.util.jdbm.RecordManager Summary:
close,   commit,   delete,   fetch,   fetch,   getNamedObject,   getRoot,   getRootCount,   insert,   insert,   rollback,   setNamedObject,   setRoot,   update,   update
Method from org.apache.hadoop.hive.ql.util.jdbm.RecordManager Detail:
 abstract public  void close() throws IOException
    Closes the record manager.
 abstract public  void commit() throws IOException
    Commit (make persistent) all changes since beginning of transaction.
 abstract public  void delete(long recid) throws IOException
    Deletes a record.
 abstract public Object fetch(long recid) throws IOException
    Fetches a record using standard java object serialization.
 abstract public Object fetch(long recid,
    Serializer serializer) throws IOException
    Fetches a record using a custom serializer.
 abstract public long getNamedObject(String name) throws IOException
    Obtain the record id of a named object. Returns 0 if named object doesn't exist.
 abstract public long getRoot(int id) throws IOException
    Returns the indicated root rowid.
 abstract public int getRootCount()
    Returns the number of slots available for "root" rowids. These slots can be used to store special rowids, like rowids that point to other rowids. Root rowids are useful for bootstrapping access to a set of data.
 abstract public long insert(Object obj) throws IOException
    Inserts a new record using standard java object serialization.
 abstract public long insert(Object obj,
    Serializer serializer) throws IOException
    Inserts a new record using a custom serializer.
 abstract public  void rollback() throws IOException
    Rollback (cancel) all changes since beginning of transaction.
 abstract public  void setNamedObject(String name,
    long recid) throws IOException
    Set the record id of a named object.
 abstract public  void setRoot(int id,
    long rowid) throws IOException
    Sets the indicated root rowid.
 abstract public  void update(long recid,
    Object obj) throws IOException
    Updates a record using standard java object serialization.
 abstract public  void update(long recid,
    Object obj,
    Serializer serializer) throws IOException
    Updates a record using a custom serializer.