当前位置:网站首页>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
边栏推荐
- D3js notes
- Bumblebee: build, deliver, and run ebpf programs smoothly like silk
- spoon插入更新oracle数据库,插了一部分提示报错Assertion botch: negative time
- Why are there fewer and fewer good products produced by big Internet companies such as Tencent and Alibaba?
- Design and practice of kubernetes cluster and application monitoring scheme
- Unpool(nn.MaxUnpool2d)
- LeetCode --- 1071. Great common divisor of strings problem solving Report
- 端口,域名,协议。
- Character painting, I use characters to draw a Bing Dwen Dwen
- Structure of ViewModel
猜你喜欢
Why are there fewer and fewer good products produced by big Internet companies such as Tencent and Alibaba?
ELFK部署
端口,域名,协议。
Introduce reflow & repaint, and how to optimize it?
El select, El option drop-down selection box
TCP security of network security foundation
Application and Optimization Practice of redis in vivo push platform
Exploration of short text analysis in the field of medical and health (II)
Open source SPL optimized report application coping endlessly
Marubeni Baidu applet detailed configuration tutorial, approved.
随机推荐
【LeetCode】106. Construct binary tree from middle order and post order traversal sequence (wrong question 2)
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
SFTP cannot connect to the server # yyds dry goods inventory #
CAM Pytorch
Exploration of short text analysis in the field of medical and health (II)
Which common ports should the server open
打破信息茧房-我主动获取信息的方法 -#3
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
【LeetCode】501. Mode in binary search tree (2 wrong questions)
Marubeni Baidu applet detailed configuration tutorial, approved.
Serious bugs with lifted/nullable conversions from int, allowing conversion from decimal
端口,域名,协议。
Leetcode takes out the least number of magic beans
Apache build web host
Redis distributed lock, lock code logic
College Students' innovation project management system
Kotlin - 协程 Coroutine
Application and Optimization Practice of redis in vivo push platform
TCP security of network security foundation
2021 Li Hongyi machine learning (3): what if neural network training fails