本文整理汇总了C++中BlockInfo::advance方法的典型用法代码示例。如果您正苦于以下问题:C++ BlockInfo::advance方法的具体用法?C++ BlockInfo::advance怎么用?C++ BlockInfo::advance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BlockInfo
的用法示例。
在下文中一共展示了BlockInfo::advance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: append_row
//.........这里部分代码省略.........
}
if(OB_SUCCESS == ret && NULL != ups_row)
{
if( ups_row->get_is_delete_row() )
{
if(OB_SUCCESS != (ret = cell_writer.row_delete()))
{
TBSYS_LOG(WARN, "append row delete flag fail:ret[%d]", ret);
}
}
}
int64_t ext_value = 0;
for (int64_t i = 0; OB_SUCCESS == ret && i < row.get_column_num(); ++i)
{
if (OB_SUCCESS != (ret = row.raw_get_cell(i, cell, table_id, column_id)))
{
TBSYS_LOG(WARN, "failed to get cell, err=%d", ret);
break;
}
if (OB_SUCCESS == ret)
{
if (ObExtendType == cell->get_type())
{
if(OB_SUCCESS != (ret = cell->get_ext(ext_value)))
{
TBSYS_LOG(WARN, "get ext value fail:ret[%d]", ret);
}
else if (ObActionFlag::OP_VALID == ext_value)
{
if (OB_SUCCESS != (ret = cell_writer.append_escape(ObCellMeta::ES_VALID)))
{
TBSYS_LOG(WARN, "fail to append escape:ret[%d]", ret);
}
}
else if (ObActionFlag::OP_ROW_DOES_NOT_EXIST == ext_value)
{
if (OB_SUCCESS != (ret = cell_writer.append_escape(ObCellMeta::ES_NOT_EXIST_ROW)))
{
TBSYS_LOG(WARN, "fail to append escape:ret[%d]", ret);
}
}
else if(ObActionFlag::OP_NOP != ext_value)
{
ret = OB_NOT_SUPPORTED;
TBSYS_LOG(WARN, "not supported ext value:ext[%ld]", ext_value);
}
else if(NULL == ups_row)
{
ret = OB_NOT_SUPPORTED;
TBSYS_LOG(WARN, "OP_NOP can only used in ups row");
}
else //OP_NOP不需要序列化
{
cell_clone = *cell;
}
}
else if (OB_SUCCESS != (ret = cell_writer.append(column_id, *cell, &cell_clone)))
{
if (OB_BUF_NOT_ENOUGH != ret)
{
TBSYS_LOG(WARN, "failed to append cell, err=%d", ret);
}
break;
}
}
if (OB_SUCCESS == ret)
{
// whether reserve this cell
for (int32_t j = 0; j < reserved_columns_count; ++j)
{
const std::pair<uint64_t,uint64_t> &tid_cid = reserved_columns_.at(j);
if (table_id == tid_cid.first && column_id == tid_cid.second)
{
stored_row.reserved_cells_[j] = cell_clone;
break;
}
} // end for j
}
} // end for i
if (OB_SUCCESS == ret)
{
if (OB_SUCCESS != (ret = cell_writer.row_finish()))
{
if (OB_BUF_NOT_ENOUGH != ret)
{
TBSYS_LOG(WARN, "failed to append cell, err=%d", ret);
}
}
else
{
stored_row.compact_row_size_ = static_cast<int32_t>(cell_writer.size());
block.advance(cell_writer.size());
cur_size_counter_ += cell_writer.size();
}
}
return ret;
}