okumin commented on code in PR #5754: URL: https://github.com/apache/hive/pull/5754#discussion_r2046586105
########## storage-api/src/java/org/apache/hadoop/hive/common/ValidReadTxnList.java: ########## @@ -59,8 +59,10 @@ public ValidReadTxnList(long[] exceptions, BitSet abortedBits, long highWatermar this.highWatermark = highWatermark; } - public ValidReadTxnList(String value) { - readFromString(value); + public static ValidReadTxnList fromValue(String value) { + ValidReadTxnList txnList = new ValidReadTxnList(); + txnList.readFromString(value); + return txnList; Review Comment: I assume this is for CT_CONSTRUCTOR_THROW, as far as I tested it locally ########## storage-api/src/java/org/apache/hive/common/util/BloomKFilter.java: ########## @@ -397,21 +410,14 @@ public static byte[] getInitialBytes(long expectedEntries) { * for index bounds nor expand the bit set size if the specified index is greater than the size. */ public static class BitSet { - private final long[] data; + private long[] data; Review Comment: This can be final maybe ########## Jenkinsfile: ########## @@ -267,7 +264,7 @@ if [ $n != 0 ]; then exit 1 fi ''' - buildHive("-Pspotbugs -pl " + spotbugsProjects.join(",") + " -am test-compile com.github.spotbugs:spotbugs-maven-plugin:4.0.0:check") + buildHive("-Pspotbugs -pl " + spotbugsProjects.join(",") + " -am test-compile com.github.spotbugs:spotbugs-maven-plugin:4.8.6.6:check") Review Comment: ```suggestion buildHive("-Pspotbugs -pl " + spotbugsProjects.join(",") + " -am test-compile com.github.spotbugs:spotbugs-maven-plugin:4.8.6.6:check") ``` ########## Jenkinsfile: ########## @@ -251,11 +251,8 @@ git merge origin/target } stage('Prechecks') { def spotbugsProjects = [ - ":hive-common", - ":hive-shims", - ":hive-storage-api", - ":hive-standalone-metastore-common", - ":hive-service-rpc" + ":hive-storage-api", + ":hive-service-rpc" Review Comment: ```suggestion ":hive-storage-api", ":hive-service-rpc" ``` ########## storage-api/src/java/org/apache/hive/common/util/BloomKFilter.java: ########## @@ -59,32 +60,44 @@ private static void checkArgument(boolean expression, String message) { } } - public BloomKFilter(long maxNumEntries) { + public BloomKFilter(int k, long m, int totalBlockCount, long[] arr) { Review Comment: ```suggestion private BloomKFilter(int k, long m, int totalBlockCount, long[] arr) { ``` ########## storage-api/src/java/org/apache/hive/common/util/BloomFilter.java: ########## @@ -329,20 +331,19 @@ public static void mergeBloomFilterBytes( * for index bounds nor expand the bit set size if the specified index is greater than the size. */ static class BitSet { - private final long[] data; Review Comment: I guess we can keep this final. The new Spot bugs fail if the constructor might fail. If it never fails, it is ok. ``` // make it private private BitSet(long[] data) { this.data = data; // without assert here } public static BitSet build(long[] data) { assert data.length > 0 : "data length is zero!"; return new BitSet(data); } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org