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

Method InstanceStats

be/src/runtime/coordinator-backend-state.cc:880–903  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

878}
879
880Coordinator::BackendState::InstanceStats::InstanceStats(
881 const FInstanceExecParamsPB& exec_params, const TPlanFragment* fragment,
882 const NetworkAddressPB& address, FragmentStats* fragment_stats, ObjectPool* obj_pool)
883 : exec_params_(exec_params), fragment_(fragment), profile_(nullptr) {
884 const string& profile_name = Substitute("Instance $0 (host=$1)",
885 PrintId(exec_params.instance_id()), NetworkAddressPBToString(address));
886 profile_ = RuntimeProfile::Create(obj_pool, profile_name);
887 profile_->AddInfoString(LAST_REPORT_TIME_DESC, ToStringFromUnixMillis(UnixMillis()));
888 fragment_stats->root_profile()->AddChild(profile_);
889
890 // Compute total split size and add to profile as "BytesAssigned".
891 for (const auto& entry : exec_params_.per_node_scan_ranges()) {
892 for (const ScanRangeParamsPB& scan_range_params : entry.second.scan_ranges()) {
893 if (!scan_range_params.scan_range().has_hdfs_file_split()) continue;
894 total_split_size_ += scan_range_params.scan_range().hdfs_file_split().length();
895 }
896 }
897 RuntimeProfile::Counter* bytes_assigned_counter =
898 PROFILE_BytesAssigned.Instantiate(profile_);
899 bytes_assigned_counter->Set(total_split_size_);
900 if (!FLAGS_gen_experimental_profile) {
901 (*fragment_stats->bytes_assigned())(total_split_size_);
902 }
903}
904
905void Coordinator::BackendState::InstanceStats::Update(
906 const FragmentInstanceExecStatusPB& exec_status,

Callers

nothing calls this directly

Calls 14

SubstituteFunction · 0.85
PrintIdFunction · 0.85
NetworkAddressPBToStringFunction · 0.85
CreateClass · 0.85
UnixMillisFunction · 0.85
instance_idMethod · 0.80
AddInfoStringMethod · 0.80
AddChildMethod · 0.80
root_profileMethod · 0.80
bytes_assignedMethod · 0.80
scan_rangeMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected