You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by kh...@apache.org on 2014/10/01 11:47:38 UTC
svn commit: r1628663 -
/hive/branches/branch-0.14/hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoader.java
Author: khorgath
Date: Wed Oct 1 09:47:38 2014
New Revision: 1628663
URL: http://svn.apache.org/r1628663
Log:
HIVE-8248 : TestHCatLoader.testReadDataPrimitiveTypes() occasionally fails (Jason Dere via Sushanth Sowmyan)
Modified:
hive/branches/branch-0.14/hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoader.java
Modified: hive/branches/branch-0.14/hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoader.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.14/hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoader.java?rev=1628663&r1=1628662&r2=1628663&view=diff
==============================================================================
--- hive/branches/branch-0.14/hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoader.java (original)
+++ hive/branches/branch-0.14/hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoader.java Wed Oct 1 09:47:38 2014
@@ -642,7 +642,11 @@ public class TestHCatLoader {
* Test that value from Hive table are read properly in Pig
*/
private static void testReadDataPrimitiveTypes() throws Exception {
- PigServer server = new PigServer(ExecType.LOCAL);
+ // testConvertBooleanToInt() sets HCatConstants.HCAT_DATA_CONVERT_BOOLEAN_TO_INTEGER=true, and
+ // might be the last one to call HCatContext.INSTANCE.setConf(). Make sure setting is false.
+ Properties properties = new Properties();
+ properties.setProperty(HCatConstants.HCAT_DATA_CONVERT_BOOLEAN_TO_INTEGER, "false");
+ PigServer server = new PigServer(ExecType.LOCAL, properties);
server.registerQuery("X = load '" + ALL_PRIMITIVE_TYPES_TABLE + "' using " + HCatLoader.class.getName() + "();");
Iterator<Tuple> XIter = server.openIterator("X");
int numTuplesRead = 0;