MCPcopy Create free account
hub / github.com/apache/impala / HashHdfsFileSplit

Method HashHdfsFileSplit

be/src/exec/tuple-cache-node.cc:472–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470}
471
472uint32_t TupleCacheNode::HashHdfsFileSplit(const HdfsFileSplitPB& split, uint32_t seed) {
473 uint32_t hash = seed;
474 if (split.has_relative_path() && !split.relative_path().empty()) {
475 hash = HashUtil::Hash(
476 split.relative_path().data(), split.relative_path().length(), hash);
477 DCHECK(split.has_partition_path_hash());
478 int32_t partition_path_hash = split.partition_path_hash();
479 hash = HashUtil::Hash(&partition_path_hash, sizeof(partition_path_hash), hash);
480 } else if (split.has_absolute_path() && !split.absolute_path().empty()) {
481 hash = HashUtil::Hash(
482 split.absolute_path().data(), split.absolute_path().length(), hash);
483 } else {
484 DCHECK("Either relative_path or absolute_path must be set");
485 }
486 DCHECK(split.has_offset());
487 int64_t offset = split.offset();
488 hash = HashUtil::Hash(&offset, sizeof(offset), hash);
489 DCHECK(split.has_length());
490 int64_t length = split.length();
491 hash = HashUtil::Hash(&length, sizeof(length), hash);
492 DCHECK(split.has_mtime());
493 int64_t mtime = split.mtime();
494 hash = HashUtil::Hash(&mtime, sizeof(mtime), hash);
495 return hash;
496}
497
498void TupleCacheNode::ComputeFragmentInstanceKey(const RuntimeState* state) {
499 const PlanFragmentInstanceCtxPB& ctx = state->instance_ctx_pb();

Callers

nothing calls this directly

Calls 6

HashFunction · 0.85
emptyMethod · 0.45
dataMethod · 0.45
lengthMethod · 0.45
offsetMethod · 0.45
mtimeMethod · 0.45

Tested by

no test coverage detected