[ 
https://issues.apache.org/jira/browse/HIVE-7689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14126766#comment-14126766
 ] 

Damien Carol commented on HIVE-7689:
------------------------------------

My bad.
It's a new method {{findColumnsWithStats}} added in {{CompactionTxnHandler}}.
I written :
{code:java}
if (ci.partName == null)
        s += " AND " + TxnDbUtil.getEscape("PARTITION_NAME", 
identifierQuoteString) + "='" + ci.partName + "'";
{code}
Instead of 
{code:java}
if (ci.partName != null)
        s += " AND " + TxnDbUtil.getEscape("PARTITION_NAME", 
identifierQuoteString) + "='" + ci.partName + "'";
{code}
These produce :
{noformat}
2014-09-09 10:34:12,818 ERROR [nc-h04-22]: compactor.Worker 
(Worker.java:run(165)) - Caught an exception in the main loop of compactor 
worker nc-h04-22, exiting MetaException(message:Unable to connect to 
transaction database org.postgresql.util.PSQLException: ERROR: column 
"PARTITION_NAME" does not exist
  Position: 104
        at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2096)
        at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1829)
        at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
        at 
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:510)
        at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:372)
        at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:252)
        at 
com.jolbox.bonecp.StatementHandle.executeQuery(StatementHandle.java:464)
        at 
org.apache.hadoop.hive.metastore.txn.CompactionTxnHandler.findColumnsWithStats(CompactionTxnHandler.java:628)
        at org.apache.hadoop.hive.ql.txn.compactor.Worker.run(Worker.java:140)
)
        at 
org.apache.hadoop.hive.metastore.txn.CompactionTxnHandler.findColumnsWithStats(CompactionTxnHandler.java:645)
        at org.apache.hadoop.hive.ql.txn.compactor.Worker.run(Worker.java:140)
{noformat}
This error breack all compactions. Version 4 of the patch was ok but version 5 
introduce a new bug.
Fixed with new patch now.

> Enable Postgres as METASTORE back-end
> -------------------------------------
>
>                 Key: HIVE-7689
>                 URL: https://issues.apache.org/jira/browse/HIVE-7689
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>    Affects Versions: 0.14.0
>            Reporter: Damien Carol
>            Assignee: Damien Carol
>            Priority: Minor
>              Labels: metastore, postgres
>             Fix For: 0.14.0
>
>         Attachments: HIVE-7689.5.patch, HIVE-7889.1.patch, HIVE-7889.2.patch, 
> HIVE-7889.3.patch, HIVE-7889.4.patch
>
>
> I maintain few patches to make Metastore works with Postgres back end in our 
> production environment.
> The main goal of this JIRA is to push upstream these patches.
> This patch enable LOCKS, COMPACTION and fix error in STATS on postgres 
> metastore.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to