Skip to content

Commit f044843

Browse files
committed
Update Hive query tests and golden files to 0.13
1 parent 3a906c6 commit f044843

File tree

8,142 files changed

+37869
-47158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

8,142 files changed

+37869
-47158
lines changed

sql/hive/src/test/resources/data/conf/hive-site.xml

Lines changed: 51 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919

2020
<configuration>
2121

22+
<property>
23+
<name>hive.in.test</name>
24+
<value>true</value>
25+
<description>Internal marker for test. Used for masking env-dependent values</description>
26+
</property>
27+
2228
<!-- Hive Configuration can either be stored in this file or in the hadoop configuration files -->
2329
<!-- that are implied by Hadoop setup variables. -->
2430
<!-- Aside from Hadoop setup variables - this file is provided as a convenience so that Hive -->
@@ -28,7 +34,7 @@
2834
<!-- Hive Execution Parameters -->
2935
<property>
3036
<name>hadoop.tmp.dir</name>
31-
<value>${build.dir.hive}/test/hadoop-${user.name}</value>
37+
<value>${test.tmp.dir}/hadoop-tmp</value>
3238
<description>A base for other temporary directories.</description>
3339
</property>
3440

@@ -42,22 +48,27 @@
4248

4349
<property>
4450
<name>hive.exec.scratchdir</name>
45-
<value>${build.dir}/scratchdir</value>
51+
<value>${test.tmp.dir}/scratchdir</value>
4652
<description>Scratch space for Hive jobs</description>
4753
</property>
4854

4955
<property>
5056
<name>hive.exec.local.scratchdir</name>
51-
<value>${build.dir}/localscratchdir/</value>
57+
<value>${test.tmp.dir}/localscratchdir/</value>
5258
<description>Local scratch space for Hive jobs</description>
5359
</property>
5460

5561
<property>
5662
<name>javax.jdo.option.ConnectionURL</name>
57-
<!-- note: variable substituion not working here because it's loaded by jdo, not Hive -->
58-
<value>jdbc:derby:;databaseName=../build/test/junit_metastore_db;create=true</value>
63+
<value>jdbc:derby:;databaseName=${test.tmp.dir}/junit_metastore_db;create=true</value>
5964
</property>
6065

66+
<property>
67+
<name>hive.stats.dbconnectionstring</name>
68+
<value>jdbc:derby:;databaseName=${test.tmp.dir}/TempStatsStore;create=true</value>
69+
</property>
70+
71+
6172
<property>
6273
<name>javax.jdo.option.ConnectionDriverName</name>
6374
<value>org.apache.derby.jdbc.EmbeddedDriver</value>
@@ -82,40 +93,27 @@
8293

8394
<property>
8495
<name>hive.metastore.metadb.dir</name>
85-
<value>file://${build.dir}/test/data/metadb/</value>
96+
<value>file://${test.tmp.dir}/metadb/</value>
8697
<description>
8798
Required by metastore server or if the uris argument below is not supplied
8899
</description>
89100
</property>
90101

91102
<property>
92103
<name>test.log.dir</name>
93-
<value>${build.dir}/test/logs</value>
94-
<description></description>
95-
</property>
96-
97-
<property>
98-
<name>test.src.dir</name>
99-
<value>file://${build.dir}/src/test</value>
104+
<value>${test.tmp.dir}/log/</value>
100105
<description></description>
101106
</property>
102107

103108
<property>
104109
<name>test.data.files</name>
105-
<value>${user.dir}/../data/files</value>
106-
<description></description>
107-
</property>
108-
109-
<property>
110-
<name>test.query.file1</name>
111-
<value>file://${user.dir}/../ql/src/test/org/apache/hadoop/hive/ql/input2.q</value>
112-
<value></value>
110+
<value>${hive.root}/data/files</value>
113111
<description></description>
114112
</property>
115113

116114
<property>
117115
<name>hive.jar.path</name>
118-
<value>${build.dir.hive}/ql/hive-exec-${version}.jar</value>
116+
<value>${maven.local.repository}/org/apache/hive/hive-exec/${hive.version}/hive-exec-${hive.version}.jar</value>
119117
<description></description>
120118
</property>
121119

@@ -127,7 +125,7 @@
127125

128126
<property>
129127
<name>hive.querylog.location</name>
130-
<value>${build.dir}/tmp</value>
128+
<value>${test.tmp.dir}/tmp</value>
131129
<description>Location of the structured hive logs</description>
132130
</property>
133131

@@ -143,18 +141,25 @@
143141
<description>Post Execute Hook for Tests</description>
144142
</property>
145143

146-
<property>
147-
<name>hive.task.progress</name>
148-
<value>false</value>
149-
<description>Track progress of a task</description>
150-
</property>
151-
152144
<property>
153145
<name>hive.support.concurrency</name>
154146
<value>true</value>
155147
<description>Whether hive supports concurrency or not. A zookeeper instance must be up and running for the default hive lock manager to support read-write locks.</description>
156148
</property>
157149

150+
<property>
151+
<key>hive.unlock.numretries</key>
152+
<value>2</value>
153+
<description>The number of times you want to retry to do one unlock</description>
154+
</property>
155+
156+
<property>
157+
<key>hive.lock.sleep.between.retries</key>
158+
<value>2</value>
159+
<description>The sleep time (in seconds) between various retries</description>
160+
</property>
161+
162+
158163
<property>
159164
<name>fs.pfile.impl</name>
160165
<value>org.apache.hadoop.fs.ProxyLocalFileSystem</value>
@@ -194,4 +199,21 @@
194199
<description>The default SerDe hive will use for the rcfile format</description>
195200
</property>
196201

202+
<property>
203+
<name>hive.stats.dbclass</name>
204+
<value>jdbc:derby</value>
205+
<description>The storage for temporary stats generated by tasks. Currently, jdbc, hbase and counter types are supported</description>
206+
</property>
207+
208+
<property>
209+
<name>hive.stats.key.prefix.reserve.length</name>
210+
<value>0</value>
211+
</property>
212+
213+
<property>
214+
<name>hive.conf.restricted.list</name>
215+
<value>dummy.config.value</value>
216+
<description>Using dummy config value above because you cannot override config with empty value</description>
217+
</property>
218+
197219
</configuration>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
+-----+-------+
2+
| id | name |
3+
+-----+-------+
4+
| 1 | aaa |
5+
| 2 | bbb |
6+
| 3 | ccc |
7+
| 4 | ddd |
8+
| 5 | eee |
9+
+-----+-------+
10+
+-------+-----+
11+
| name | id |
12+
+-------+-----+
13+
| aaa | 1 |
14+
| bbb | 2 |
15+
+-------+-----+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
true|10|100|1000|10000|4.0|20.0|2.2222|1969-12-31 15:59:58.174|1970-01-01 00:00:00|hello|hello|k1:v1,k2:v2|100,200|{10, "foo"}
2+
true|20|200|2000|20000|8.0|40.0|4.2222|1970-12-31 15:59:58.174|1971-01-01 00:00:00|||k3:v3,k4:v4|200,300|{20, "bar"}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
true|10|100|1000|10000|4.0|20.0|4.2222|1969-12-31 15:59:58.174|1970-01-01|string|hello|hello|k1:v1,k2:v2|100,200|{10, "foo"}
2+
false|20|200|2000|20000|8.0|40.0|2.2222|1970-12-31 15:59:58.174|1971-01-01|abcd|world|world|k3:v3,k4:v4|200,300|{20, "bar"}
368 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
47.3224 2923.29346
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N
2-
-1false-1.1\N\N\N-1-1-1.0-1\N\N\N\N\N\N\N
3-
1true1.11121x2ykva92.2111.01abcd1111213142212212x1abcd22012-04-22 09:00:00.123456789123456789.0123456YWJjZA==2013-01-01abc123
1+
\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N
2+
-1false-1.1\N\N\N-1-1-1.0-1\N\N\N\N\N\N\N\N
3+
1true1.11121x2ykva92.2111.01abcd1111213142212212x1abcd22012-04-22 09:00:00.123456789123456789.0123456YWJjZA==2013-01-01abc123abc123X'01FF'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
55.33
2+
44.2
3+
435.33
4+
324.33
5+
324.33
6+
44.2
7+
55.3
8+
55.3
9+
0.0
10+
11+
66.4
12+
23.22
13+
-87.2
14+
15+
33.44
16+
55.3
17+
435.331
18+
-0.342
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
31|sales
2+
33|engineering
3+
34|clerical
4+
35|marketing
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Rafferty|31
2+
Jones|33
3+
Steinberg|33
4+
Robinson|34
5+
Smith|34
6+
John|

0 commit comments

Comments
 (0)