Alarm method, alarm device and storage medium
By using prediction models to predict the timeout information of the task workflow in the big data computing platform and outputting alarms in advance, the problem of job timeout alarm lag in the existing technology is solved, and the user experience and developer response efficiency is improved.
Patent Information
- Application Number
- CN202311268632.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2025-03-28
AI Technical Summary
There is a lag in the job timeout alarm in the existing big data computing platform, which causes developers to get up at night to eliminate abnormalities, and the user experience is poor.
By filtering the jobs that were triggered to run in the previous scheduling cycle, using the prediction model (including the first sub-model, the second sub-model and the third sub-model) to predict the timeout prediction information of the task workflow in the current scheduling cycle, and output alarm information in advance when the preset conditions are met.
It effectively reduces the time for developers to eliminate exceptions, improves user experience, and aggregates alarms into task workflows, reducing the number of alarm information output by the system, helping developers to locate abnormal task workflows faster.
Smart Images

Figure CN119718844A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of big data technology, and in particular to an alarm method, an alarm device and a storage medium. Background Art
[0002] With the development of informatization, traditional technologies can no longer meet the explosive growth of data storage and computing needs, and big data technology has emerged. In related technologies, taking the job timeout alarm existing in the big data computing platform as an example, the probability of job timeout is predicted during the job execution process, and the job timeout alarm is output to prompt developers to eliminate the cause of the timeout and solve the problem.
[0003] However, this alarm method has a lag, which requires developers to get up late at night to troubleshoot anomalies, resulting in a poor user experience. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides an alarm method, an alarm device and a storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided an alarm method, including:
[0006] Filter out at least one target job required by the prediction model from multiple jobs that are triggered to run in the previous scheduling cycle;
[0007] Based on the job data of the at least one target job, using a prediction model to predict timeout prediction information of the task workflow to which the target job belongs in the current scheduling cycle;
[0008] If the timeout prediction information of the task workflow to which the target job belongs meets a preset condition, the alarm information corresponding to the task workflow is output before the task workflow is triggered to run.
[0009] Optionally, the prediction model includes: a first sub-model, a second sub-model and a third sub-model;
[0010] The predicting, based on the job data of the at least one target job, using a prediction model to predict the timeout prediction information of the task workflow to which the target job belongs in the current scheduling cycle, includes:
[0011] Using the first sub-model, the job data of the target job required by the first sub-model is processed to obtain first prediction information; the first sub-model is used to predict the task workflow timeout caused by the abnormal growth of the memory usage of the data table or the abnormal growth of the output time;
[0012] Using the second sub-model, processing the job data of the target job required by the second sub-model to obtain second prediction information; the second sub-model is used to predict the task workflow timeout caused by memory leakage or data skew;
[0013] The third sub-model is used to process the job data of the target job required by the third sub-model to obtain third prediction information; the third sub-model is used to predict the task workflow timeout caused by the number of target files exceeding a preset number threshold; the target file is: a file whose memory usage is less than a preset memory threshold;
[0014] If the timeout prediction information of the task workflow to which the target job belongs meets the preset condition, outputting the alarm information corresponding to the task workflow before the task workflow is triggered to run includes:
[0015] If there is at least one prediction information that meets the preset condition, the alarm information corresponding to the task workflow is output before the task workflow is triggered to run.
[0016] Optionally, the using the first sub-model to process the job data of the target job required by the first sub-model to obtain the first prediction information includes:
[0017] Obtaining historical description information of at least one data table included in the target job within a preset time period;
[0018] Based on a plurality of historical description information of the at least one data table within a preset time period, determining a target data table from the at least one data table; wherein the plurality of historical description information of the target data table indicates that the target data table presents a growth trend within the preset time period;
[0019] The historical description information of the target data table is processed using the first sub-model to obtain the first prediction information.
[0020] Optionally, the historical description information includes: production time;
[0021] The using the first sub-model to process the historical description information of the target data table to obtain the first prediction information includes:
[0022] Determine output time growth information of the target data table based on multiple output times of the target data table within the preset time period;
[0023] Using the first sub-model, based on the output time of the target data table in the previous scheduling period and the output time growth information, predict the predicted output time of the target data table in the current scheduling period;
[0024] If the timeout prediction information of the task workflow to which the target job belongs meets the preset condition, outputting the alarm information corresponding to the task workflow before the task workflow is triggered to run includes:
[0025] If there is at least one of the target data tables whose predicted output time in the current scheduling cycle is greater than the timeout time of the task workflow, an alarm message corresponding to the task workflow is output before the task workflow is triggered to run.
[0026] Optionally, the historical description information further includes: memory usage;
[0027] If the timeout prediction information of the task workflow to which the target job belongs meets the preset condition, outputting the alarm information corresponding to the task workflow before the task workflow is triggered to run includes:
[0028] If the timeout prediction information satisfies the preset condition, determining the memory growth information of the target data table based on multiple memory usages of the target data table within the preset time period;
[0029] If the memory growth information indicates that the memory usage of the target data table maintains an increasing trend in any sub-time period within the preset time period, and the output time growth information indicates that the output time of the target data table maintains an increasing trend in any sub-time period, a first alarm message is output before the task workflow is triggered to run; the first alarm message indicates that the timeout of the task workflow is caused by an abnormal increase in the memory usage of the data table;
[0030] If the output time growth information indicates that the output time of the target data table maintains an increasing trend in any sub-time period within the preset time period, and the memory growth information indicates that the memory occupancy of the target data table shows a non-increasing trend in at least one of the sub-time periods, a second alarm information is output before the task workflow is triggered to run; the second alarm information indicates that the timeout of the task workflow is caused by an abnormal increase in the output time of the data table.
[0031] Optionally, the using the second sub-model to process the job data of the target job required by the second sub-model to obtain the second prediction information includes:
[0032] Obtaining job configuration information of the target job;
[0033] Obtaining operation result information of multiple stages of the target job;
[0034] Obtain key value distribution information of multiple data tables generated by the target job in the previous scheduling cycle;
[0035] Using the second sub-model, the job configuration information, the running result information and the key-value distribution information of the target job are processed to obtain the second prediction information; wherein, the second prediction information indicates the probability of memory leakage and / or data skew in the target job.
[0036] Optionally, the job configuration information includes: executor configuration, indicating the maximum number of executors allowed to apply;
[0037] The operation result information includes: execution duration information, garbage collection duration information and first executor information, indicating the number of executors actually applied for during the execution of the target job;
[0038] The processing of the job configuration information, the operation result information, and the key value distribution information of the target job to obtain the second prediction information includes:
[0039] Based on the execution time information, first judgment information is determined; the first judgment information indicates the distribution of task execution time of multiple stages of the target job;
[0040] Based on the garbage collection duration information, second judgment information is determined; the second judgment information indicates the distribution of garbage collection durations of multiple stages of the target job;
[0041] Determining third judgment information based on the garbage collection duration information and the execution duration information; the third judgment information indicates the garbage collection frequency in multiple stages of the target job;
[0042] Determining fourth judgment information based on the first executor information and the executor configuration; the fourth judgment information indicates a ratio between the number of executors actually applied for and the number of executors allowed to be applied for during the execution of the target job;
[0043] If the timeout prediction information of the task workflow to which the target job belongs meets the preset condition, outputting the alarm information corresponding to the task workflow before the task workflow is triggered to run includes:
[0044] If the first judgment information, the second judgment information, the third judgment information and the fourth judgment information meet the first condition, the third alarm information corresponding to the task workflow is output before the task workflow is triggered to run; the third alarm information indicates that the timeout of the task workflow is caused by a memory leak.
[0045] Optionally, the job configuration information further includes: dynamic memory configuration; the operation result information further includes: second executor information indicating the number of idle executors;
[0046] The processing of the job configuration information, the operation result information, and the key value distribution information of the target job to obtain the second prediction information includes:
[0047] Based on the second executor information and the first executor information, fifth judgment information is determined; the fifth judgment information indicates the ratio between the number of idle executors and the number of actually requested executors during the execution of the target job;
[0048] Performing outlier analysis on the key-value distribution information to obtain sixth decision information; the sixth decision information indicates first outliers in the plurality of data tables;
[0049] Based on the execution duration information, determining seventh judgment information; the seventh judgment information indicates that there is a stage of an abnormal task in the multiple stages of the target job; the task execution duration of the abnormal task is less than or equal to a minimum execution duration threshold;
[0050] Based on a duration set consisting of the same execution duration information of a plurality of the stages, determining eighth judgment information; the eighth judgment information indicates a ratio of a maximum execution duration to an average execution duration in the duration set;
[0051] Performing outlier analysis on the duration set to obtain ninth decision information; the ninth decision information indicates a second outlier in the duration set;
[0052] Based on the dynamic memory configuration, obtaining tenth judgment information; the tenth judgment information indicates whether the dynamic memory is in an open state;
[0053] If the timeout prediction information of the task workflow to which the target job belongs meets the preset condition, outputting the alarm information corresponding to the task workflow before the task workflow is triggered to run includes:
[0054] If the fifth judgment information, the sixth judgment information, the seventh judgment information, the eighth judgment information, the ninth judgment information and the tenth judgment information meet the second condition, the fourth alarm information corresponding to the task workflow is output before the task workflow is triggered to run; the fourth alarm information indicates that the timeout of the task workflow is caused by data skew.
[0055] Optionally, the using the third sub-model to process the job data of the target job required by the third sub-model to obtain third prediction information includes:
[0056] Acquire multiple data tables generated by the target job in the previous scheduling cycle;
[0057] Using the third sub-model, determining the number of target files contained in each of the data tables and the average memory size of the target files;
[0058] If the timeout prediction information of the task workflow to which the target job belongs meets the preset condition, outputting the alarm information corresponding to the task workflow before the task workflow is triggered to run includes:
[0059] If there is at least one data table whose number of target files is greater than a quantity threshold, and the average memory amount of the target files is less than the memory threshold, a fifth alarm message is output before the task workflow is triggered to run; the fifth alarm message indicates that the timeout of the task workflow is caused by the number of target files exceeding a preset quantity threshold.
[0060] According to a second aspect of an embodiment of the present disclosure, there is provided an alarm device, including:
[0061] A data screening module, used to screen out at least one target job required by the prediction model from multiple jobs that were triggered to run in the previous scheduling cycle;
[0062] A prediction module, configured to predict, based on the job data of the at least one target job, timeout prediction information of the task workflow to which the target job belongs in the current scheduling cycle using a prediction model;
[0063] The output module is used to output the alarm information corresponding to the task workflow before the task workflow is triggered to run if the timeout prediction information of the task workflow to which the target job belongs meets the preset conditions.
[0064] Optionally, the prediction model includes: a first sub-model, a second sub-model and a third sub-model;
[0065] The prediction module is used to:
[0066] Using the first sub-model, the job data of the target job required by the first sub-model is processed to obtain first prediction information; the first sub-model is used to predict the task workflow timeout caused by the abnormal growth of the memory usage of the data table or the abnormal growth of the output time;
[0067] Using the second sub-model, processing the job data of the target job required by the second sub-model to obtain second prediction information; the second sub-model is used to predict the task workflow timeout caused by memory leakage or data skew;
[0068] The third sub-model is used to process the job data of the target job required by the third sub-model to obtain third prediction information; the third sub-model is used to predict the task workflow timeout caused by the number of target files exceeding a preset number threshold; the target file is: a file whose memory usage is less than a preset memory threshold;
[0069] The output module is used for:
[0070] If there is at least one prediction information that meets the preset condition, the alarm information corresponding to the task workflow is output before the task workflow is triggered to run.
[0071] Optionally, the prediction module is specifically used to:
[0072] Obtaining historical description information of at least one data table included in the target job within a preset time period;
[0073] Based on a plurality of historical description information of the at least one data table within a preset time period, determining a target data table from the at least one data table; wherein the plurality of historical description information of the target data table indicates that the target data table presents a growth trend within the preset time period;
[0074] The historical description information of the target data table is processed using the first sub-model to obtain the first prediction information.
[0075] Optionally, the historical description information includes: production time;
[0076] The prediction module is used to:
[0077] Determine output time growth information of the target data table based on multiple output times of the target data table within the preset time period;
[0078] Using the first sub-model, based on the output time of the target data table in the previous scheduling period and the output time growth information, predict the predicted output time of the target data table in the current scheduling period;
[0079] The output module is used for:
[0080] If there is at least one of the target data tables whose predicted output time in the current scheduling cycle is greater than the timeout time of the task workflow, an alarm message corresponding to the task workflow is output before the task workflow is triggered to run.
[0081] Optionally, the historical description information further includes: memory usage;
[0082] The output module is specifically used for:
[0083] If the timeout prediction information satisfies the preset condition, determining the memory growth information of the target data table based on multiple memory usages of the target data table within the preset time period;
[0084] If the memory growth information indicates that the memory usage of the target data table maintains an increasing trend in any sub-time period within the preset time period, and the output time growth information indicates that the output time of the target data table maintains an increasing trend in any sub-time period, a first alarm message is output before the task workflow is triggered to run; the first alarm message indicates that the timeout of the task workflow is caused by an abnormal increase in the memory usage of the data table;
[0085] If the output time growth information indicates that the output time of the target data table maintains an increasing trend in any sub-time period within the preset time period, and the memory growth information indicates that the memory occupancy of the target data table shows a non-increasing trend in at least one of the sub-time periods, a second alarm information is output before the task workflow is triggered to run; the second alarm information indicates that the timeout of the task workflow is caused by an abnormal increase in the output time of the data table.
[0086] Optionally, the prediction module is used to:
[0087] Obtaining job configuration information of the target job;
[0088] Obtaining operation result information of multiple stages of the target job;
[0089] Obtain key value distribution information of multiple data tables generated by the target job in the previous scheduling cycle;
[0090] Using the second sub-model, the job configuration information, the running result information and the key-value distribution information of the target job are processed to obtain the second prediction information; wherein, the second prediction information indicates the probability of memory leakage and / or data skew in the target job.
[0091] Optionally, the job configuration information includes: executor configuration, indicating the maximum number of executors allowed to apply;
[0092] The operation result information includes: execution duration information, garbage collection duration information and first executor information, indicating the number of executors actually applied for during the execution of the target job;
[0093] The prediction module is used to:
[0094] Based on the execution time information, first judgment information is determined; the first judgment information indicates the distribution of task execution time of multiple stages of the target job;
[0095] Based on the garbage collection duration information, second judgment information is determined; the second judgment information indicates the distribution of garbage collection durations of multiple stages of the target job;
[0096] Determining third judgment information based on the garbage collection duration information and the execution duration information; the third judgment information indicates the garbage collection frequency in multiple stages of the target job;
[0097] Determining fourth judgment information based on the first executor information and the executor configuration; the fourth judgment information indicates a ratio between the number of executors actually applied for and the number of executors allowed to be applied for during the execution of the target job;
[0098] The output module is used for:
[0099] If the first judgment information, the second judgment information, the third judgment information and the fourth judgment information meet the first condition, the third alarm information corresponding to the task workflow is output before the task workflow is triggered to run; the third alarm information indicates that the timeout of the task workflow is caused by a memory leak.
[0100] Optionally, the job configuration information further includes: dynamic memory configuration; the operation result information further includes: second executor information indicating the number of idle executors;
[0101] The prediction module is used to:
[0102] Based on the second executor information and the first executor information, fifth judgment information is determined; the fifth judgment information indicates the ratio between the number of idle executors and the number of actually requested executors during the execution of the target job;
[0103] Performing outlier analysis on the key-value distribution information to obtain sixth decision information; the sixth decision information indicates first outliers in the plurality of data tables;
[0104] Based on the execution duration information, determining seventh judgment information; the seventh judgment information indicates that there is a stage of an abnormal task in the multiple stages of the target job; the task execution duration of the abnormal task is less than or equal to a minimum execution duration threshold;
[0105] Based on a duration set consisting of the same execution duration information of a plurality of the stages, determining eighth judgment information; the eighth judgment information indicates a ratio of a maximum execution duration to an average execution duration in the duration set;
[0106] Performing outlier analysis on the duration set to obtain ninth decision information; the ninth decision information indicates a second outlier in the duration set;
[0107] Based on the dynamic memory configuration, obtaining tenth judgment information; the tenth judgment information indicates whether the dynamic memory is in an open state;
[0108] The output module is used for:
[0109] If the fifth judgment information, the sixth judgment information, the seventh judgment information, the eighth judgment information, the ninth judgment information and the tenth judgment information meet the second condition, the fourth alarm information corresponding to the task workflow is output before the task workflow is triggered to run; the fourth alarm information indicates that the timeout of the task workflow is caused by data skew.
[0110] Optionally, the prediction module is used to:
[0111] Acquire multiple data tables generated by the target job in the previous scheduling cycle;
[0112] Using the third sub-model, determining the number of target files contained in each of the data tables and the average memory size of the target files;
[0113] The output module is used for:
[0114] If there is at least one data table whose number of target files is greater than a quantity threshold, and the average memory amount of the target files is less than the memory threshold, a fifth alarm message is output before the task workflow is triggered to run; the fifth alarm message indicates that the timeout of the task workflow is caused by the number of target files exceeding a preset quantity threshold.
[0115] According to a third aspect of an embodiment of the present disclosure, there is provided an alarm device, including:
[0116] processor;
[0117] a memory for storing executable instructions;
[0118] Wherein, the processor is configured to: when executing the executable instructions stored in the memory, implement the steps in the alarm method described in the first aspect of the embodiment of the present disclosure.
[0119] According to the fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When the instructions in the storage medium are executed by a processor of an alarm device, the alarm device is enabled to perform the steps in the alarm method described in the first aspect of the embodiment of the present disclosure.
[0120] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0121] The disclosed embodiment can screen data of multiple jobs that were triggered to run in the previous scheduling cycle to determine at least one target job required by the prediction model; based on the job data of at least one target job in the previous scheduling cycle, predict the timeout prediction information in the current scheduling cycle, and when the timeout prediction information meets the preset conditions, output the alarm information corresponding to the task workflow before the task workflow to which the target job belongs is triggered to run, so as to discover and warn the job timeout problem of the task workflow in advance before the task workflow is executed, reduce the situation of developers getting up at night, and improve the user experience. In addition, the disclosed embodiment aggregates alarms into task workflows, which can effectively reduce the number of alarm information output by the system, so that developers can locate all abnormal task workflows more quickly.
[0122] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0123] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0124] Figure 1 The following is a flow diagram of an alarm method according to an exemplary embodiment. Figure 1 ;
[0125] Figure 2 The following is a flow diagram of an alarm method according to an exemplary embodiment. Figure 2 ;
[0126] Figure 3 is a structural schematic diagram of an alarm device according to an exemplary embodiment;
[0127] Figure 4 It is a block diagram of a computing device according to an exemplary embodiment. DETAILED DESCRIPTION
[0128] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices consistent with some aspects of the present disclosure as detailed in the appended claims.
[0129] The present disclosure provides an alarm method, such as Figure 1 As shown, Figure 1 The following is a flow diagram of an alarm method according to an exemplary embodiment. Figure 1 The method comprises:
[0130] Step S101, selecting at least one target job required by the prediction model from multiple jobs that were triggered to run in the previous scheduling cycle;
[0131] Step S102, based on the job data of the at least one target job, using a prediction model to predict timeout prediction information of the task workflow to which the target job belongs in the current scheduling cycle;
[0132] Step S103: if the timeout prediction information of the task workflow to which the target job belongs meets a preset condition, outputting the alarm information corresponding to the task workflow before the task workflow is triggered to run.
[0133] The embodiments of the present disclosure may be applied to a big data computing system. The big data computing system may include one or more computing devices; the computing devices may be servers and / or computers, etc.
[0134] In step S101, multiple jobs that are triggered to run in the previous scheduling period may be obtained, and data of the multiple jobs that are triggered to run in the previous scheduling period may be screened to determine at least one target job required by the prediction model.
[0135] The multiple jobs can be multiple jobs associated with one task workflow, or multiple jobs associated with multiple task workflows.
[0136] It should be noted that a task workflow is a group of dependent jobs. For example, the execution of the next job in the task workflow depends on the completion of the previous job in the task workflow. A task workflow generally includes multiple parallel or serial jobs. A job is an application submitted by a user to perform corresponding data processing. For example, a job can be understood as a calculation statement of a big data computing system, which can query data from a source data table, process data, and finally write the processed data to a target data table.
[0137] The ways to start a task workflow include: manual trigger, backtracking and scheduling trigger. Among them, scheduling trigger can be understood as setting the start time of the task workflow in advance. When the time reaches the start time of the task workflow, the system will automatically start the task workflow without manual triggering.
[0138] Scheduling triggers are usually periodic triggers; for example, the start time can be 4 a.m. every day. The scheduling period of a task workflow can be the interval between two adjacent scheduling triggers of the task workflow. The scheduling period of a scheduling trigger can be hourly, daily, weekly, monthly, and / or quarterly. It should be noted that the daily level can be understood as being executed once a day, and the specific execution time is subject to the user's settings.
[0139] The last scheduling cycle can be understood as the most recent historical scheduling cycle. It can be understood that the jobs input into the prediction model for processing in the embodiment of the present disclosure are historical jobs.
[0140] According to the data screening condition of the prediction model, data screening can be performed on multiple jobs that are triggered to run in the previous scheduling period to obtain at least one target job.
[0141] The data screening conditions can be set according to actual needs, and the embodiments of the present disclosure do not limit this. For example, the data screening conditions may include: the scheduling period is at the daily level, and the job type is an offline job.
[0142] In step S102, after determining at least one target job required by the prediction model, the job data of the target job is obtained, and the job data of the target job is processed using the prediction model to output timeout prediction information of the task workflow to which the target job belongs in the current scheduling cycle.
[0143] It can be understood that in the embodiments of the present disclosure, multiple target jobs triggered to run in the previous scheduling cycle are used to predict the timeout prediction information of at least one task workflow associated with the target job in the current scheduling cycle. That is, the embodiments of the present disclosure can use the historical job data of the target job to predict the timeout prediction information of the task workflow in the current scheduling cycle before the task workflow to which the target job belongs is executed, so as to implement the timeout alarm of the task workflow before the task workflow is executed.
[0144] Moreover, in the related art, one alarm message corresponds to one job, so when multiple jobs in a task workflow time out, the system will output a large number of alarm messages, which is not convenient for developers to quickly determine the cause of the timeout. The disclosed embodiment aggregates alarms into task workflows, that is, one alarm message corresponds to one task workflow, so that developers can more quickly determine the task workflows with timeout risks.
[0145] In step S103, it may be determined whether the timeout prediction information of the task workflow to which the target job belongs meets a preset condition, and whether it is necessary to output the alarm information corresponding to the task workflow.
[0146] If the timeout prediction information of the task workflow to which the target job belongs meets the preset conditions, it means that the probability of timeout of the task workflow is relatively high. An alarm message can be output before the task workflow is triggered to prompt the developer to conduct an abnormality check on the data involved in the task workflow.
[0147] The disclosed embodiment can screen data of multiple jobs that were triggered to run in the previous scheduling cycle to determine at least one target job required by the prediction model; based on the job data of at least one target job in the previous scheduling cycle, predict the timeout prediction information in the current scheduling cycle, and when the timeout prediction information meets the preset conditions, output the alarm information corresponding to the task workflow before the task workflow to which the target job belongs is triggered to run, so as to discover and warn the job timeout problem of the task workflow in advance before the task workflow is executed, reduce the situation of developers getting up at night, and improve the user experience. In addition, the disclosed embodiment aggregates alarms into task workflows, which can effectively reduce the number of alarm information output by the system, so that developers can locate all abnormal task workflows more quickly.
[0148] Optionally, the prediction model includes: a first sub-model, a second sub-model and a third sub-model;
[0149] The predicting, based on the job data of the at least one target job, using a prediction model to predict the timeout prediction information of the task workflow to which the target job belongs in the current scheduling cycle, includes:
[0150] Using the first sub-model, the job data of the target job required by the first sub-model is processed to obtain first prediction information; the first sub-model is used to predict the task workflow timeout caused by the abnormal growth of the memory usage of the data table or the abnormal growth of the output time;
[0151] Using the second sub-model, processing the job data of the target job required by the second sub-model to obtain second prediction information; the second sub-model is used to predict the task workflow timeout caused by memory leakage or data skew;
[0152] The third sub-model is used to process the job data of the target job required by the third sub-model to obtain third prediction information; the third sub-model is used to predict the task workflow timeout caused by the number of target files exceeding a preset number threshold; the target file is: a file whose memory usage is less than a preset memory threshold;
[0153] If the timeout prediction information of the task workflow to which the target job belongs meets the preset condition, outputting the alarm information corresponding to the task workflow before the task workflow is triggered to run includes:
[0154] If there is at least one prediction information that meets the preset condition, the alarm information corresponding to the task workflow is output before the task workflow is triggered to run.
[0155] In the embodiment of the present disclosure, the prediction model may include: a first sub-model, a second sub-model and a third sub-model.
[0156] The first sub-model is used to predict task workflow timeouts caused by abnormal growth of data table memory usage or output time. The second sub-model is used to predict task workflow timeouts caused by memory leaks or data skew. The third sub-model is used to predict task workflow timeouts caused by the number of target files exceeding a preset number threshold.
[0157] It should be noted that the target file is a file whose memory usage is less than a preset memory threshold. It is understandable that the target file may be a small file. The third sub-model may be used to predict task workflow timeouts caused by an excessive number of small files.
[0158] Here, a small file refers to a file whose size is significantly smaller than the size of a block in the file system.
[0159] The first sub-model can be used to process the job data of the target job required by the first sub-model to output first prediction information. Here, the first prediction information can indicate the probability of abnormal growth of memory usage or abnormal growth of output time in the data table corresponding to the target job.
[0160] The second sub-model may be used to process the job data of the target job required by the second sub-model to output second prediction information. Here, the second prediction information may indicate the probability of memory leakage and / or data skew in the target job.
[0161] The third sub-model may be used to process the job data of the target job required by the third sub-model to output third prediction information. Here, the third prediction information may indicate the probability of an abnormal number of small files appearing in the data table corresponding to the target job.
[0162] After using the three sub-models to process the target job respectively, the three prediction information (i.e., the first prediction information, the second prediction information, and the third prediction information) output by the three sub-models can be used. If at least one of the first prediction information, the second prediction information, and the third prediction information meets the preset conditions, it means that the probability of a task workflow timeout is high. Before the task workflow is triggered to run, an alarm message can be output to prompt the developer to check for abnormalities in the data involved in the task workflow.
[0163] The preset conditions may include a preset condition corresponding to the first prediction information, a preset condition corresponding to the second prediction information, and a preset condition corresponding to the third prediction information.
[0164] The three prediction information can be compared with the three preset conditions corresponding to the three prediction information respectively. If there is at least one prediction information that meets the preset condition corresponding to the prediction information, it means that the probability of timeout of the task workflow is relatively high, and the alarm information corresponding to the task workflow can be output before the task workflow is triggered to run.
[0165] In the related art, the analysis of job timeout alarms is usually only focused on data table anomalies. However, there are many reasons for job timeouts, making it difficult to issue more accurate timeout alarms for jobs.
[0166] The disclosed embodiment analyzes the jobs in the task workflow and determines that the possible reasons for the job timeout may include: the generation time of the data table is later than the expected time, the memory usage of the data table is slowly increasing, there are large keys in the data table, there are multiple small files in the data table, insufficient memory in the job configuration, etc.
[0167] In order to perform a more comprehensive timeout analysis on the job, the embodiment of the present disclosure sets three sub-models and uses the three sub-models to perform timeout analysis on the job from the above five aspects that may cause job timeout, thereby being able to more accurately predict the timeout probability of the job.
[0168] Optionally, the using the first sub-model to process the job data of the target job required by the first sub-model to obtain the first prediction information includes:
[0169] Obtaining historical description information of at least one data table included in the target job within a preset time period;
[0170] Based on a plurality of historical description information of the at least one data table within a preset time period, determining a target data table from the at least one data table; wherein the plurality of historical description information of the target data table indicates that the target data table presents a growth trend within the preset time period;
[0171] The historical description information of the target data table is processed using the first sub-model to obtain the first prediction information.
[0172] In an embodiment of the present disclosure, after the target job required by the first sub-model is screened out, at least one data table included in the target job and historical description information of the data table within a preset time period may be obtained.
[0173] Here, the preset time period can be set according to actual needs.
[0174] In some embodiments, the preset time period may be the n most recent scheduling periods before the current scheduling period. For example, the scheduling period is at the day level; historical description information of at least one data table included in the target job in the most recent n days may be obtained.
[0175] The historical description information may be table description information for a data table, for example, memory usage, output time, and / or table type, etc. This embodiment of the present disclosure is not limited to this.
[0176] It should be noted that the historical description information of the data table obtained may include one or more different categories of historical description information. And the historical description information of the data table within the preset time period may include one or more different categories of historical description information generated (updated) by the data table at multiple different time points within the preset time period. For example, n memory usages and n output times of at least one data table included in the target job in the last n days may be obtained; wherein each day corresponds to a memory usage and an output time.
[0177] Based on the multiple historical description information of the at least one data table within a preset time period, the change trend of the historical description information of the same category of each data table over time is determined; and according to the change trend corresponding to each data table, the target data table is determined.
[0178] Here, the changing trend of the historical description information of the same category of the target data table over time presents an increasing trend.
[0179] After the target data table is determined, the historical description information of the target data table is processed using the first sub-model to obtain first prediction information.
[0180] It should be noted that since the first sub-model is used to predict task workflow timeouts caused by abnormal growth in the memory usage of a data table or abnormal growth in the output time, a target data table whose historical description information shows an increasing trend within a preset time period can be determined from multiple data tables, and the historical description information of the target data table can be processed, thereby effectively reducing the amount of data that needs to be processed by the first sub-model and improving processing efficiency.
[0181] In some embodiments, the target data table may include: a partitioned table and a non-partitioned table;
[0182] The partition table can be processed using the first sub-model to obtain first prediction information corresponding to the partition table; the non-partition table can be processed using the first sub-model to obtain first prediction information corresponding to the non-partition table.
[0183] It should be noted that partitioning is to store data in different files according to the partition field. The file name can generally be the value of the partition field. For example, in a partition table partitioned by time, each file stores a part of the data of the partition table. Non-partitioned tables store all data in one file. Even if you only need to access a part of the data in the non-partitioned table, you need to scan the entire table.
[0184] It is understandable that due to the difference in data storage in the partition table and the non-partition table, when using the first sub-model for processing, the partition table and the non-partition table need to be processed separately.
[0185] The disclosed embodiment uses historical description information of at least one data table included in the target job within a preset time period to determine, from at least one data table, a target data table whose historical description information shows an increasing trend within the preset time period, and uses the first sub-model to process the historical description information of the target data table, thereby effectively reducing the amount of data that needs to be processed by the first sub-model and improving processing efficiency.
[0186] Optionally, the historical description information includes: production time;
[0187] The using the first sub-model to process the historical description information of the target data table to obtain the first prediction information includes:
[0188] Determine output time growth information of the target data table based on multiple output times of the target data table within the preset time period;
[0189] Using the first sub-model, based on the output time of the target data table in the previous scheduling period and the output time growth information, predict the predicted output time of the target data table in the current scheduling period;
[0190] If the timeout prediction information of the task workflow to which the target job belongs meets the preset condition, outputting the alarm information corresponding to the task workflow before the task workflow is triggered to run includes:
[0191] If there is at least one of the target data tables whose predicted output time in the current scheduling cycle is greater than the timeout time of the task workflow, an alarm message corresponding to the task workflow is output before the task workflow is triggered to run.
[0192] In the embodiment of the present disclosure, the historical description information includes: production time.
[0193] Here, the output time may be the output time of the file storing data in the data table, or the output time may be the update time of the file storing data in the data table.
[0194] The output time growth information of the target data table may be determined according to a plurality of output times of the target data table within the preset time period.
[0195] Here, the production time growth information may be used to describe the change rate of the production time of the target data table within the preset time period.
[0196] In some embodiments, the output time growth information of the target data table may include at least one of the following:
[0197] A first fitting slope, used to describe the rate of change of the output time within the preset time period;
[0198] a second fitting slope, used to describe the rate of change of the output time within the first sub-time period of the preset time period;
[0199] The third fitting slope is used to describe the change rate of the output time in the second sub-time period of the preset time period.
[0200] Here, the first sub-time period and the second sub-time period may be two non-overlapping sub-time periods within a preset time period. For example, the first sub-time period may be the first half of the preset time period; and the second sub-time period may be the second half of the preset time period.
[0201] The predicted output time of the target data table in the current scheduling cycle can be predicted based on the output time of the target data table in the previous scheduling cycle and the output time growth information of the target data table. The timeout time of the task workflow associated with the target data table in the current scheduling cycle is obtained, and the predicted output time of the target data table is compared with the timeout time of the associated task workflow.
[0202] It should be noted that the timeout period of the task workflow may be a preset fixed value, and the output time of the multiple data tables included in the task workflow is less than the timeout period.
[0203] If there is at least one target data table whose predicted output time is greater than the timeout time of the task workflow associated with the target data table, it means that the task workflow may timeout under the current scheduling cycle; the alarm information corresponding to the task workflow can be output before the task workflow is triggered to run.
[0204] In the embodiment of the present disclosure, the output time growth information used to describe the rate of change of the output time of the target data table within the preset time period is determined; the output time growth information of the target data table and the output time of the target data table in the previous scheduling period are used to predict the output time of the target data table in the current scheduling period, that is, the predicted output time. Thus, according to the predicted generation time of the target data table and the timeout time of the associated task workflow, the probability of timeout of the task workflow associated with the target data table is determined, so as to output the alarm information corresponding to the task workflow before the task workflow is triggered to run.
[0205] Optionally, the historical description information further includes: memory usage;
[0206] If the timeout prediction information of the task workflow to which the target job belongs meets the preset condition, outputting the alarm information corresponding to the task workflow before the task workflow is triggered to run includes:
[0207] If the timeout prediction information satisfies the preset condition, determining the memory growth information of the target data table based on multiple memory usages of the target data table within the preset time period;
[0208] If the memory growth information indicates that the memory usage of the target data table maintains an increasing trend in any sub-time period within the preset time period, and the output time growth information indicates that the output time of the target data table maintains an increasing trend in any sub-time period, a first alarm message is output before the task workflow is triggered to run; the first alarm message indicates that the timeout of the task workflow is caused by an abnormal increase in the memory usage of the data table;
[0209] If the output time growth information indicates that the output time of the target data table maintains an increasing trend in any sub-time period within the preset time period, and the memory growth information indicates that the memory occupancy of the target data table shows a non-increasing trend in at least one of the sub-time periods, a second alarm information is output before the task workflow is triggered to run; the second alarm information indicates that the timeout of the task workflow is caused by an abnormal increase in the output time of the data table.
[0210] In the embodiment of the present disclosure, the historical description information also includes: memory usage.
[0211] If the timeout prediction information corresponding to the task workflow meets the preset conditions, that is, there is at least one target data table in the task workflow whose predicted output time is greater than the timeout time of the task workflow, the memory growth information of the target data table can be determined based on multiple memory usages of the target data table within the preset time period.
[0212] Here, the memory growth information may be used to describe the rate of change of the memory usage of the target data table within a preset time period.
[0213] In some embodiments, the memory growth information of the target data table may include at least one of the following:
[0214] a fourth fitting slope, used to describe a rate of change of the memory usage within the preset time period;
[0215] a fifth fitting slope, used to describe a rate of change of the memory usage in a first sub-time period of the preset time period;
[0216] The sixth fitting slope is used to describe the rate of change of the memory usage in the second sub-time period within the preset time period.
[0217] Here, the first sub-time period and the second sub-time period may be two non-overlapping sub-time periods within a preset time period. For example, the first sub-time period may be the first half of the preset time period; and the second sub-time period may be the second half of the preset time period.
[0218] The timeout reasons of the task workflow associated with the target data table can be analyzed based on the memory growth information and output time growth information of the target data table.
[0219] If the memory growth information indicates that the memory usage of the target data table maintains an increasing trend in any sub-time period within the preset time period, and the output time growth information indicates that the output time of the target data table maintains an increasing trend in any sub-time period, it means that the output time delay of the target data table may be caused by the abnormal growth of the memory usage of the target data table; based on this, the first alarm information is output before the task workflow is triggered to run.
[0220] Here, the first alarm information indicates that the timeout of the task workflow is caused by an abnormal increase in the memory usage of the data table.
[0221] If the output time growth information indicates that the output time of the target data table maintains an increasing trend in any sub-time period within the preset time period, and the memory growth information indicates that the memory occupancy of the target data table shows a non-increasing trend in at least one of the sub-time periods, it means that the output time delay of the target data table may be caused by the output time delay of the upstream table; based on this, the second alarm information is output before the task workflow is triggered to run; the second alarm information indicates that the timeout of the task workflow is caused by the abnormal growth of the output time of the data table.
[0222] When it is determined that the task workflow associated with the target data table may time out in the current scheduling cycle, the embodiment of the present disclosure determines the timeout reason of the task workflow associated with the target data table by analyzing the output time growth information and memory growth information of the target data table, so as to output different alarm information before the task workflow is triggered to run, so as to inform the developer of the reason for the timeout of the task workflow, so as to facilitate the developer to carry out targeted repairs on the data and improve the repair efficiency.
[0223] Optionally, the using the second sub-model to process the job data of the target job required by the second sub-model to obtain the second prediction information includes:
[0224] Obtaining job configuration information of the target job;
[0225] Obtaining operation result information of multiple stages of the target job;
[0226] Obtain key value distribution information of multiple data tables generated by the target job in the previous scheduling cycle;
[0227] Using the second sub-model, the job configuration information, the running result information and the key-value distribution information of the target job are processed to obtain the second prediction information; wherein, the second prediction information indicates the probability of memory leakage and / or data skew in the target job.
[0228] In the embodiment of the present disclosure, the target job required by the second sub-model may be a spark-type job.
[0229] It is understandable that data screening may be performed on multiple jobs that are triggered to run in the previous scheduling cycle to determine at least one job of the saprk type, ie, the target job required by the second sub-model.
[0230] It should be noted that spark type jobs refer to jobs that use Apache Spark as the computing engine. Apache Spark is a big data computing engine that records some key information during the job execution after the calculation is completed.
[0231] The second prediction information of the task workflow associated with the target data table can be obtained by obtaining the job configuration information of the target job, the running result information of the target job in multiple stages, and the key value distribution information of multiple data tables generated by the target job in the previous scheduling cycle; and using the second sub-model to process the job configuration information, running result information and key value distribution information of the target job.
[0232] It should be noted that the second sub-model is used to predict task workflow timeouts caused by memory leaks or data skew; by analyzing the running result information of spark-type jobs, it is possible to predict whether the computing resources have the risk of memory leaks (Out of Memory, OOM). At the same time, it is also possible to predict whether the job has data skew, which in turn leads to the risk of OOM, by analyzing whether there are abnormal points in the key value distribution of the data table that the job depends on.
[0233] The job configuration information may indicate the resources pre-configured for the job. The job configuration information may include configuration information of multiple different resources. In the embodiment of the present disclosure, the configuration information of one or more resources associated with the operation result information of the job may be selected for subsequent processing.
[0234] The disclosed embodiment obtains the job configuration information, operation result information and key value distribution information of the target job required by the second sub-model; based on the job configuration information, operation result information and key value distribution information, analyzes from the aspects of memory leakage and / or data skew, and predicts the probability of timeout of the task workflow to which the target job belongs, so as to output corresponding alarm information before the task workflow is triggered to run.
[0235] Optionally, the job configuration information includes: executor configuration, indicating the maximum number of executors allowed to apply;
[0236] The operation result information includes: execution duration information, garbage collection duration information and first executor information, indicating the number of executors actually applied for during the execution of the target job;
[0237] The processing of the job configuration information, the operation result information, and the key value distribution information of the target job to obtain the second prediction information includes:
[0238] Based on the execution time information, first judgment information is determined; the first judgment information indicates the distribution of task execution time of multiple stages of the target job;
[0239] Based on the garbage collection duration information, second judgment information is determined; the second judgment information indicates the distribution of garbage collection durations of multiple stages of the target job;
[0240] Determining third judgment information based on the garbage collection duration information and the execution duration information; the third judgment information indicates the garbage collection frequency in multiple stages of the target job;
[0241] Determining fourth judgment information based on the first executor information and the executor configuration; the fourth judgment information indicates a ratio between the number of executors actually applied for and the number of executors allowed to be applied for during the execution of the target job;
[0242] If the timeout prediction information of the task workflow to which the target job belongs meets the preset condition, outputting the alarm information corresponding to the task workflow before the task workflow is triggered to run includes:
[0243] If the first judgment information, the second judgment information, the third judgment information and the fourth judgment information meet the first condition, the third alarm information corresponding to the task workflow is output before the task workflow is triggered to run; the third alarm information indicates that the timeout of the task workflow is caused by a memory leak.
[0244] In an embodiment of the present disclosure, the job configuration information may include: executor configuration.
[0245] Here, the executor configuration indicates the maximum number of executors allowed to apply.
[0246] It should be noted that each computing task submitted by the user is an application. An application can be divided into multiple jobs based on the Active class operator; a job can be divided into multiple stages based on the partition operator; a stage can be further divided into multiple tasks; a task is the smallest scheduling unit.
[0247] The executor is responsible for actually running the tasks and storing data for the application.
[0248] The operation result information includes: execution duration information, garbage collection duration information and first executor information.
[0249] Here, the execution duration information can be used to indicate the task execution duration of multiple tasks within a stage of the job; the garbage collection duration information can be used to indicate the duration required for garbage collection of multiple tasks within a stage of the job; the first executor information can indicate the number of executors actually requested during the execution of the target job.
[0250] Based on the execution duration information corresponding to a stage, the task execution duration distribution of multiple tasks corresponding to the stage can be determined; it can be understood that if the task execution duration distribution of multiple tasks in a stage is relatively scattered, that is, the task execution duration of some tasks in a stage is much longer than the task execution duration of other tasks, it means that the execution of these tasks is lagging behind.
[0251] The first judgment information is determined according to the multiple execution duration information corresponding to the multiple stages of the target job. Here, the first judgment information indicates the distribution of the task execution durations of the multiple stages of the target job.
[0252] It can be understood that, according to the first judgment information, the proportion of stages in which task execution lags behind in multiple stages of the target job can be determined.
[0253] In some embodiments, the execution duration information corresponding to a stage may include:
[0254] The first execution duration indicates the minimum task execution duration of multiple tasks corresponding to this stage;
[0255] The second execution duration indicates the maximum task execution duration of multiple tasks corresponding to the stage;
[0256] The third execution duration indicates the task execution duration corresponding to the task whose task execution duration is at the nth percentile among the multiple tasks corresponding to the stage.
[0257] Wherein, the n is a positive integer greater than 0 and less than or equal to 100. Exemplarily, the n may be 75.
[0258] The first judgment information may be determined according to a first ratio between a second execution time and a third execution time of each of a plurality of stages of the target job.
[0259] In some embodiments, the first decision information may be a set of first ratios corresponding to multiple stages of the target job.
[0260] It is understandable that if the second execution time of a stage is much longer than the third execution time, it means that some tasks in this stage are behind schedule. If some tasks in more stages of the target job are behind schedule, it means that there is an abnormality in memory allocation.
[0261] Based on the garbage collection duration information corresponding to a stage, the garbage collection duration distribution of multiple tasks corresponding to the stage can be determined; it can be understood that if the garbage collection duration distribution of multiple tasks in a stage is relatively scattered, that is, the garbage collection duration of some tasks in a stage is much longer than the garbage collection duration of other tasks, it means that the memory allocation is uneven and there is a skew.
[0262] The second judgment information is determined according to the multiple garbage collection duration information corresponding to the multiple stages of the target job. Here, the first judgment information indicates the distribution of the garbage collection duration of the multiple stages of the target job.
[0263] It can be understood that, according to the second judgment information, the proportion of the stages in which uneven memory allocation occurs among the multiple stages of the target job can be determined.
[0264] In some embodiments, the garbage collection duration information corresponding to a phase may include:
[0265] The first collection duration indicates the minimum garbage collection duration of multiple tasks corresponding to this stage;
[0266] The second collection duration indicates the maximum garbage collection duration of multiple tasks corresponding to this stage;
[0267] The third collection duration indicates the garbage collection duration corresponding to the task whose garbage collection duration is at the nth percentile among the multiple tasks corresponding to the stage.
[0268] Wherein, the n is a positive integer greater than 0 and less than or equal to 100. Exemplarily, the n may be 75.
[0269] The second judgment information may be determined according to a second ratio between the second recovery time and the third recovery time of each of the multiple stages of the target job.
[0270] In some embodiments, the second decision information may be a set of second ratios corresponding to multiple stages of the target job.
[0271] It is understandable that if the second recycling time of a certain stage is much longer than the third recycling time, it means that there is uneven memory allocation in this stage. If there are more stages with uneven memory allocation in multiple stages of the target job, it means that there is an abnormality in memory allocation.
[0272] The garbage collection frequency of a stage can be determined based on the garbage collection duration and execution duration information corresponding to a stage. It can be understood that if the garbage collection frequency of a stage is good, that is, the job will have frequent garbage collection, it means that the memory allocated to the task of this stage is insufficient.
[0273] The third decision information is determined according to the multiple garbage collection durations and execution duration information corresponding to the multiple stages of the target job. Here, the third decision information indicates the garbage collection frequencies of the multiple stages of the target job.
[0274] It can be understood that, according to the third judgment information, the garbage collection frequencies of multiple stages of the target job can be determined.
[0275] In some embodiments, the third judgment information may be determined according to a third ratio between the second recovery duration and the second execution duration of each of the multiple stages of the target job.
[0276] In some embodiments, the third decision information may be a set of third ratios corresponding to multiple stages of the target job.
[0277] It is understandable that if the second recovery duration and the second execution duration of a certain stage are different, it means that the memory allocation in the stage is uneven. If there are more stages with uneven memory allocation in the target job, it means that there is an abnormality in memory allocation.
[0278] Since the first executor information can indicate the number of executors actually applied for during the execution of the target job, and the executor configuration can indicate the maximum number of executors allowed to be applied for; the ratio between the number of executors actually applied for and the number of executors allowed to be applied for during the execution of the target job can be determined based on the first executor information and executor configuration of the target job, that is, the fourth judgment information.
[0279] It is understandable that if the number of executors actually requested is larger than the number of executors allowed to be requested, it means that there is insufficient memory.
[0280] After determining the first judgment information, the second judgment information, the third judgment information and the fourth judgment information, it can be determined whether the first judgment information, the second judgment information, the third judgment information and the fourth judgment information meet the first condition. If the first judgment information, the second judgment information, the third judgment information and the fourth judgment information meet the first condition, it indicates that there is an abnormality in memory allocation; based on this, the third alarm information corresponding to the task workflow is output before the task workflow is triggered to run.
[0281] Here, the third warning information indicates that the timeout of the task workflow is caused by a memory leak.
[0282] Based on the first judgment information, first ratios corresponding to multiple stages of the target operation may be determined. If the proportion of stages in the target operation where the first ratio is greater than the first threshold is greater than the second threshold, it means that the first judgment information satisfies the first condition.
[0283] Here, the first threshold and the second threshold can be set according to actual needs.
[0284] Based on the second judgment information, the second ratios corresponding to the multiple stages of the target job can be determined. If the proportion of the stages in the target job where the second ratio is greater than the third threshold is greater than the fourth threshold, it means that the second judgment information meets the first condition.
[0285] Here, the third threshold and the fourth threshold can be set according to actual needs.
[0286] Based on the third judgment information, the third ratios corresponding to the multiple stages of the target job can be determined. If the proportion of stages in the target job where the third ratio is greater than the fifth threshold is greater than the sixth threshold, it means that the third judgment information meets the first condition.
[0287] Here, the fifth threshold and the sixth threshold can be set according to actual needs.
[0288] Based on the fourth judgment information, a quantity ratio between the executors actually applied for and the executors allowed to be applied for in the target job may be determined. If the quantity ratio of the target job is greater than a seventh threshold, it indicates that the fourth judgment information satisfies the first condition.
[0289] Here, the seventh threshold can be set according to actual needs.
[0290] The disclosed embodiment obtains the job configuration information and running result information of the target job required by the second sub-model; determines the first judgment information, the second judgment information, the third judgment information and the fourth judgment information of the target job based on the job configuration information and the running result information; and predicts the probability of timeout caused by memory leakage in the task workflow to which the target job belongs based on whether the first judgment information, the second judgment information, the third judgment information and the fourth judgment information meet the first condition, so as to output the third warning information before the task workflow is triggered to run, so as to inform the developer of the reason for the timeout of the task workflow, so as to improve the repair efficiency.
[0291] Optionally, the job configuration information further includes: dynamic memory configuration; the operation result information further includes: second executor information indicating the number of idle executors;
[0292] The processing of the job configuration information, the operation result information, and the key value distribution information of the target job to obtain the second prediction information includes:
[0293] Based on the second executor information and the first executor information, fifth judgment information is determined; the fifth judgment information indicates the ratio between the number of idle executors and the number of actually requested executors during the execution of the target job;
[0294] Performing outlier analysis on the key-value distribution information to obtain sixth decision information; the sixth decision information indicates first outliers in the plurality of data tables;
[0295] Based on the execution duration information, determining seventh judgment information; the seventh judgment information indicates that there is a stage of an abnormal task in the multiple stages of the target job; the task execution duration of the abnormal task is less than or equal to a minimum execution duration threshold;
[0296] Based on a duration set consisting of the same execution duration information of a plurality of the stages, determining eighth judgment information; the eighth judgment information indicates a ratio of a maximum execution duration to an average execution duration in the duration set;
[0297] Performing outlier analysis on the duration set to obtain ninth decision information; the ninth decision information indicates a second outlier in the duration set;
[0298] Based on the dynamic memory configuration, obtaining tenth judgment information; the tenth judgment information indicates whether the dynamic memory is in an open state;
[0299] If the timeout prediction information of the task workflow to which the target job belongs meets the preset condition, outputting the alarm information corresponding to the task workflow before the task workflow is triggered to run includes:
[0300] If the fifth judgment information, the sixth judgment information, the seventh judgment information, the eighth judgment information, the ninth judgment information and the tenth judgment information meet the second condition, the fourth alarm information corresponding to the task workflow is output before the task workflow is triggered to run; the fourth alarm information indicates that the timeout of the task workflow is caused by data skew.
[0301] In an embodiment of the present disclosure, the job configuration information may include: dynamic memory configuration; dynamic memory configuration, indicating whether the dynamic memory is turned on.
[0302] It should be noted that if the dynamic memory configuration indicates that dynamic memory is turned on, the memory space allocated to the target job can be dynamically adjusted during the execution process.
[0303] The operation result information also includes: second executor information; the second executor information indicates the number of idle executors during the execution of the target job.
[0304] Based on the second executor information and the first executor information of the target job, the ratio of the number of idle executors to the number of executors actually requested during the execution of the target job, ie, the fifth judgment information, may be determined.
[0305] It should be noted that if the number of idle executors is relatively large compared to the number of executors actually requested during the execution of the target job, it means that there are many idle executors. At this time, if dynamic memory allocation is not enabled, data skew may occur.
[0306] An outlier analysis may be performed on the key value distribution information of the data table associated with the target job to determine a first outlier in the data table associated with the target job.
[0307] The key value distribution information of the data table may be subjected to outlier analysis by using an isolation forest algorithm; alternatively, other outlier analysis algorithms may also be used, which is not limited in the embodiments of the present disclosure.
[0308] In some embodiments, the sixth decision information may be a collection of first outliers in multiple data tables.
[0309] Based on the execution time information of multiple tasks in a stage, it can be determined whether there are abnormal tasks in the stage.
[0310] Here, the task execution time of the abnormal task is less than or equal to the minimum execution time threshold. The minimum execution time threshold can be set according to actual needs, and the embodiment of the present disclosure does not limit this. For example, the minimum execution time threshold can be 0.
[0311] Based on the task execution time of each task in a stage, it can be determined whether there are abnormal tasks in the stage.
[0312] In some embodiments, it may be determined whether there are abnormal tasks in each stage based on the first execution duration of each stage in the target job.
[0313] It can be understood that since the first execution duration indicates the minimum task execution duration of multiple tasks corresponding to the stage; if the minimum task execution duration of a stage is less than or equal to the minimum execution duration threshold, it can be determined that there is at least one abnormal task in the stage. If the minimum task execution duration of a stage is greater than the minimum execution duration threshold, it can be determined that there is no abnormal task in the stage.
[0314] In the disclosed embodiment, the stage where an abnormal task exists in the target job can be determined based on the execution time information of each stage in the target job, that is, the seventh judgment information.
[0315] In some embodiments, the seventh judgment information may be a set of stages in which abnormal tasks exist within the target job.
[0316] In some other embodiments, the seventh judgment information may indicate the ratio of the number of stages in which abnormal tasks exist in the target job to the number of stages in the target job.
[0317] The duration set may be determined based on the execution duration information of multiple stages in the target job.
[0318] In some embodiments, a duration set may be formed based on the first execution durations of multiple stages of the target job;
[0319] Alternatively, a duration set may be formed based on the second execution durations of multiple stages of the target job;
[0320] Alternatively, a duration set may be formed based on the third execution durations of multiple stages of the target job.
[0321] Based on the duration set, the maximum execution duration and the average execution duration in the duration set are determined; and based on the ratio of the maximum execution duration to the average execution duration, the eighth judgment information is determined.
[0322] An outlier analysis may be performed on the duration set of the target job to determine a second outlier in the duration set.
[0323] The duration set may be subjected to outlier analysis using an isolation forest algorithm; alternatively, other outlier analysis algorithms may also be used, which is not limited in the embodiments of the present disclosure.
[0324] In some embodiments, the ninth decision information may be a set of second outliers in the duration set.
[0325] The tenth judgment information corresponding to the target job may be determined based on the dynamic memory configuration of the target job.
[0326] Here, the tenth judgment information indicates whether the dynamic memory is in an open state.
[0327] After determining the fifth judgment information, the sixth judgment information, the seventh judgment information, the eighth judgment information, the ninth judgment information and the tenth judgment information, it can be determined whether the above judgment information meets the second condition. If the above judgment information meets the second condition, it means that there is data skew in the target job. Based on this, the fourth alarm information corresponding to the task workflow is output before the task workflow is triggered to run.
[0328] Here, the fourth alarm information indicates that the timeout of the task workflow is caused by data skew.
[0329] Based on the fifth judgment information, the quantity ratio between the idle executors and the actually requested executors in the target job can be determined. If the quantity ratio of the target job is greater than the eighth threshold, it means that the fifth judgment information meets the second condition.
[0330] Here, the eighth threshold can be set according to actual needs.
[0331] Based on the sixth judgment information, the first outliers in the plurality of data tables may be determined; if the proportion of data tables in which the number of first outliers in the target job is greater than the outlier number threshold is greater than the ninth threshold, it indicates that the sixth judgment information satisfies the second condition.
[0332] Here, the outlier number threshold and the ninth threshold can be set according to actual needs.
[0333] Based on the seventh judgment information, the proportion of stages with abnormal tasks in the target job can be determined; if the proportion of stages with abnormal tasks in the target job is less than the tenth threshold, it means that the seventh judgment information meets the second condition.
[0334] Here, the tenth threshold can be set according to actual needs.
[0335] Based on the eighth judgment information, the ratio of the maximum execution time to the average execution time in the duration set can be determined; if the ratio of the maximum execution time to the average execution time in the duration set is greater than the eleventh threshold, it means that the eighth judgment information meets the second condition.
[0336] Here, the eleventh threshold can be set according to actual needs.
[0337] The second outlier in the duration set can be determined based on the ninth judgment information; if the execution duration information of the second outlier in the duration set indicates a duration greater than the outlier duration threshold, it indicates that the ninth judgment information satisfies the second condition.
[0338] Here, the outlier duration threshold can be set according to actual needs.
[0339] Based on the tenth judgment information, it can be determined whether the target job is configured with dynamic memory; if the target job is configured with dynamic memory, it means that the tenth judgment information satisfies the second condition.
[0340] The disclosed embodiment obtains the job configuration information, operation result information and key value distribution information of the target job required by the second sub-model; determines the fifth judgment information, the sixth judgment information, the seventh judgment information, the eighth judgment information, the ninth judgment information and the tenth judgment information of the target job based on the job configuration information, the operation result information and the key value distribution information; and predicts the probability of timeout caused by data skew in the task workflow to which the target job belongs based on whether the fifth judgment information, the sixth judgment information, the seventh judgment information, the eighth judgment information, the ninth judgment information and the tenth judgment information meet the second condition, so as to output the fourth warning information before the task workflow is triggered to run, so as to inform the developer of the reason for the timeout of the task workflow, so as to improve the repair efficiency.
[0341] Optionally, the using the third sub-model to process the job data of the target job required by the third sub-model to obtain third prediction information includes:
[0342] Acquire multiple data tables generated by the target job in the previous scheduling cycle;
[0343] Using the third sub-model, determining the number of target files contained in each of the data tables and the average memory size of the target files;
[0344] If the timeout prediction information of the task workflow to which the target job belongs meets the preset condition, outputting the alarm information corresponding to the task workflow before the task workflow is triggered to run includes:
[0345] If there is at least one data table whose number of target files is greater than a quantity threshold, and the average memory amount of the target files is less than the memory threshold, a fifth alarm message is output before the task workflow is triggered to run; the fifth alarm message indicates that the timeout of the task workflow is caused by the number of target files exceeding a preset quantity threshold.
[0346] In the disclosed embodiment, multiple data tables generated by the target job in the previous scheduling cycle may be obtained; and according to the memory usage of the files included in each data table, it is determined whether the data table contains the target file.
[0347] If the data table contains object files, the number of object files contained in the data table and the average memory usage of multiple object files contained in the data table can be determined.
[0348] After determining the number of target files of each data table and the average memory size of the target files, the data of the target files of each data table may be compared with a preset number threshold. If there is at least one data table where the number of target files is greater than the number threshold, the average memory size of the target files of the data table may be compared with the preset memory threshold. If the average memory size of the target files of the data table is less than the memory threshold, it indicates that the number of target files of the data table in the target job is too large. Based on this, a fifth alarm message is output before the task workflow is triggered to run.
[0349] Here, the fifth warning information indicates that the timeout of the task workflow is caused by the number of target files exceeding a preset number threshold.
[0350] The disclosed embodiment obtains the data table generated by the target job required by the third sub-model in the previous scheduling cycle; based on the target files in the data table, it predicts the probability of timeout due to too many small files in the task workflow to which the target job belongs, so as to output corresponding alarm information before the task workflow is triggered to run.
[0351] The present disclosure also provides the following embodiments:
[0352] Figure 2 The following is a flow diagram of an alarm method according to an exemplary embodiment. Figure 2 , the method comprising:
[0353] Step S201, selecting at least one target job required by the first sub-model, the second sub-model and the third sub-model from a plurality of jobs triggered to run in the previous scheduling cycle;
[0354] Here, the first sub-model may be a model for predicting task workflow timeout by analyzing abnormal growth of table size / abnormal table output time.
[0355] It is understandable that by analyzing the changing trend of the table size and the changing trend of the table output time, it is possible to predict whether the job will time out. Since a task workflow corresponds to multiple jobs, and a job corresponds to multiple data tables, the first sub-model can use the data table as an entry point.
[0356] The data screening conditions of the first sub-model may include:
[0357] Condition 1: Select the jobs running on day T-1;
[0358] Condition 2: Select the job triggered by the schedule;
[0359] Condition 3: Select jobs scheduled at the daily level;
[0360] Condition 4: Select a job whose job type is offline.
[0361] It should be noted that the job running on day T-1 may be the job running on the previous day.
[0362] Here, the second sub-model may be a model for predicting task workflow timeout by analyzing insufficient memory / data skew.
[0363] It is understandable that the risk of OOM in computing resources can be predicted by analyzing the execution information of spark during the job execution; the risk of data skew in the job can be predicted by analyzing whether there are abnormal points in the key value distribution of the data table that the job depends on. The second sub-model can take the running information of a single spark type job and the key value distribution of the data table that the job depends on as the entry point.
[0364] The data screening conditions of the second sub-model may include:
[0365] Condition 1: Select the jobs running on day T-1;
[0366] Condition 2: Select the job triggered by the schedule;
[0367] Condition 3: Select a spark job.
[0368] The third sub-model may be a model for predicting task workflow timeout by analyzing the large number of small files.
[0369] It is understandable that when there are too many small files in a data table, the job execution will time out. The third sub-model can use the file information of the data table that the job depends on as the entry point.
[0370] The data screening conditions of the third sub-model may include:
[0371] Condition 1: Select the jobs running on day T-1;
[0372] Condition 2: Select the job triggered by the schedule;
[0373] Condition 3: Select jobs scheduled at the daily level;
[0374] Condition 4: Select a job whose job type is offline.
[0375] Step S202, using the first sub-model, processing the operation data of the target operation required by the first sub-model to obtain first prediction information;
[0376] After the target job required by the first sub-model is screened out, the table size and table output time of the data table corresponding to the target job in the last 15 days can be obtained.
[0377] It is worth noting that partitioned tables and non-partitioned tables need to be calculated separately, and different types of partitioned tables need to be distinguished when calculating partitioned tables. According to the actual situation, only hive type data tables and iceberg type data tables can be considered, and other types of data tables, such as mysql, doris and es, are not considered for the time being.
[0378] The data of the data table corresponding to the target job in the latest 15 days can be aggregated and arranged in reverse order of date to form an array; the array involves the date field, table size field, and table output time field.
[0379] Based on the array, the growth trend of the table size of the data table in time series can be determined. Here, the growth trend is a value that describes the change trend of a set of table size data arranged in time.
[0380] If the trend of the data table is increasing, the fitting slope slope of the entire timing, the fitting slope upper_slope of the first half of the timing, and the fitting slope lower_slope of the second half of the timing can be determined.
[0381] Based on the array, the growth trend time_trend of the table output time of the data table according to the time series can be determined. If the time_trend of the data table is increasing, the fitting slope time_slope of the entire time series, the fitting slope time_upper_slope of the first half of the time series, and the fitting slope time_lower_slope of the second half of the time series can be determined.
[0382] The above information can be recorded as key information of the data table. For example, trend, slope, upper_slope, lower_slope, time_trend, time_slope, time_upper_slope and time_lower_slope fields can be added to the corresponding row of each data table.
[0383] The processed key information of the table is then mapped one by one to the jobs associated with the data table and the task workflow associated with the job. The timeout time of the task workflow and the daily scheduling time of the task workflow are also added.
[0384] Step S203: if the first prediction information meets the preset condition, outputting the warning information corresponding to the task workflow before the task workflow is triggered to run;
[0385] Here, the early warning formula corresponding to the first sub-model can be:
[0386] y = k*t+m;
[0387] Wherein, m is the output time of the data table in the most recent day, for example, 5:30, which can be converted into minutes, that is, 330. k is the slope of the growth of the output time of the table in the most recent n days, that is, time_slope. y is the alarm time, that is, the scheduling time of the task workflow + the timeout time. t is the number of days of advance warning. When t is 1, k+m>y, indicating that a timeout alarm will appear tomorrow.
[0388] Based on the above formula, a field indicating whether a timeout has occurred, namely is_timeout, can be set for the data granularity: data table-job-task workflow. It is understandable that since the timeout alarm is issued according to the task workflow, it is necessary to correspond the abnormal data table to the job and task workflow one by one.
[0389] If time_trend + the output time of the most recent data table of the task workflow - the scheduling time of the task workflow - the timeout time of the task workflow > 0, is_timeout is assigned a value of 2, indicating that it may time out tomorrow.
[0390] Among them, all the enumeration values of is_timeout and their meanings are as follows: is_timeout is assigned a value of 1, indicating that the task workflow has not set a timeout in advance and warning analysis cannot be performed; is_timeout is assigned a value of 2, indicating that a timeout will occur; is_timeout is assigned a value of 3, indicating that there will be no timeout.
[0391] If is_timeout is assigned a value of 2, the timeout cause can be further determined to output the corresponding alarm information.
[0392] As shown in Table 1, Table 1 is a summary table of the alarm information output by the first sub-model.
[0393]
[0394] Table 1
[0395] Step S204, using the second sub-model, processing the operation data of the target operation required by the second sub-model to obtain second prediction information;
[0396] The job configuration information of the target job may be obtained based on the target job required by the second sub-model.
[0397] It is worth noting that the job configuration information obtained here is the configuration information that needs to be compared with the results.
[0398] Job configuration information may include:
[0399] spark.dynamicAllocation.maxExecutors: Set the set_max_execs field to store this value, which indicates the maximum number of executors that can be applied;
[0400] spark.dynamicAllocation.enabled: Sets the is_dyn_exec field to store this value, indicating whether dynamic memory is enabled.
[0401] As shown in Table 2.1, Table 2.1 is the job configuration information table.
[0402]
[0403]
[0404] Table 2.1
[0405] Based on the target job, the running result information of the task dimension of the target job can be obtained.
[0406] The operation result information may include: the garbage collection time (gc) and execution time (duration) of all stages of a job.
[0407] As shown in Table 2.2, Table 2.2 is a table of operation result information of one stage.
[0408] Min 75th percentile Max Execution time 0.1s(min_dura) 0.3s(75th_dura) 0.5s(max_dura) Garbage collection time - 0.0ms(75th_gc_time) 0.0ms(max_gc_time)
[0409] Table 2.2
[0410] As shown in Table 2.3, Table 2.3 is a job running result information table (part).
[0411] Operation Task Stage id min_dura(s) 75th_dura(s) max_dura(s) 75th_gc_time(ms) max_gc_time(ms) 111 2341 0 0.1s 0.3 0.5 0.0 0.0 111 2341 1 0.1s 0.3 0.5 0.0 0.0
[0412] Table 2.3
[0413] The operation result information may also include:
[0414] The total number of executors (exec_num) when a job is executed;
[0415] The number of idle executors during a job execution is desd_exec_num.
[0416] As shown in Table 2.4, Table 2.4 is an information table of the number of executors corresponding to a job.
[0417] Operation Task exec_num dead_exec_num 111 2341 721 243
[0418] Table 2.4
[0419] The key value distribution of the partition (t-1 partition) corresponding to the data table associated with the target job in the most recent day. As shown in Table 2.5, Table 2.5 is a key value distribution information table.
[0420] Operation Data table id Key value distribution number [num_key1, num_key2, num_key3, num_key4, num_key5] 111 2341 [2381,34,484,12,78] 111 2342 [23,304,84,102,34]
[0421] Table 2.5
[0422] The value of max_dura / 75th_dura of each stage can be calculated and recorded as the dura_spr_rat field. It can be understood that if there are many stages where max_dura is much larger than 75th_dura, it indicates that the execution time of tasks is relatively scattered and some tasks are lagging behind.
[0423] The value of max_gc_tm / 75th_gc_tm in each stage can be calculated and recorded as the gc_spr_rat field.
[0424] The value of max_gc_tm / max_dura can be calculated for each stage and recorded as the gc_prop field. It can be understood that if this value is large, it means that the job has frequent garbage collection, the executor has insufficient memory, or the memory ratio allocated to the task is small.
[0425] The value of exec_num / set_max_execs for each target job can be calculated and recorded as the use_exec_rat field. It is understandable that if this value is large, it means that there is insufficient memory.
[0426] The value of dead_exec_num / exec_num for each target job can be calculated and recorded as the dead_exec_rat field. It can be understood that if this value is large, it means that there are many idle executors. If dynamic allocation is not enabled at this time, it means that there may be data skew.
[0427] The isolation forest algorithm can be used to analyze whether there are outliers in the key value distribution of each data table, which is recorded as the each_ex_key field.
[0428] Step S205: if the second prediction information meets the preset condition, outputting the warning information corresponding to the task workflow before the task workflow is triggered to run;
[0429] If the gc_prop of more than 50% (threshold) stages of a target job is greater than 0.8 (threshold), the value of the is_gc_warn field is set to 1.
[0430] If the dura_spr_rat of a stage above 50% (threshold) of a target job is greater than 1 (threshold), the value of the is_dura_spr_wid field is set to 1.
[0431] If the gc_spr_rat of more than 50% (threshold) of the stages of a target job is greater than 1 (threshold), the value of the is_gc_spr_wid field is set to 1.
[0432] If the use_exec_rat of a target job is greater than 1.5 (threshold), the value of the is_exec_lack field is set to 1.
[0433] If the dead_exec_rat of a target job is greater than 0.2 (threshold), the value of the is_dead_exec field is set to 1.
[0434] If a target job has a min_dura of 20% (threshold) stages close to or equal to 0, the value of the is_incline field is set to 1, indicating that some tasks are running in vain.
[0435] Use the isolation forest algorithm to analyze the array consisting of 75th_dura of all stages of a target job and obtain the outlier ex_constant.
[0436] If each_ex_key>500(threshold) for more than 50%(threshold) of the data tables of a target job, set the value of the key_incline field to 1.
[0437] Based on an array consisting of 75th_dura of all stages of a target job, get the average value avg_75th_dura and the maximum value max_75th_dura; if max_75th_dura / avg_75th_dura>10 (threshold), set the value of the key_incline_flag field to 1.
[0438] If is_gc_warn is 1, is_dura_spr_wid is 1, is_gc_spr_wid is 1, and is_exec_lack is 1, it indicates that the job is likely to have OOM. You can output an alarm message about the task workflow timeout due to memory leak.
[0439] If is_incline is 0, is_dyn_exec is 0, is_dead_exec is 1, ex_constant is >30min (threshold), key_incline is 1, and key_incline_flag is 1, it indicates that there is a high possibility of data skew in the job, and an alarm message indicating that the task workflow has timed out due to data skew can be output.
[0440] Step S206, using the third sub-model, processing the operation data of the target operation required by the third sub-model to obtain third prediction information;
[0441] Based on the target job required by the third sub-model, the number of files and the size of each file in the data table corresponding to the target job under the T-1 partition can be obtained. As shown in Table 3.1, Table 3.1 is a file information table of the job.
[0442] Operation Task Data table id Number of small files File size(M) 111 3241 hive.test.ads_pro_wf_1d 120 [23,46,67,90,...,123]
[0443] Table 3.1
[0444] The average size of small files in each data table can be calculated, as shown in Table 3.2, which is the small file information table of the job.
[0445] Operation Task Data table id Number of small files Average size(M) 111 3241 hive.test.ads_pro_wf_1d 120 60
[0446] Table 3.2
[0447] Step S207: if the third prediction information meets a preset condition, outputting warning information corresponding to the task workflow before the task workflow is triggered to run.
[0448] If the number of small files in a data table is greater than 100 (threshold) and the average size of small files is less than 64M (threshold), set the value of the s_files_exceed field to 1; when the s_files_exceed of one or more data tables that a target job depends on is 1, output an alarm message.
[0449] It is worth noting that the alarm jobs can be aggregated into the task workflow, and alarms can be issued according to the dimensions of the task workflow.
[0450] The embodiment of the present disclosure also provides an alarm device. Figure 3 is a schematic diagram of the structure of an alarm device according to an exemplary embodiment. Figure 3 As shown, the device 100 includes:
[0451] The data screening module 101 is used to screen out at least one target job required by the prediction model from multiple jobs that are triggered to run in the previous scheduling cycle;
[0452] A prediction module 102, configured to predict, based on the job data of the at least one target job, timeout prediction information of the task workflow to which the target job belongs in the current scheduling cycle by using a prediction model;
[0453] The output module 103 is configured to output the warning information corresponding to the task workflow before the task workflow is triggered to run if the timeout prediction information of the task workflow to which the target job belongs meets a preset condition.
[0454] Optionally, the prediction model includes: a first sub-model, a second sub-model and a third sub-model;
[0455] The prediction module 102 is used to:
[0456] Using the first sub-model, the job data of the target job required by the first sub-model is processed to obtain first prediction information; the first sub-model is used to predict the task workflow timeout caused by the abnormal growth of the memory usage of the data table or the abnormal growth of the output time;
[0457] Using the second sub-model, processing the job data of the target job required by the second sub-model to obtain second prediction information; the second sub-model is used to predict the task workflow timeout caused by memory leakage or data skew;
[0458] The third sub-model is used to process the job data of the target job required by the third sub-model to obtain third prediction information; the third sub-model is used to predict the task workflow timeout caused by the number of target files exceeding a preset number threshold; the target file is: a file whose memory usage is less than a preset memory threshold;
[0459] The output module 103 is used to:
[0460] If there is at least one prediction information that meets the preset condition, the alarm information corresponding to the task workflow is output before the task workflow is triggered to run.
[0461] Optionally, the prediction module 102 is specifically configured to:
[0462] Obtaining historical description information of at least one data table included in the target job within a preset time period;
[0463] Based on a plurality of historical description information of the at least one data table within a preset time period, determining a target data table from the at least one data table; wherein the plurality of historical description information of the target data table indicates that the target data table presents a growth trend within the preset time period;
[0464] The historical description information of the target data table is processed using the first sub-model to obtain the first prediction information.
[0465] Optionally, the historical description information includes: production time;
[0466] The prediction module 102 is used to:
[0467] Determine output time growth information of the target data table based on multiple output times of the target data table within the preset time period;
[0468] Using the first sub-model, based on the output time of the target data table in the previous scheduling period and the output time growth information, predict the predicted output time of the target data table in the current scheduling period;
[0469] The output module 103 is used to:
[0470] If there is at least one of the target data tables whose predicted output time in the current scheduling cycle is greater than the timeout time of the task workflow, an alarm message corresponding to the task workflow is output before the task workflow is triggered to run.
[0471] Optionally, the historical description information further includes: memory usage;
[0472] The output module 103 is specifically used for:
[0473] If the timeout prediction information satisfies the preset condition, determining the memory growth information of the target data table based on multiple memory usages of the target data table within the preset time period;
[0474] If the memory growth information indicates that the memory usage of the target data table maintains an increasing trend in any sub-time period within the preset time period, and the output time growth information indicates that the output time of the target data table maintains an increasing trend in any sub-time period, a first alarm message is output before the task workflow is triggered to run; the first alarm message indicates that the timeout of the task workflow is caused by an abnormal increase in the memory usage of the data table;
[0475] If the output time growth information indicates that the output time of the target data table maintains an increasing trend in any sub-time period within the preset time period, and the memory growth information indicates that the memory occupancy of the target data table shows a non-increasing trend in at least one of the sub-time periods, a second alarm information is output before the task workflow is triggered to run; the second alarm information indicates that the timeout of the task workflow is caused by an abnormal increase in the output time of the data table.
[0476] Optionally, the prediction module 102 is used to:
[0477] Obtaining job configuration information of the target job;
[0478] Obtaining operation result information of multiple stages of the target job;
[0479] Obtain key value distribution information of multiple data tables generated by the target job in the previous scheduling cycle;
[0480] Using the second sub-model, the job configuration information, the running result information and the key-value distribution information of the target job are processed to obtain the second prediction information; wherein, the second prediction information indicates the probability of memory leakage and / or data skew in the target job.
[0481] Optionally, the job configuration information includes: executor configuration, indicating the maximum number of executors allowed to apply;
[0482] The operation result information includes: execution duration information, garbage collection duration information and first executor information, indicating the number of executors actually applied for during the execution of the target job;
[0483] The prediction module 102 is used to:
[0484] Based on the execution time information, first judgment information is determined; the first judgment information indicates the distribution of task execution time of multiple stages of the target job;
[0485] Based on the garbage collection duration information, second judgment information is determined; the second judgment information indicates the distribution of garbage collection durations of multiple stages of the target job;
[0486] Determining third judgment information based on the garbage collection duration information and the execution duration information; the third judgment information indicates the garbage collection frequency in multiple stages of the target job;
[0487] Determining fourth judgment information based on the first executor information and the executor configuration; the fourth judgment information indicates a ratio between the number of executors actually applied for and the number of executors allowed to be applied for during the execution of the target job;
[0488] The output module 103 is used to:
[0489] If the first judgment information, the second judgment information, the third judgment information and the fourth judgment information meet the first condition, the third alarm information corresponding to the task workflow is output before the task workflow is triggered to run; the third alarm information indicates that the timeout of the task workflow is caused by a memory leak.
[0490] Optionally, the job configuration information further includes: dynamic memory configuration; the operation result information further includes: second executor information indicating the number of idle executors;
[0491] The prediction module 102 is used to:
[0492] Based on the second executor information and the first executor information, fifth judgment information is determined; the fifth judgment information indicates the ratio between the number of idle executors and the number of actually requested executors during the execution of the target job;
[0493] Performing outlier analysis on the key-value distribution information to obtain sixth decision information; the sixth decision information indicates first outliers in the plurality of data tables;
[0494] Based on the execution duration information, determining seventh judgment information; the seventh judgment information indicates that there is a stage of an abnormal task in the multiple stages of the target job; the task execution duration of the abnormal task is less than or equal to a minimum execution duration threshold;
[0495] Based on a duration set consisting of the same execution duration information of a plurality of the stages, determining eighth judgment information; the eighth judgment information indicates a ratio of a maximum execution duration to an average execution duration in the duration set;
[0496] Performing outlier analysis on the duration set to obtain ninth decision information; the ninth decision information indicates a second outlier in the duration set;
[0497] Based on the dynamic memory configuration, obtaining tenth judgment information; the tenth judgment information indicates whether the dynamic memory is in an open state;
[0498] The output module 103 is used to:
[0499] If the fifth judgment information, the sixth judgment information, the seventh judgment information, the eighth judgment information, the ninth judgment information and the tenth judgment information meet the second condition, the fourth alarm information corresponding to the task workflow is output before the task workflow is triggered to run; the fourth alarm information indicates that the timeout of the task workflow is caused by data skew.
[0500] Optionally, the prediction module 102 is used to:
[0501] Acquire multiple data tables generated by the target job in the previous scheduling cycle;
[0502] Using the third sub-model, determining the number of target files contained in each of the data tables and the average memory size of the target files;
[0503] The output module 103 is used to:
[0504] If there is at least one data table whose number of target files is greater than a quantity threshold, and the average memory amount of the target files is less than the memory threshold, a fifth alarm message is output before the task workflow is triggered to run; the fifth alarm message indicates that the timeout of the task workflow is caused by the number of target files exceeding a preset quantity threshold.
[0505] Figure 4 8 is a block diagram of a computing device according to an exemplary embodiment. For example, the computing device 800 may be a mobile phone, a mobile computer, etc.
[0506] Reference Figure 4 , the computing device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0507] The processing component 802 generally controls the overall operation of the computing device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0508] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the computing device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0509] The power supply component 806 provides power to the various components of the computing device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the computing device 800.
[0510] The multimedia component 808 includes a screen that provides an output interface between the computing device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0511] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the computing device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0512] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0513] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the computing device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the computing device 800, and the sensor assembly 814 can also detect the position change of the computing device 800 or a component of the computing device 800, the presence or absence of user contact with the computing device 800, the orientation or acceleration / deceleration of the computing device 800, and the temperature change of the computing device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0514] The communication component 816 is configured to facilitate wired or wireless communication between the computing device 800 and other devices. The computing device 800 can access a wireless network based on a communication standard, such as Wi-Fi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0515] In an exemplary embodiment, the computing device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0516] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the computing device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0517] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0518] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An alarm method, characterized in that: The method comprises: Filter out at least one target job required by the prediction model from multiple jobs that are triggered to run in the previous scheduling cycle; Based on the job data of the at least one target job, using a prediction model to predict timeout prediction information of the task workflow to which the target job belongs in the current scheduling cycle; If the timeout prediction information of the task workflow to which the target job belongs meets a preset condition, the alarm information corresponding to the task workflow is output before the task workflow is triggered to run.
2. The method according to claim 1, characterized in that The prediction model includes: a first sub-model, a second sub-model and a third sub-model; The predicting, based on the job data of the at least one target job, using a prediction model to predict the timeout prediction information of the task workflow to which the target job belongs in the current scheduling cycle, includes: Using the first sub-model, the job data of the target job required by the first sub-model is processed to obtain first prediction information; the first sub-model is used to predict the task workflow timeout caused by the abnormal growth of the memory usage of the data table or the abnormal growth of the output time; Using the second sub-model, processing the job data of the target job required by the second sub-model to obtain second prediction information; the second sub-model is used to predict the task workflow timeout caused by memory leakage or data skew; The third sub-model is used to process the job data of the target job required by the third sub-model to obtain third prediction information; the third sub-model is used to predict the task workflow timeout caused by the number of target files exceeding a preset number threshold; the target file is: a file whose memory usage is less than a preset memory threshold; If the timeout prediction information of the task workflow to which the target job belongs meets the preset condition, outputting the alarm information corresponding to the task workflow before the task workflow is triggered to run includes: If there is at least one prediction information that meets the preset condition, the alarm information corresponding to the task workflow is output before the task workflow is triggered to run.
3. The method according to claim 2, characterized in that The using the first sub-model to process the operation data of the target operation required by the first sub-model to obtain first prediction information includes: Obtaining historical description information of at least one data table included in the target job within a preset time period; Based on a plurality of historical description information of the at least one data table within a preset time period, determining a target data table from the at least one data table; wherein the plurality of historical description information of the target data table indicates that the target data table presents a growth trend within the preset time period; The historical description information of the target data table is processed using the first sub-model to obtain the first prediction information.
4. The method according to claim 3, characterized in that The historical description information includes: production time; The using the first sub-model to process the historical description information of the target data table to obtain the first prediction information includes: Determine output time growth information of the target data table based on multiple output times of the target data table within the preset time period; Using the first sub-model, based on the output time of the target data table in the previous scheduling period and the output time growth information, predict the predicted output time of the target data table in the current scheduling period; If the timeout prediction information of the task workflow to which the target job belongs meets the preset condition, outputting the alarm information corresponding to the task workflow before the task workflow is triggered to run includes: If there is at least one of the target data tables whose predicted output time in the current scheduling cycle is greater than the timeout time of the task workflow, an alarm message corresponding to the task workflow is output before the task workflow is triggered to run.
5. The method according to claim 4, characterized in that The historical description information also includes: memory usage; If the timeout prediction information of the task workflow to which the target job belongs meets the preset condition, outputting the alarm information corresponding to the task workflow before the task workflow is triggered to run includes: If the timeout prediction information satisfies the preset condition, determining the memory growth information of the target data table based on multiple memory usages of the target data table within the preset time period; If the memory growth information indicates that the memory usage of the target data table maintains an increasing trend in any sub-time period within the preset time period, and the output time growth information indicates that the output time of the target data table maintains an increasing trend in any sub-time period, a first alarm message is output before the task workflow is triggered to run; the first alarm message indicates that the timeout of the task workflow is caused by an abnormal increase in the memory usage of the data table; If the output time growth information indicates that the output time of the target data table maintains an increasing trend in any sub-time period within the preset time period, and the memory growth information indicates that the memory occupancy of the target data table shows a non-increasing trend in at least one of the sub-time periods, a second alarm information is output before the task workflow is triggered to run; the second alarm information indicates that the timeout of the task workflow is caused by an abnormal increase in the output time of the data table.
6. The method according to claim 2, characterized in that The using the second sub-model to process the operation data of the target operation required by the second sub-model to obtain second prediction information includes: Obtaining job configuration information of the target job; Obtaining operation result information of multiple stages of the target job; Obtain key value distribution information of multiple data tables generated by the target job in the previous scheduling cycle; Using the second sub-model, the job configuration information, the running result information and the key-value distribution information of the target job are processed to obtain the second prediction information; wherein, the second prediction information indicates the probability of memory leakage and / or data skew in the target job.
7. The method according to claim 6, characterized in that The job configuration information includes: executor configuration, indicating the maximum number of executors allowed to apply; The operation result information includes: execution duration information, garbage collection duration information and first executor information, indicating the number of executors actually applied for during the execution of the target job; The processing of the job configuration information, the operation result information, and the key value distribution information of the target job to obtain the second prediction information includes: Based on the execution time information, first judgment information is determined; the first judgment information indicates the distribution of task execution time of multiple stages of the target job; Based on the garbage collection duration information, second judgment information is determined; the second judgment information indicates the distribution of garbage collection durations of multiple stages of the target job; Determining third judgment information based on the garbage collection duration information and the execution duration information; the third judgment information indicates the garbage collection frequency in multiple stages of the target job; Determining fourth judgment information based on the first executor information and the executor configuration; the fourth judgment information indicates a ratio between the number of executors actually applied for and the number of executors allowed to be applied for during the execution of the target job; If the timeout prediction information of the task workflow to which the target job belongs meets the preset condition, outputting the alarm information corresponding to the task workflow before the task workflow is triggered to run includes: If the first judgment information, the second judgment information, the third judgment information and the fourth judgment information meet the first condition, the third alarm information corresponding to the task workflow is output before the task workflow is triggered to run; the third alarm information indicates that the timeout of the task workflow is caused by a memory leak.
8. The method according to claim 7, characterized in that The job configuration information also includes: dynamic memory configuration; the operation result information also includes: second executor information indicating the number of idle executors; The processing of the job configuration information, the operation result information, and the key value distribution information of the target job to obtain the second prediction information includes: Based on the second executor information and the first executor information, fifth judgment information is determined; the fifth judgment information indicates the ratio between the number of idle executors and the number of actually requested executors during the execution of the target job; Performing outlier analysis on the key-value distribution information to obtain sixth decision information; the sixth decision information indicates first outliers in the plurality of data tables; Based on the execution duration information, determining seventh judgment information; the seventh judgment information indicates that there is a stage of an abnormal task in the multiple stages of the target job; the task execution duration of the abnormal task is less than or equal to a minimum execution duration threshold; Based on a duration set consisting of the same execution duration information of a plurality of the stages, determining eighth judgment information; the eighth judgment information indicates a ratio of a maximum execution duration to an average execution duration in the duration set; Performing outlier analysis on the duration set to obtain ninth decision information; the ninth decision information indicates a second outlier in the duration set; Based on the dynamic memory configuration, obtaining tenth judgment information; the tenth judgment information indicates whether the dynamic memory is in an open state; If the timeout prediction information of the task workflow to which the target job belongs meets the preset condition, outputting the alarm information corresponding to the task workflow before the task workflow is triggered to run includes: If the fifth judgment information, the sixth judgment information, the seventh judgment information, the eighth judgment information, the ninth judgment information and the tenth judgment information meet the second condition, the fourth alarm information corresponding to the task workflow is output before the task workflow is triggered to run; the fourth alarm information indicates that the timeout of the task workflow is caused by data skew.
9. The method according to claim 2, characterized in that: The using the third sub-model to process the operation data of the target operation required by the third sub-model to obtain third prediction information includes: Acquire multiple data tables generated by the target job in the previous scheduling cycle; Using the third sub-model, determining the number of target files contained in each of the data tables and the average memory size of the target files; If the timeout prediction information of the task workflow to which the target job belongs meets the preset condition, outputting the alarm information corresponding to the task workflow before the task workflow is triggered to run includes: If there is at least one data table whose number of target files is greater than a quantity threshold, and the average memory amount of the target files is less than the memory threshold, a fifth alarm message is output before the task workflow is triggered to run; the fifth alarm message indicates that the timeout of the task workflow is caused by the number of target files exceeding a preset quantity threshold.
10. An alarm device, characterized in that: The device comprises: A data screening module, used to screen out at least one target job required by the prediction model from multiple jobs that were triggered to run in the previous scheduling cycle; A prediction module, configured to predict, based on the job data of the at least one target job, timeout prediction information of the task workflow to which the target job belongs in the current scheduling cycle using a prediction model; The output module is used to output the alarm information corresponding to the task workflow before the task workflow is triggered to run if the timeout prediction information of the task workflow to which the target job belongs meets the preset conditions.
11. An alarm device, characterized in that: include: processor; a memory for storing executable instructions; The processor is configured to implement the alarm method according to any one of claims 1 to 9 when executing the executable instructions stored in the memory.
12. A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an alarm device, the alarm device is enabled to execute the alarm method according to any one of claims 1 to 9.