Oozie command line common command summary.
Sometimes, when the script runs too much, you are reluctant to view the script running status on oozieweb. Fortunately, oozie provides many command line commands. You can use the command line to directly retrieve the script information you want to see. Here is a brief summary. Generally, they are commonly used every day.
1. Suspend a job: oozie job-suspend [jobid]
Oozie job-suspend ipv244-140909170015500-oozie-hado-w
2. Restore the suspended job: oozie job-resume [jobid]
Oozie job-resume running 244-140909170015500-oozie-hado-w
These two commands are applicable when the script is paused.
3. Submit a job to oozie (if it is not run, it will be in the prep state if all running conditions are met after it is submitted): oozie job-config./job. properties-submit
Oozie job-config./job. properties-submit
4. Start the job submitted to oozie: oozie job-start [jobid]
Oozie job-start0000258-140909170015500-oozie-hado-W
These two commands are also a group. Eg: Some scripts operate on data in the database, but the data is delayed for some reason, you can submit the script first. Then restart after the data arrives.
5. verify the correctness of the configuration file: oozie validate./workflow. XML (Coordinator. XML)
Oozie validate workflow. xml
This command can only detect configuration files in XML format. Errors in job. properties cannot be verified. To verify the correctness of the three configuration files, run the following command.
6. Pre-check command: oozie job-config./job. properties-dryrun
Oozie job-config./job. properties-dryrun
Add an rerun command: oozie job-rerun [jobid]-Action 1
Oozie job-rerun0000001-140909170015500-oozie-hado-C-Action 1
The rerun command can be used to re-run a batch of coordinator. -The parameter following the action indicates that the first batch in Coordinator scheduling is re-run.
PS: when using the rerun command, some identification folders I created on HDFS (empty folders mainly use these folders to indicate whether the script is running successfully) it is often inexplicably deleted. The specific cause is not found many times. Later I suspected it was the reason for using the rerun command. Oozie may recover the external environment of the script when running the rerun command. This is just a consideration, and no relevant documentation has been found. If you have any questions, please let me know. Or discuss with me [email protected] ^-^
7. view the job log: oozie job-log [jobid]
Oozie job-log 487145-140909170015500-oozie-hado-w
This command is rarely used. After all, the log here is a transactional log. If there is a problem, go to the machine that runs the job to capture logs.
8. view the workflow. XML definition of a job: oozie job-Definition [jobid]
Oozie job-definition0000244-140909170015500-oozie-hado-W
9. View job: oozie jobs-jobtype WF (Coordinator) based on the job type)
Oozie jobs-jobtype Wf
10. Use the filter to view the job: oozie jobs-filter <Arg> User = <u>; name = <n>; Group = <G>; status = <S>;
Oozie jobs-filter user = hadoop; name = LiMingji-2b; status = succeeded
This command is the most commonly used command. In this way, you can use this command to filter out successfully executed jobs every day. Let's focus on failed jobs. Then locate the problem.
This command can be combined with other commands. For example:
Oozie jobs-localtime-Len 2-filter status = succeeded
The remaining commands are not very useful. For example, the commands for viewing oozie version are not listed here.
If you still have some common commands that LZ hasn't mentioned, please add them. [Email protected]
|
Li Xiaoji Dongxin beiyou/data business Product center/Business Intelligence Department Phone: 18001214581 Phone: [email protected] 7-9, Kun Xun building, No. 9 Zhichun Road, Haidian District, Beijing |
Oozie common command line commands of oozie