multiSet
写同一HashKey下的多行数据。
- /**
- * Set multiple value under the same hash key.
- * @param tableName table name
- * @param hashKey used to decide which partition to put this k-v,
- * should not be null or empty.
- * @param values all <sortkey,value> pairs to be set,
- * should not be null or empty.
- * @param ttl_seconds time to live in seconds,
- * 0 means no ttl. default value is 0.
- * @throws PException
- */
- public void multiSet(String tableName, byte[] hashKey, List<Pair<byte[], byte[]>> values, int ttl_seconds) throws PException;
- public void multiSet(String tableName, byte[] hashKey, List<Pair<byte[], byte[]>> values) throws PException;
注:
- 提供了两个版本的接口,其中第一个接口可以指定TTL时间。
- 参数:需传入TableName、HashKey、Values;选择性传入TTL。
- Values是Pair列表,Pair的第一个元素是SortKey,第二个元素为value。
- 返回值:无。
- 异常:如果出现异常,譬如网络错误、超时错误、服务端错误等,会抛出 PException。