get
读单行数据。
- /**
- * Get value.
- * @param tableName TableHandler name
- * @param hashKey used to decide which partition to get this k-v,
- * if null or length == 0, means hash key is "".
- * @param sortKey all the k-v under hashKey will be sorted by sortKey,
- * if null or length == 0, means sort key is "".
- * @return value; null if not found
- * @throws PException
- */
- public byte[] get(String tableName, byte[] hashKey, byte[] sortKey) throws PException;
注:
- 参数:需传入TableName、HashKey、SortKey。
- 返回值:如果返回null,表示key对应的数据不存在
- 异常:如果出现异常,譬如网络错误、超时错误、服务端错误等,会抛出 PException。