-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[SPARK-41423][CORE] Protobuf serializer for StageDataWrapper #39192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
2b7f1ef
0dedace
f0ba3fc
65e8e02
f89b17a
809d5ff
21bbfca
e28a727
4bd85f8
59b5749
fac1115
3def54d
955b22a
bab6770
6cb476f
8aeb9c5
f8e6162
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -390,3 +390,214 @@ message SQLExecutionUIData { | |
| repeated int64 stages = 11; | ||
| map<int64, string> metric_values = 12; | ||
| } | ||
|
|
||
| message StageDataWrapper { | ||
| StageData info = 1; | ||
| repeated int64 job_ids = 2; | ||
| map<string, int64> locality = 3; | ||
| } | ||
|
|
||
| message TaskData { | ||
| int64 task_id = 1; | ||
| int32 index = 2; | ||
| int32 attempt = 3; | ||
| int32 partition_id = 4; | ||
| int64 launch_time = 5; | ||
| optional int64 result_fetch_start = 6; | ||
| optional int64 duration = 7; | ||
| string executor_id = 8; | ||
| string host = 9; | ||
| string status = 10; | ||
| string task_locality = 11; | ||
| bool speculative = 12; | ||
| repeated AccumulableInfo accumulator_updates = 13; | ||
| optional string error_message = 14; | ||
| optional TaskMetrics task_metrics = 15; | ||
| map<string, string> executor_logs = 16; | ||
| int64 scheduler_delay = 17; | ||
| int64 getting_result_time = 18; | ||
| } | ||
|
|
||
| message StageData { | ||
| enum StageStatus { | ||
| UNSPECIFIED = 0; | ||
| ACTIVE = 1; | ||
| COMPLETE = 2; | ||
| FAILED = 3; | ||
| PENDING = 4; | ||
| SKIPPED = 5; | ||
| } | ||
|
|
||
| StageStatus status = 1; | ||
| int64 stage_id = 2; | ||
| int32 attempt_id = 3; | ||
| int32 num_tasks = 4; | ||
| int32 num_active_tasks = 5; | ||
| int32 num_complete_tasks = 6; | ||
| int32 num_failed_tasks = 7; | ||
| int32 num_killed_tasks = 8; | ||
| int32 num_completed_indices = 9; | ||
|
|
||
| optional int64 submission_time = 10; | ||
| optional int64 first_task_launched_time = 11; | ||
| optional int64 completion_time = 12; | ||
| optional string failure_reason = 13; | ||
|
|
||
| int64 executor_deserialize_time = 14; | ||
| int64 executor_deserialize_cpu_time = 15; | ||
| int64 executor_run_time = 16; | ||
| int64 executor_cpu_time = 17; | ||
| int64 result_size = 18; | ||
| int64 jvm_gc_time = 19; | ||
| int64 result_serialization_time = 20; | ||
| int64 memory_bytes_spilled = 21; | ||
| int64 disk_bytes_spilled = 22; | ||
| int64 peak_execution_memory = 23; | ||
| int64 input_bytes = 24; | ||
| int64 input_records = 25; | ||
| int64 output_bytes = 26; | ||
| int64 output_records = 27; | ||
| int64 shuffle_remote_blocks_fetched = 28; | ||
| int64 shuffle_local_blocks_fetched = 29; | ||
| int64 shuffle_fetch_wait_time = 30; | ||
| int64 shuffle_remote_bytes_read = 31; | ||
| int64 shuffle_remote_bytes_read_to_disk = 32; | ||
| int64 shuffle_local_bytes_read = 33; | ||
| int64 shuffle_read_bytes = 34; | ||
| int64 shuffle_read_records = 35; | ||
| int64 shuffle_write_bytes = 36; | ||
| int64 shuffle_write_time = 37; | ||
| int64 shuffle_write_records = 38; | ||
|
|
||
| string name = 39; | ||
| optional string description = 40; | ||
| string details = 41; | ||
| string scheduling_pool = 42; | ||
|
|
||
| repeated int64 rdd_ids = 43; | ||
| repeated AccumulableInfo accumulator_updates = 44; | ||
| map<int64, TaskData> tasks = 45; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see, hmm... should we encapsulate this map? such as also cc @gengliangwang
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Simply a map is OK here. An empty map should make no difference with |
||
| map<string, ExecutorStageSummary> executor_summary = 46; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
||
| optional SpeculationStageSummary speculation_summary = 47; | ||
| map<string, int32> killed_tasks_summary = 48; | ||
| int32 resource_profile_id = 49; | ||
| optional ExecutorMetrics peak_executor_metrics = 50; | ||
| optional TaskMetricDistributions task_metrics_distributions = 51; | ||
| optional ExecutorMetricsDistributions executor_metrics_distributions = 52; | ||
| } | ||
|
|
||
| message TaskMetrics { | ||
| int64 executor_deserialize_time = 1; | ||
| int64 executor_deserialize_cpu_time = 2; | ||
| int64 executor_run_time = 3; | ||
| int64 executor_cpu_time = 4; | ||
| int64 result_size = 5; | ||
| int64 jvm_gc_time = 6; | ||
| int64 result_serialization_time = 7; | ||
| int64 memory_bytes_spilled = 8; | ||
| int64 disk_bytes_spilled = 9; | ||
| int64 peak_execution_memory = 10; | ||
| InputMetrics input_metrics = 11; | ||
| OutputMetrics output_metrics = 12; | ||
| ShuffleReadMetrics shuffle_read_metrics = 13; | ||
| ShuffleWriteMetrics shuffle_write_metrics = 14; | ||
| } | ||
|
|
||
| message InputMetrics { | ||
| int64 bytes_read = 1; | ||
| int64 records_read = 2; | ||
| } | ||
|
|
||
| message OutputMetrics { | ||
| int64 bytes_written = 1; | ||
| int64 records_written = 2; | ||
| } | ||
|
|
||
| message ShuffleReadMetrics { | ||
| int64 remote_blocks_fetched = 1; | ||
| int64 local_blocks_fetched = 2; | ||
| int64 fetch_wait_time = 3; | ||
| int64 remote_bytes_read = 4; | ||
| int64 remote_bytes_read_to_disk = 5; | ||
| int64 local_bytes_read = 6; | ||
| int64 records_read = 7; | ||
| } | ||
|
|
||
| message ShuffleWriteMetrics { | ||
| int64 bytes_written = 1; | ||
| int64 write_time = 2; | ||
| int64 records_written = 3; | ||
| } | ||
|
|
||
| message TaskMetricDistributions { | ||
| repeated double quantiles = 1; | ||
| repeated double duration = 2; | ||
| repeated double executor_deserialize_time = 3; | ||
| repeated double executor_deserialize_cpu_time = 4; | ||
| repeated double executor_run_time = 5; | ||
| repeated double executor_cpu_time = 6; | ||
| repeated double result_size = 7; | ||
| repeated double jvm_gc_time = 8; | ||
| repeated double result_serialization_time = 9; | ||
| repeated double getting_result_time = 10; | ||
| repeated double scheduler_delay = 11; | ||
| repeated double peak_execution_memory = 12; | ||
| repeated double memory_bytes_spilled = 13; | ||
| repeated double disk_bytes_spilled = 14; | ||
| InputMetricDistributions input_metrics = 15; | ||
| OutputMetricDistributions output_metrics = 16; | ||
| ShuffleReadMetricDistributions shuffle_read_metrics = 17; | ||
| ShuffleWriteMetricDistributions shuffle_write_metrics = 18; | ||
| } | ||
|
|
||
| message InputMetricDistributions { | ||
| repeated double bytes_read = 1; | ||
| repeated double records_read = 2; | ||
| } | ||
|
|
||
| message OutputMetricDistributions { | ||
| repeated double bytes_written = 1; | ||
| repeated double records_written = 2; | ||
| } | ||
|
|
||
| message ShuffleReadMetricDistributions { | ||
| repeated double read_bytes = 1; | ||
| repeated double read_records = 2; | ||
| repeated double remote_blocks_fetched = 3; | ||
| repeated double local_blocks_fetched = 4; | ||
| repeated double fetch_wait_time = 5; | ||
| repeated double remote_bytes_read = 6; | ||
| repeated double remote_bytes_read_to_disk = 7; | ||
| repeated double total_blocks_fetched = 8; | ||
| } | ||
|
|
||
| message ShuffleWriteMetricDistributions { | ||
| repeated double write_bytes = 1; | ||
| repeated double write_records = 2; | ||
| repeated double write_time = 3; | ||
| } | ||
|
|
||
| message ExecutorMetricsDistributions { | ||
| repeated double quantiles = 1; | ||
|
|
||
| repeated double task_time = 2; | ||
| repeated double failed_tasks = 3; | ||
| repeated double succeeded_tasks = 4; | ||
| repeated double killed_tasks = 5; | ||
| repeated double input_bytes = 6; | ||
| repeated double input_records = 7; | ||
| repeated double output_bytes = 8; | ||
| repeated double output_records = 9; | ||
| repeated double shuffle_read = 10; | ||
| repeated double shuffle_read_records = 11; | ||
| repeated double shuffle_write = 12; | ||
| repeated double shuffle_write_records = 13; | ||
| repeated double memory_bytes_spilled = 14; | ||
| repeated double disk_bytes_spilled = 15; | ||
| ExecutorPeakMetricsDistributions peak_memory_metrics = 16; | ||
| } | ||
|
|
||
| message ExecutorPeakMetricsDistributions { | ||
| repeated double quantiles = 1; | ||
| repeated ExecutorMetrics executor_metrics = 2; | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why
StageStatusdesigned asStageDatainsideenum?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If

StageStatusis defined outside, the error message is as follows:Then If
StageStatusis defined as follows:enum StageStatus {
STAGE_STATUS_UNSPECIFIED = 0;
STAGE_STATUS_ACTIVE = 1;
STAGE_STATUS_COMPLETE = 2;
STAGE_STATUS_FAILED = 3;
STAGE_STATUS_PENDING = 4;
STAGE_STATUS_SKIPPED = 5;
}
The Code of
SerializerandDeerializerwill be very ugly!Will have to handle the operations of adding prefix and deleting prefix.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, the enum definition of JobExecutionStatus seems more reasonable in JobData ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fine to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JobExecutionStatus is used in
SQLExecutionUIData. So it can't be moved intoJobDataUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As described in https://github.com/apache/spark/pull/39270/files,
UNSPECIFIEDinStageStatusshould change toSTAGE_STATUS_UNSPECIFIEDand moved out ofStageDataThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, Let us follow code style(https://developers.google.com/protocol-buffers/docs/style#enums):

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New pr for JobExecutionStatus: #39286
@gengliangwang @LuciferYang