Airblader commented on a change in pull request #17808:
URL: https://github.com/apache/flink/pull/17808#discussion_r750474903
##########
File path:
flink-runtime-web/web-dashboard/src/app/pages/job/checkpoints/subtask/job-checkpoints-subtask.component.ts
##########
@@ -40,31 +55,42 @@ import { deepFind } from 'utils';
changeDetection: ChangeDetectionStrategy.OnPush
})
export class JobCheckpointsSubtaskComponent implements OnInit, OnChanges {
- @Input() vertex: VerticesItemInterface;
- @Input() checkPointId: number;
- jobDetail: JobDetailCorrectInterface;
- subTaskCheckPoint: CheckPointSubTaskInterface;
- listOfSubTaskCheckPoint: Array<{ index: number; status: string }> = [];
- isLoading = true;
- sortName: string;
- sortValue: string;
+ @Input() public vertex: VerticesItem;
+ @Input() public checkPointId: number;
+
+ public jobDetail: JobDetailCorrect;
+ public subTaskCheckPoint: CheckPointSubTask;
+ public listOfSubTaskCheckPoint: SubTaskCheckPointStatisticsItem[] = [];
+ public isLoading = true;
+ public sortName: string;
+ public sortValue: string;
- sortAckTimestampFn = this.sortFn('ack_timestamp');
- sortEndToEndDurationFn = this.sortFn('end_to_end_duration');
- sortStateSizeFn = this.sortFn('state_size');
- sortCpSyncFn = this.sortFn('checkpoint.sync');
- sortCpAsyncFn = this.sortFn('checkpoint.async');
- sortAlignmentProcessedFn = this.sortFn('alignment.processed');
- sortAlignmentDurationFn = this.sortFn('alignment.duration');
- sortStartDelayFn = this.sortFn('start_delay');
- sortUnalignedCpFn = this.sortFn('unaligned_checkpoint');
+ public readonly sortAckTimestampFn = createSortFn(item =>
item.ack_timestamp);
+ public readonly sortEndToEndDurationFn = createSortFn(item =>
item.end_to_end_duration);
+ public readonly sortStateSizeFn = createSortFn(item => item.state_size);
+ public readonly sortCpSyncFn = createSortFn(item => item.checkpoint?.sync);
Review comment:
The sort functions here never return 0, so there is no stability, no.
But that's how it was before, I just switched from a type-unsafe string path to
a type-safe selector function.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]