azkaban plugin在cdh cloudera环境下的配置之 jobtype插件

复制编译后的jobtype到exec服务的插件下,

cp dist/jobtype/packages/azkaban-jobtype-${git.tag}.tar.gz
/home/app/azkaban/azkaban-exec-server/plugins/jobtypes
cd /home/app/azkaban/azkaban-exec-server/plugins/jobtypes
tar -zxvf azkaban-jobtype-${git.tag}.tar.gz
解压之后将azkaban-jobtype-${git.tag}目录下的内容移动到/home/app/azkaban/azkaban-exec-server/plugins/jobtypes目录,然后rm -rf azkaban-jobtype-${git.tag}

2.在/home/app/azkaban/azkaban-exec-server/conf/azkaban.properties配置文件里增加一行语句:

azkaban.jobtype.plugin.dir=plugins/jobtypes

3.vim plugins/jobtypes/common.properties

## everything that the user job can know
##配置hadoop、hive、spark home
hadoop.home=/home/app/hadoop-2.7.2
hive.home=/home/app/hive-2.1.1
#pig.home=
spark.home=/home/app/spark2.1

azkaban.should.proxy=false

4.vim plugins/jobtypes/commonprivate.properties

## hadoop security manager setting common to all hadoop jobs
hadoop.security.manager.class=azkaban.security.HadoopSecurityManager_H_2_0

## hadoop security related settings

# proxy.keytab.location=
# proxy.user=

# azkaban.should.proxy=true
 azkaban.should.proxy=false
# obtain.binary.token=true
 obtain.binary.token=false
# obtain.namenode.token=true
# obtain.jobtracker.token=true

# global classpath items for all jobs. e.g. hadoop-core jar, hadoop conf
#jobtype.global.classpath=${hadoop.home}/*,${hadoop.home}/conf
# global jvm args for all jobs. e.g. java.io.temp.dir, java.library.path
#jobtype.global.jvm.args=

# hadoop
#hadoop.home=/home/app/hadoop-2.7.2
#pig.home=
hadoop.home=/home/app/hadoop-2.7.2
hive.home=/home/app/hive-2.1.1
#hive.home=
spark.home=/home/app/spark2.1
hadoop.classpath=${hadoop.home}/etc/hadoop,${hadoop.home}/share/hadoop/common/*,${hadoop.home}/share/hadoop/common/lib/*,${hadoop.home}/share/hadoop/hdfs/*,${hadoop.home}/share/hadoop/hdfs/lib/*,${hadoop.home}/share/hadoop/yarn/*,${hadoop.home}/share/hadoop/yarn/lib/*,${hadoop.home}/share/hadoop/mapreduce/*,${hadoop.home}/share/hadoop/mapreduce/lib/*
jobtype.global.classpath=${hadoop.home}/etc/hadoop,${hadoop.home}/share/hadoop/common/*,${hadoop.home}/share/hadoop/common/lib/*,${hadoop.home}/share/hadoop/hdfs/*,${hadoop.home}/share/hadoop/hdfs/lib/*,${hadoop.home}/share/hadoop/yarn/*,${hadoop.home}/share/hadoop/yarn/lib/*,${hadoop.home}/share/hadoop/mapreduce/*,${hadoop.home}/share/hadoop/mapreduce/lib/*
# configs for jobtype security settings
execute.as.user=tru

5.复制一份azkaban-jobtype-${git.tag}.jar到azkaban-exec-server/extlib目录下

6.由于使用 azkaban.security.HadoopSecurityManager_H_2_0, 故将plugins/jobtypes/下的 hadoopsecurity.jar 替换成 azkban-hadoopsecuritymanageryarn-3.0.0.jar

你可能感兴趣的:(azkaban)