我使用的是Accumulo 1.6,想要通过nodejs中的accumulo代理客户端给出rowkey来删除一些记录。
但代理客户端throw" start行必须小于end row"当我尝试将相同的rowkey放入deleteRows API
时var rowId = "1";
var proxyClient = getAccumuloProxyClient();
proxyClient.deleteRows(getLogin(), TABLE_NAME, rowId, rowId, callback);
更新 让我们说有一个表格如下:
rowID | columnFamily | columnQualifier
1 name John
1 age 25
1 department sales
2 name Lisa
2 age 25
2 department sales
如果我要删除rowID的所有行等于1,我应该将哪些参数传递给deleteRows函数? 我试过传递1开始和结束,但它抱怨
"org.apache.accumulo.core.client.AccumuloException: start row must be less than end row"
然后我尝试传递start = 1
和end = 1\0
以确保开始少于结束,但没有任何事情发生,没有错误丢失,没有删除行。
我认为由开始引起的是排除,结束是包含deleteRows。所以我对如何删除一条记录(哪些行具有相同的rowID)感到困惑。
答案 0 :(得分:1)
对于我的案例使用(char - 1作为起始行解决了我的问题:
var startRowId = rowId.substring(0, rowId.length - 1) + String.fromCharCode(rowId.charCodeAt(rowId.length - 1) - 1);
proxyClient.deleteRows(getLogin(), TABLE_NAME, startRowId, rowId, callback);