You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Максим Буйлин <bu...@gmail.com> on 2017/02/02 07:57:26 UTC

Compactions doesn't launch on Hive 1.1.0

Hi!
I'm testing hive transactions. They work well, but compaction doesn't
launch.

I try reduce check interval and launch it manuallty with command "Alter
table tx_tbl compaction 'major';". Nothing helps.


Hive version: Hive 1.1.0-cdh5.8.3


Hive properties:

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

Hive table:
*create table *tx_tbl (
     *id **int*,
     *name *string)
     clustered *by *(id) *into *2 buckets stored *as *orc
     tblproperties(
     "transactional"="true",
     "compactor.mapreduce.map.memory.mb"="2048",
     "compactorthreshold.hive.compactor.delta.num.threshold"="4",
     "compactorthreshold.hive.compactor.delta.pct.threshold"="0.2"
);

Hive inserts looks like this:
insert into tx_tbl value(1, "some");

What i can try else?

Thanks!

Re: Compactions doesn't launch on Hive 1.1.0

Posted by Eugene Koifman <ek...@hortonworks.com>.
As Gopal said, you have to run a standalone metastore process for compactor to work.
More on that in https://cwiki.apache.org/confluence/display/Hive/AdminManual+MetastoreAdmin#AdminManualMetastoreAdmin-RemoteMetastoreServer.

Please note that the transaction specific configuration properties in https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions#HiveTransactions-Configuration are split into client and server groups.
The server group should be set in the config of the metastore process.

Eugene



From: Максим Буйлин <bu...@gmail.com>
Reply-To: "user@hive.apache.org" <us...@hive.apache.org>
Date: Thursday, February 2, 2017 at 1:50 AM
To: "user@hive.apache.org" <us...@hive.apache.org>
Subject: Re: Compactions doesn't launch on Hive 1.1.0

Thanks!
In logs i only see messages of DummyTxnManager, nothing about DbTxnManager.

When i connected to hive i use "set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;".
How else i can configure transaction manager?

2017-02-02 11:12 GMT+03:00 Gopal Vijayaraghavan <go...@apache.org>>:




> I try reduce check interval and launch it manuallty with command "Alter
> table tx_tbl compaction 'major';". Nothing helps.

You can check the hive metastore log and confirm it also has the DbTxnManager
set up & that it is triggering the compactions.

Without a standalone metastore, the hive ACID compactor threads are not triggered.

Cheers,
Gopal



Re: Compactions doesn't launch on Hive 1.1.0

Posted by Максим Буйлин <bu...@gmail.com>.
Thanks!
In logs i only see messages of DummyTxnManager, nothing about DbTxnManager.

When i connected to hive i use "set
hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;".
How else i can configure transaction manager?

2017-02-02 11:12 GMT+03:00 Gopal Vijayaraghavan <go...@apache.org>:

>
>
>
>
> > I try reduce check interval and launch it manuallty with command "Alter
> > table tx_tbl compaction 'major';". Nothing helps.
>
> You can check the hive metastore log and confirm it also has the
> DbTxnManager
> set up & that it is triggering the compactions.
>
> Without a standalone metastore, the hive ACID compactor threads are not
> triggered.
>
> Cheers,
> Gopal
>
>
>

Re: Compactions doesn't launch on Hive 1.1.0

Posted by Gopal Vijayaraghavan <go...@apache.org>.



> I try reduce check interval and launch it manuallty with command "Alter
> table tx_tbl compaction 'major';". Nothing helps.

You can check the hive metastore log and confirm it also has the DbTxnManager
set up & that it is triggering the compactions.

Without a standalone metastore, the hive ACID compactor threads are not triggered.

Cheers,
Gopal