exist
检查数据是否存在。
- /**
- * Check value exist by key from the cluster
- * @param tableName TableHandler name
- * @param hashKey used to decide which partition the key may exist.
- * @param sortKey all keys under the same hashKey will be sorted by sortKey
- *
- * @return true if exist, false if not exist
- * @throws PException
- */
- public boolean exist(String tableName, byte[] hashKey, byte[] sortKey) throws PException;
注:
- 参数:需传入TableName、HashKey、SortKey。
- 返回值:如果存在返回true,否则返回false。
- 异常:如果出现异常,譬如网络错误、超时错误、服务端错误等,会抛出 PException。