FAQ
Author: ecapriolo
Date: Wed Jun 20 21:26:00 2012
New Revision: 1352333

URL: http://svn.apache.org/viewvc?rev=1352333&view=rev
Log:
HIVE-2585 Collapse hive.metastore.uris and hive.metastore.local (Ashutosh Chauhan via egc)

Modified:
hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
hive/trunk/conf/hive-default.xml.template
hive/trunk/data/conf/hive-site.xml
hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMarkPartitionRemote.java
hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreAuthorization.java
hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java
hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStore.java
hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStoreIpAddress.java
hive/trunk/shims/src/test/org/apache/hadoop/hive/thrift/TestHadoop20SAuthBridge.java

Modified: hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
URL: http://svn.apache.org/viewvc/hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java?rev=1352333&r1=1352332&r2=1352333&view=diff
==============================================================================
--- hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (original)
+++ hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java Wed Jun 20 21:26:00 2012
@@ -82,7 +82,6 @@ public class HiveConf extends Configurat
HiveConf.ConfVars.METASTOREDIRECTORY,
HiveConf.ConfVars.METASTOREWAREHOUSE,
HiveConf.ConfVars.METASTOREURIS,
- HiveConf.ConfVars.METASTORE_MODE,
HiveConf.ConfVars.METASTORETHRIFTRETRIES,
HiveConf.ConfVars.METASTORE_CLIENT_CONNECT_RETRY_DELAY,
HiveConf.ConfVars.METASTORE_CLIENT_SOCKET_TIMEOUT,
@@ -301,7 +300,6 @@ public class HiveConf extends Configurat
METASTORE_EVENT_EXPIRY_DURATION("hive.metastore.event.expiry.duration",0L),
METASTORE_EXECUTE_SET_UGI("hive.metastore.execute.setugi", false),

- METASTORE_MODE("hive.metastore.local",true),
// Default parameters for creating tables
NEWTABLEDEFAULTPARA("hive.table.parameters.default", ""),
METASTORE_RAW_STORE_IMPL("hive.metastore.rawstore.impl",
@@ -868,6 +866,19 @@ public class HiveConf extends Configurat
// Overlay the values of any system properties whose names appear in the list of ConfVars
applySystemProperties();

+ if(this.get("hive.metastore.local", null) != null) {
+ l4j.warn("DEPRECATED: Configuration property hive.metastore.local no longer has any " +
+ "effect. Make sure to provide a valid value for hive.metastore.uris if you are " +
+ "connecting to a remote metastore.");
+ }
+
+ if (null != this.get(ConfVars.METASTOREURIS.varname, null) &&
+ null != this.get(ConfVars.METASTORECONNECTURLKEY.varname, null)) {
+ l4j.error("Found both " + ConfVars.METASTOREURIS.varname + " and " +
+ ConfVars.METASTORECONNECTURLKEY + " Recommended to have exactly one of those config key" +
+ "in configuration");
+ }
+
// if the running class was loaded directly (through eclipse) rather than through a
// jar then this would be needed
if (hiveJar == null) {

Modified: hive/trunk/conf/hive-default.xml.template
URL: http://svn.apache.org/viewvc/hive/trunk/conf/hive-default.xml.template?rev=1352333&r1=1352332&r2=1352333&view=diff
==============================================================================
--- hive/trunk/conf/hive-default.xml.template (original)
+++ hive/trunk/conf/hive-default.xml.template Wed Jun 20 21:26:00 2012
@@ -100,9 +100,9 @@
</property>

<property>
- <name>hive.metastore.local</name>
- <value>true</value>
- <description>controls whether to connect to remove metastore server or open a new metastore server in Hive Client JVM</description>
+ <name>hive.metastore.uris</name>
+ <value></value>
+ <description>Thrift uri for the remote metastore. Used by metastore client to connect to remote metastore.</description>
</property>

<property>

Modified: hive/trunk/data/conf/hive-site.xml
URL: http://svn.apache.org/viewvc/hive/trunk/data/conf/hive-site.xml?rev=1352333&r1=1352332&r2=1352333&view=diff
==============================================================================
--- hive/trunk/data/conf/hive-site.xml (original)
+++ hive/trunk/data/conf/hive-site.xml Wed Jun 20 21:26:00 2012
@@ -68,12 +68,6 @@
</property>

<property>
- <name>hive.metastore.local</name>
- <value>true</value>
- <description>controls whether to connect to remove metastore server or open a new metastore server in Hive Client JVM</description>
-</property>
-
-<property>
<!-- this should eventually be deprecated since the metastore should supply this -->
<name>hive.metastore.warehouse.dir</name>
<value>${test.warehouse.dir}</value>

Modified: hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java?rev=1352333&r1=1352332&r2=1352333&view=diff
==============================================================================
--- hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java (original)
+++ hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java Wed Jun 20 21:26:00 2012
@@ -108,7 +108,8 @@ public class HiveMetaStoreClient impleme
}
this.conf = conf;

- localMetaStore = conf.getBoolVar(ConfVars.METASTORE_MODE);
+ String msUri = conf.getVar(HiveConf.ConfVars.METASTOREURIS);
+ localMetaStore = (msUri == null) ? true : msUri.trim().isEmpty();
if (localMetaStore) {
// instantiate the metastore server handler directly instead of connecting
// through the network

Modified: hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMarkPartitionRemote.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMarkPartitionRemote.java?rev=1352333&r1=1352332&r2=1352333&view=diff
==============================================================================
--- hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMarkPartitionRemote.java (original)
+++ hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMarkPartitionRemote.java Wed Jun 20 21:26:00 2012
@@ -19,7 +19,6 @@
package org.apache.hadoop.hive.metastore;

import org.apache.hadoop.hive.conf.HiveConf;
-import org.apache.hadoop.hive.conf.HiveConf.ConfVars;

public class TestMarkPartitionRemote extends TestMarkPartition{

@@ -42,7 +41,6 @@ public class TestMarkPartitionRemote ext
Thread t = new Thread(new RunMS());
t.setDaemon(true);
t.start();
- hiveConf.setBoolVar(ConfVars.METASTORE_MODE, false);
hiveConf.setVar(HiveConf.ConfVars.METASTOREURIS, "thrift://localhost:29111");
hiveConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTRETRIES, 3);
Thread.sleep(30000);

Modified: hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreAuthorization.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreAuthorization.java?rev=1352333&r1=1352332&r2=1352333&view=diff
==============================================================================
--- hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreAuthorization.java (original)
+++ hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreAuthorization.java Wed Jun 20 21:26:00 2012
@@ -39,7 +39,6 @@ public class TestMetaStoreAuthorization
public void setup() throws Exception {
System.setProperty(HiveConf.ConfVars.METASTORE_AUTHORIZATION_STORAGE_AUTH_CHECKS.varname,
"true");
- conf.setBoolVar(ConfVars.METASTORE_MODE, false);
conf.setVar(HiveConf.ConfVars.METASTOREURIS, "thrift://localhost:" + port);
conf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTRETRIES, 3);
conf.setIntVar(ConfVars.METASTORE_CLIENT_CONNECT_RETRY_DELAY, 60);

Modified: hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java?rev=1352333&r1=1352332&r2=1352333&view=diff
==============================================================================
--- hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java (original)
+++ hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java Wed Jun 20 21:26:00 2012
@@ -90,7 +90,6 @@ public class TestMetaStoreEventListener
t.start();
Thread.sleep(40000);
hiveConf = new HiveConf(this.getClass());
- hiveConf.setBoolVar(ConfVars.METASTORE_MODE, false);
hiveConf.setVar(HiveConf.ConfVars.METASTOREURIS, "thrift://localhost:" + msPort);
hiveConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTRETRIES, 3);
hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, "");

Modified: hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStore.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStore.java?rev=1352333&r1=1352332&r2=1352333&view=diff
==============================================================================
--- hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStore.java (original)
+++ hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStore.java Wed Jun 20 21:26:00 2012
@@ -67,7 +67,6 @@ public class TestRemoteHiveMetaStore ext
}

protected void createClient(boolean setugi) throws Exception {
- hiveConf.setBoolVar(ConfVars.METASTORE_MODE, false);
hiveConf.setVar(HiveConf.ConfVars.METASTOREURIS, "thrift://localhost:" + METASTORE_PORT);
hiveConf.setBoolVar(ConfVars.METASTORE_EXECUTE_SET_UGI,setugi);
client = new HiveMetaStoreClient(hiveConf);

Modified: hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStoreIpAddress.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStoreIpAddress.java?rev=1352333&r1=1352332&r2=1352333&view=diff
==============================================================================
--- hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStoreIpAddress.java (original)
+++ hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStoreIpAddress.java Wed Jun 20 21:26:00 2012
@@ -101,7 +101,6 @@ public class TestRemoteHiveMetaStoreIpAd
}

protected void createClient() throws Exception {
- hiveConf.setBoolVar(ConfVars.METASTORE_MODE, false);
hiveConf.setVar(HiveConf.ConfVars.METASTOREURIS, "thrift://localhost:" + port);
msc = new HiveMetaStoreClient(hiveConf);
}

Modified: hive/trunk/shims/src/test/org/apache/hadoop/hive/thrift/TestHadoop20SAuthBridge.java
URL: http://svn.apache.org/viewvc/hive/trunk/shims/src/test/org/apache/hadoop/hive/thrift/TestHadoop20SAuthBridge.java?rev=1352333&r1=1352332&r2=1352333&view=diff
==============================================================================
--- hive/trunk/shims/src/test/org/apache/hadoop/hive/thrift/TestHadoop20SAuthBridge.java (original)
+++ hive/trunk/shims/src/test/org/apache/hadoop/hive/thrift/TestHadoop20SAuthBridge.java Wed Jun 20 21:26:00 2012
@@ -127,7 +127,6 @@ public class TestHadoop20SAuthBridge ext
System.setProperty(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, new Path(
System.getProperty("test.build.data", "/tmp")).toString());
conf = new HiveConf(TestHadoop20SAuthBridge.class);
- conf.setBoolVar(ConfVars.METASTORE_MODE, false);
MetaStoreUtils.startMetaStore(port, new MyHadoopThriftAuthBridge20S());
}

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedJun 20, '12 at 9:26p
activeJun 20, '12 at 9:26p
posts1
users1
websitehive.apache.org

1 user in discussion

Ecapriolo: 1 post

People

Translate

site design / logo © 2021 Grokbase