You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var scan = client.getScanner(topicTokens.table),
var f = {
familyFilter: {
compareFilter: {
compareOp: 'EQUAL',
comparator: {
substringComparator: {
substr: topicTokens.family
}
}
}
}
};
scan.setFilter(f);
But this gives me invalid field exceptions. I have to do something like this:
var scan = client.getScanner(topicTokens.table),
//singleColumnValueFilter is treated as special in scan.js so we have to
//use it to serialize the comparator (we can't do it directly).
var dummy = {
singleColumnValueFilter: {
compareOp: "EQUAL",
comparator: {
substringComparator: {
substr: topicTokens.family
}
}
}
}
scan.setFilter(dummy);
var f = {
familyFilter: {
compareFilter: {
compareOp: 'EQUAL',
comparator: dummy.singleColumnValueFilter.comparator
}
}
};
scan.setFilter(f);
I am not sure if I have missed another way of doing this. If so, I'd like to know how please.
The serialisation could be fixed to do this as in my first example, or you could expose scan.getFilter() and allow me to serialise it by hand. I wasn't sure of the rational behind making singleColumnValueFilter a special case.
The text was updated successfully, but these errors were encountered:
I need a scan limited to one column family only.
I want to do something like this:
But this gives me invalid field exceptions. I have to do something like this:
I am not sure if I have missed another way of doing this. If so, I'd like to know how please.
The serialisation could be fixed to do this as in my first example, or you could expose scan.getFilter() and allow me to serialise it by hand. I wasn't sure of the rational behind making singleColumnValueFilter a special case.
The text was updated successfully, but these errors were encountered: