You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2012/11/28 03:44:59 UTC
svn commit: r1414512 -
/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/tools/HiveMetaTool.java
Author: hashutosh
Date: Wed Nov 28 02:44:58 2012
New Revision: 1414512
URL: http://svn.apache.org/viewvc?rev=1414512&view=rev
Log:
HIVE-3665: Allow URIs without port to be specified in metatool (Shreepadma via Ashutosh Chauhan)
Modified:
hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/tools/HiveMetaTool.java
Modified: hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/tools/HiveMetaTool.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/tools/HiveMetaTool.java?rev=1414512&r1=1414511&r2=1414512&view=diff
==============================================================================
--- hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/tools/HiveMetaTool.java (original)
+++ hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/tools/HiveMetaTool.java Wed Nov 28 02:44:58 2012
@@ -438,15 +438,11 @@ public class HiveMetaTool {
}
/*
- * validate input - if the old uri contains a valid port, the new uri
- * should contain a valid port as well. Both new and old uri should
- * contain valid host names and valid schemes.
+ * validate input - Both new and old URI should contain valid host names and valid schemes.
+ * port is optional in both the URIs since HDFS HA NN URI doesn't have a port.
*/
if (oldURI.getHost() == null || newURI.getHost() == null) {
System.err.println("HiveMetaTool:A valid host is required in both old-loc and new-loc");
- } else if (oldURI.getPort() > 0 && newURI.getPort() < 0) {
- System.err.println("HiveMetaTool:old-loc has a valid port, new-loc should " +
- "also contain a valid port");
} else if (oldURI.getScheme() == null || newURI.getScheme() == null) {
System.err.println("HiveMetaTool:A valid scheme is required in both old-loc and new-loc");
} else {