如何从 Hbase table 的特定行中检索信息?
How to retrieve information from specific rows from table in Hbase?
我在 Hbase 中有一个 table,这个 table 的键是 "user_name" + "id" 例如 ("username123")。
例如,我想检索特定 user_name 的所有行(如果我有一些键为 "john1"、"john2"... 的行,我想检索 john 的所有行)
我该怎么做?
使用前缀过滤器。对于 Java API 答案在这里 Hbase Java API: Retrieving all rows that match a Partial Row Key
在 HBase 中 shell PrefixFilter 也是:
scan 'tablename', {FILTER => "(PrefixFilter ('username'))"}
我在 Hbase 中有一个 table,这个 table 的键是 "user_name" + "id" 例如 ("username123")。 例如,我想检索特定 user_name 的所有行(如果我有一些键为 "john1"、"john2"... 的行,我想检索 john 的所有行) 我该怎么做?
使用前缀过滤器。对于 Java API 答案在这里 Hbase Java API: Retrieving all rows that match a Partial Row Key
在 HBase 中 shell PrefixFilter 也是:
scan 'tablename', {FILTER => "(PrefixFilter ('username'))"}