> On May 4, 2020, 3 p.m., Denys Kuzmenko wrote:
> > standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java
> > Line 107 (original), 110 (patched)
> > <https://reviews.apache.org/r/72465/diff/2/?file=2230138#file2230138line111>
> >
> >     Could we add helper methods into the enum to avoid calling quoteChar 
> > everywhere, like TxnSatus.aborted()?

99% of the places we use the quoted strings so I changed to toString, this will 
be the most readable way I think.


> On May 4, 2020, 3 p.m., Denys Kuzmenko wrote:
> > standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnUtils.java
> > Lines 400 (patched)
> > <https://reviews.apache.org/r/72465/diff/2/?file=2230140#file2230140line400>
> >
> >     Is is a generic txn object (i.e TxnInfo)? I don't think TxnUtils is a 
> > good place for domain objects.
> 
> Peter Varga wrote:
>     I didn't really know which way to go. The TxnInfo is missing the type 
> field and I did not want to change the api.
>     The tables used by txnhandler don't have domain objects, should I create 
> one in the model package for txns? I think that would be confusing too, since 
> it would seem like the txns table is managed by jdo.
>     What do you suggest?
> 
> Denys Kuzmenko wrote:
>     I would create OpenTxnList under org.apache.hadoop.hive.metastore.txn 
> (similarily to CompactionInfo) - same as you did with extra 2 methods:
>     - toOpenTxns (OpenTxnsResponse)
>     - toOpenTxnsInfo (OpenTxnsInfoResponse)
>     
>     and place dto conversion logic there

Moved the OpenTxn, OpenTxnList and the TxnState and OperationTypee enums to the 
txn package.


- Peter


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72465/#review220593
-----------------------------------------------------------


On May 7, 2020, 11:58 a.m., Peter Varga wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72465/
> -----------------------------------------------------------
> 
> (Updated May 7, 2020, 11:58 a.m.)
> 
> 
> Review request for hive and Denys Kuzmenko.
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> * Merge getOpenTxns and getOpenTxnInfo to avoid code duplication
>   * Remove TxnStatus character constants and use the enum values
> 
> 
> Diffs
> -----
> 
>   
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java
>  d59f863b11 
>   
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/OpenTxn.java
>  PRE-CREATION 
>   
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/OpenTxnList.java
>  PRE-CREATION 
>   
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/OperationType.java
>  PRE-CREATION 
>   
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
>  7c3937520c 
>   
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnStatus.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/72465/diff/3/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Peter Varga
> 
>

Reply via email to