Grant Henke has posted comments on this change. ( http://gerrit.cloudera.org:8080/16388 )
Change subject: KUDU-3187: Enhance the HMS plugin to check if synchronization is enabled ...................................................................... Patch Set 4: (8 comments) I am still fixing the C++ tests. http://gerrit.cloudera.org:8080/#/c/16388/4/java/kudu-hive/src/main/java/org/apache/kudu/hive/metastore/KuduMetastorePlugin.java File java/kudu-hive/src/main/java/org/apache/kudu/hive/metastore/KuduMetastorePlugin.java: http://gerrit.cloudera.org:8080/#/c/16388/4/java/kudu-hive/src/main/java/org/apache/kudu/hive/metastore/KuduMetastorePlugin.java@131 PS4, Line 131: below doesn't fail. > nit: If the master addresses property isn't set, won't kuduSyncEnabled() ju Done http://gerrit.cloudera.org:8080/#/c/16388/4/java/kudu-hive/src/main/java/org/apache/kudu/hive/metastore/KuduMetastorePlugin.java@151 PS4, Line 151: if (skipsValidation()) { : return; : } > nit: does it make sense to move this before tableEvent.getTable() call? Done http://gerrit.cloudera.org:8080/#/c/16388/4/java/kudu-hive/src/main/java/org/apache/kudu/hive/metastore/KuduMetastorePlugin.java@165 PS4, Line 165: isKuduTable > Why not to perform checkNoKuduProperties() here as well? Could you add a c This is onDropTable, we don't care about existing properties given the table is being dropped. http://gerrit.cloudera.org:8080/#/c/16388/4/java/kudu-hive/src/main/java/org/apache/kudu/hive/metastore/KuduMetastorePlugin.java@166 PS4, Line 166: However, make sure it doesn't have a table id from the context. > Could you add more color on why this is a error condition which needs to be Done http://gerrit.cloudera.org:8080/#/c/16388/4/java/kudu-hive/src/main/java/org/apache/kudu/hive/metastore/KuduMetastorePlugin.java@168 PS4, Line 168: Kudu table ID does not match the non-Kudu HMS entry > Does it make sense to include table ID (and, maybe, table name from 'table' The context should be included in the larger stack trace. http://gerrit.cloudera.org:8080/#/c/16388/4/java/kudu-hive/src/main/java/org/apache/kudu/hive/metastore/KuduMetastorePlugin.java@179 PS4, Line 179: // Dropping tables from Hive is okay and Kudu will be notified via the : // notification listener. > nit: I didn't understand the context of this comment until I read the gerri Done http://gerrit.cloudera.org:8080/#/c/16388/4/java/kudu-hive/src/main/java/org/apache/kudu/hive/metastore/KuduMetastorePlugin.java@181 PS4, Line 181: if (targetTableId == null) { : return; : } > Should this check precede the check at line 165? No it shouldn't. This would be a Kudu table without a targetTableId set. http://gerrit.cloudera.org:8080/#/c/16388/4/java/kudu-hive/src/main/java/org/apache/kudu/hive/metastore/KuduMetastorePlugin.java@463 PS4, Line 463: String masterAddresses = table.getParameters().get(KUDU_MASTER_ADDRS_KEY); : if (masterAddresses == null || masterAddresses.isEmpty()) { : // A table without master addresses is not synchronized, : // it may not even be a Kudu table. : return false; : } > nit: could this be separated into a method/function and used here and in ch It doesn't save any code given the behavior when unset/missing is different. -- To view, visit http://gerrit.cloudera.org:8080/16388 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib3588d72af1bb499202b47fca50a08876e13ea37 Gerrit-Change-Number: 16388 Gerrit-PatchSet: 4 Gerrit-Owner: Grant Henke <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Greg Solovyev <[email protected]> Gerrit-Reviewer: Hao Hao <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Comment-Date: Thu, 10 Sep 2020 14:56:29 +0000 Gerrit-HasComments: Yes
