org.apache.hadoop.hbase.client.Query.setLoadColumnFamiliesOnDemand()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(239)

本文整理了Java中org.apache.hadoop.hbase.client.Query.setLoadColumnFamiliesOnDemand方法的一些代码示例,展示了Query.setLoadColumnFamiliesOnDemand的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setLoadColumnFamiliesOnDemand方法的具体详情如下:
包路径:org.apache.hadoop.hbase.client.Query
类名称:Query
方法名:setLoadColumnFamiliesOnDemand

Query.setLoadColumnFamiliesOnDemand介绍

[英]Set the value indicating whether loading CFs on demand should be allowed (cluster default is false). On-demand CF loading doesn't load column families until necessary, e.g. if you filter on one column, the other column family data will be loaded only for the rows that are included in result, not all rows like in normal case. With column-specific filters, like SingleColumnValueFilter w/filterIfMissing == true, this can deliver huge perf gains when there's a cf with lots of data; however, it can also lead to some inconsistent results, as follows: - if someone does a concurrent update to both column families in question you may get a row that never existed, e.g. for { rowKey = 5, { cat_videos => 1 }, { video => "my cat" } } someone puts rowKey 5 with { cat_videos => 0 }, { video => "my dog" }, concurrent scan filtering on "cat_videos == 1" can get { rowKey = 5, { cat_videos => 1 }, { video => "my dog" } }. - if there's a concurrent split and you have more than 2 column families, some rows may be missing some column families.
[中]设置指示是否应允许按需加载CFs的值(集群默认值为false)。按需CF加载直到必要时才加载列族,例如,如果对一列进行筛选,则只会为结果中包含的行加载其他列族数据,而不是像正常情况下那样加载所有行。使用特定于列的过滤器,比如SingleColumnValueFilter w/filterIfMissing==true,当cf有大量数据时,这可以提供巨大的性能增益;然而,它也可能导致一些不一致的结果,如下所示:-如果有人同时更新两个相关列族,您可能会得到一个从未存在过的行,例如{rowKey=5,{cat_videos=>1},{video=>“my cat”}有人将rowKey 5与{cat_videos=>0},{video=>“my dog”},对“cat_videos==1”进行并发扫描过滤可以得到{rowKey=5,{cat_videos=>1},{videos=>my dog}如果同时拆分,并且有两个以上的列族,则某些行可能缺少某些列族。

代码示例

代码示例来源:origin: apache/hbase

@Override
public Scan setLoadColumnFamiliesOnDemand(boolean value) {
 return (Scan) super.setLoadColumnFamiliesOnDemand(value);
}

代码示例来源:origin: apache/hbase

@Override
public Get setLoadColumnFamiliesOnDemand(boolean value) {
 return (Get) super.setLoadColumnFamiliesOnDemand(value);
}

代码示例来源:origin: org.apache.hbase/hbase-client

@Override
public Get setLoadColumnFamiliesOnDemand(boolean value) {
 return (Get) super.setLoadColumnFamiliesOnDemand(value);
}

代码示例来源:origin: org.apache.hbase/hbase-client

@Override
public Scan setLoadColumnFamiliesOnDemand(boolean value) {
 return (Scan) super.setLoadColumnFamiliesOnDemand(value);
}

代码示例来源:origin: com.aliyun.hbase/alihbase-client

@Override
public Get setLoadColumnFamiliesOnDemand(boolean value) {
 return (Get) super.setLoadColumnFamiliesOnDemand(value);
}

代码示例来源:origin: com.aliyun.hbase/alihbase-client

@Override
public Scan setLoadColumnFamiliesOnDemand(boolean value) {
 return (Scan) super.setLoadColumnFamiliesOnDemand(value);
}

相关文章