> 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 > > Peter Varga wrote: > 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.
ok, let's address this in diff patch - Denys ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/72465/#review220802 ----------------------------------------------------------- On May 20, 2020, 12:24 p.m., Peter Varga wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/72465/ > ----------------------------------------------------------- > > (Updated May 20, 2020, 12:24 p.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 > d2efc595a5 > > 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 > 89ddccbbda > > 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/4/ > > > Testing > ------- > > > Thanks, > > Peter Varga > >