Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

HDP 2.3 Activated ACID but HIVE Metadataserver connection fails

Highlighted

HDP 2.3 Activated ACID but HIVE Metadataserver connection fails

Explorer

Hi community,

i had a running an working HDP2.3 installation. Metaserver/Ambari db local postgres 9.3. in NN/Hiveserver Now i wanted to enable ACID features.

First i tried to activate it completly through ambari but it does not work. Cause the option to save settings was not available after setting hive_txn_acid =true Thats why i tried in manually: 1:

set hive.support.concurrency=true; set hive.exec.dynamic.partition.mode = nonstrict; set hive.compactor.initiator.on =true ; set hive.compactor.worker.threads =1; set hive.enforce.bucketing=true; set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;

2. restarted hive services.

3. rechecked settings ->all applied

4. via HIVE-CLI:

update staging.test_hiveacid set data="updateddata1" where id=5; ... .. nothing happends

Checking the metaserver.log i can see the following:

2016-07-07 10:04:45,218 ERROR [pool-3-thread-4]: txn.TxnHandler (TxnHandler.java:getDbConn(984)) - There is a problem with a connection from the pool, retrying(rc=6): Timed out waiting for a free available connection.(SQLState=08001,ErrorCode=0) java.sql.SQLException: Timed out waiting for a free available connection. at com.jolbox.bonecp.DefaultConnectionStrategy.getConnectionInternal(DefaultConnectionStrategy.java:88) at com.jolbox.bonecp.AbstractConnectionStrategy.getConnection(AbstractConnectionStrategy.java:90) at com.jolbox.bonecp.BoneCP.getConnection(BoneCP.java:553) at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:131) at org.apache.hadoop.hive.metastore.txn.TxnHandler.getDbConn(TxnHandler.java:978) at org.apache.hadoop.hive.metastore.txn.TxnHandler.getOpenTxns(TxnHandler.java:240) at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_open_txns(HiveMetaStore.java:5558) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107) at com.sun.proxy.$Proxy4.get_open_txns(Unknown Source) at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$get_open_txns.getResult(ThriftHiveMetastore.java:11560) at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$get_open_txns.getResult(ThriftHiveMetastore.java:11545) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) at org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:110) at org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:106) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) at org.apache.hadoop.hive.metastore.TUGIBasedProcessor.process(TUGIBasedProcessor.java:118) at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

Any Idea?

Thanks for help

4 REPLIES 4
Highlighted

Re: HDP 2.3 Activated ACID but HIVE Metadataserver connection fails

Mentor

What happens if you try again, maybe it was busy servicing other connections

Highlighted

Re: HDP 2.3 Activated ACID but HIVE Metadataserver connection fails

Super Guru

@kf kfname can you verify you have performed the following:

To configure HiveServer2 for transactions:

[Important>Important
  • Ensure that the hive.txn.timeout property is set to the same value in the hive-site.xml file for HiveServer2 that you configure in Step 1 below and the hive-site.xmlfile for the standalone Hive metastore that you configure in Step 2.
  • The following listed properties are the minimum that are required to enable transaction support on HiveServer2. For additional information about configuring this feature and for information about additional configuration parameters, see Hive Transactions on the Apache web site.
  1. Set the following parameters in the hive-site.xml file:
    <property>
         <name>hive.support.concurrency</name>
         <value>true</value>
    </property>
            
    <property>
         <name>hive.txn.manager</name>
         <value>org.apache.hadoop.hive.ql.lockmgr.DbTxnManager</value>
    </property>
    
    <property>
         <name>name>hive.enforce.bucketing</name>
         <value>true</value>
    </property>
    
    <property>
         <name>hive.exec.dynamic.partition.mode</name>
         <value>nostrict</value>
    </property>
  2. Ensure that a standalone Hive metastore is running with the following parameters set in its hive-site.xml file:
    <property>
         <name>hive.compactor.initiator.on</name>
         <value>true</value>
    </property>
            
    <property>
         <name>hive.compactor.worker.threads</name>
         <value><positive_number></value>
    </property>
    [Important>Important
    These are the minimum properties required to enable transactions in the standalone Hive metastore. See Hive Transactions on the Apache web site for information about configuring Hive for transactions and additional configuration parameters.

    Even though HiveServer2 runs with an embedded metastore, a standalone Hive metastore is required for ACID support to function properly. If you are not using ACID support with HiveServer2, you do not need a standalone metastore.

    The default value for hive.compactor.worker.threads is 0. Set this to a positive number to enable Hive transactions. Worker threads spawn MapReduce jobs to perform compactions, but they do not perform the compactions themselves. Increasing the number of worker threads decreases the time that it takes tables or partitions to be compacted. However, increasing the number of worker threads also increases the background load on the Hadoop cluster because they cause more MapReduce jobs to run in the background.

Highlighted

Re: HDP 2.3 Activated ACID but HIVE Metadataserver connection fails

Explorer

i restarted the cluster, queries and anything else but it did not work. Always the same error

Highlighted

Re: HDP 2.3 Activated ACID but HIVE Metadataserver connection fails

Explorer

as written above i did all the changes you mentioned but it does not work. I set:

set hive.support.concurrency=true; set hive.exec.dynamic.partition.mode = nonstrict; set hive.compactor.initiator.on =true ; set hive.compactor.worker.threads =1; set hive.enforce.bucketing=true; set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager; The strange thing is that i cannot save the settings via ambari only through console.

Don't have an account?
Coming from Hortonworks? Activate your account here