MCPcopy Create free account
hub / github.com/baidu/tera / Scan

Method Scan

src/sdk/table_impl.cc:392–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392ResultStream* TableImpl::Scan(const ScanDescriptor& desc, ErrorCode* err) {
393 ScanDescImpl impl(*desc.GetImpl());
394 if (impl.GetFilterDesc() && impl.GetMaxVersion() != 1) {
395 LOG(ERROR) << "when scan with a filter, only support max_version of scanner == 1";
396 return NULL;
397 }
398 if (IsHashTable()) {
399 if (!impl.GetStartRowKey().empty()) {
400 impl.SetStart(hash_method_(impl.GetStartRowKey()), impl.GetStartColumnFamily(),
401 impl.GetStartQualifier(), impl.GetStartTimeStamp());
402 }
403 if (!impl.GetEndRowKey().empty()) {
404 impl.SetEnd(hash_method_(impl.GetEndRowKey()));
405 }
406 }
407 impl.SetTableSchema(table_schema_);
408 ResultStream* results = NULL;
409 VLOG(6) << "activate async-scan";
410 results = new ResultStreamImpl(this, &impl);
411 return results;
412}
413
414void TableImpl::ScanTabletAsync(ResultStreamImpl* stream) {
415 ScanTask* scan_task = new ScanTask;

Callers 4

ScanTableFunction · 0.45
InitMethod · 0.45
SetScannerMethod · 0.45

Calls 8

GetImplMethod · 0.80
GetFilterDescMethod · 0.80
GetMaxVersionMethod · 0.80
SetStartMethod · 0.80
GetStartTimeStampMethod · 0.80
emptyMethod · 0.45
SetEndMethod · 0.45
SetTableSchemaMethod · 0.45

Tested by

no test coverage detected