HPE Ezmeral Software platform
1819541 Members
2539 Online
109603 Solutions
New Discussion

Query: transaction manager does not support explicit lock requests

 
SOLVED
Go to solution
Satish_Infa
Advisor

transaction manager does not support explicit lock requests

0: jdbc:hive2://invr88maprdes04.informatica.c> lock table HiveLocking_simpleTgt EXCLUSIVE;

INFO  : Compiling command(queryId=mapr_20250212142653_01a3694c-1b87-4bd0-bb05-cc600d29d499): lock table HiveLocking_simpleTgt EXCLUSIVE

INFO  : Semantic Analysis Completed (retrial = false)

INFO  : Returning Hive schema: Schema(fieldSchemas:null, properties:null)

INFO  : Completed compiling command(queryId=mapr_20250212142653_01a3694c-1b87-4bd0-bb05-cc600d29d499); Time taken: 0.22 seconds

INFO  : Executing command(queryId=mapr_20250212142653_01a3694c-1b87-4bd0-bb05-cc600d29d499): lock table HiveLocking_simpleTgt EXCLUSIVE

INFO  : Starting task [Stage-0:DDL] in serial mode

ERROR : FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Current transaction manager does not support explicit lock requests.  Transaction manager:   org.apache.hadoop.hive.ql.lockmgr.DbTxnManager

in the hive-site.xml of VM , property “hive.txn.manager” with value  "org.apache.hadoop.hive.ql.lockmgr.DbTxnManager”

is not working for exclusive table lock in hive

if we give  value as  “org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager” , hive queries are getting hung.

 

8 REPLIES 8
Komal_L
HPE Pro

Re: transaction manager does not support explicit lock requests

What is the  value of hive.support.concurrency set to in your hive-site.xml configuration?

I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Satish_Infa
Advisor

Re: transaction manager does not support explicit lock requests

@Komal_L 

<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>hive.enforce.bucketing</name>

    <value>true</value>

  </property>

  <property>

    <name>hive.exec.dynamic.partition.mode</name>

    <value>nonstrict</value>

  </property>

    <property>

    <name>hive.compactor.initiator.on</name>

    <value>true</value>

  </property>

  <property>

    <name>hive.compactor.worker.threads</name>

    <value>1</value>

  </property>

Satish_Infa
Advisor

Re: transaction manager does not support explicit lock requests

@Komal_L 

after adding below property beeline queries are getting hung.  

<property

        <name>hive.txn.manager</name>

     <value>org.apache.hadoop.hive.ql.lockmgr.DbTxnManager</value>

  </property>

Satish_Infa
Advisor

Re: transaction manager does not support explicit lock requests

please share the solution asap.

 

Satish_Infa
Advisor

Re: transaction manager does not support explicit lock requests

<property>
<name>hive.txn.manager</name>
<value>org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager</value>
</property>

below beeline query is hanging after updaing the above property in hive-site.xml

 

CREATE EXTERNAL TABLE HiveLocking_simpleTgt_2 (COL_TINYINT TINYINT, COL_SMALLINT SMALLINT, COL_INT INT, COL_BIGINT BIGINT, COL_FLOAT FLOAT, COL_DOUBLE DOUBLE, COL_DECIMAL DECIMAL(4,2), COL_BINARY BINARY, COL_BOOLEAN BOOLEAN, COL_STRING STRING, COL_DATE DATE, COL_TIMESTAMP TIMESTAMP, COL_CHAR CHAR(5), COL_VARCHAR VARCHAR(255),COL_PARTITION_INT INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' stored as textfile;

 

output

 

jdbc:hive2://invr88maprdes04.informatica.c> CREATE EXTERNAL TABLE HiveLocking_simpleTgt_2 (COL_TINYINT TINYINT, COL_SMALLINT SMALLINT, COL_INT INT, COL_BIGINT BIGINT, COL_FLOAT FLOAT, COL_DOUBLE DOUBLE, COL_DECIMAL DECIMAL(4,2), COL_BINARY BINARY, COL_BOOLEAN BOOLEAN, COL_STRING STRING, COL_DATE DATE, COL_TIMESTAMP TIMESTAMP, COL_CHAR CHAR(5), COL_VARCHAR VARCHAR(255),COL_PARTITION_INT INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' stored as textfile;
INFO : Compiling command(queryId=mapr_20250221113719_3c092e4b-783f-4ec5-8cd8-eb40605bf4e1): CREATE EXTERNAL TABLE HiveLocking_simpleTgt_2 (COL_TINYINT TINYINT, COL_SMALLINT SMALLINT, COL_INT INT, COL_BIGINT BIGINT, COL_FLOAT FLOAT, COL_DOUBLE DOUBLE, COL_DECIMAL DECIMAL(4,2), COL_BINARY BINARY, COL_BOOLEAN BOOLEAN, COL_STRING STRING, COL_DATE DATE, COL_TIMESTAMP TIMESTAMP, COL_CHAR CHAR(5), COL_VARCHAR VARCHAR(255),COL_PARTITION_INT INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' stored as textfile
INFO : Semantic Analysis Completed (retrial = false)
INFO : Returning Hive schema: Schema(fieldSchemas:null, properties:null)
INFO : Completed compiling command(queryId=mapr_20250221113719_3c092e4b-783f-4ec5-8cd8-eb40605bf4e1); Time taken: 0.104 seconds

 

 

 

vaddy224
HPE Pro

Re: transaction manager does not support explicit lock requests

Can you please let me know what is the issue that you are facing here?

Are you just trying to create an external table? 

I am given to believe that once you run show locks in the Hive prompt, you are not seeing any locks rt?

Are your tables ACID Enabled and ORC'ed?

 



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
nara_pakeer
HPE Pro

Re: transaction manager does not support explicit lock requests

Please see below for the the transaction management in hive. If you need transaction management DummyTxnManager may not be useful.

========

hive.txn.manager 

Default: org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager

Value required for transactions: org.apache.hadoop.hive.ql.lockmgr.DbTxnManager

Client/
HiveServer2

DummyTxnManager replicates pre Hive-0.13 behavior and provides no transactions.

=========

Check the below link to understand which properties to use and how to create tables to enable transaction management.

https://cwiki.apache.org/confluence/display/hive/hive+transactions

Also, as mentioned in previous post check o/p of  "show locks" command to see if you have any locks. This will show if any other queries are blocking the query you are running.



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
support_s
System Recommended
Solution

Query: transaction manager does not support explicit lock requests

Hello,

 

Let us know if you were able to resolve the issue.

If you are satisfied with the answers then kindly click the "Accept As Solution" button for the most helpful response so that it is beneficial to all community members.

 

 

Please click on "Thumbs Up/Kudo" icon to give a "Kudo".


Accept or Kudo