当前位置:网站首页>Azkaban actual combat
Azkaban actual combat
2022-07-05 02:46:00 【A vegetable chicken that is working hard】
A single job Case study
1. establish job Description file
- vim job1.job
#first.job
type=command
command=echo 'this is my first job'
2. take job Resource files are packaged into zip file
- install zip,unzip command
yum install -y unzip zip
- Compress
zip job1.zip job1.job
- Azkaban Uploaded workflow file Only support xxx.zip file ,zip Should include xxx.job Files and any files needed to run the job ( file name The suffix must be .job, Otherwise, I can't recognize ), The job name must be unique in the project
3. adopt azkaban Of web Management platform creation project And upload job Of zip package
- establish project
- Upload zip package
- Start execution of the job
- Job Successful implementation
- Click to see job journal
many job Workflow case
1. establish job Description file
- first job:start.job
vim start.job
#start.job
type=command
command=touch /usr/local/azkaban/jobs/t2test.txt
- the second job:step1.job rely on start.job
vim step1.job
#step1.job
type=command
dependencies=start
command=echo "this is step1 job"
- Third job:step2.job rely on start.job
vim step2.job
#step2.job
type=command
dependencies=start
command=echo "this is step2 job"
- The fourth one job:finish.job rely on step1.job and step2.job
vim finish.job
#finish.job
type=command
dependencies=step1,step2
command=echo "this is finish job"
2. take job Resource files are packaged into zip file
- zip jobs.zip start.job step1.job step2.job finish.job
3. adopt azkaban Of web Management platform creation project And upload job Of zip package
Java Operational tasks
1. To write java Program
import java.io.FileOutputStream;
import java.io.IOException;
public class AzkabanTest {
public void run() throws IOException {
FileOutputStream fos = new FileOutputStream("/usr/local/azkaban/t3test.txt");
fos.write("this is a java progress".getBytes());
fos.close();
}
public static void main(String[] args) throws IOException {
AzkabanTest azkabanTest = new AzkabanTest();
azkabanTest.run();
}
}
2.java The program is written as jar
- Generate class file
- jar -cvf AzkabanTest.jar AzkabanTest.class
- Move to linux Inside
- A test run
java -jar AzkabanTest.jar
3. To write job
- vim java.job
type=javaprocess
java.class=AzkabanTest
classpath=/usr/local/azkaban/jobs/t3/jar/*
4. take job become involved zip
- zip java.zip java.job
5.web operation
HDFS Operational tasks
1. establish job Description file
- vim fs.job
type=command
command=/usr/local/hadoop-2.7.1/bin/hadoop fs -mkdir /azkaban
2. take job Resource files are packaged into zip file
zip fs.zip fs.job
3.web operation
MapReduce Mission
1. establish job Description file
- vim mapreduce.job
#mapreduce job
type=command
command=/usr/local/hadoop-2.7.1/bin/hadoop jar /usr/local/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar wordcount /wordcountinput /wordcountinputazkaban
2. take job Resource files are packaged into zip file
zip mapreduce.zip mapreduce.job
3.web operation
边栏推荐
- 【LeetCode】501. Mode in binary search tree (2 wrong questions)
- Marubeni Baidu applet detailed configuration tutorial, approved.
- openresty ngx_lua執行階段
- Vb+access hotel service management system
- Yolov5 model training and detection
- 使用druid連接MySQL數據庫報類型錯誤
- Bumblebee: build, deliver, and run ebpf programs smoothly like silk
- qrcode:将文本生成二维码
- Asp+access campus network goods trading platform
- Design and implementation of community hospital information system
猜你喜欢
Design and implementation of high availability website architecture
Hmi-31- [motion mode] solve the problem of picture display of music module
【LeetCode】110. Balanced binary tree (2 brushes of wrong questions)
Sqoop命令
Android advanced interview question record in 2022
Exploration of short text analysis in the field of medical and health (I)
单项框 复选框
Chinese natural language processing, medical, legal and other public data sets, sorting and sharing
Vb+access hotel service management system
Elfk deployment
随机推荐
Naacl 2021 | contrastive learning sweeping text clustering task
The most powerful new household god card of Bank of communications. Apply to earn 2100 yuan. Hurry up if you haven't applied!
腾讯云,实现图片上传
Six stone programming: advantages of automated testing
Privatization lightweight continuous integration deployment scheme -- 01 environment configuration (Part 1)
【LeetCode】111. Minimum depth of binary tree (2 brushes of wrong questions)
Sqoop命令
Single box check box
Simple use of devtools
Blue bridge - maximum common divisor and minimum common multiple
单项框 复选框
Asynchronous and promise
Hmi-30- [motion mode] the module on the right side of the instrument starts to write
2021 Li Hongyi machine learning (1): basic concepts
[micro service SCG] 33 usages of filters
Cut! 39 year old Ali P9, saved 150million
Tencent cloud, realize image upload
【LeetCode】404. Sum of left leaves (2 brushes of wrong questions)
spoon插入更新oracle数据库,插了一部分提示报错Assertion botch: negative time
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety