> On May 18, 2020, 7:33 a.m., Denys Kuzmenko wrote: > > standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnStatus.java > > Lines 32 (patched) > > <https://reviews.apache.org/r/72465/diff/3/?file=2230714#file2230714line32> > > > > Could you please refactor here as well LockTypeUtil to LockType enum. > > Denys Kuzmenko wrote: > move to txn package + overwrite toString(), this would allow to get rid > of static exclWrite, sharedWrite, sharedRead methods
The LockType enum is part of the thrift interface. I could duplicate it, but I am not sure it will be cleaner that way. I don't know why they went with this weird encoding, that the enums are represented as ints in the interface and as char-s in the db. So many unnecessary switch between the two representation. - Peter ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/72465/#review220802 ----------------------------------------------------------- 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 > >