当前位置:网站首页>Oozie integrated sqoop
Oozie integrated sqoop
2022-07-19 02:05:00 【sun_ xo】
1) modify yarn to avoid workflow hang
$ cd ~/work/hadoop/etc/hadoop
$ diff -u yarn-site.xml.orig yarn-site.xml
--- yarn-site.xml.orig 2022-06-21 14:44:21.000000000 +0800
+++ yarn-site.xml 2022-06-29 16:03:34.000000000 +0800
@@ -29,4 +29,8 @@
<name>yarn.log-aggregation.retain-seconds</name>
<value>604800</value>
</property>
+ <property>
+ <name>yarn.resourcemanager.scheduler.class</name>
+ <value>org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler</value>
+ </property>
</configuration>2) prepare the case
$ cd ~/work/oozie-5.2.1
$ tree oozie/apps/sqoop_import
oozie/apps/sqoop_import
├── job.properties
├── lib
│ └── mysql-connector-java-8.0.28.jar
└── workflow.xm$ cat oozie/apps/sqoop_import/job.properties
nameNode=hdfs://localhost:9000
resourceManager=localhost:8032
queueName=default
oozieRoot=user/${user.name}/oozie
oozie.use.system.libpath=true
oozie.wf.application.path=${nameNode}/${oozieRoot}/apps/sqoop_import
outputDir=data/sqoop_import/output$ cat oozie/apps/sqoop_import/workflow.xml
<workflow-app xmlns="uri:oozie:workflow:1.0" name="sqoop-wf">
<start to="sqoop-node"/>
<action name="sqoop-node">
<sqoop xmlns="uri:oozie:sqoop-action:1.0">
<resource-manager>${resourceManager}</resource-manager>
<name-node>${nameNode}</name-node>
<prepare>
<delete path="${nameNode}/${oozieRoot}/${outputDir}"/>
</prepare>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
</configuration>
<arg>import</arg>
<arg>--connect</arg>
<arg>jdbc:mysql://localhost:3306/manga</arg>
<arg>--username</arg>
<arg>manga</arg>
<arg>--password</arg>
<arg>manga</arg>
<arg>--table</arg>
<arg>fruit</arg>
<arg>--target-dir</arg>
<arg>/${oozieRoot}/${outputDir}</arg>
<arg>-m</arg>
<arg>1</arg>
</sqoop>
<ok to="end"/>
<error to="fail"/>
</action>
<kill name="fail">
<message>Sqoop failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>3) upload to hdfs
$ hdfs dfs -put oozie/apps/sqoop_import oozie/apps/
4) run and check
$ bin/oozie job -config oozie/apps/sqoop_import/job.properties -run
job: 0000000-220629212524491-oozie-sun_-W
~/work/oozie-5.2.1$ bin/oozie job -info 0000000-220629212524491-oozie-sun_-W
Job ID : 0000000-220629212524491-oozie-sun_-W
------------------------------------------------------------------------------------------------------------------------------------
Workflow Name : sqoop-wf
App Path : hdfs://localhost:9000/user/sun_xo/oozie/apps/sqoop_import
Status : SUCCEEDED
Run : 0
User : sun_xo
Group : -
Created : 2022-06-29 13:27 GMT
Started : 2022-06-29 13:27 GMT
Last Modified : 2022-06-29 13:27 GMT
Ended : 2022-06-29 13:27 GMT
CoordAction ID: -
Actions
------------------------------------------------------------------------------------------------------------------------------------
ID Status Ext ID Ext Status Err Code
------------------------------------------------------------------------------------------------------------------------------------
[email protected]:start: OK - OK -
------------------------------------------------------------------------------------------------------------------------------------
[email protected] OK application_1656509094029_0001SUCCEEDED -
------------------------------------------------------------------------------------------------------------------------------------
[email protected] OK - OK -
------------------------------------------------------------------------------------------------------------------------------------Note: Oozie application logs can be found under hdfs://localhost:9000/tmp/${user.name}/logs/, which is very useful in troubleshooting
...
Oozie Launcher Application Master configuration
===============================================
Workflow job id : 0000000-220629212524491-oozie-sun_-W
Workflow action id: [email protected]
...边栏推荐
- 利用因果线性模型监测不公平A Causal Linear Model to Quantify Edge Unfairness for Unfair Edge Prioritization
- Uncaught syntaxerror: unexpected token '< is reported on the blank page of the H5 uniapp package‘
- openGauss Developer Day 2022|东方通诚邀您莅临“东方通生态工具分论坛”
- The following packages have unmet dependencies: deepin. com. wechat:i386 : Depends: deepin-wine:i386
- 搭建map-reduce开发环境
- ROC 曲线讲解 (Receiver Operarating Curve)
- 集成学习
- Fairness in Semi-supervised Learning: Unlabeled Data Help to Reduce Discrimination
- 【萌新解题】三数之和
- Oozie 集成 Sqoop
猜你喜欢

MATLAB :Warning: the font “Times” is not available

利用因果线性模型监测不公平A Causal Linear Model to Quantify Edge Unfairness for Unfair Edge Prioritization

Détection de bord de deuxième ordre laplacien de guassian Gaussian laplacien Operator

Can protocol communication

Fisher线性判别分析Fisher Linear Distrimination

IGBT 直通短路过程问题分析

Owl Eyes: Spotting UI Display Issues via Visual Understanding

06基于STM32的智能电子药盒设计

高斯分布的性质(含代码)

二階邊緣檢測 - Laplacian of Guassian 高斯拉普拉斯算子
随机推荐
Differences between saber PSPICE Simulink power supply simulation software
JS practical tips
Handling conditional discrimination
[literature reading] isl: an integer set library for the polygonal model
One vs One Mitigation of Intersectional Bias
浏览器无法打开Tensorboard
Characteristics and application points of electrolytic capacitor
openGauss Developer Day 2022|东方通诚邀您莅临“东方通生态工具分论坛”
Fisher线性判别分析Fisher Linear Distrimination
递推与递归学习笔记
Allegro Design Entry CIS 和 Orcad Capture CIS 关系
【pycharm】Cannot find reference ‘XXX‘ in ‘__ init__. Py 'solution
静态库与动态库
[go language] detailed explanation of dynamic library and static library
搭建Spark on yarn环境
gdb+vscode进行调试7——程序出现segmentation default/段错误,如何进行调试?
Monitor browser return operation - prohibit returning to the previous page
Détection de bord de deuxième ordre laplacien de guassian Gaussian laplacien Operator
动手学深度学习--线性神经网络篇
[literature reading] counting integer points in parametric polymers using barvinok's rational functions