hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gunt...@apache.org
Subject svn commit: r1541190 [15/15] - in /hive/branches/tez: ./ ant/src/org/apache/hadoop/hive/ant/ beeline/ beeline/src/java/org/apache/hive/beeline/ cli/ cli/src/java/org/apache/hadoop/hive/cli/ common/ common/src/java/org/apache/hadoop/hive/common/ common/...
Date Tue, 12 Nov 2013 18:23:14 GMT
Modified: hive/branches/tez/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableHiveVarcharObjectInspector.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableHiveVarcharObjectInspector.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableHiveVarcharObjectInspector.java (original)
+++ hive/branches/tez/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableHiveVarcharObjectInspector.java Tue Nov 12 18:23:05 2013
@@ -22,7 +22,7 @@ import org.apache.commons.logging.LogFac
 import org.apache.hadoop.hive.common.type.HiveVarchar;
 import org.apache.hadoop.hive.serde2.io.HiveVarcharWritable;
 import org.apache.hadoop.hive.serde2.typeinfo.VarcharTypeInfo;
-import org.apache.hadoop.hive.serde2.typeinfo.VarcharUtils;
+import org.apache.hadoop.hive.serde2.typeinfo.BaseCharUtils;
 
 public class WritableHiveVarcharObjectInspector extends AbstractPrimitiveWritableObjectInspector
 implements SettableHiveVarcharObjectInspector {
@@ -78,7 +78,7 @@ implements SettableHiveVarcharObjectInsp
   }
 
   private boolean doesWritableMatchTypeParams(HiveVarcharWritable writable) {
-    return VarcharUtils.doesWritableMatchTypeParams(
+    return BaseCharUtils.doesWritableMatchTypeParams(
         writable, (VarcharTypeInfo)typeInfo);
   }
 

Modified: hive/branches/tez/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoFactory.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoFactory.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoFactory.java (original)
+++ hive/branches/tez/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoFactory.java Tue Nov 12 18:23:05 2013
@@ -24,9 +24,11 @@ import java.util.concurrent.ConcurrentHa
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.hive.common.type.HiveChar;
 import org.apache.hadoop.hive.common.type.HiveVarchar;
 import org.apache.hadoop.hive.common.type.HiveDecimal;
 import org.apache.hadoop.hive.serde.serdeConstants;
+import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector.PrimitiveCategory;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils.PrimitiveTypeEntry;
 
@@ -49,6 +51,7 @@ public final class TypeInfoFactory {
   public static final PrimitiveTypeInfo intTypeInfo = new PrimitiveTypeInfo(serdeConstants.INT_TYPE_NAME);
   public static final PrimitiveTypeInfo longTypeInfo = new PrimitiveTypeInfo(serdeConstants.BIGINT_TYPE_NAME);
   public static final PrimitiveTypeInfo stringTypeInfo = new PrimitiveTypeInfo(serdeConstants.STRING_TYPE_NAME);
+  public static final PrimitiveTypeInfo charTypeInfo = new CharTypeInfo(HiveChar.MAX_CHAR_LENGTH);
   public static final PrimitiveTypeInfo varcharTypeInfo = new VarcharTypeInfo(HiveVarchar.MAX_VARCHAR_LENGTH);
   public static final PrimitiveTypeInfo floatTypeInfo = new PrimitiveTypeInfo(serdeConstants.FLOAT_TYPE_NAME);
   public static final PrimitiveTypeInfo doubleTypeInfo = new PrimitiveTypeInfo(serdeConstants.DOUBLE_TYPE_NAME);
@@ -76,6 +79,7 @@ public final class TypeInfoFactory {
     cachedPrimitiveTypeInfo.put(serdeConstants.INT_TYPE_NAME, intTypeInfo);
     cachedPrimitiveTypeInfo.put(serdeConstants.BIGINT_TYPE_NAME, longTypeInfo);
     cachedPrimitiveTypeInfo.put(serdeConstants.STRING_TYPE_NAME, stringTypeInfo);
+    cachedPrimitiveTypeInfo.put(charTypeInfo.getQualifiedName(), charTypeInfo);
     cachedPrimitiveTypeInfo.put(varcharTypeInfo.getQualifiedName(), varcharTypeInfo);
     cachedPrimitiveTypeInfo.put(serdeConstants.FLOAT_TYPE_NAME, floatTypeInfo);
     cachedPrimitiveTypeInfo.put(serdeConstants.DOUBLE_TYPE_NAME, doubleTypeInfo);
@@ -132,6 +136,11 @@ public final class TypeInfoFactory {
     }
 
     switch (typeEntry.primitiveCategory) {
+      case CHAR:
+        if (parts.typeParams.length != 1) {
+          return null;
+        }
+        return new CharTypeInfo(Integer.valueOf(parts.typeParams[0]));
       case VARCHAR:
         if (parts.typeParams.length != 1) {
           return null;
@@ -148,6 +157,11 @@ public final class TypeInfoFactory {
     }
   }
 
+  public static CharTypeInfo getCharTypeInfo(int length) {
+    String fullName = BaseCharTypeInfo.getQualifiedName(serdeConstants.CHAR_TYPE_NAME, length);
+    return (CharTypeInfo) getPrimitiveTypeInfo(fullName);
+  }
+
   public static VarcharTypeInfo getVarcharTypeInfo(int length) {
     String fullName = BaseCharTypeInfo.getQualifiedName(serdeConstants.VARCHAR_TYPE_NAME, length);
     return (VarcharTypeInfo) getPrimitiveTypeInfo(fullName);

Modified: hive/branches/tez/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java (original)
+++ hive/branches/tez/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java Tue Nov 12 18:23:05 2013
@@ -29,6 +29,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
+import org.apache.hadoop.hive.common.type.HiveChar;
 import org.apache.hadoop.hive.common.type.HiveVarchar;
 import org.apache.hadoop.hive.serde.serdeConstants;
 import org.apache.hadoop.hive.serde2.objectinspector.ListObjectInspector;
@@ -397,17 +398,24 @@ public final class TypeInfoUtils {
         String qualifiedTypeName = typeEntry.typeName;
         String[] params = parseParams();
         switch (typeEntry.primitiveCategory) {
+        case CHAR:
         case VARCHAR:
           if (params == null || params.length == 0) {
-            throw new IllegalArgumentException( "Varchar type is specified without length: " + typeInfoString);
+            throw new IllegalArgumentException(typeEntry.typeName
+                + " type is specified without length: " + typeInfoString);
           }
 
           if (params.length == 1) {
             int length = Integer.valueOf(params[0]);
-            VarcharUtils.validateParameter(length);
+            if (typeEntry.primitiveCategory == PrimitiveCategory.VARCHAR) {
+              BaseCharUtils.validateVarcharParameter(length);
+            } else {
+              BaseCharUtils.validateCharParameter(length);
+            }
             qualifiedTypeName = BaseCharTypeInfo.getQualifiedName(typeEntry.typeName, length);
           } else if (params.length > 1) {
-            throw new IllegalArgumentException("Type varchar only takes one parameter, but " +
+            throw new IllegalArgumentException(
+                "Type " + typeEntry.typeName+ " only takes one parameter, but " +
                 params.length + " is seen");
           }
 
@@ -778,9 +786,10 @@ public final class TypeInfoUtils {
     switch (typeInfo.getPrimitiveCategory()) {
       case STRING:
         return HiveVarchar.MAX_VARCHAR_LENGTH;
+      case CHAR:
       case VARCHAR:
-        VarcharTypeInfo varcharTypeInfo = (VarcharTypeInfo) typeInfo;
-        return varcharTypeInfo.getLength();
+        BaseCharTypeInfo baseCharTypeInfo = (BaseCharTypeInfo) typeInfo;
+        return baseCharTypeInfo.getLength();
       default:
         return 0;
     }

Modified: hive/branches/tez/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/VarcharTypeInfo.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/VarcharTypeInfo.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/VarcharTypeInfo.java (original)
+++ hive/branches/tez/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/VarcharTypeInfo.java Tue Nov 12 18:23:05 2013
@@ -29,7 +29,7 @@ public class VarcharTypeInfo extends Bas
 
   public VarcharTypeInfo(int length) {
     super(serdeConstants.VARCHAR_TYPE_NAME, length);
-    VarcharUtils.validateParameter(length);
+    BaseCharUtils.validateVarcharParameter(length);
   }
 
   @Override

Modified: hive/branches/tez/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/primitive/TestPrimitiveObjectInspectorFactory.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/primitive/TestPrimitiveObjectInspectorFactory.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/primitive/TestPrimitiveObjectInspectorFactory.java (original)
+++ hive/branches/tez/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/primitive/TestPrimitiveObjectInspectorFactory.java Tue Nov 12 18:23:05 2013
@@ -30,6 +30,11 @@ public class TestPrimitiveObjectInspecto
     PrimitiveObjectInspector poi = PrimitiveObjectInspectorFactory
         .getPrimitiveWritableObjectInspector(PrimitiveCategory.VARCHAR);
     assertEquals(poi, PrimitiveObjectInspectorFactory.writableHiveVarcharObjectInspector);
+
+    // Same for char
+    poi = PrimitiveObjectInspectorFactory
+        .getPrimitiveWritableObjectInspector(PrimitiveCategory.CHAR);
+    assertEquals(poi, PrimitiveObjectInspectorFactory.writableHiveCharObjectInspector);
   }
 
   public void testGetPrimitiveJavaObjectInspector() {
@@ -37,5 +42,10 @@ public class TestPrimitiveObjectInspecto
     PrimitiveObjectInspector poi = PrimitiveObjectInspectorFactory
         .getPrimitiveJavaObjectInspector(PrimitiveCategory.VARCHAR);
     assertEquals(poi, PrimitiveObjectInspectorFactory.javaHiveVarcharObjectInspector);
+
+    // same for char
+    poi = PrimitiveObjectInspectorFactory
+        .getPrimitiveJavaObjectInspector(PrimitiveCategory.CHAR);
+    assertEquals(poi, PrimitiveObjectInspectorFactory.javaHiveCharObjectInspector);
   }
 }

Modified: hive/branches/tez/serde/src/test/org/apache/hadoop/hive/serde2/typeinfo/TestTypeInfoUtils.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/serde/src/test/org/apache/hadoop/hive/serde2/typeinfo/TestTypeInfoUtils.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/serde/src/test/org/apache/hadoop/hive/serde2/typeinfo/TestTypeInfoUtils.java (original)
+++ hive/branches/tez/serde/src/test/org/apache/hadoop/hive/serde2/typeinfo/TestTypeInfoUtils.java Tue Nov 12 18:23:05 2013
@@ -40,6 +40,7 @@ public class TestTypeInfoUtils extends T
         "int",
         "string",
         "varchar(10)",
+        "char(15)",
         "array<int>"
     };
 
@@ -48,7 +49,11 @@ public class TestTypeInfoUtils extends T
         "varchar(123",
         "varchar(123,",
         "varchar()",
-        "varchar("
+        "varchar(",
+        "char(123",
+        "char(123,)",
+        "char()",
+        "char("
     };
 
     for (String typeString : validTypeStrings) {
@@ -59,7 +64,7 @@ public class TestTypeInfoUtils extends T
     }
   }
 
-  public void testVarcharNoParams() {
+  public void testQualifiedTypeNoParams() {
     boolean caughtException = false;
     try {
       TypeInfoUtils.getTypeInfoFromTypeString("varchar");
@@ -67,5 +72,12 @@ public class TestTypeInfoUtils extends T
       caughtException = true;
     }
     assertEquals("varchar TypeInfo with no params should fail", true, caughtException);
+
+    try {
+      TypeInfoUtils.getTypeInfoFromTypeString("char");
+    } catch (Exception err) {
+      caughtException = true;
+    }
+    assertEquals("char TypeInfo with no params should fail", true, caughtException);
   }
 }

Modified: hive/branches/tez/service/if/TCLIService.thrift
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/if/TCLIService.thrift?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/if/TCLIService.thrift (original)
+++ hive/branches/tez/service/if/TCLIService.thrift Tue Nov 12 18:23:05 2013
@@ -45,6 +45,9 @@ enum TProtocolVersion {
 
   // V3 add varchar type, primitive type qualifiers
   HIVE_CLI_SERVICE_PROTOCOL_V3
+
+  // V4 add decimal precision/scale, char type
+  HIVE_CLI_SERVICE_PROTOCOL_V4
 }
 
 enum TTypeId {
@@ -66,7 +69,8 @@ enum TTypeId {
   DECIMAL_TYPE,
   NULL_TYPE,
   DATE_TYPE,
-  VARCHAR_TYPE
+  VARCHAR_TYPE,
+  CHAR_TYPE
 }
   
 const set<TTypeId> PRIMITIVE_TYPES = [
@@ -84,6 +88,7 @@ const set<TTypeId> PRIMITIVE_TYPES = [
   TTypeId.NULL_TYPE
   TTypeId.DATE_TYPE
   TTypeId.VARCHAR_TYPE
+  TTypeId.CHAR_TYPE
 ]
 
 const set<TTypeId> COMPLEX_TYPES = [
@@ -118,6 +123,7 @@ const map<TTypeId,string> TYPE_NAMES = {
   TTypeId.NULL_TYPE: "NULL"
   TTypeId.DATE_TYPE: "DATE"
   TTypeId.VARCHAR_TYPE: "VARCHAR"
+  TTypeId.CHAR_TYPE: "CHAR"
 }
 
 // Thrift does not support recursively defined types or forward declarations,
@@ -168,6 +174,10 @@ typedef i32 TTypeEntryPtr
 // Valid TTypeQualifiers key names
 const string CHARACTER_MAXIMUM_LENGTH = "characterMaximumLength"
 
+// Type qualifier key name for decimal
+const string PRECISION = "precision"
+const string SCALE = "scale"
+
 union TTypeQualifierValue {
   1: optional i32 i32Value
   2: optional string stringValue
@@ -497,7 +507,7 @@ struct TOpenSessionResp {
   1: required TStatus status
 
   // The protocol version that the server is using.
-  2: required TProtocolVersion serverProtocolVersion = TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V3
+  2: required TProtocolVersion serverProtocolVersion = TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V4
 
   // Session Handle
   3: optional TSessionHandle sessionHandle

Modified: hive/branches/tez/service/pom.xml
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/pom.xml?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/pom.xml (original)
+++ hive/branches/tez/service/pom.xml Tue Nov 12 18:23:05 2013
@@ -38,21 +38,42 @@
       <artifactId>hive-exec</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <dependency>
+      <groupId>org.apache.hive</groupId>
+      <artifactId>hive-metastore</artifactId>
+      <version>${project.version}</version>
+    </dependency>
     <!-- inter-project -->
     <dependency>
+      <groupId>commons-codec</groupId>
+      <artifactId>commons-codec</artifactId>
+      <version>${commons-codec.version}</version>
+    </dependency>
+    <dependency>
       <groupId>commons-cli</groupId>
       <artifactId>commons-cli</artifactId>
       <version>${commons-cli.version}</version>
     </dependency>
+    <!-- used by thrift generated code -->
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+      <version>${commons-lang.version}</version>
+    </dependency>
     <dependency>
       <groupId>commons-logging</groupId>
       <artifactId>commons-logging</artifactId>
       <version>${commons-logging.version}</version>
     </dependency>
     <dependency>
-      <groupId>commons-io</groupId>
-      <artifactId>commons-io</artifactId>
-      <version>${commons-io.version}</version>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jetty</artifactId>
+      <version>${jetty.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jetty-util</artifactId>
+      <version>${jetty.version}</version>
     </dependency>
     <dependency>
       <groupId>org.apache.thrift</groupId>
@@ -79,12 +100,6 @@
       <version>${junit.version}</version>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
-      <version>${mockito-all.version}</version>
-      <scope>test</scope>
-    </dependency>
   </dependencies>
 
   <profiles>

Modified: hive/branches/tez/service/src/gen/thrift/gen-cpp/TCLIService_constants.cpp
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/src/gen/thrift/gen-cpp/TCLIService_constants.cpp?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/src/gen/thrift/gen-cpp/TCLIService_constants.cpp (original)
+++ hive/branches/tez/service/src/gen/thrift/gen-cpp/TCLIService_constants.cpp Tue Nov 12 18:23:05 2013
@@ -25,6 +25,7 @@ TCLIServiceConstants::TCLIServiceConstan
   PRIMITIVE_TYPES.insert((TTypeId::type)16);
   PRIMITIVE_TYPES.insert((TTypeId::type)17);
   PRIMITIVE_TYPES.insert((TTypeId::type)18);
+  PRIMITIVE_TYPES.insert((TTypeId::type)19);
 
   COMPLEX_TYPES.insert((TTypeId::type)10);
   COMPLEX_TYPES.insert((TTypeId::type)11);
@@ -53,9 +54,14 @@ TCLIServiceConstants::TCLIServiceConstan
   TYPE_NAMES.insert(std::make_pair((TTypeId::type)16, "NULL"));
   TYPE_NAMES.insert(std::make_pair((TTypeId::type)17, "DATE"));
   TYPE_NAMES.insert(std::make_pair((TTypeId::type)18, "VARCHAR"));
+  TYPE_NAMES.insert(std::make_pair((TTypeId::type)19, "CHAR"));
 
   CHARACTER_MAXIMUM_LENGTH = "characterMaximumLength";
 
+  PRECISION = "precision";
+
+  SCALE = "scale";
+
 }
 
 }}}}} // namespace

Modified: hive/branches/tez/service/src/gen/thrift/gen-cpp/TCLIService_constants.h
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/src/gen/thrift/gen-cpp/TCLIService_constants.h?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/src/gen/thrift/gen-cpp/TCLIService_constants.h (original)
+++ hive/branches/tez/service/src/gen/thrift/gen-cpp/TCLIService_constants.h Tue Nov 12 18:23:05 2013
@@ -20,6 +20,8 @@ class TCLIServiceConstants {
   std::set<TTypeId::type>  COLLECTION_TYPES;
   std::map<TTypeId::type, std::string>  TYPE_NAMES;
   std::string CHARACTER_MAXIMUM_LENGTH;
+  std::string PRECISION;
+  std::string SCALE;
 };
 
 extern const TCLIServiceConstants g_TCLIService_constants;

Modified: hive/branches/tez/service/src/gen/thrift/gen-cpp/TCLIService_types.cpp
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/src/gen/thrift/gen-cpp/TCLIService_types.cpp?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/src/gen/thrift/gen-cpp/TCLIService_types.cpp (original)
+++ hive/branches/tez/service/src/gen/thrift/gen-cpp/TCLIService_types.cpp Tue Nov 12 18:23:05 2013
@@ -13,14 +13,16 @@ namespace apache { namespace hive { name
 int _kTProtocolVersionValues[] = {
   TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V1,
   TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V2,
-  TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V3
+  TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V3,
+  TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V4
 };
 const char* _kTProtocolVersionNames[] = {
   "HIVE_CLI_SERVICE_PROTOCOL_V1",
   "HIVE_CLI_SERVICE_PROTOCOL_V2",
-  "HIVE_CLI_SERVICE_PROTOCOL_V3"
+  "HIVE_CLI_SERVICE_PROTOCOL_V3",
+  "HIVE_CLI_SERVICE_PROTOCOL_V4"
 };
-const std::map<int, const char*> _TProtocolVersion_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kTProtocolVersionValues, _kTProtocolVersionNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+const std::map<int, const char*> _TProtocolVersion_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kTProtocolVersionValues, _kTProtocolVersionNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
 
 int _kTTypeIdValues[] = {
   TTypeId::BOOLEAN_TYPE,
@@ -41,7 +43,8 @@ int _kTTypeIdValues[] = {
   TTypeId::DECIMAL_TYPE,
   TTypeId::NULL_TYPE,
   TTypeId::DATE_TYPE,
-  TTypeId::VARCHAR_TYPE
+  TTypeId::VARCHAR_TYPE,
+  TTypeId::CHAR_TYPE
 };
 const char* _kTTypeIdNames[] = {
   "BOOLEAN_TYPE",
@@ -62,9 +65,10 @@ const char* _kTTypeIdNames[] = {
   "DECIMAL_TYPE",
   "NULL_TYPE",
   "DATE_TYPE",
-  "VARCHAR_TYPE"
+  "VARCHAR_TYPE",
+  "CHAR_TYPE"
 };
-const std::map<int, const char*> _TTypeId_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(19, _kTTypeIdValues, _kTTypeIdNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+const std::map<int, const char*> _TTypeId_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(20, _kTTypeIdValues, _kTTypeIdNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
 
 int _kTStatusCodeValues[] = {
   TStatusCode::SUCCESS_STATUS,

Modified: hive/branches/tez/service/src/gen/thrift/gen-cpp/TCLIService_types.h
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/src/gen/thrift/gen-cpp/TCLIService_types.h?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/src/gen/thrift/gen-cpp/TCLIService_types.h (original)
+++ hive/branches/tez/service/src/gen/thrift/gen-cpp/TCLIService_types.h Tue Nov 12 18:23:05 2013
@@ -20,7 +20,8 @@ struct TProtocolVersion {
   enum type {
     HIVE_CLI_SERVICE_PROTOCOL_V1 = 0,
     HIVE_CLI_SERVICE_PROTOCOL_V2 = 1,
-    HIVE_CLI_SERVICE_PROTOCOL_V3 = 2
+    HIVE_CLI_SERVICE_PROTOCOL_V3 = 2,
+    HIVE_CLI_SERVICE_PROTOCOL_V4 = 3
   };
 };
 
@@ -46,7 +47,8 @@ struct TTypeId {
     DECIMAL_TYPE = 15,
     NULL_TYPE = 16,
     DATE_TYPE = 17,
-    VARCHAR_TYPE = 18
+    VARCHAR_TYPE = 18,
+    CHAR_TYPE = 19
   };
 };
 
@@ -1657,8 +1659,8 @@ class TOpenSessionResp {
   static const char* ascii_fingerprint; // = "CFE7D7F4E9EC671F2518ED74FEE9F163";
   static const uint8_t binary_fingerprint[16]; // = {0xCF,0xE7,0xD7,0xF4,0xE9,0xEC,0x67,0x1F,0x25,0x18,0xED,0x74,0xFE,0xE9,0xF1,0x63};
 
-  TOpenSessionResp() : serverProtocolVersion((TProtocolVersion::type)2) {
-    serverProtocolVersion = (TProtocolVersion::type)2;
+  TOpenSessionResp() : serverProtocolVersion((TProtocolVersion::type)3) {
+    serverProtocolVersion = (TProtocolVersion::type)3;
 
   }
 

Modified: hive/branches/tez/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TCLIServiceConstants.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TCLIServiceConstants.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TCLIServiceConstants.java (original)
+++ hive/branches/tez/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TCLIServiceConstants.java Tue Nov 12 18:23:05 2013
@@ -49,6 +49,7 @@ public class TCLIServiceConstants {
     PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.NULL_TYPE);
     PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.DATE_TYPE);
     PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.VARCHAR_TYPE);
+    PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.CHAR_TYPE);
   }
 
   public static final Set<TTypeId> COMPLEX_TYPES = new HashSet<TTypeId>();
@@ -86,8 +87,13 @@ public class TCLIServiceConstants {
     TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.NULL_TYPE, "NULL");
     TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.DATE_TYPE, "DATE");
     TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.VARCHAR_TYPE, "VARCHAR");
+    TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.CHAR_TYPE, "CHAR");
   }
 
   public static final String CHARACTER_MAXIMUM_LENGTH = "characterMaximumLength";
 
+  public static final String PRECISION = "precision";
+
+  public static final String SCALE = "scale";
+
 }

Modified: hive/branches/tez/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TOpenSessionResp.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TOpenSessionResp.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TOpenSessionResp.java (original)
+++ hive/branches/tez/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TOpenSessionResp.java Tue Nov 12 18:23:05 2013
@@ -141,7 +141,7 @@ public class TOpenSessionResp implements
   }
 
   public TOpenSessionResp() {
-    this.serverProtocolVersion = org.apache.hive.service.cli.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V3;
+    this.serverProtocolVersion = org.apache.hive.service.cli.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V4;
 
   }
 
@@ -191,7 +191,7 @@ public class TOpenSessionResp implements
   @Override
   public void clear() {
     this.status = null;
-    this.serverProtocolVersion = org.apache.hive.service.cli.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V3;
+    this.serverProtocolVersion = org.apache.hive.service.cli.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V4;
 
     this.sessionHandle = null;
     this.configuration = null;

Modified: hive/branches/tez/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TProtocolVersion.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TProtocolVersion.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TProtocolVersion.java (original)
+++ hive/branches/tez/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TProtocolVersion.java Tue Nov 12 18:23:05 2013
@@ -14,7 +14,8 @@ import org.apache.thrift.TEnum;
 public enum TProtocolVersion implements org.apache.thrift.TEnum {
   HIVE_CLI_SERVICE_PROTOCOL_V1(0),
   HIVE_CLI_SERVICE_PROTOCOL_V2(1),
-  HIVE_CLI_SERVICE_PROTOCOL_V3(2);
+  HIVE_CLI_SERVICE_PROTOCOL_V3(2),
+  HIVE_CLI_SERVICE_PROTOCOL_V4(3);
 
   private final int value;
 
@@ -41,6 +42,8 @@ public enum TProtocolVersion implements 
         return HIVE_CLI_SERVICE_PROTOCOL_V2;
       case 2:
         return HIVE_CLI_SERVICE_PROTOCOL_V3;
+      case 3:
+        return HIVE_CLI_SERVICE_PROTOCOL_V4;
       default:
         return null;
     }

Modified: hive/branches/tez/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTypeId.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTypeId.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTypeId.java (original)
+++ hive/branches/tez/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTypeId.java Tue Nov 12 18:23:05 2013
@@ -30,7 +30,8 @@ public enum TTypeId implements org.apach
   DECIMAL_TYPE(15),
   NULL_TYPE(16),
   DATE_TYPE(17),
-  VARCHAR_TYPE(18);
+  VARCHAR_TYPE(18),
+  CHAR_TYPE(19);
 
   private final int value;
 
@@ -89,6 +90,8 @@ public enum TTypeId implements org.apach
         return DATE_TYPE;
       case 18:
         return VARCHAR_TYPE;
+      case 19:
+        return CHAR_TYPE;
       default:
         return null;
     }

Modified: hive/branches/tez/service/src/gen/thrift/gen-py/TCLIService/constants.py
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/src/gen/thrift/gen-py/TCLIService/constants.py?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/src/gen/thrift/gen-py/TCLIService/constants.py (original)
+++ hive/branches/tez/service/src/gen/thrift/gen-py/TCLIService/constants.py Tue Nov 12 18:23:05 2013
@@ -24,6 +24,7 @@ PRIMITIVE_TYPES = set([
     16,
     17,
     18,
+    19,
 ])
 COMPLEX_TYPES = set([
     10,
@@ -55,5 +56,8 @@ TYPE_NAMES = {
     16 : "NULL",
     17 : "DATE",
     18 : "VARCHAR",
+    19 : "CHAR",
 }
 CHARACTER_MAXIMUM_LENGTH = "characterMaximumLength"
+PRECISION = "precision"
+SCALE = "scale"

Modified: hive/branches/tez/service/src/gen/thrift/gen-py/TCLIService/ttypes.py
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/src/gen/thrift/gen-py/TCLIService/ttypes.py?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/src/gen/thrift/gen-py/TCLIService/ttypes.py (original)
+++ hive/branches/tez/service/src/gen/thrift/gen-py/TCLIService/ttypes.py Tue Nov 12 18:23:05 2013
@@ -20,17 +20,20 @@ class TProtocolVersion:
   HIVE_CLI_SERVICE_PROTOCOL_V1 = 0
   HIVE_CLI_SERVICE_PROTOCOL_V2 = 1
   HIVE_CLI_SERVICE_PROTOCOL_V3 = 2
+  HIVE_CLI_SERVICE_PROTOCOL_V4 = 3
 
   _VALUES_TO_NAMES = {
     0: "HIVE_CLI_SERVICE_PROTOCOL_V1",
     1: "HIVE_CLI_SERVICE_PROTOCOL_V2",
     2: "HIVE_CLI_SERVICE_PROTOCOL_V3",
+    3: "HIVE_CLI_SERVICE_PROTOCOL_V4",
   }
 
   _NAMES_TO_VALUES = {
     "HIVE_CLI_SERVICE_PROTOCOL_V1": 0,
     "HIVE_CLI_SERVICE_PROTOCOL_V2": 1,
     "HIVE_CLI_SERVICE_PROTOCOL_V3": 2,
+    "HIVE_CLI_SERVICE_PROTOCOL_V4": 3,
   }
 
 class TTypeId:
@@ -53,6 +56,7 @@ class TTypeId:
   NULL_TYPE = 16
   DATE_TYPE = 17
   VARCHAR_TYPE = 18
+  CHAR_TYPE = 19
 
   _VALUES_TO_NAMES = {
     0: "BOOLEAN_TYPE",
@@ -74,6 +78,7 @@ class TTypeId:
     16: "NULL_TYPE",
     17: "DATE_TYPE",
     18: "VARCHAR_TYPE",
+    19: "CHAR_TYPE",
   }
 
   _NAMES_TO_VALUES = {
@@ -96,6 +101,7 @@ class TTypeId:
     "NULL_TYPE": 16,
     "DATE_TYPE": 17,
     "VARCHAR_TYPE": 18,
+    "CHAR_TYPE": 19,
   }
 
 class TStatusCode:
@@ -2710,7 +2716,7 @@ class TOpenSessionResp:
   thrift_spec = (
     None, # 0
     (1, TType.STRUCT, 'status', (TStatus, TStatus.thrift_spec), None, ), # 1
-    (2, TType.I32, 'serverProtocolVersion', None,     2, ), # 2
+    (2, TType.I32, 'serverProtocolVersion', None,     3, ), # 2
     (3, TType.STRUCT, 'sessionHandle', (TSessionHandle, TSessionHandle.thrift_spec), None, ), # 3
     (4, TType.MAP, 'configuration', (TType.STRING,None,TType.STRING,None), None, ), # 4
   )

Modified: hive/branches/tez/service/src/gen/thrift/gen-rb/t_c_l_i_service_constants.rb
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/src/gen/thrift/gen-rb/t_c_l_i_service_constants.rb?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/src/gen/thrift/gen-rb/t_c_l_i_service_constants.rb (original)
+++ hive/branches/tez/service/src/gen/thrift/gen-rb/t_c_l_i_service_constants.rb Tue Nov 12 18:23:05 2013
@@ -22,6 +22,7 @@ PRIMITIVE_TYPES = Set.new([
     16,
     17,
     18,
+    19,
 ])
 
 COMPLEX_TYPES = Set.new([
@@ -56,7 +57,12 @@ TYPE_NAMES = {
     16 => %q"NULL",
     17 => %q"DATE",
     18 => %q"VARCHAR",
+    19 => %q"CHAR",
 }
 
 CHARACTER_MAXIMUM_LENGTH = %q"characterMaximumLength"
 
+PRECISION = %q"precision"
+
+SCALE = %q"scale"
+

Modified: hive/branches/tez/service/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb (original)
+++ hive/branches/tez/service/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb Tue Nov 12 18:23:05 2013
@@ -10,8 +10,9 @@ module TProtocolVersion
   HIVE_CLI_SERVICE_PROTOCOL_V1 = 0
   HIVE_CLI_SERVICE_PROTOCOL_V2 = 1
   HIVE_CLI_SERVICE_PROTOCOL_V3 = 2
-  VALUE_MAP = {0 => "HIVE_CLI_SERVICE_PROTOCOL_V1", 1 => "HIVE_CLI_SERVICE_PROTOCOL_V2", 2 => "HIVE_CLI_SERVICE_PROTOCOL_V3"}
-  VALID_VALUES = Set.new([HIVE_CLI_SERVICE_PROTOCOL_V1, HIVE_CLI_SERVICE_PROTOCOL_V2, HIVE_CLI_SERVICE_PROTOCOL_V3]).freeze
+  HIVE_CLI_SERVICE_PROTOCOL_V4 = 3
+  VALUE_MAP = {0 => "HIVE_CLI_SERVICE_PROTOCOL_V1", 1 => "HIVE_CLI_SERVICE_PROTOCOL_V2", 2 => "HIVE_CLI_SERVICE_PROTOCOL_V3", 3 => "HIVE_CLI_SERVICE_PROTOCOL_V4"}
+  VALID_VALUES = Set.new([HIVE_CLI_SERVICE_PROTOCOL_V1, HIVE_CLI_SERVICE_PROTOCOL_V2, HIVE_CLI_SERVICE_PROTOCOL_V3, HIVE_CLI_SERVICE_PROTOCOL_V4]).freeze
 end
 
 module TTypeId
@@ -34,8 +35,9 @@ module TTypeId
   NULL_TYPE = 16
   DATE_TYPE = 17
   VARCHAR_TYPE = 18
-  VALUE_MAP = {0 => "BOOLEAN_TYPE", 1 => "TINYINT_TYPE", 2 => "SMALLINT_TYPE", 3 => "INT_TYPE", 4 => "BIGINT_TYPE", 5 => "FLOAT_TYPE", 6 => "DOUBLE_TYPE", 7 => "STRING_TYPE", 8 => "TIMESTAMP_TYPE", 9 => "BINARY_TYPE", 10 => "ARRAY_TYPE", 11 => "MAP_TYPE", 12 => "STRUCT_TYPE", 13 => "UNION_TYPE", 14 => "USER_DEFINED_TYPE", 15 => "DECIMAL_TYPE", 16 => "NULL_TYPE", 17 => "DATE_TYPE", 18 => "VARCHAR_TYPE"}
-  VALID_VALUES = Set.new([BOOLEAN_TYPE, TINYINT_TYPE, SMALLINT_TYPE, INT_TYPE, BIGINT_TYPE, FLOAT_TYPE, DOUBLE_TYPE, STRING_TYPE, TIMESTAMP_TYPE, BINARY_TYPE, ARRAY_TYPE, MAP_TYPE, STRUCT_TYPE, UNION_TYPE, USER_DEFINED_TYPE, DECIMAL_TYPE, NULL_TYPE, DATE_TYPE, VARCHAR_TYPE]).freeze
+  CHAR_TYPE = 19
+  VALUE_MAP = {0 => "BOOLEAN_TYPE", 1 => "TINYINT_TYPE", 2 => "SMALLINT_TYPE", 3 => "INT_TYPE", 4 => "BIGINT_TYPE", 5 => "FLOAT_TYPE", 6 => "DOUBLE_TYPE", 7 => "STRING_TYPE", 8 => "TIMESTAMP_TYPE", 9 => "BINARY_TYPE", 10 => "ARRAY_TYPE", 11 => "MAP_TYPE", 12 => "STRUCT_TYPE", 13 => "UNION_TYPE", 14 => "USER_DEFINED_TYPE", 15 => "DECIMAL_TYPE", 16 => "NULL_TYPE", 17 => "DATE_TYPE", 18 => "VARCHAR_TYPE", 19 => "CHAR_TYPE"}
+  VALID_VALUES = Set.new([BOOLEAN_TYPE, TINYINT_TYPE, SMALLINT_TYPE, INT_TYPE, BIGINT_TYPE, FLOAT_TYPE, DOUBLE_TYPE, STRING_TYPE, TIMESTAMP_TYPE, BINARY_TYPE, ARRAY_TYPE, MAP_TYPE, STRUCT_TYPE, UNION_TYPE, USER_DEFINED_TYPE, DECIMAL_TYPE, NULL_TYPE, DATE_TYPE, VARCHAR_TYPE, CHAR_TYPE]).freeze
 end
 
 module TStatusCode
@@ -803,7 +805,7 @@ class TOpenSessionResp
 
   FIELDS = {
     STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::TStatus},
-    SERVERPROTOCOLVERSION => {:type => ::Thrift::Types::I32, :name => 'serverProtocolVersion', :default =>     2, :enum_class => ::TProtocolVersion},
+    SERVERPROTOCOLVERSION => {:type => ::Thrift::Types::I32, :name => 'serverProtocolVersion', :default =>     3, :enum_class => ::TProtocolVersion},
     SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::TSessionHandle, :optional => true},
     CONFIGURATION => {:type => ::Thrift::Types::MAP, :name => 'configuration', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true}
   }

Modified: hive/branches/tez/service/src/java/org/apache/hive/service/auth/HiveAuthFactory.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/src/java/org/apache/hive/service/auth/HiveAuthFactory.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/src/java/org/apache/hive/service/auth/HiveAuthFactory.java (original)
+++ hive/branches/tez/service/src/java/org/apache/hive/service/auth/HiveAuthFactory.java Tue Nov 12 18:23:05 2013
@@ -18,6 +18,12 @@
 package org.apache.hive.service.auth;
 
 import java.io.IOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.UnknownHostException;
+import java.text.MessageFormat;
+import java.util.HashMap;
+import java.util.Map;
 
 import javax.security.auth.login.LoginException;
 import javax.security.sasl.Sasl;
@@ -28,15 +34,15 @@ import org.apache.hadoop.hive.shims.Shim
 import org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge;
 import org.apache.hive.service.cli.thrift.ThriftCLIService;
 import org.apache.thrift.TProcessorFactory;
+import org.apache.thrift.transport.TSSLTransportFactory;
+import org.apache.thrift.transport.TServerSocket;
+import org.apache.thrift.transport.TSocket;
+import org.apache.thrift.transport.TTransport;
 import org.apache.thrift.transport.TTransportException;
 import org.apache.thrift.transport.TTransportFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.text.MessageFormat;
-import java.util.HashMap;
-import java.util.Map;
-
 public class HiveAuthFactory {
   private static final Logger LOG = LoggerFactory.getLogger(HiveAuthFactory.class);
 
@@ -153,4 +159,44 @@ public class HiveAuthFactory {
     }
   }
 
+  public static TTransport getSocketTransport(String host, int port, int loginTimeout)
+      throws TTransportException {
+    return new TSocket(host, port, loginTimeout);
+  }
+
+  public static TTransport getSSLSocket(String host, int port, int loginTimeout)
+      throws TTransportException {
+    return TSSLTransportFactory.getClientSocket(host, port, loginTimeout);
+  }
+
+  public static TTransport getSSLSocket(String host, int port, int loginTimeout,
+      String trustStorePath, String trustStorePassWord) throws TTransportException {
+    TSSLTransportFactory.TSSLTransportParameters params =
+        new TSSLTransportFactory.TSSLTransportParameters();
+    params.setTrustStore(trustStorePath, trustStorePassWord);
+    params.requireClientAuth(true);
+    return TSSLTransportFactory.getClientSocket(host, port, loginTimeout, params);
+  }
+
+  public static TServerSocket getServerSocket(String hiveHost, int portNum)
+      throws TTransportException {
+    InetSocketAddress serverAddress = null;
+    if (hiveHost != null && !hiveHost.isEmpty()) {
+      serverAddress = new InetSocketAddress(hiveHost, portNum);
+    } else {
+      serverAddress = new  InetSocketAddress(portNum);
+    }
+    return new TServerSocket(serverAddress );
+  }
+
+  public static TServerSocket getServerSSLSocket(String hiveHost, int portNum,
+      String keyStorePath, String keyStorePassWord) throws TTransportException, UnknownHostException {
+    TSSLTransportFactory.TSSLTransportParameters params =
+        new TSSLTransportFactory.TSSLTransportParameters();
+    params.setKeyStore(keyStorePath, keyStorePassWord);
+
+    return TSSLTransportFactory.getServerSocket(portNum, 10000,
+        InetAddress.getByName(hiveHost), params);
+  }
+
 }

Modified: hive/branches/tez/service/src/java/org/apache/hive/service/cli/ColumnValue.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/src/java/org/apache/hive/service/cli/ColumnValue.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/src/java/org/apache/hive/service/cli/ColumnValue.java (original)
+++ hive/branches/tez/service/src/java/org/apache/hive/service/cli/ColumnValue.java Tue Nov 12 18:23:05 2013
@@ -21,6 +21,7 @@ package org.apache.hive.service.cli;
 import java.sql.Date;
 import java.sql.Timestamp;
 
+import org.apache.hadoop.hive.common.type.HiveChar;
 import org.apache.hadoop.hive.common.type.HiveDecimal;
 import org.apache.hadoop.hive.common.type.HiveVarchar;
 import org.apache.hive.service.cli.thrift.TBoolValue;
@@ -119,6 +120,14 @@ public class ColumnValue {
     return new ColumnValue(TColumnValue.stringVal(tStringValue));
   }
 
+  public static ColumnValue stringValue(HiveChar value) {
+    TStringValue tStringValue = new TStringValue();
+    if (value != null) {
+      tStringValue.setValue(value.toString());
+    }
+    return new ColumnValue(TColumnValue.stringVal(tStringValue));
+  }
+
   public static ColumnValue stringValue(HiveVarchar value) {
     TStringValue tStringValue = new TStringValue();
     if (value != null) {
@@ -146,7 +155,7 @@ public class ColumnValue {
   public static ColumnValue stringValue(HiveDecimal value) {
     TStringValue tStrValue = new TStringValue();
     if (value != null) {
-      tStrValue.setValue(((HiveDecimal)value).toString());
+      tStrValue.setValue(value.toString());
     }
     return new ColumnValue(TColumnValue.stringVal(tStrValue));
   }
@@ -169,6 +178,8 @@ public class ColumnValue {
       return doubleValue((Double)value);
     case STRING_TYPE:
       return stringValue((String)value);
+    case CHAR_TYPE:
+      return stringValue((HiveChar)value);
     case VARCHAR_TYPE:
       return stringValue((HiveVarchar)value);
     case DATE_TYPE:

Modified: hive/branches/tez/service/src/java/org/apache/hive/service/cli/Type.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/src/java/org/apache/hive/service/cli/Type.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/src/java/org/apache/hive/service/cli/Type.java (original)
+++ hive/branches/tez/service/src/java/org/apache/hive/service/cli/Type.java Tue Nov 12 18:23:05 2013
@@ -54,6 +54,10 @@ public enum Type {
   STRING_TYPE("STRING",
       java.sql.Types.VARCHAR,
       TTypeId.STRING_TYPE),
+  CHAR_TYPE("CHAR",
+      java.sql.Types.CHAR,
+      TTypeId.CHAR_TYPE,
+      true, false, false),
   VARCHAR_TYPE("VARCHAR",
       java.sql.Types.VARCHAR,
       TTypeId.VARCHAR_TYPE,

Modified: hive/branches/tez/service/src/java/org/apache/hive/service/cli/TypeQualifiers.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/src/java/org/apache/hive/service/cli/TypeQualifiers.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/src/java/org/apache/hive/service/cli/TypeQualifiers.java (original)
+++ hive/branches/tez/service/src/java/org/apache/hive/service/cli/TypeQualifiers.java Tue Nov 12 18:23:05 2013
@@ -21,6 +21,8 @@ package org.apache.hive.service.cli;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.hadoop.hive.serde2.typeinfo.CharTypeInfo;
+import org.apache.hadoop.hive.serde2.typeinfo.DecimalTypeInfo;
 import org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo;
 import org.apache.hadoop.hive.serde2.typeinfo.VarcharTypeInfo;
 import org.apache.hive.service.cli.thrift.TCLIServiceConstants;
@@ -33,6 +35,8 @@ import org.apache.hive.service.cli.thrif
  */
 public class TypeQualifiers {
   private Integer characterMaximumLength;
+  private Integer precision;
+  private Integer scale;
 
   public TypeQualifiers() {}
 
@@ -53,6 +57,18 @@ public class TypeQualifiers {
       qMap.put(TCLIServiceConstants.CHARACTER_MAXIMUM_LENGTH, val);
     }
 
+    if (precision != null) {
+      TTypeQualifierValue val = new TTypeQualifierValue();
+      val.setI32Value(precision.intValue());
+      qMap.put(TCLIServiceConstants.PRECISION, val);
+    }
+
+    if (scale != null) {
+      TTypeQualifierValue val = new TTypeQualifierValue();
+      val.setI32Value(scale.intValue());
+      qMap.put(TCLIServiceConstants.SCALE, val);
+    }
+
     if (qMap.size() > 0) {
       ret = new TTypeQualifiers(qMap);
     }
@@ -70,18 +86,48 @@ public class TypeQualifiers {
         ret.setCharacterMaximumLength(
             tqMap.get(TCLIServiceConstants.CHARACTER_MAXIMUM_LENGTH).getI32Value());
       }
+
+      if (tqMap.containsKey(TCLIServiceConstants.PRECISION)) {
+        ret.setPrecision(tqMap.get(TCLIServiceConstants.PRECISION).getI32Value());
+      }
+
+      if (tqMap.containsKey(TCLIServiceConstants.SCALE)) {
+        ret.setScale(tqMap.get(TCLIServiceConstants.SCALE).getI32Value());
+      }
     }
     return ret;
   }
 
   public static TypeQualifiers fromTypeInfo(PrimitiveTypeInfo pti) {
+    TypeQualifiers result = null;
     if (pti instanceof VarcharTypeInfo) {
-      TypeQualifiers ret = new TypeQualifiers();
-      ret.setCharacterMaximumLength(((VarcharTypeInfo)pti).getLength());
-      return ret;
-    } else {
-      return null;
+      result = new TypeQualifiers();
+      result.setCharacterMaximumLength(((VarcharTypeInfo)pti).getLength());
+    }  else if (pti instanceof CharTypeInfo) {
+      result = new TypeQualifiers();
+      result.setCharacterMaximumLength(((CharTypeInfo)pti).getLength());
+    } else if (pti instanceof DecimalTypeInfo) {
+      result = new TypeQualifiers();
+      result.setPrecision(((DecimalTypeInfo)pti).precision());
+      result.setScale(((DecimalTypeInfo)pti).scale());
     }
+    return result;
+  }
+
+  public Integer getPrecision() {
+    return precision;
+  }
+
+  public void setPrecision(Integer precision) {
+    this.precision = precision;
+  }
+
+  public Integer getScale() {
+    return scale;
+  }
+
+  public void setScale(Integer scale) {
+    this.scale = scale;
   }
 
 }

Modified: hive/branches/tez/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java (original)
+++ hive/branches/tez/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java Tue Nov 12 18:23:05 2013
@@ -165,7 +165,8 @@ public class SQLOperation extends Execut
           getParentSession().getSessionManager().submitBackgroundOperation(backgroundOperation);
       } catch (RejectedExecutionException rejected) {
         setState(OperationState.ERROR);
-        throw new HiveSQLException(rejected);
+        throw new HiveSQLException("All the asynchronous threads are currently busy, " +
+            "please retry the operation", rejected);
       }
     }
   }

Modified: hive/branches/tez/service/src/java/org/apache/hive/service/cli/session/SessionManager.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/src/java/org/apache/hive/service/cli/session/SessionManager.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/src/java/org/apache/hive/service/cli/session/SessionManager.java (original)
+++ hive/branches/tez/service/src/java/org/apache/hive/service/cli/session/SessionManager.java Tue Nov 12 18:23:05 2013
@@ -21,16 +21,16 @@ package org.apache.hive.service.cli.sess
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hive.conf.HiveConf;
-import org.apache.hadoop.hive.ql.hooks.HookUtils;
 import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
+import org.apache.hadoop.hive.ql.hooks.HookUtils;
 import org.apache.hive.service.CompositeService;
 import org.apache.hive.service.cli.HiveSQLException;
 import org.apache.hive.service.cli.SessionHandle;
@@ -46,7 +46,7 @@ public class SessionManager extends Comp
   private final Map<SessionHandle, HiveSession> handleToSession = new HashMap<SessionHandle, HiveSession>();
   private OperationManager operationManager = new OperationManager();
   private static final Object sessionMapLock = new Object();
-  private ExecutorService backgroundOperationPool;
+  private ThreadPoolExecutor backgroundOperationPool;
 
   public SessionManager() {
     super("SessionManager");
@@ -57,8 +57,17 @@ public class SessionManager extends Comp
     this.hiveConf = hiveConf;
     operationManager = new OperationManager();
     int backgroundPoolSize = hiveConf.getIntVar(ConfVars.HIVE_SERVER2_ASYNC_EXEC_THREADS);
-    LOG.info("HiveServer2: Async execution pool size" + backgroundPoolSize);
-    backgroundOperationPool = Executors.newFixedThreadPool(backgroundPoolSize);
+    LOG.info("HiveServer2: Async execution thread pool size: " + backgroundPoolSize);
+    int backgroundPoolQueueSize = hiveConf.getIntVar(ConfVars.HIVE_SERVER2_ASYNC_EXEC_WAIT_QUEUE_SIZE);
+    LOG.info("HiveServer2: Async execution wait queue size: " + backgroundPoolQueueSize);
+    int keepAliveTime = hiveConf.getIntVar(ConfVars.HIVE_SERVER2_ASYNC_EXEC_KEEPALIVE_TIME);
+    LOG.info("HiveServer2: Async execution thread keepalive time: " + keepAliveTime);
+    // Create a thread pool with #backgroundPoolSize threads
+    // Threads terminate when they are idle for more than the keepAliveTime
+    // An bounded blocking queue is used to queue incoming operations, if #operations > backgroundPoolSize
+    backgroundOperationPool = new ThreadPoolExecutor(backgroundPoolSize, backgroundPoolSize,
+        keepAliveTime, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(backgroundPoolQueueSize));
+    backgroundOperationPool.allowCoreThreadTimeOut(true);
     addService(operationManager);
     super.init(hiveConf);
   }
@@ -66,26 +75,23 @@ public class SessionManager extends Comp
   @Override
   public synchronized void start() {
     super.start();
-    // TODO
   }
 
   @Override
   public synchronized void stop() {
-    // TODO
     super.stop();
     if (backgroundOperationPool != null) {
       backgroundOperationPool.shutdown();
-      long timeout = hiveConf.getLongVar(ConfVars.HIVE_SERVER2_ASYNC_EXEC_SHUTDOWN_TIMEOUT);
+      int timeout = hiveConf.getIntVar(ConfVars.HIVE_SERVER2_ASYNC_EXEC_SHUTDOWN_TIMEOUT);
       try {
         backgroundOperationPool.awaitTermination(timeout, TimeUnit.SECONDS);
-      } catch (InterruptedException exc) {
+      } catch (InterruptedException e) {
         LOG.warn("HIVE_SERVER2_ASYNC_EXEC_SHUTDOWN_TIMEOUT = " + timeout +
-        		" seconds has been exceeded. RUNNING background operations will be shut down", exc);
+            " seconds has been exceeded. RUNNING background operations will be shut down", e);
       }
     }
   }
 
-
   public SessionHandle openSession(String username, String password, Map<String, String> sessionConf)
           throws HiveSQLException {
      return openSession(username, password, sessionConf, false, null);
@@ -129,7 +135,6 @@ public class SessionManager extends Comp
     session.close();
   }
 
-
   public HiveSession getSession(SessionHandle sessionHandle) throws HiveSQLException {
     HiveSession session;
     synchronized(sessionMapLock) {

Modified: hive/branches/tez/service/src/java/org/apache/hive/service/cli/thrift/ThriftBinaryCLIService.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/service/src/java/org/apache/hive/service/cli/thrift/ThriftBinaryCLIService.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/service/src/java/org/apache/hive/service/cli/thrift/ThriftBinaryCLIService.java (original)
+++ hive/branches/tez/service/src/java/org/apache/hive/service/cli/thrift/ThriftBinaryCLIService.java Tue Nov 12 18:23:05 2013
@@ -64,7 +64,19 @@ public class ThriftBinaryCLIService exte
       minWorkerThreads = hiveConf.getIntVar(ConfVars.HIVE_SERVER2_THRIFT_MIN_WORKER_THREADS);
       maxWorkerThreads = hiveConf.getIntVar(ConfVars.HIVE_SERVER2_THRIFT_MAX_WORKER_THREADS);
 
-      TThreadPoolServer.Args sargs = new TThreadPoolServer.Args(new TServerSocket(serverAddress))
+      TServerSocket serverSocket = null;
+      if (!hiveConf.getBoolVar(ConfVars.HIVE_SERVER2_USE_SSL)) {
+        serverSocket = HiveAuthFactory.getServerSocket(hiveHost, portNum);
+      } else {
+        String keyStorePath = hiveConf.getVar(ConfVars.HIVE_SERVER2_SSL_KEYSTORE_PATH).trim();
+        if (keyStorePath.isEmpty()) {
+          throw new IllegalArgumentException(ConfVars.HIVE_SERVER2_SSL_KEYSTORE_PATH.varname +
+              " Not configured for SSL connection");
+        }
+        serverSocket = HiveAuthFactory.getServerSSLSocket(hiveHost, portNum,
+            keyStorePath, hiveConf.getVar(ConfVars.HIVE_SERVER2_SSL_KEYSTORE_PASSWORD));
+      }
+      TThreadPoolServer.Args sargs = new TThreadPoolServer.Args(serverSocket)
       .processorFactory(processorFactory)
       .transportFactory(transportFactory)
       .protocolFactory(new TBinaryProtocol.Factory())
@@ -82,4 +94,4 @@ public class ThriftBinaryCLIService exte
     }
 
   }
-}
\ No newline at end of file
+}

Modified: hive/branches/tez/shims/0.20/src/main/java/org/apache/hadoop/hive/shims/Hadoop20Shims.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/shims/0.20/src/main/java/org/apache/hadoop/hive/shims/Hadoop20Shims.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/shims/0.20/src/main/java/org/apache/hadoop/hive/shims/Hadoop20Shims.java (original)
+++ hive/branches/tez/shims/0.20/src/main/java/org/apache/hadoop/hive/shims/Hadoop20Shims.java Tue Nov 12 18:23:05 2013
@@ -83,32 +83,6 @@ import org.apache.hadoop.util.VersionInf
  */
 public class Hadoop20Shims implements HadoopShims {
 
-  public boolean usesJobShell() {
-    return false;
-  }
-
-  public boolean fileSystemDeleteOnExit(FileSystem fs, Path path)
-      throws IOException {
-
-    return fs.deleteOnExit(path);
-  }
-
-  public void inputFormatValidateInput(InputFormat fmt, JobConf conf)
-      throws IOException {
-    // gone in 0.18+
-  }
-
-  public boolean isJobPreparing(RunningJob job) throws IOException {
-    return job.getJobState() == JobStatus.PREP;
-  }
-  /**
-   * Workaround for hadoop-17 - jobclient only looks at commandlineconfig.
-   */
-  public void setTmpFiles(String prop, String files) {
-    // gone in 20+
-  }
-
-
   /**
    * Returns a shim to wrap MiniMrCluster
    */
@@ -172,24 +146,6 @@ public class Hadoop20Shims implements Ha
     }
   }
 
-  /**
-   * We define this function here to make the code compatible between
-   * hadoop 0.17 and hadoop 0.20.
-   *
-   * Hive binary that compiled Text.compareTo(Text) with hadoop 0.20 won't
-   * work with hadoop 0.17 because in hadoop 0.20, Text.compareTo(Text) is
-   * implemented in org.apache.hadoop.io.BinaryComparable, and Java compiler
-   * references that class, which is not available in hadoop 0.17.
-   */
-  public int compareText(Text a, Text b) {
-    return a.compareTo(b);
-  }
-
-  @Override
-  public long getAccessTime(FileStatus file) {
-    return file.getAccessTime();
-  }
-
   public HadoopShims.CombineFileInputFormatShim getCombineFileInputFormat() {
     return new CombineFileInputFormatShim() {
       @Override
@@ -485,18 +441,6 @@ public class Hadoop20Shims implements Ha
   String[] ret = new String[2];
 
   @Override
-  public String[] getTaskJobIDs(TaskCompletionEvent t) {
-    TaskID tid = t.getTaskAttemptId().getTaskID();
-    ret[0] = tid.toString();
-    ret[1] = tid.getJobID().toString();
-    return ret;
-  }
-
-  public void setFloatConf(Configuration conf, String varName, float val) {
-    conf.setFloat(varName, val);
-  }
-
-  @Override
   public int createHadoopArchive(Configuration conf, Path sourceDir, Path destDir,
       String archiveName) throws Exception {
 
@@ -611,6 +555,10 @@ public class Hadoop20Shims implements Ha
 
   @Override
   public UserGroupInformation createRemoteUser(String userName, List<String> groupNames) {
+    if (groupNames.isEmpty()) {
+      groupNames = new ArrayList<String>();
+      groupNames.add(userName);
+    }
     return new UnixUserGroupInformation(userName, groupNames.toArray(new String[0]));
   }
 

Modified: hive/branches/tez/shims/common-secure/src/main/java/org/apache/hadoop/hive/shims/HadoopShimsSecure.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/shims/common-secure/src/main/java/org/apache/hadoop/hive/shims/HadoopShimsSecure.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/shims/common-secure/src/main/java/org/apache/hadoop/hive/shims/HadoopShimsSecure.java (original)
+++ hive/branches/tez/shims/common-secure/src/main/java/org/apache/hadoop/hive/shims/HadoopShimsSecure.java Tue Nov 12 18:23:05 2013
@@ -77,54 +77,11 @@ public abstract class HadoopShimsSecure 
 
   static final Log LOG = LogFactory.getLog(HadoopShimsSecure.class);
 
-  public boolean usesJobShell() {
-    return false;
-  }
-
-  public boolean fileSystemDeleteOnExit(FileSystem fs, Path path)
-      throws IOException {
-
-    return fs.deleteOnExit(path);
-  }
-
-  public void inputFormatValidateInput(InputFormat fmt, JobConf conf)
-      throws IOException {
-    // gone in 0.18+
-  }
-
   @Override
   public String unquoteHtmlChars(String item) {
     return HtmlQuoting.unquoteHtmlChars(item);
   }
 
-  public boolean isJobPreparing(RunningJob job) throws IOException {
-    return job.getJobState() == JobStatus.PREP;
-  }
-  /**
-   * Workaround for hadoop-17 - jobclient only looks at commandlineconfig.
-   */
-  public void setTmpFiles(String prop, String files) {
-    // gone in 20+
-  }
-
-  /**
-   * We define this function here to make the code compatible between
-   * hadoop 0.17 and hadoop 0.20.
-   *
-   * Hive binary that compiled Text.compareTo(Text) with hadoop 0.20 won't
-   * work with hadoop 0.17 because in hadoop 0.20, Text.compareTo(Text) is
-   * implemented in org.apache.hadoop.io.BinaryComparable, and Java compiler
-   * references that class, which is not available in hadoop 0.17.
-   */
-  public int compareText(Text a, Text b) {
-    return a.compareTo(b);
-  }
-
-  @Override
-  public long getAccessTime(FileStatus file) {
-    return file.getAccessTime();
-  }
-
   public HadoopShims.CombineFileInputFormatShim getCombineFileInputFormat() {
     return new CombineFileInputFormatShim() {
       @Override
@@ -413,18 +370,6 @@ public abstract class HadoopShimsSecure 
   String[] ret = new String[2];
 
   @Override
-  public String[] getTaskJobIDs(TaskCompletionEvent t) {
-    TaskID tid = t.getTaskAttemptId().getTaskID();
-    ret[0] = tid.toString();
-    ret[1] = tid.getJobID().toString();
-    return ret;
-  }
-
-  public void setFloatConf(Configuration conf, String varName, float val) {
-    conf.setFloat(varName, val);
-  }
-
-  @Override
   public int createHadoopArchive(Configuration conf, Path sourceDir, Path destDir,
       String archiveName) throws Exception {
 
@@ -545,7 +490,6 @@ public abstract class HadoopShimsSecure 
     return tokenPath;
   }
 
-
   @Override
   public UserGroupInformation createProxyUser(String userName) throws IOException {
     return UserGroupInformation.createProxyUser(

Modified: hive/branches/tez/shims/common/src/main/java/org/apache/hadoop/hive/shims/HadoopShims.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/shims/common/src/main/java/org/apache/hadoop/hive/shims/HadoopShims.java?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/shims/common/src/main/java/org/apache/hadoop/hive/shims/HadoopShims.java (original)
+++ hive/branches/tez/shims/common/src/main/java/org/apache/hadoop/hive/shims/HadoopShims.java Tue Nov 12 18:23:05 2013
@@ -72,12 +72,6 @@ public interface HadoopShims {
   static final Log LOG = LogFactory.getLog(HadoopShims.class);
 
   /**
-   * Return true if the current version of Hadoop uses the JobShell for
-   * command line interpretation.
-   */
-  boolean usesJobShell();
-
-  /**
    * Constructs and Returns TaskAttempt Log Url
    * or null if the TaskLogServlet is not available
    *
@@ -89,39 +83,6 @@ public interface HadoopShims {
     throws MalformedURLException;
 
   /**
-   * Return true if the job has not switched to RUNNING state yet
-   * and is still in PREP state
-   */
-  boolean isJobPreparing(RunningJob job) throws IOException;
-
-  /**
-   * Calls fs.deleteOnExit(path) if such a function exists.
-   *
-   * @return true if the call was successful
-   */
-  boolean fileSystemDeleteOnExit(FileSystem fs, Path path) throws IOException;
-
-  /**
-   * Calls fmt.validateInput(conf) if such a function exists.
-   */
-  void inputFormatValidateInput(InputFormat fmt, JobConf conf) throws IOException;
-
-  /**
-   * If JobClient.getCommandLineConfig exists, sets the given
-   * property/value pair in that Configuration object.
-   *
-   * This applies for Hadoop 0.17 through 0.19
-   */
-  void setTmpFiles(String prop, String files);
-
-  /**
-   * return the last access time of the given file.
-   * @param file
-   * @return last access time. -1 if not supported.
-   */
-  long getAccessTime(FileStatus file);
-
-  /**
    * Returns a shim to wrap MiniMrCluster
    */
   public MiniMrShim getMiniMrCluster(Configuration conf, int numberOfTaskTrackers,
@@ -154,35 +115,10 @@ public interface HadoopShims {
     void shutdown() throws IOException;
   }
 
-  /**
-   * We define this function here to make the code compatible between
-   * hadoop 0.17 and hadoop 0.20.
-   *
-   * Hive binary that compiled Text.compareTo(Text) with hadoop 0.20 won't
-   * work with hadoop 0.17 because in hadoop 0.20, Text.compareTo(Text) is
-   * implemented in org.apache.hadoop.io.BinaryComparable, and Java compiler
-   * references that class, which is not available in hadoop 0.17.
-   */
-  int compareText(Text a, Text b);
-
   CombineFileInputFormatShim getCombineFileInputFormat();
 
   String getInputFormatClassName();
 
-  /**
-   * Wrapper for Configuration.setFloat, which was not introduced
-   * until 0.20.
-   */
-  void setFloatConf(Configuration conf, String varName, float val);
-
-  /**
-   * getTaskJobIDs returns an array of String with two elements. The first
-   * element is a string representing the task id and the second is a string
-   * representing the job id. This is necessary as TaskID and TaskAttemptID
-   * are not supported in Haddop 0.17
-   */
-  String[] getTaskJobIDs(TaskCompletionEvent t);
-
   int createHadoopArchive(Configuration conf, Path parentDir, Path destDir,
       String archiveName) throws Exception;
 

Modified: hive/branches/tez/shims/pom.xml
URL: http://svn.apache.org/viewvc/hive/branches/tez/shims/pom.xml?rev=1541190&r1=1541189&r2=1541190&view=diff
==============================================================================
--- hive/branches/tez/shims/pom.xml (original)
+++ hive/branches/tez/shims/pom.xml Tue Nov 12 18:23:05 2013
@@ -23,9 +23,9 @@
     <relativePath>../pom.xml</relativePath>
   </parent>
 
-  <artifactId>hive-shims</artifactId>
+  <artifactId>hive-shims-aggregator</artifactId>
   <packaging>pom</packaging>
-  <name>Hive Shims</name>
+  <name>Hive Shims Aggregator</name>
 
   <properties>
     <hive.path.to.root>..</hive.path.to.root>
@@ -37,76 +37,6 @@
     <module>common-secure</module>
     <module>0.20S</module>
     <module>0.23</module>
+    <module>assembly</module>
   </modules>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.hive.shims</groupId>
-      <artifactId>hive-shims-common</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hive.shims</groupId>
-      <artifactId>hive-shims-0.20</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hive.shims</groupId>
-      <artifactId>hive-shims-common-secure</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hive.shims</groupId>
-      <artifactId>hive-shims-0.20S</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hive.shims</groupId>
-      <artifactId>hive-shims-0.23</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <configuration>
-          <descriptors>
-            <descriptor>src/assembly/uberjar.xml</descriptor>
-          </descriptors>
-        </configuration>
-        <executions>
-          <execution>
-            <phase>compile</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>attach-artifacts</id>
-            <phase>package</phase>
-            <goals>
-              <goal>attach-artifact</goal>
-            </goals>
-            <configuration>
-              <artifacts>
-                <artifact>
-                  <file>target/hive-shims-${project.version}-uberjar.jar</file>
-                  <type>jar</type>
-                </artifact>
-              </artifacts>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
 </project>



Mime
View raw message