You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by br...@apache.org on 2013/10/24 15:42:35 UTC
svn commit: r1535378 [1/5] - in /hive/branches/maven: ./ ant/ beeline/ cli/
common/ contrib/ data/conf/ data/files/ hbase-handler/
hbase-handler/src/test/queries/negative/ hcatalog/ hcatalog/core/
hcatalog/core/src/main/java/org/apache/hcatalog/mapredu...
Author: brock
Date: Thu Oct 24 13:42:32 2013
New Revision: 1535378
URL: http://svn.apache.org/r1535378
Log:
HIVE-5566 - Milestone 6: All tests pass under hadoop 1
Added:
hive/branches/maven/itests/custom-serde/
hive/branches/maven/itests/custom-serde/pom.xml
hive/branches/maven/itests/hcatalog-unit/
hive/branches/maven/itests/hcatalog-unit/pom.xml
hive/branches/maven/itests/hive-unit/
hive/branches/maven/itests/hive-unit/pom.xml
hive/branches/maven/itests/test-serde/
hive/branches/maven/itests/test-serde/pom.xml
hive/branches/maven/ql/.gitignore
hive/branches/maven/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFBridge.java
Removed:
hive/branches/maven/itests/unit/pom.xml
hive/branches/maven/packaging/exec/pom.xml
hive/branches/maven/packaging/exec/src/assembly/execjar.xml
hive/branches/maven/packaging/internal/pom.xml
hive/branches/maven/packaging/internal/src/assembly/assembly/testudf.xml
hive/branches/maven/packaging/internal/src/assembly/customserde.xml
hive/branches/maven/packaging/internal/src/assembly/testserde.xml
hive/branches/maven/packaging/internal/src/assembly/testudf.xml
hive/branches/maven/ql/src/test/queries/clientnegative/udfnull.q
hive/branches/maven/ql/src/test/results/clientnegative/udfnull.q.out
hive/branches/maven/testutils/build
Modified:
hive/branches/maven/ant/pom.xml
hive/branches/maven/beeline/pom.xml
hive/branches/maven/cli/pom.xml
hive/branches/maven/common/pom.xml
hive/branches/maven/contrib/pom.xml
hive/branches/maven/data/conf/hive-site-new.xml
hive/branches/maven/data/files/symlink1.txt
hive/branches/maven/data/files/symlink2.txt
hive/branches/maven/hbase-handler/pom.xml
hive/branches/maven/hbase-handler/src/test/queries/negative/cascade_dbdrop_hadoop20.q
hive/branches/maven/hcatalog/core/pom-new.xml
hive/branches/maven/hcatalog/core/src/main/java/org/apache/hcatalog/mapreduce/FileOutputCommitterContainer.java
hive/branches/maven/hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestHCatMultiOutputFormat.java
hive/branches/maven/hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestHCatPartitionPublish.java
hive/branches/maven/hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestPassProperties.java
hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/MiniCluster.java
hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatMultiOutputFormat.java
hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatPartitionPublish.java
hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestPassProperties.java
hive/branches/maven/hcatalog/hcatalog-pig-adapter/pom-new.xml
hive/branches/maven/hcatalog/pom-new.xml
hive/branches/maven/hcatalog/server-extensions/pom-new.xml
hive/branches/maven/hcatalog/storage-handlers/hbase/pom-new.xml
hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/SkeletonHBaseTest.java
hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseBulkOutputFormat.java
hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseDirectOutputFormat.java
hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseHCatStorageHandler.java
hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHCatHBaseInputFormat.java
hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestSnapshots.java
hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestIDGenerator.java
hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestRevisionManager.java
hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestRevisionManagerEndpoint.java
hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestZNodeSetUp.java
hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/TestPigHBaseStorageHandler.java
hive/branches/maven/hcatalog/webhcat/java-client/pom-new.xml
hive/branches/maven/hcatalog/webhcat/java-client/src/test/java/org/apache/hcatalog/api/TestHCatClient.java
hive/branches/maven/hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/TestHCatClient.java
hive/branches/maven/hcatalog/webhcat/svr/pom-new.xml
hive/branches/maven/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/HcatDelegator.java
hive/branches/maven/hcatalog/webhcat/svr/src/test/java/org/apache/hive/hcatalog/templeton/TestWebHCatE2e.java
hive/branches/maven/hcatalog/webhcat/svr/src/test/java/org/apache/hive/hcatalog/templeton/tool/TestJobIDParser.java
hive/branches/maven/hwi/pom.xml
hive/branches/maven/itests/pom.xml
hive/branches/maven/itests/qtest/pom.xml
hive/branches/maven/itests/util/pom.xml
hive/branches/maven/jdbc/pom.xml
hive/branches/maven/maven-rollback.sh
hive/branches/maven/maven-rollforward.sh
hive/branches/maven/metastore/pom.xml
hive/branches/maven/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
hive/branches/maven/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java
hive/branches/maven/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
hive/branches/maven/metastore/src/test/org/apache/hadoop/hive/metastore/TestMarkPartitionRemote.java
hive/branches/maven/packaging/pom.xml
hive/branches/maven/pom.xml
hive/branches/maven/ql/pom.xml
hive/branches/maven/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
hive/branches/maven/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBridge.java
hive/branches/maven/ql/src/test/org/apache/hadoop/hive/ql/BaseTestQueries.java
hive/branches/maven/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java
hive/branches/maven/ql/src/test/org/apache/hadoop/hive/ql/TestLocationQueries.java
hive/branches/maven/ql/src/test/org/apache/hadoop/hive/ql/TestMTQueries.java
hive/branches/maven/ql/src/test/queries/clientnegative/compute_stats_long.q
hive/branches/maven/ql/src/test/queries/clientnegative/deletejar.q
hive/branches/maven/ql/src/test/queries/clientnegative/invalid_columns.q
hive/branches/maven/ql/src/test/queries/clientnegative/windowing_ll_no_neg.q
hive/branches/maven/ql/src/test/queries/clientpositive/alter1.q
hive/branches/maven/ql/src/test/queries/clientpositive/create_like.q
hive/branches/maven/ql/src/test/queries/clientpositive/custom_input_output_format.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_00_nonpart_empty.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_01_nonpart.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_02_00_part_empty.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_02_part.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_03_nonpart_over_compat.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_04_all_part.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_04_evolved_parts.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_05_some_part.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_06_one_part.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_07_all_part_over_nonoverlap.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_08_nonpart_rename.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_09_part_spec_nonoverlap.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_10_external_managed.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_11_managed_external.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_13_managed_location.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_14_managed_location_over_existing.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_15_external_part.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_16_part_external.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_17_part_managed.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_18_part_external.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_19_00_part_external_location.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_19_part_external_location.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_20_part_managed_location.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_21_export_authsuccess.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_22_import_exist_authsuccess.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_23_import_part_authsuccess.q
hive/branches/maven/ql/src/test/queries/clientpositive/exim_24_import_nonexist_authsuccess.q
hive/branches/maven/ql/src/test/queries/clientpositive/input16.q
hive/branches/maven/ql/src/test/queries/clientpositive/input16_cc.q
hive/branches/maven/ql/src/test/queries/clientpositive/input44.q
hive/branches/maven/ql/src/test/queries/clientpositive/input45.q
hive/branches/maven/ql/src/test/queries/clientpositive/partition_wise_fileformat17.q
hive/branches/maven/ql/src/test/queries/clientpositive/partition_wise_fileformat18.q
hive/branches/maven/ql/src/test/queries/clientpositive/ptf_matchpath.q
hive/branches/maven/ql/src/test/queries/clientpositive/repair.q
hive/branches/maven/ql/src/test/queries/clientpositive/scriptfile1.q
hive/branches/maven/ql/src/test/queries/clientpositive/set_processor_namespaces.q
hive/branches/maven/ql/src/test/queries/clientpositive/stats_noscan_2.q
hive/branches/maven/ql/src/test/queries/clientpositive/symlink_text_input_format.q
hive/branches/maven/ql/src/test/queries/clientpositive/udtf_posexplode.q
hive/branches/maven/ql/src/test/results/clientnegative/alter_concatenate_indexed_table.q.out
hive/branches/maven/ql/src/test/results/clientnegative/alter_partition_invalidspec.q.out
hive/branches/maven/ql/src/test/results/clientnegative/alter_partition_nodrop.q.out
hive/branches/maven/ql/src/test/results/clientnegative/alter_partition_nodrop_table.q.out
hive/branches/maven/ql/src/test/results/clientnegative/alter_partition_offline.q.out
hive/branches/maven/ql/src/test/results/clientnegative/alter_rename_partition_failure.q.out
hive/branches/maven/ql/src/test/results/clientnegative/alter_rename_partition_failure2.q.out
hive/branches/maven/ql/src/test/results/clientnegative/alter_rename_partition_failure3.q.out
hive/branches/maven/ql/src/test/results/clientnegative/archive_corrupt.q.out
hive/branches/maven/ql/src/test/results/clientnegative/bucket_mapjoin_mismatch1.q.out
hive/branches/maven/ql/src/test/results/clientnegative/bucket_mapjoin_wrong_table_metadata_1.q.out
hive/branches/maven/ql/src/test/results/clientnegative/bucket_mapjoin_wrong_table_metadata_2.q.out
hive/branches/maven/ql/src/test/results/clientnegative/columnstats_partlvl_dp.q.out
hive/branches/maven/ql/src/test/results/clientnegative/columnstats_partlvl_incorrect_num_keys.q.out
hive/branches/maven/ql/src/test/results/clientnegative/columnstats_partlvl_invalid_values.q.out
hive/branches/maven/ql/src/test/results/clientnegative/columnstats_partlvl_multiple_part_clause.q.out
hive/branches/maven/ql/src/test/results/clientnegative/columnstats_tbllvl.q.out
hive/branches/maven/ql/src/test/results/clientnegative/columnstats_tbllvl_complex_type.q.out
hive/branches/maven/ql/src/test/results/clientnegative/columnstats_tbllvl_incorrect_column.q.out
hive/branches/maven/ql/src/test/results/clientnegative/compute_stats_long.q.out
hive/branches/maven/ql/src/test/results/clientnegative/dynamic_partitions_with_whitelist.q.out
hive/branches/maven/ql/src/test/results/clientnegative/fetchtask_ioexception.q.out
hive/branches/maven/ql/src/test/results/clientnegative/insertover_dynapart_ifnotexists.q.out
hive/branches/maven/ql/src/test/results/clientnegative/load_wrong_fileformat.q.out
hive/branches/maven/ql/src/test/results/clientnegative/load_wrong_fileformat_rc_seq.q.out
hive/branches/maven/ql/src/test/results/clientnegative/load_wrong_fileformat_txt_seq.q.out
hive/branches/maven/ql/src/test/results/clientnegative/load_wrong_noof_part.q.out
hive/branches/maven/ql/src/test/results/clientnegative/local_mapred_error_cache.q.out
hive/branches/maven/ql/src/test/results/clientnegative/protectmode_part2.q.out
hive/branches/maven/ql/src/test/results/clientnegative/ptf_negative_AggrFuncsWithNoGBYNoPartDef.q.out
hive/branches/maven/ql/src/test/results/clientnegative/ptf_negative_AmbiguousWindowDefn.q.out
hive/branches/maven/ql/src/test/results/clientnegative/script_error.q.out
hive/branches/maven/ql/src/test/results/clientnegative/serde_regex2.q.out
hive/branches/maven/ql/src/test/results/clientnegative/windowing_ll_no_neg.q.out
hive/branches/maven/ql/src/test/results/clientpositive/binarysortable_1.q.out
hive/branches/maven/ql/src/test/results/clientpositive/custom_input_output_format.q.out
hive/branches/maven/ql/src/test/results/clientpositive/escape1.q.out
hive/branches/maven/ql/src/test/results/clientpositive/escape2.q.out
hive/branches/maven/ql/src/test/results/clientpositive/load_binary_data.q.out
hive/branches/maven/ql/src/test/results/clientpositive/ptf_matchpath.q.out
hive/branches/maven/ql/src/test/results/clientpositive/repair.q.out
hive/branches/maven/ql/src/test/results/clientpositive/symlink_text_input_format.q.out
hive/branches/maven/ql/src/test/results/clientpositive/udtf_posexplode.q.out
hive/branches/maven/serde/pom.xml
hive/branches/maven/service/pom.xml
hive/branches/maven/shims/0.20/pom.xml
hive/branches/maven/shims/0.20S/pom.xml
hive/branches/maven/shims/0.23/pom.xml
hive/branches/maven/shims/common-secure/pom.xml
hive/branches/maven/shims/common/pom.xml
hive/branches/maven/shims/pom.xml
hive/branches/maven/shims/src/0.23/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
hive/branches/maven/testutils/pom.xml
Modified: hive/branches/maven/ant/pom.xml
URL: http://svn.apache.org/viewvc/hive/branches/maven/ant/pom.xml?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/ant/pom.xml (original)
+++ hive/branches/maven/ant/pom.xml Thu Oct 24 13:42:32 2013
@@ -19,7 +19,7 @@
<parent>
<groupId>org.apache.hive</groupId>
<artifactId>hive</artifactId>
- <version>0.99.0-SNAPSHOT</version>
+ <version>0.13.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: hive/branches/maven/beeline/pom.xml
URL: http://svn.apache.org/viewvc/hive/branches/maven/beeline/pom.xml?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/beeline/pom.xml (original)
+++ hive/branches/maven/beeline/pom.xml Thu Oct 24 13:42:32 2013
@@ -19,7 +19,7 @@
<parent>
<groupId>org.apache.hive</groupId>
<artifactId>hive</artifactId>
- <version>0.99.0-SNAPSHOT</version>
+ <version>0.13.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -85,7 +85,7 @@
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
- <artifactId>hive-ql</artifactId>
+ <artifactId>hive-exec</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
Modified: hive/branches/maven/cli/pom.xml
URL: http://svn.apache.org/viewvc/hive/branches/maven/cli/pom.xml?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/cli/pom.xml (original)
+++ hive/branches/maven/cli/pom.xml Thu Oct 24 13:42:32 2013
@@ -19,7 +19,7 @@
<parent>
<groupId>org.apache.hive</groupId>
<artifactId>hive</artifactId>
- <version>0.99.0-SNAPSHOT</version>
+ <version>0.13.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -61,7 +61,7 @@
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
- <artifactId>hive-ql</artifactId>
+ <artifactId>hive-exec</artifactId>
<version>${project.version}</version>
</dependency>
<!-- inter-project -->
Modified: hive/branches/maven/common/pom.xml
URL: http://svn.apache.org/viewvc/hive/branches/maven/common/pom.xml?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/common/pom.xml (original)
+++ hive/branches/maven/common/pom.xml Thu Oct 24 13:42:32 2013
@@ -19,7 +19,7 @@
<parent>
<groupId>org.apache.hive</groupId>
<artifactId>hive</artifactId>
- <version>0.99.0-SNAPSHOT</version>
+ <version>0.13.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -130,6 +130,7 @@
<exec executable="bash" failonerror="true">
<arg value="${basedir}/src/scripts/saveVersion.sh"/>
<arg value="${project.version}"/>
+ <arg value="${hive.version.shortname}"/>
<arg value="${basedir}/src"/>
</exec>
</target>
Modified: hive/branches/maven/contrib/pom.xml
URL: http://svn.apache.org/viewvc/hive/branches/maven/contrib/pom.xml?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/contrib/pom.xml (original)
+++ hive/branches/maven/contrib/pom.xml Thu Oct 24 13:42:32 2013
@@ -19,7 +19,7 @@
<parent>
<groupId>org.apache.hive</groupId>
<artifactId>hive</artifactId>
- <version>0.99.0-SNAPSHOT</version>
+ <version>0.13.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -35,7 +35,7 @@
<!-- intra-project -->
<dependency>
<groupId>org.apache.hive</groupId>
- <artifactId>hive-ql</artifactId>
+ <artifactId>hive-exec</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Modified: hive/branches/maven/data/conf/hive-site-new.xml
URL: http://svn.apache.org/viewvc/hive/branches/maven/data/conf/hive-site-new.xml?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/data/conf/hive-site-new.xml (original)
+++ hive/branches/maven/data/conf/hive-site-new.xml Thu Oct 24 13:42:32 2013
@@ -107,7 +107,7 @@
<property>
<name>hive.jar.path</name>
- <value>${user.home}/.m2/repository/org/apache/hive/hive-ql/${hive.version}/hive-ql-${hive.version}-exec-bundle.jar</value>
+ <value>${maven.local.repository}/org/apache/hive/hive-exec/${hive.version}/hive-exec-${hive.version}.jar</value>
<description></description>
</property>
Modified: hive/branches/maven/data/files/symlink1.txt
URL: http://svn.apache.org/viewvc/hive/branches/maven/data/files/symlink1.txt?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/data/files/symlink1.txt (original)
+++ hive/branches/maven/data/files/symlink1.txt Thu Oct 24 13:42:32 2013
@@ -1,2 +1,2 @@
-../data/files/T1.txt
-../data/files/T3.txt
+../../data/files/T1.txt
+../../data/files/T3.txt
Modified: hive/branches/maven/data/files/symlink2.txt
URL: http://svn.apache.org/viewvc/hive/branches/maven/data/files/symlink2.txt?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/data/files/symlink2.txt (original)
+++ hive/branches/maven/data/files/symlink2.txt Thu Oct 24 13:42:32 2013
@@ -1 +1 @@
-../data/files/T2.txt
+../../data/files/T2.txt
Modified: hive/branches/maven/hbase-handler/pom.xml
URL: http://svn.apache.org/viewvc/hive/branches/maven/hbase-handler/pom.xml?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hbase-handler/pom.xml (original)
+++ hive/branches/maven/hbase-handler/pom.xml Thu Oct 24 13:42:32 2013
@@ -19,7 +19,7 @@
<parent>
<groupId>org.apache.hive</groupId>
<artifactId>hive</artifactId>
- <version>0.99.0-SNAPSHOT</version>
+ <version>0.13.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -55,7 +55,7 @@
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
- <artifactId>hive-ql</artifactId>
+ <artifactId>hive-exec</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
@@ -79,6 +79,12 @@
<groupId>org.apache.hbase</groupId>
<artifactId>hbase</artifactId>
<version>${hbase.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.thrift</groupId>
+ <artifactId>libthrift</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<!-- test inter-project -->
<dependency>
Modified: hive/branches/maven/hbase-handler/src/test/queries/negative/cascade_dbdrop_hadoop20.q
URL: http://svn.apache.org/viewvc/hive/branches/maven/hbase-handler/src/test/queries/negative/cascade_dbdrop_hadoop20.q?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hbase-handler/src/test/queries/negative/cascade_dbdrop_hadoop20.q (original)
+++ hive/branches/maven/hbase-handler/src/test/queries/negative/cascade_dbdrop_hadoop20.q Thu Oct 24 13:42:32 2013
@@ -16,11 +16,11 @@ STORED BY 'org.apache.hadoop.hive.hbase.
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:string")
TBLPROPERTIES ("hbase.table.name" = "hbase_table_0");
-dfs -ls ../build/ql/tmp/hbase/hbase_table_0;
+dfs -ls target/tmp/hbase/hbase_table_0;
DROP DATABASE IF EXISTS hbaseDB CASCADE;
-dfs -ls ../build/ql/tmp/hbase/hbase_table_0;
+dfs -ls target/tmp/hbase/hbase/hbase_table_0;
Modified: hive/branches/maven/hcatalog/core/pom-new.xml
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/core/pom-new.xml?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/core/pom-new.xml (original)
+++ hive/branches/maven/hcatalog/core/pom-new.xml Thu Oct 24 13:42:32 2013
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.hive.hcatalog</groupId>
<artifactId>hcatalog</artifactId>
- <version>0.99.0-SNAPSHOT</version>
+ <version>0.13.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -56,7 +56,7 @@
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
- <artifactId>hive-ql</artifactId>
+ <artifactId>hive-exec</artifactId>
<version>${project.version}</version>
</dependency>
<!-- inter-project -->
Modified: hive/branches/maven/hcatalog/core/src/main/java/org/apache/hcatalog/mapreduce/FileOutputCommitterContainer.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/core/src/main/java/org/apache/hcatalog/mapreduce/FileOutputCommitterContainer.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/core/src/main/java/org/apache/hcatalog/mapreduce/FileOutputCommitterContainer.java (original)
+++ hive/branches/maven/hcatalog/core/src/main/java/org/apache/hcatalog/mapreduce/FileOutputCommitterContainer.java Thu Oct 24 13:42:32 2013
@@ -585,13 +585,6 @@ class FileOutputCommitterContainer exten
}
}
- // for (Entry<String,Map<String,String>> spec : partitionsDiscoveredByPath.entrySet()){
- // LOG.info("Partition "+ spec.getKey());
- // for (Entry<String,String> e : spec.getValue().entrySet()){
- // LOG.info(e.getKey() + "=>" +e.getValue());
- // }
- // }
-
this.partitionsDiscovered = true;
}
}
@@ -652,7 +645,6 @@ class FileOutputCommitterContainer exten
for(Partition ptn : partitionsToAdd){
ptnInfos.add(InternalUtil.createPtnKeyValueMap(new Table(tableInfo.getTable()), ptn));
}
-
//Publish the new partition(s)
if (dynamicPartitioningUsed && harProcessor.isEnabled() && (!partitionsToAdd.isEmpty())){
@@ -678,7 +670,7 @@ class FileOutputCommitterContainer exten
throw e;
}
- }else{
+ } else {
// no harProcessor, regular operation
updateTableSchema(client, table, jobInfo.getOutputSchema());
LOG.info("HAR not is not being used. The table {} has new partitions {}.", table.getTableName(), ptnInfos);
Modified: hive/branches/maven/hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestHCatMultiOutputFormat.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestHCatMultiOutputFormat.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestHCatMultiOutputFormat.java (original)
+++ hive/branches/maven/hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestHCatMultiOutputFormat.java Thu Oct 24 13:42:32 2013
@@ -108,6 +108,7 @@ public class TestHCatMultiOutputFormat {
HiveMetaStore.main(new String[]{"-v", "-p", msPort, "--hiveconf", warehouseConf});
} catch (Throwable t) {
System.err.println("Exiting. Got exception from metastore: " + t.getMessage());
+ t.printStackTrace();
}
}
@@ -163,13 +164,14 @@ public class TestHCatMultiOutputFormat {
@BeforeClass
public static void setup() throws Exception {
+ System.clearProperty("mapred.job.tracker");
String testDir = System.getProperty("test.tmp.dir", "./");
testDir = testDir + "/test_multitable_" + Math.abs(new Random().nextLong()) + "/";
workDir = new File(new File(testDir).getCanonicalPath());
FileUtil.fullyDelete(workDir);
workDir.mkdirs();
- warehousedir = new Path(workDir + "/warehouse");
+ warehousedir = new Path(System.getProperty("test.warehouse.dir"));
// Run hive metastore server
t = new Thread(new RunMS());
@@ -186,9 +188,10 @@ public class TestHCatMultiOutputFormat {
mrCluster = new MiniMRCluster(1, fs.getUri().toString(), 1, null, null,
new JobConf(conf));
mrConf = mrCluster.createJobConf();
- fs.mkdirs(warehousedir);
initializeSetup();
+
+ warehousedir.getFileSystem(hiveConf).mkdirs(warehousedir);
}
private static void initializeSetup() throws Exception {
@@ -251,14 +254,15 @@ public class TestHCatMultiOutputFormat {
tbl.setPartitionKeys(ColumnHolder.partitionCols);
hmsc.createTable(tbl);
- FileSystem fs = FileSystem.get(mrConf);
- fs.setPermission(new Path(warehousedir, tableName), new FsPermission(tablePerm));
+ Path path = new Path(warehousedir, tableName);
+ FileSystem fs = path.getFileSystem(hiveConf);
+ fs.setPermission(path, new FsPermission(tablePerm));
}
@AfterClass
public static void tearDown() throws IOException {
FileUtil.fullyDelete(workDir);
- FileSystem fs = FileSystem.get(mrConf);
+ FileSystem fs = warehousedir.getFileSystem(hiveConf);
if (fs.exists(warehousedir)) {
fs.delete(warehousedir, true);
}
@@ -367,14 +371,14 @@ public class TestHCatMultiOutputFormat {
* @throws Exception if any error occurs
*/
private List<String> getTableData(String table, String database) throws Exception {
- HiveConf conf = new HiveConf();
- conf.addResource("hive-site.xml");
ArrayList<String> results = new ArrayList<String>();
ArrayList<String> temp = new ArrayList<String>();
- Hive hive = Hive.get(conf);
+ Hive hive = Hive.get(hiveConf);
org.apache.hadoop.hive.ql.metadata.Table tbl = hive.getTable(database, table);
FetchWork work;
- if (!tbl.getPartCols().isEmpty()) {
+ if (tbl.getPartCols().isEmpty()) {
+ work = new FetchWork(tbl.getDataLocation().toString(), Utilities.getTableDesc(tbl));
+ } else {
List<Partition> partitions = hive.getPartitions(tbl);
List<PartitionDesc> partDesc = new ArrayList<PartitionDesc>();
List<String> partLocs = new ArrayList<String>();
@@ -384,12 +388,10 @@ public class TestHCatMultiOutputFormat {
}
work = new FetchWork(partLocs, partDesc, Utilities.getTableDesc(tbl));
work.setLimit(100);
- } else {
- work = new FetchWork(tbl.getDataLocation().toString(), Utilities.getTableDesc(tbl));
}
FetchTask task = new FetchTask();
task.setWork(work);
- task.initialize(conf, null, null);
+ task.initialize(hiveConf, null, null);
task.fetch(temp);
for (String str : temp) {
results.add(str.replace("\t", ","));
Modified: hive/branches/maven/hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestHCatPartitionPublish.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestHCatPartitionPublish.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestHCatPartitionPublish.java (original)
+++ hive/branches/maven/hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestHCatPartitionPublish.java Thu Oct 24 13:42:32 2013
@@ -51,6 +51,7 @@ import org.apache.hadoop.mapred.MiniMRCl
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.lib.input.TextInputFormat;
+import org.apache.hadoop.util.Shell;
import org.apache.hcatalog.NoExitSecurityManager;
import org.apache.hcatalog.cli.SemanticAnalysis.HCatSemanticAnalyzer;
import org.apache.hcatalog.data.DefaultHCatRecord;
@@ -74,10 +75,10 @@ public class TestHCatPartitionPublish {
private static HiveConf hcatConf;
private static HiveMetaStoreClient msc;
private static SecurityManager securityManager;
+ private static Configuration conf = new Configuration(true);
@BeforeClass
public static void setup() throws Exception {
- Configuration conf = new Configuration(true);
conf.set("yarn.scheduler.capacity.root.queues", "default");
conf.set("yarn.scheduler.capacity.root.default.capacity", "100");
@@ -150,10 +151,13 @@ public class TestHCatPartitionPublish {
Assert.assertEquals(0, ptns.size());
Table table = msc.getTable(dbName, tableName);
Assert.assertTrue(table != null);
- // Also make sure that the directory has been deleted in the table
- // location.
- Assert.assertFalse(fs.exists(new Path(table.getSd().getLocation()
- + "/part1=p1value1/part0=p0value1")));
+ // In Windows, we cannot remove the output directory when job fail. See
+ // FileOutputCommitterContainer.abortJob
+ if (!Shell.WINDOWS) {
+ Path path = new Path(table.getSd().getLocation()
+ + "/part1=p1value1/part0=p0value1");
+ Assert.assertFalse(path.getFileSystem(conf).exists(path));
+ }
}
void runMRCreateFail(
Modified: hive/branches/maven/hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestPassProperties.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestPassProperties.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestPassProperties.java (original)
+++ hive/branches/maven/hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestPassProperties.java Thu Oct 24 13:42:32 2013
@@ -51,7 +51,7 @@ import org.junit.Test;
*/
public class TestPassProperties {
private static final String TEST_DATA_DIR = System.getProperty("user.dir") +
- "/build/test/data/" + TestSequenceFileReadWrite.class.getCanonicalName();
+ "/build/test/data/" + TestPassProperties.class.getCanonicalName();
private static final String TEST_WAREHOUSE_DIR = TEST_DATA_DIR + "/warehouse";
private static final String INPUT_FILE_NAME = TEST_DATA_DIR + "/input.data";
@@ -96,7 +96,7 @@ public class TestPassProperties {
conf.set("hive.metastore.uris", "thrift://no.such.machine:10888");
conf.set("hive.metastore.local", "false");
Job job = new Job(conf, "Write-hcat-seq-table");
- job.setJarByClass(TestSequenceFileReadWrite.class);
+ job.setJarByClass(TestPassProperties.class);
job.setMapperClass(Map.class);
job.setOutputKeyClass(NullWritable.class);
Modified: hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/MiniCluster.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/MiniCluster.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/MiniCluster.java (original)
+++ hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/MiniCluster.java Thu Oct 24 13:42:32 2013
@@ -62,7 +62,9 @@ public class MiniCluster {
Configuration config = new Configuration();
// Builds and starts the mini dfs and mapreduce clusters
- System.setProperty("hadoop.log.dir", ".");
+ if(System.getProperty("hadoop.log.dir") == null) {
+ System.setProperty("hadoop.log.dir", "target/tmp/logs/");
+ }
m_dfs = new MiniDFSCluster(config, dataNodes, true, null);
m_fileSys = m_dfs.getFileSystem();
Modified: hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatMultiOutputFormat.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatMultiOutputFormat.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatMultiOutputFormat.java (original)
+++ hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatMultiOutputFormat.java Thu Oct 24 13:42:32 2013
@@ -105,6 +105,7 @@ public class TestHCatMultiOutputFormat {
HiveMetaStore.main(new String[]{"-v", "-p", msPort, "--hiveconf", warehouseConf});
} catch (Throwable t) {
System.err.println("Exiting. Got exception from metastore: " + t.getMessage());
+ t.printStackTrace();
}
}
@@ -160,13 +161,14 @@ public class TestHCatMultiOutputFormat {
@BeforeClass
public static void setup() throws Exception {
+ System.clearProperty("mapred.job.tracker");
String testDir = System.getProperty("test.tmp.dir", "./");
testDir = testDir + "/test_multitable_" + Math.abs(new Random().nextLong()) + "/";
workDir = new File(new File(testDir).getCanonicalPath());
FileUtil.fullyDelete(workDir);
workDir.mkdirs();
- warehousedir = new Path(workDir + "/warehouse");
+ warehousedir = new Path(System.getProperty("test.warehouse.dir"));
// Run hive metastore server
t = new Thread(new RunMS());
@@ -183,9 +185,10 @@ public class TestHCatMultiOutputFormat {
mrCluster = new MiniMRCluster(1, fs.getUri().toString(), 1, null, null,
new JobConf(conf));
mrConf = mrCluster.createJobConf();
- fs.mkdirs(warehousedir);
initializeSetup();
+
+ warehousedir.getFileSystem(conf).mkdirs(warehousedir);
}
private static void initializeSetup() throws Exception {
@@ -248,14 +251,15 @@ public class TestHCatMultiOutputFormat {
tbl.setPartitionKeys(ColumnHolder.partitionCols);
hmsc.createTable(tbl);
- FileSystem fs = FileSystem.get(mrConf);
- fs.setPermission(new Path(warehousedir, tableName), new FsPermission(tablePerm));
+ Path path = new Path(warehousedir, tableName);
+ FileSystem fs = path.getFileSystem(hiveConf);
+ fs.setPermission(path, new FsPermission(tablePerm));
}
@AfterClass
public static void tearDown() throws IOException {
FileUtil.fullyDelete(workDir);
- FileSystem fs = FileSystem.get(mrConf);
+ FileSystem fs = warehousedir.getFileSystem(hiveConf);
if (fs.exists(warehousedir)) {
fs.delete(warehousedir, true);
}
@@ -312,7 +316,8 @@ public class TestHCatMultiOutputFormat {
Assert.assertEquals("Comparing output of table " +
tableNames[0] + " is not correct", outputs.get(0), "a,a,1,ag");
Assert.assertEquals("Comparing output of table " +
- tableNames[1] + " is not correct", outputs.get(1), "a,1,ag");
+ tableNames[1] + " is not correct", outputs.get(1),
+ "a,1,ag");
Assert.assertEquals("Comparing output of table " +
tableNames[2] + " is not correct", outputs.get(2), "a,a,extra,1,ag");
Modified: hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatPartitionPublish.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatPartitionPublish.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatPartitionPublish.java (original)
+++ hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatPartitionPublish.java Thu Oct 24 13:42:32 2013
@@ -74,6 +74,7 @@ public class TestHCatPartitionPublish {
private static HiveConf hcatConf;
private static HiveMetaStoreClient msc;
private static SecurityManager securityManager;
+ private static Configuration conf = new Configuration(true);
@BeforeClass
public static void setup() throws Exception {
@@ -82,7 +83,6 @@ public class TestHCatPartitionPublish {
File workDir = new File(new File(testDir).getCanonicalPath());
FileUtil.fullyDelete(workDir);
workDir.mkdirs();
- Configuration conf = new Configuration(true);
conf.set("yarn.scheduler.capacity.root.queues", "default");
conf.set("yarn.scheduler.capacity.root.default.capacity", "100");
@@ -158,8 +158,9 @@ public class TestHCatPartitionPublish {
// In Windows, we cannot remove the output directory when job fail. See
// FileOutputCommitterContainer.abortJob
if (!Shell.WINDOWS) {
- Assert.assertFalse(fs.exists(new Path(table.getSd().getLocation()
- + "/part1=p1value1/part0=p0value1")));
+ Path path = new Path(table.getSd().getLocation()
+ + "/part1=p1value1/part0=p0value1");
+ Assert.assertFalse(path.getFileSystem(conf).exists(path));
}
}
Modified: hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestPassProperties.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestPassProperties.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestPassProperties.java (original)
+++ hive/branches/maven/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestPassProperties.java Thu Oct 24 13:42:32 2013
@@ -48,7 +48,7 @@ import org.junit.Test;
public class TestPassProperties {
private static final String TEST_DATA_DIR = System.getProperty("user.dir") +
- "/build/test/data/" + TestSequenceFileReadWrite.class.getCanonicalName();
+ "/build/test/data/" + TestPassProperties.class.getCanonicalName();
private static final String TEST_WAREHOUSE_DIR = TEST_DATA_DIR + "/warehouse";
private static final String INPUT_FILE_NAME = TEST_DATA_DIR + "/input.data";
@@ -93,7 +93,7 @@ public class TestPassProperties {
conf.set("hive.metastore.uris", "thrift://no.such.machine:10888");
conf.set("hive.metastore.local", "false");
Job job = new Job(conf, "Write-hcat-seq-table");
- job.setJarByClass(TestSequenceFileReadWrite.class);
+ job.setJarByClass(TestPassProperties.class);
job.setMapperClass(Map.class);
job.setOutputKeyClass(NullWritable.class);
Modified: hive/branches/maven/hcatalog/hcatalog-pig-adapter/pom-new.xml
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/hcatalog-pig-adapter/pom-new.xml?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/hcatalog-pig-adapter/pom-new.xml (original)
+++ hive/branches/maven/hcatalog/hcatalog-pig-adapter/pom-new.xml Thu Oct 24 13:42:32 2013
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.hive.hcatalog</groupId>
<artifactId>hcatalog</artifactId>
- <version>0.99.0-SNAPSHOT</version>
+ <version>0.13.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: hive/branches/maven/hcatalog/pom-new.xml
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/pom-new.xml?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/pom-new.xml (original)
+++ hive/branches/maven/hcatalog/pom-new.xml Thu Oct 24 13:42:32 2013
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.hive</groupId>
<artifactId>hive</artifactId>
- <version>0.99.0-SNAPSHOT</version>
+ <version>0.13.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: hive/branches/maven/hcatalog/server-extensions/pom-new.xml
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/server-extensions/pom-new.xml?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/server-extensions/pom-new.xml (original)
+++ hive/branches/maven/hcatalog/server-extensions/pom-new.xml Thu Oct 24 13:42:32 2013
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.hive.hcatalog</groupId>
<artifactId>hcatalog</artifactId>
- <version>0.99.0-SNAPSHOT</version>
+ <version>0.13.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: hive/branches/maven/hcatalog/storage-handlers/hbase/pom-new.xml
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/storage-handlers/hbase/pom-new.xml?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/storage-handlers/hbase/pom-new.xml (original)
+++ hive/branches/maven/hcatalog/storage-handlers/hbase/pom-new.xml Thu Oct 24 13:42:32 2013
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.hive.hcatalog</groupId>
<artifactId>hcatalog</artifactId>
- <version>0.99.0-SNAPSHOT</version>
+ <version>0.13.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -59,6 +59,17 @@
<groupId>org.apache.hbase</groupId>
<artifactId>hbase</artifactId>
<version>${hbase.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.thrift</groupId>
+ <artifactId>libthrift</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.thrift</groupId>
+ <artifactId>libthrift</artifactId>
+ <version>${libthrift.version}</version>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
@@ -158,6 +169,17 @@
</resources>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
Modified: hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/SkeletonHBaseTest.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/SkeletonHBaseTest.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/SkeletonHBaseTest.java (original)
+++ hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/SkeletonHBaseTest.java Thu Oct 24 13:42:32 2013
@@ -36,14 +36,13 @@ import org.apache.hadoop.hbase.HTableDes
import org.apache.hadoop.hbase.client.HBaseAdmin;
import org.apache.hadoop.hive.conf.HiveConf;
import org.junit.AfterClass;
-import org.junit.BeforeClass;
/**
* Base class for HBase Tests which need a mini cluster instance
*/
public abstract class SkeletonHBaseTest {
- protected static String TEST_DIR = "/tmp/build/test/data/";
+ protected static String TEST_DIR = System.getProperty("test.tmp.dir", "target/tmp/");
protected final static String DEFAULT_CONTEXT_HANDLE = "default";
@@ -56,20 +55,15 @@ public abstract class SkeletonHBaseTest
*/
protected static Configuration testConf = null;
- protected void createTable(String tableName, String[] families) {
- try {
- HBaseAdmin admin = new HBaseAdmin(getHbaseConf());
- HTableDescriptor tableDesc = new HTableDescriptor(tableName);
- for (String family : families) {
- HColumnDescriptor columnDescriptor = new HColumnDescriptor(family);
- tableDesc.addFamily(columnDescriptor);
- }
- admin.createTable(tableDesc);
- } catch (Exception e) {
- e.printStackTrace();
- throw new IllegalStateException(e);
+ protected void createTable(String tableName, String[] families) throws IOException {
+ HBaseAdmin admin = new HBaseAdmin(getHbaseConf());
+ HTableDescriptor tableDesc = new HTableDescriptor(tableName);
+ for (String family : families) {
+ HColumnDescriptor columnDescriptor = new HColumnDescriptor(family);
+ tableDesc.addFamily(columnDescriptor);
}
-
+ admin.createTable(tableDesc);
+ admin.close();
}
protected String newTableName(String prefix) {
@@ -78,21 +72,20 @@ public abstract class SkeletonHBaseTest
do {
name = prefix + "_" + Math.abs(new Random().nextLong());
} while (tableNames.contains(name) && --tries > 0);
- if (tableNames.contains(name))
+ if (tableNames.contains(name)) {
throw new IllegalStateException("Couldn't find a unique table name, tableNames size: " + tableNames.size());
+ }
tableNames.add(name);
return name;
}
-
-
+
/**
* startup an hbase cluster instance before a test suite runs
*/
- @BeforeClass
- public static void setup() {
- if (!contextMap.containsKey(getContextHandle()))
+ public static void setupSkeletonHBaseTest() {
+ if (!contextMap.containsKey(getContextHandle())) {
contextMap.put(getContextHandle(), new Context(getContextHandle()));
-
+ }
contextMap.get(getContextHandle()).start();
}
Modified: hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseBulkOutputFormat.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseBulkOutputFormat.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseBulkOutputFormat.java (original)
+++ hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseBulkOutputFormat.java Thu Oct 24 13:42:32 2013
@@ -66,6 +66,7 @@ import org.apache.hcatalog.mapreduce.HCa
import org.apache.hcatalog.mapreduce.HCatOutputFormat;
import org.apache.hcatalog.mapreduce.OutputJobInfo;
+import org.junit.BeforeClass;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -89,6 +90,11 @@ public class TestHBaseBulkOutputFormat e
private final HiveConf allConf;
private final HCatDriver hcatDriver;
+ @BeforeClass
+ public static void setup() throws Throwable {
+ setupSkeletonHBaseTest();
+ }
+
public TestHBaseBulkOutputFormat() {
allConf = getHiveConf();
allConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname,
Modified: hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseDirectOutputFormat.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseDirectOutputFormat.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseDirectOutputFormat.java (original)
+++ hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseDirectOutputFormat.java Thu Oct 24 13:42:32 2013
@@ -63,6 +63,7 @@ import org.apache.hcatalog.hbase.snapsho
import org.apache.hcatalog.mapreduce.HCatInputFormat;
import org.apache.hcatalog.mapreduce.HCatOutputFormat;
import org.apache.hcatalog.mapreduce.OutputJobInfo;
+import org.junit.BeforeClass;
import org.junit.Test;
import java.io.IOException;
@@ -83,6 +84,11 @@ public class TestHBaseDirectOutputFormat
private final HiveConf allConf;
private final HCatDriver hcatDriver;
+ @BeforeClass
+ public static void setup() throws Throwable {
+ setupSkeletonHBaseTest();
+ }
+
public TestHBaseDirectOutputFormat() {
allConf = getHiveConf();
allConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname,
Modified: hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseHCatStorageHandler.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseHCatStorageHandler.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseHCatStorageHandler.java (original)
+++ hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseHCatStorageHandler.java Thu Oct 24 13:42:32 2013
@@ -41,6 +41,7 @@ import org.apache.hcatalog.cli.SemanticA
import org.apache.hcatalog.hbase.snapshot.RevisionManager;
import org.apache.hcatalog.hbase.snapshot.RevisionManagerConfiguration;
import org.apache.zookeeper.KeeperException.NoNodeException;
+import org.junit.BeforeClass;
import org.junit.Test;
public class TestHBaseHCatStorageHandler extends SkeletonHBaseTest {
@@ -49,6 +50,11 @@ public class TestHBaseHCatStorageHandler
private static HCatDriver hcatDriver;
private static Warehouse wh;
+ @BeforeClass
+ public static void setup() throws Throwable {
+ setupSkeletonHBaseTest();
+ }
+
public void Initialize() throws Exception {
hcatConf = getHiveConf();
Modified: hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHCatHBaseInputFormat.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHCatHBaseInputFormat.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHCatHBaseInputFormat.java (original)
+++ hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHCatHBaseInputFormat.java Thu Oct 24 13:42:32 2013
@@ -73,6 +73,7 @@ import org.apache.hcatalog.hbase.snapsho
import org.apache.hcatalog.mapreduce.HCatInputFormat;
import org.apache.hcatalog.mapreduce.InputJobInfo;
import org.apache.hcatalog.mapreduce.PartInfo;
+import org.junit.BeforeClass;
import org.junit.Test;
public class TestHCatHBaseInputFormat extends SkeletonHBaseTest {
@@ -83,6 +84,11 @@ public class TestHCatHBaseInputFormat ex
private final byte[] QUALIFIER1 = Bytes.toBytes("testQualifier1");
private final byte[] QUALIFIER2 = Bytes.toBytes("testQualifier2");
+ @BeforeClass
+ public static void setup() throws Throwable {
+ setupSkeletonHBaseTest();
+ }
+
public TestHCatHBaseInputFormat() throws Exception {
hcatConf = getHiveConf();
hcatConf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname,
Modified: hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestSnapshots.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestSnapshots.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestSnapshots.java (original)
+++ hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestSnapshots.java Thu Oct 24 13:42:32 2013
@@ -41,12 +41,18 @@ import org.apache.hcatalog.common.HCatUt
import org.apache.hcatalog.hbase.snapshot.TableSnapshot;
import org.apache.hcatalog.mapreduce.HCatInputFormat;
import org.apache.hcatalog.mapreduce.InputJobInfo;
+import org.junit.BeforeClass;
import org.junit.Test;
public class TestSnapshots extends SkeletonHBaseTest {
private static HiveConf hcatConf;
private static HCatDriver hcatDriver;
+ @BeforeClass
+ public static void setup() throws Throwable {
+ setupSkeletonHBaseTest();
+ }
+
public void Initialize() throws Exception {
hcatConf = getHiveConf();
hcatConf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname,
Modified: hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestIDGenerator.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestIDGenerator.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestIDGenerator.java (original)
+++ hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestIDGenerator.java Thu Oct 24 13:42:32 2013
@@ -26,10 +26,16 @@ import java.util.HashMap;
import org.apache.hcatalog.hbase.SkeletonHBaseTest;
import org.junit.Assert;
+import org.junit.BeforeClass;
import org.junit.Test;
public class TestIDGenerator extends SkeletonHBaseTest {
+ @BeforeClass
+ public static void setup() throws Throwable {
+ setupSkeletonHBaseTest();
+ }
+
@Test
public void testIDGeneration() throws Exception {
Modified: hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestRevisionManager.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestRevisionManager.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestRevisionManager.java (original)
+++ hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestRevisionManager.java Thu Oct 24 13:42:32 2013
@@ -32,10 +32,16 @@ import org.apache.hcatalog.hbase.snapsho
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.ZooKeeper;
import org.apache.zookeeper.data.Stat;
+import org.junit.BeforeClass;
import org.junit.Test;
public class TestRevisionManager extends SkeletonHBaseTest {
+ @BeforeClass
+ public static void setup() throws Throwable {
+ setupSkeletonHBaseTest();
+ }
+
@Test
public void testBasicZNodeCreation() throws IOException, KeeperException, InterruptedException {
Modified: hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestRevisionManagerEndpoint.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestRevisionManagerEndpoint.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestRevisionManagerEndpoint.java (original)
+++ hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestRevisionManagerEndpoint.java Thu Oct 24 13:42:32 2013
@@ -31,24 +31,30 @@ import org.apache.hadoop.conf.Configurat
import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
import org.apache.hcatalog.hbase.SkeletonHBaseTest;
import org.junit.Assert;
+import org.junit.BeforeClass;
import org.junit.Test;
public class TestRevisionManagerEndpoint extends SkeletonHBaseTest {
- static {
+ @BeforeClass
+ public static void setup() throws Throwable {
// test case specific mini cluster settings
testConf = new Configuration(false);
testConf.setStrings(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY,
"org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpoint",
"org.apache.hadoop.hbase.coprocessor.GenericEndpoint");
testConf.set(RMConstants.REVISION_MGR_ENDPOINT_IMPL_CLASS, MockRM.class.getName());
+ setupSkeletonHBaseTest();
}
-
+
/**
* Mock implementation to test the protocol/serialization
*/
public static class MockRM implements RevisionManager {
+ public MockRM() {
+ Thread.dumpStack();
+ }
private static class Invocation {
Invocation(String methodName, Object ret, Object... args) {
this.methodName = methodName;
Modified: hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestZNodeSetUp.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestZNodeSetUp.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestZNodeSetUp.java (original)
+++ hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestZNodeSetUp.java Thu Oct 24 13:42:32 2013
@@ -38,6 +38,7 @@ import org.apache.hcatalog.cli.SemanticA
import org.apache.hcatalog.hbase.SkeletonHBaseTest;
import org.apache.zookeeper.ZooKeeper;
import org.apache.zookeeper.data.Stat;
+import org.junit.BeforeClass;
import org.junit.Test;
@@ -46,6 +47,11 @@ public class TestZNodeSetUp extends Skel
private static HiveConf hcatConf;
private static HCatDriver hcatDriver;
+ @BeforeClass
+ public static void setup() throws Throwable {
+ setupSkeletonHBaseTest();
+ }
+
public void Initialize() throws Exception {
hcatConf = getHiveConf();
Modified: hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/TestPigHBaseStorageHandler.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/TestPigHBaseStorageHandler.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/TestPigHBaseStorageHandler.java (original)
+++ hive/branches/maven/hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/TestPigHBaseStorageHandler.java Thu Oct 24 13:42:32 2013
@@ -73,6 +73,7 @@ public class TestPigHBaseStorageHandler
URI fsuri = getFileSystem().getUri();
Path whPath = new Path(fsuri.getScheme(), fsuri.getAuthority(),
getTestDir());
+ hcatConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false");
hcatConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, "");
hcatConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, "");
hcatConf.set(ConfVars.METASTOREWAREHOUSE.varname, whPath.toString());
Modified: hive/branches/maven/hcatalog/webhcat/java-client/pom-new.xml
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/webhcat/java-client/pom-new.xml?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/webhcat/java-client/pom-new.xml (original)
+++ hive/branches/maven/hcatalog/webhcat/java-client/pom-new.xml Thu Oct 24 13:42:32 2013
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.hive.hcatalog</groupId>
<artifactId>hcatalog</artifactId>
- <version>0.99.0-SNAPSHOT</version>
+ <version>0.13.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: hive/branches/maven/hcatalog/webhcat/java-client/src/test/java/org/apache/hcatalog/api/TestHCatClient.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/webhcat/java-client/src/test/java/org/apache/hcatalog/api/TestHCatClient.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/webhcat/java-client/src/test/java/org/apache/hcatalog/api/TestHCatClient.java (original)
+++ hive/branches/maven/hcatalog/webhcat/java-client/src/test/java/org/apache/hcatalog/api/TestHCatClient.java Thu Oct 24 13:42:32 2013
@@ -36,7 +36,6 @@ import org.apache.hadoop.hive.ql.io.RCFi
import org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe;
import org.apache.hadoop.mapred.TextInputFormat;
import org.apache.hcatalog.cli.SemanticAnalysis.HCatSemanticAnalyzer;
-import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
import org.apache.hcatalog.common.HCatConstants;
import org.apache.hcatalog.common.HCatException;
import org.apache.hcatalog.data.schema.HCatFieldSchema;
@@ -52,6 +51,7 @@ import static org.junit.Assert.assertEqu
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.fail;
/**
* @deprecated Use/modify {@link org.apache.hive.hcatalog.api.TestHCatClient} instead
@@ -123,9 +123,9 @@ public class TestHCatClient {
assertTrue(testDb.getComment() == null);
assertTrue(testDb.getProperties().size() == 0);
String warehouseDir = System
- .getProperty(ConfVars.METASTOREWAREHOUSE.varname, "/user/hive/warehouse");
- assertTrue(testDb.getLocation().equals(
- "file:" + warehouseDir + "/" + db + ".db"));
+ .getProperty("test.warehouse.dir", "/user/hive/warehouse");
+ String expectedDir = warehouseDir.replaceAll("\\\\", "/").replaceFirst("pfile:///", "pfile:/");
+ assertEquals(expectedDir + "/" + db + ".db", testDb.getLocation());
ArrayList<HCatFieldSchema> cols = new ArrayList<HCatFieldSchema>();
cols.add(new HCatFieldSchema("id", Type.INT, "id comment"));
cols.add(new HCatFieldSchema("value", Type.STRING, "value comment"));
@@ -145,6 +145,7 @@ public class TestHCatClient {
// will result in an exception.
try {
client.createTable(tableDesc);
+ fail("Expected exception");
} catch (HCatException e) {
assertTrue(e.getMessage().contains(
"AlreadyExistsException while creating table."));
@@ -159,8 +160,7 @@ public class TestHCatClient {
TextInputFormat.class.getName()));
assertTrue(table2.getOutputFileFormat().equalsIgnoreCase(
IgnoreKeyTextOutputFormat.class.getName()));
- assertTrue(table2.getLocation().equalsIgnoreCase(
- "file:" + warehouseDir + "/" + db + ".db/" + tableTwo));
+ assertEquals((expectedDir + "/" + db + ".db/" + tableTwo).toLowerCase(), table2.getLocation().toLowerCase());
client.close();
}
Modified: hive/branches/maven/hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/TestHCatClient.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/TestHCatClient.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/TestHCatClient.java (original)
+++ hive/branches/maven/hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/TestHCatClient.java Thu Oct 24 13:42:32 2013
@@ -36,7 +36,6 @@ import org.apache.hadoop.hive.ql.io.RCFi
import org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe;
import org.apache.hadoop.mapred.TextInputFormat;
import org.apache.hive.hcatalog.cli.SemanticAnalysis.HCatSemanticAnalyzer;
-import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
import org.apache.hive.hcatalog.common.HCatConstants;
import org.apache.hive.hcatalog.common.HCatException;
import org.apache.hive.hcatalog.data.schema.HCatFieldSchema;
@@ -48,6 +47,7 @@ import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import static org.junit.Assert.fail;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -120,13 +120,9 @@ public class TestHCatClient {
assertTrue(testDb.getComment() == null);
assertTrue(testDb.getProperties().size() == 0);
String warehouseDir = System
- .getProperty(ConfVars.METASTOREWAREHOUSE.varname, "/user/hive/warehouse");
- String expectedDir = warehouseDir.replaceAll("\\\\", "/");
- if (!expectedDir.startsWith("/")) {
- expectedDir = "/" + expectedDir;
- }
- assertTrue(testDb.getLocation().equals(
- "file:" + expectedDir + "/" + db + ".db"));
+ .getProperty("test.warehouse.dir", "/user/hive/warehouse");
+ String expectedDir = warehouseDir.replaceAll("\\\\", "/").replaceFirst("pfile:///", "pfile:/");
+ assertEquals(expectedDir + "/" + db + ".db", testDb.getLocation());
ArrayList<HCatFieldSchema> cols = new ArrayList<HCatFieldSchema>();
cols.add(new HCatFieldSchema("id", Type.INT, "id comment"));
cols.add(new HCatFieldSchema("value", Type.STRING, "value comment"));
@@ -146,6 +142,7 @@ public class TestHCatClient {
// will result in an exception.
try {
client.createTable(tableDesc);
+ fail("Expected exception");
} catch (HCatException e) {
assertTrue(e.getMessage().contains(
"AlreadyExistsException while creating table."));
@@ -160,8 +157,7 @@ public class TestHCatClient {
TextInputFormat.class.getName()));
assertTrue(table2.getOutputFileFormat().equalsIgnoreCase(
IgnoreKeyTextOutputFormat.class.getName()));
- assertTrue(table2.getLocation().equalsIgnoreCase(
- "file:" + expectedDir + "/" + db + ".db/" + tableTwo));
+ assertEquals((expectedDir + "/" + db + ".db/" + tableTwo).toLowerCase(), table2.getLocation().toLowerCase());
client.close();
}
Modified: hive/branches/maven/hcatalog/webhcat/svr/pom-new.xml
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/webhcat/svr/pom-new.xml?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/webhcat/svr/pom-new.xml (original)
+++ hive/branches/maven/hcatalog/webhcat/svr/pom-new.xml Thu Oct 24 13:42:32 2013
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.hive.hcatalog</groupId>
<artifactId>hcatalog</artifactId>
- <version>0.99.0-SNAPSHOT</version>
+ <version>0.13.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -135,4 +135,50 @@
</profile>
</profiles>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>${maven-javadoc-plugin.version}</version>
+ <executions>
+ <execution>
+ <id>resourcesdoc.xml</id>
+ <goals>
+ <goal>javadoc</goal>
+ </goals>
+ <phase>compile</phase>
+ <configuration>
+ <encoding>${project.build.sourceEncoding}</encoding>
+ <verbose>true</verbose>
+ <show>public</show>
+ <doclet>com.sun.jersey.wadl.resourcedoc.ResourceDoclet</doclet>
+ <docletArtifacts>
+ <docletArtifact>
+ <groupId>com.sun.jersey.contribs</groupId>
+ <artifactId>wadl-resourcedoc-doclet</artifactId>
+ <version>${wadl-resourcedoc-doclet.version}</version>
+ </docletArtifact>
+ <!--
+ Also specify jersey and xerces as doclet artifacts as the ResourceDoclet
+ uses classes provided by them to generate the resourcedoc.
+ -->
+ <docletArtifact>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-server</artifactId>
+ <version>${jersey.version}</version>
+ </docletArtifact>
+ <docletArtifact>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>${xerces.version}</version>
+ </docletArtifact>
+ </docletArtifacts>
+ <additionalparam>-output ${project.build.outputDirectory}/resourcedoc.xml</additionalparam>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
Modified: hive/branches/maven/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/HcatDelegator.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/HcatDelegator.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/HcatDelegator.java (original)
+++ hive/branches/maven/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/HcatDelegator.java Thu Oct 24 13:42:32 2013
@@ -107,12 +107,12 @@ public class HcatDelegator extends Launc
}
LOG.info("Main.getAppConfigInstance().get(AppConfig.UNIT_TEST_MODE)=" +
Main.getAppConfigInstance().get(AppConfig.UNIT_TEST_MODE));
- if(System.getProperty("hive.metastore.warehouse.dir") != null) {
+ if(System.getProperty("test.warehouse.dir") != null) {
/*when running in unit test mode, pass this property to HCat,
which will in turn pass it to Hive to make sure that Hive
tries to write to a directory that exists.*/
args.add("-D");
- args.add("hive.metastore.warehouse.dir=" + System.getProperty("hive.metastore.warehouse.dir"));
+ args.add("hive.metastore.warehouse.dir=" + System.getProperty("test.warehouse.dir"));
}
return args;
}
Modified: hive/branches/maven/hcatalog/webhcat/svr/src/test/java/org/apache/hive/hcatalog/templeton/TestWebHCatE2e.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/webhcat/svr/src/test/java/org/apache/hive/hcatalog/templeton/TestWebHCatE2e.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/webhcat/svr/src/test/java/org/apache/hive/hcatalog/templeton/TestWebHCatE2e.java (original)
+++ hive/branches/maven/hcatalog/webhcat/svr/src/test/java/org/apache/hive/hcatalog/templeton/TestWebHCatE2e.java Thu Oct 24 13:42:32 2013
@@ -156,7 +156,7 @@ public class TestWebHCatE2e {
public void createDataBase() throws IOException {
Map<String, Object> props = new HashMap<String, Object>();
props.put("comment", "Hello, there");
- props.put("location", "file://" + System.getProperty("hive.metastore.warehouse.dir"));
+ props.put("location", System.getProperty("test.warehouse.dir"));
Map<String, String> props2 = new HashMap<String, String>();
props2.put("prop", "val");
props.put("properties", props2);
Modified: hive/branches/maven/hcatalog/webhcat/svr/src/test/java/org/apache/hive/hcatalog/templeton/tool/TestJobIDParser.java
URL: http://svn.apache.org/viewvc/hive/branches/maven/hcatalog/webhcat/svr/src/test/java/org/apache/hive/hcatalog/templeton/tool/TestJobIDParser.java?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hcatalog/webhcat/svr/src/test/java/org/apache/hive/hcatalog/templeton/tool/TestJobIDParser.java (original)
+++ hive/branches/maven/hcatalog/webhcat/svr/src/test/java/org/apache/hive/hcatalog/templeton/tool/TestJobIDParser.java Thu Oct 24 13:42:32 2013
@@ -29,7 +29,7 @@ import junit.framework.Assert;
public class TestJobIDParser {
@Test
public void testParsePig() throws IOException {
- String errFileName = "../../src/test/data/status/pig";
+ String errFileName = "src/test/data/status/pig";
PigJobIDParser pigJobIDParser = new PigJobIDParser(errFileName, new Configuration());
List<String> jobs = pigJobIDParser.parseJobID();
Assert.assertEquals(jobs.size(), 1);
@@ -37,7 +37,7 @@ public class TestJobIDParser {
@Test
public void testParseHive() throws IOException {
- String errFileName = "../../src/test/data/status/hive";
+ String errFileName = "src/test/data/status/hive";
HiveJobIDParser hiveJobIDParser = new HiveJobIDParser(errFileName, new Configuration());
List<String> jobs = hiveJobIDParser.parseJobID();
Assert.assertEquals(jobs.size(), 1);
@@ -45,7 +45,7 @@ public class TestJobIDParser {
@Test
public void testParseJar() throws IOException {
- String errFileName = "../../src/test/data/status/jar";
+ String errFileName = "src/test/data/status/jar";
JarJobIDParser jarJobIDParser = new JarJobIDParser(errFileName, new Configuration());
List<String> jobs = jarJobIDParser.parseJobID();
Assert.assertEquals(jobs.size(), 1);
@@ -53,7 +53,7 @@ public class TestJobIDParser {
@Test
public void testParseStreaming() throws IOException {
- String errFileName = "../../src/test/data/status/streaming";
+ String errFileName = "src/test/data/status/streaming";
JarJobIDParser jarJobIDParser = new JarJobIDParser(errFileName, new Configuration());
List<String> jobs = jarJobIDParser.parseJobID();
Assert.assertEquals(jobs.size(), 1);
Modified: hive/branches/maven/hwi/pom.xml
URL: http://svn.apache.org/viewvc/hive/branches/maven/hwi/pom.xml?rev=1535378&r1=1535377&r2=1535378&view=diff
==============================================================================
--- hive/branches/maven/hwi/pom.xml (original)
+++ hive/branches/maven/hwi/pom.xml Thu Oct 24 13:42:32 2013
@@ -19,7 +19,7 @@
<parent>
<groupId>org.apache.hive</groupId>
<artifactId>hive</artifactId>
- <version>0.99.0-SNAPSHOT</version>
+ <version>0.13.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -51,7 +51,7 @@
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
- <artifactId>hive-ql</artifactId>
+ <artifactId>hive-exec</artifactId>
<version>${project.version}</version>
</dependency>
<!-- inter-project -->
@@ -68,7 +68,7 @@
<!-- test intra-project -->
<dependency>
<groupId>org.apache.hive</groupId>
- <artifactId>hive-ql</artifactId>
+ <artifactId>hive-exec</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
Added: hive/branches/maven/itests/custom-serde/pom.xml
URL: http://svn.apache.org/viewvc/hive/branches/maven/itests/custom-serde/pom.xml?rev=1535378&view=auto
==============================================================================
--- hive/branches/maven/itests/custom-serde/pom.xml (added)
+++ hive/branches/maven/itests/custom-serde/pom.xml Thu Oct 24 13:42:32 2013
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.hive</groupId>
+ <artifactId>hive-it</artifactId>
+ <version>0.13.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>hive-it-custom-serde</artifactId>
+ <packaging>jar</packaging>
+ <name>Hive Integration - Custom Serde</name>
+
+ <properties>
+ <hive.path.to.root>../..</hive.path.to.root>
+ </properties>
+
+ <dependencies>
+ <!-- intra-project -->
+ <dependency>
+ <groupId>org.apache.hive</groupId>
+ <artifactId>hive-exec</artifactId>
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>hadoop-1</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-core</artifactId>
+ <version>${hadoop-20S.version}</version>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>hadoop-2</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-common</artifactId>
+ <version>${hadoop-23.version}</version>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+</project>
Added: hive/branches/maven/itests/hcatalog-unit/pom.xml
URL: http://svn.apache.org/viewvc/hive/branches/maven/itests/hcatalog-unit/pom.xml?rev=1535378&view=auto
==============================================================================
--- hive/branches/maven/itests/hcatalog-unit/pom.xml (added)
+++ hive/branches/maven/itests/hcatalog-unit/pom.xml Thu Oct 24 13:42:32 2013
@@ -0,0 +1,227 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.hive</groupId>
+ <artifactId>hive-it</artifactId>
+ <version>0.13.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>hcatalog-it-unit</artifactId>
+ <packaging>jar</packaging>
+ <name>Hive Integration - HCatalog Unit Tests</name>
+
+ <properties>
+ <hive.path.to.root>../..</hive.path.to.root>
+ </properties>
+
+ <dependencies>
+ <!-- test intra-project -->
+ <dependency>
+ <groupId>org.apache.hive.hcatalog</groupId>
+ <artifactId>hcatalog-core</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hive.hcatalog</groupId>
+ <artifactId>hcatalog-core</artifactId>
+ <version>${project.version}</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hive.hcatalog</groupId>
+ <artifactId>hbase-storage-handler</artifactId>
+ <version>${project.version}</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hive.hcatalog</groupId>
+ <artifactId>hcatalog-pig-adapter</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hive</groupId>
+ <artifactId>hive-cli</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hive</groupId>
+ <artifactId>hive-common</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hive</groupId>
+ <artifactId>hive-metastore</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hive</groupId>
+ <artifactId>hive-exec</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <!-- test inter-project -->
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>${commons-io.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hbase</groupId>
+ <artifactId>hbase</artifactId>
+ <version>${hbase.version}</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.thrift</groupId>
+ <artifactId>libthrift</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>hadoop-1</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <dependencies>
+ <!-- test -->
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-core</artifactId>
+ <version>${hadoop-20S.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-tools</artifactId>
+ <version>${hadoop-20S.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-test</artifactId>
+ <version>${hadoop-20S.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.pig</groupId>
+ <artifactId>pig</artifactId>
+ <version>${pig.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>hadoop-2</id>
+ <dependencies>
+ <!-- test -->
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-annotations</artifactId>
+ <version>${hadoop-23.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-archives</artifactId>
+ <version>${hadoop-23.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-common</artifactId>
+ <version>${hadoop-23.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-mapreduce-client-core</artifactId>
+ <version>${hadoop-23.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-hdfs</artifactId>
+ <version>${hadoop-23.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-hdfs</artifactId>
+ <version>${hadoop-23.version}</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
+ <version>${hadoop-23.version}</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.pig</groupId>
+ <artifactId>pig</artifactId>
+ <version>${pig.version}</version>
+ <classifier>h2</classifier>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>