本文整理汇总了C++中ObScanner::reset_row_iter方法的典型用法代码示例。如果您正苦于以下问题:C++ ObScanner::reset_row_iter方法的具体用法?C++ ObScanner::reset_row_iter怎么用?C++ ObScanner::reset_row_iter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObScanner
的用法示例。
在下文中一共展示了ObScanner::reset_row_iter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
int ObMetaTable3::MyIterator::scan_beginning(ConstIterator &meta_it, const KeyRange &search_range, ObScanner& scanner)
{
int ret = OB_SUCCESS;
scanner.reset();
ObString null_string;
ObScanParam *scan_param = aggr_.scan_param_allocator_.alloc();
ObScanner *my_location = aggr_.scanner_allocator_.alloc();
if (NULL == scan_param)
{
TBSYS_LOG(ERROR, "failed to alloc scan param");
ret = OB_ALLOCATE_MEMORY_FAILED;
}
else if (NULL == my_location)
{
TBSYS_LOG(ERROR, "failed to alloc scanner");
ret = OB_ALLOCATE_MEMORY_FAILED;
}
else
{
scan_param->reset();
my_location->reset();
scan_param->set(my_tid_, null_string, search_range);
if (OB_SUCCESS != (ret = scan_param->set_limit_info(0, SCAN_LIMIT_COUNT)))
{
TBSYS_LOG(WARN, "failed to set limit info, err=%d", ret);
}
// scan all columns
else if (OB_SUCCESS != (ret = add_scan_columns(*scan_param)))
{
TBSYS_LOG(WARN, "failed to add scan columsn, err=%d", ret);
}
// find the locations of the tablet which the startkey is in
else if (OB_SUCCESS != (ret = get_location(meta_it, search_range.start_key_,
search_range.border_flag_.inclusive_start(), *my_location)))
{
TBSYS_LOG(WARN, "failed to get location, err=%d", ret);
}
else if (OB_SUCCESS != (ret = scan_param->set_location_info(*my_location)))
{
TBSYS_LOG(WARN, "failed to add location, err=%d", ret);
}
else if (OB_SUCCESS != (ret = aggr_.scan(*scan_param, scanner)))
{
TBSYS_LOG(WARN, "scan error, err=%d range=%s", ret, to_cstring(search_range));
}
else
{
scanner.reset_row_iter();
read_scanner_row_count_ = 0;
TBSYS_LOG(DEBUG, "scan meta table succ, range=%s", to_cstring(search_range));
}
}
if (NULL != scan_param)
{
aggr_.scan_param_allocator_.free(scan_param);
}
if (NULL != my_location)
{
aggr_.scanner_allocator_.free(my_location);
}
return ret;
}