本文整理汇总了C++中ObScanner::get_data_version方法的典型用法代码示例。如果您正苦于以下问题:C++ ObScanner::get_data_version方法的具体用法?C++ ObScanner::get_data_version怎么用?C++ ObScanner::get_data_version使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObScanner
的用法示例。
在下文中一共展示了ObScanner::get_data_version方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: get_compact_scanner
int ObGetScanProxy::get_compact_scanner(const ObGetParam& get_param,
ObScanner& orig_scanner,ObScanner& compact_scanner)
{
ObTabletManager::ObGetThreadContext*& get_context = tablet_manager_.get_cur_thread_get_contex();
const ObGetParam::ObRowIndex* row_index = get_param.get_row_index();
int64_t row_num = orig_scanner.get_row_num();
ColumnFilter* cf = GET_TSI_MULT(ColumnFilter,TSI_CS_COLUMNFILTER_1);
ObTablet* tablet = NULL;
int ret = OB_SUCCESS;
ObRowkey rowkey;
if ((NULL == get_context) || (NULL == row_index) || (NULL == cf))
{
TBSYS_LOG(WARN,"get thread context of get failed");
ret = OB_ERROR;
}
else
{
int64_t compactsstable_version = get_context->min_compactsstable_version_;
if (ObVersion::compare(compactsstable_version,orig_scanner.get_data_version()) > 0)
{
compact_scanner.set_data_version(compactsstable_version);
for(int64_t i=0; (i < row_num) && (OB_SUCCESS == ret); ++i)
{
tablet = get_context->tablets_[i];
rowkey = get_param[row_index[i].offset_]->row_key_;
build_get_column_filter(get_param,row_index[i].offset_,row_index[i].size_,*cf);
if ((tablet != NULL) &&
(ret = get_compact_row(*tablet,rowkey,compactsstable_version,cf,compact_scanner)) != OB_SUCCESS)
{
TBSYS_LOG(WARN,"get data from compactsstable failed,ret=%d",ret);
}
}
}
}
return ret;
}