| 390 | } |
| 391 | |
| 392 | ResultStream* 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 | |
| 414 | void TableImpl::ScanTabletAsync(ResultStreamImpl* stream) { |
| 415 | ScanTask* scan_task = new ScanTask; |
no test coverage detected