· 10 years ago · May 26, 2016, 01:09 PM
1use test;
2
3create external table if not exists customer(customer_id int,name string,address string)row format delimited fields terminated by ',';
4
5load data inpath /sqoop_import_increment into table customer;
6
7<workflow-app name="hive_script" xmlns="uri:oozie:workflow:0.5">
8 <start to="hive-4327"/>
9 <kill name="Kill">
10 <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
11 </kill>
12 <action name="hive-4327" cred="hcat">
13 <hive xmlns="uri:oozie:hive-action:0.2">
14 <job-tracker>${jobTracker}</job-tracker>
15 <name-node>${nameNode}</name-node>
16 <job-xml>lib/hive-config.xml</job-xml>
17 <script>lib/impala-script.hql</script>
18 </hive>
19 <ok to="End"/>
20 <error to="Kill"/>
21 </action>
22 <end name="End"/>
23</workflow-app>
24
25oozie.use.system.libpath=True
26security_enabled=False
27dryrun=False
28jobTracker=localhost:8032
29nameNode=hdfs://quickstart.cloudera:8020
30
31<?xml version="1.0"?>
32<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
33
34<configuration>
35
36 <!-- Hive Configuration can either be stored in this file or in the hadoop configuration files -->
37 <!-- that are implied by Hadoop setup variables. -->
38 <!-- Aside from Hadoop setup variables - this file is provided as a convenience so that Hive -->
39 <!-- users do not have to edit hadoop configuration files (that may be managed as a centralized -->
40 <!-- resource). -->
41
42 <!-- Hive Execution Parameters -->
43
44 <property>
45 <name>javax.jdo.option.ConnectionURL</name>
46 <value>jdbc:mysql://127.0.0.1/metastore?createDatabaseIfNotExist=true</value>
47 <description>JDBC connect string for a JDBC metastore</description>
48 </property>
49
50 <property>
51 <name>javax.jdo.option.ConnectionDriverName</name>
52 <value>com.mysql.jdbc.Driver</value>
53 <description>Driver class name for a JDBC metastore</description>
54 </property>
55
56 <property>
57 <name>javax.jdo.option.ConnectionUserName</name>
58 <value>hive</value>
59 </property>
60
61 <property>
62 <name>javax.jdo.option.ConnectionPassword</name>
63 <value>cloudera</value>
64 </property>
65
66 <property>
67 <name>hive.hwi.war.file</name>
68 <value>/usr/lib/hive/lib/hive-hwi-0.8.1-cdh4.0.0.jar</value>
69 <description>This is the WAR file with the jsp content for Hive Web Interface</description>
70 </property>
71
72 <property>
73 <name>datanucleus.fixedDatastore</name>
74 <value>true</value>
75 </property>
76
77 <property>
78 <name>datanucleus.autoCreateSchema</name>
79 <value>false</value>
80 </property>
81
82 <property>
83 <name>hive.metastore.uris</name>
84 <value>thrift://127.0.0.1:9083</value>
85 <description>IP address (or fully-qualified domain name) and port of the metastore host</description>
86 </property>
87</configuration>