Andrew Wong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/10844 )

Change subject: KUDU-2191: Adjust upgrade tool to tolerate downgraded metadata
......................................................................


Patch Set 4:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/10844/4//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/10844/4//COMMIT_MSG@9
PS4, Line 9: TestHmsDowngrade keeps on failing as the metadata
Have you looped the updated test via dist-test?


http://gerrit.cloudera.org:8080/#/c/10844/4//COMMIT_MSG@10
PS4, Line 10: This issue
            : didn't surface because commit 214dbc249 didn't rebase. This commit
            : corrects the upgrade tool to better handle this scenario.
To clarify, this means there's some logic in some other commit that was 
incorrectly rebased?


http://gerrit.cloudera.org:8080/#/c/10844/4/src/kudu/tools/tool_action_hms.cc
File src/kudu/tools/tool_action_hms.cc:

http://gerrit.cloudera.org:8080/#/c/10844/4/src/kudu/tools/tool_action_hms.cc@170
PS4, Line 170: LOG(WARNING) << Substitute("Failed to upgrade legacy Impala 
table '$0.$1' "
             :                                        "(Kudu table name: $2), 
because a Kudu table with "
             :                                        "name '$0.$1' already 
exists'.", hms_table->dbName,
             :                                        hms_table->tableName, 
table_name);
Do you think this message would be helpful to append to add to the Status 
itself? Eg through CloneAndPrepend or something?


http://gerrit.cloudera.org:8080/#/c/10844/4/src/kudu/tools/tool_action_hms.cc@176
PS4, Line 176: return hms_catalog->UpgradeLegacyImpalaTable(
             :                       kudu_table->id(), hms_table->dbName, 
hms_table->tableName,
             :                       
client::SchemaFromKuduSchema(kudu_table->schema()));
This usage of AndThen feels a bit weird. Generally, I think of it as chaining 
together calls, but in this case, we're using it pretty much exclusively for 
control-flow, which IMO feels kind of unnatural. Since this is being called 
both here and at L164, maybe we can combine the usages? How about something 
like:

 if (table_name != new_table_name) {
   s = AlterKuduTableOnly();
   if (s.IsAlreadyPresent()) LOG(WARNING) << error;
 }
 if (s.ok()) {
   s = hms_catalog->UpgradeLegacyImpalaTable();
 }



--
To view, visit http://gerrit.cloudera.org:8080/10844
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie9a3b154e77db4eda72b9c4b53861f9fe06f09a3
Gerrit-Change-Number: 10844
Gerrit-PatchSet: 4
Gerrit-Owner: Hao Hao <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>
Gerrit-Reviewer: Hao Hao <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Comment-Date: Mon, 02 Jul 2018 18:23:21 +0000
Gerrit-HasComments: Yes

Reply via email to