You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Hao Hao (Code Review)" <ge...@cloudera.org> on 2018/05/08 00:57:06 UTC

[kudu-CR] Add a table renaming tool

Hao Hao has uploaded this change for review. ( http://gerrit.cloudera.org:8080/10337


Change subject: Add a table renaming tool
......................................................................

Add a table renaming tool

This commit introduces a tool to rename a table. When HMS integration
feature is enabled, users can use this tool to rename legacy tables
that have hive incompatible names. In order to allow these tables to be
upgraded.

Change-Id: I49a8c352ded124eef99f341ab552961fc3dc1260
---
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_table.cc
2 files changed, 58 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/37/10337/1
-- 
To view, visit http://gerrit.cloudera.org:8080/10337
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I49a8c352ded124eef99f341ab552961fc3dc1260
Gerrit-Change-Number: 10337
Gerrit-PatchSet: 1
Gerrit-Owner: Hao Hao <ha...@cloudera.com>

[kudu-CR] Add a table renaming tool

Posted by "Hao Hao (Code Review)" <ge...@cloudera.org>.
Hao Hao has posted comments on this change. ( http://gerrit.cloudera.org:8080/10337 )

Change subject: Add a table renaming tool
......................................................................


Patch Set 2:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/10337/1/src/kudu/tools/kudu-tool-test.cc
File src/kudu/tools/kudu-tool-test.cc:

http://gerrit.cloudera.org:8080/#/c/10337/1/src/kudu/tools/kudu-tool-test.cc@1847
PS1, Line 1847: 
              :   string master_addr = cl
> nit: do we need to write any data?
Done


http://gerrit.cloudera.org:8080/#/c/10337/1/src/kudu/tools/kudu-tool-test.cc@1850
PS1, Line 1850:   NO_FATALS(RunActionStdoutNone(Substitute("table rename $0 $1 $2",
              :                                            master_addr, kTableName,
              :                                            kNewTableName)));
              :   shared_ptr<KuduClient> client;
              :   ASSERT_OK(KuduClientB
> nit: move this down below the tool call, since it's not used until later?
Done


http://gerrit.cloudera.org:8080/#/c/10337/1/src/kudu/tools/tool_action_table.cc
File src/kudu/tools/tool_action_table.cc:

http://gerrit.cloudera.org:8080/#/c/10337/1/src/kudu/tools/tool_action_table.cc@121
PS1, Line 121: }
             : 
             : Status RenameTable(const RunnerContext& context) {
             :   const string& table_name = FindOrDie(context.required_args, kTableNameArg);
             :   const string& new_table_name = FindOrDie(context.required_args, kNewTableNameArg);
             : 
             :   client::sp::shared_ptr<KuduClient> client;
             :   RETURN_NOT_OK(CreateKuduClient(context, &client));
             :   unique_ptr<KuduTableAlterer> alterer(client->NewTableAlterer(table_name));
             :   return alterer->RenameTo(new_table_
> seems this is the same code as lines 108-116 above. Can we factor it out so
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I49a8c352ded124eef99f341ab552961fc3dc1260
Gerrit-Change-Number: 10337
Gerrit-PatchSet: 2
Gerrit-Owner: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 08 May 2018 21:44:57 +0000
Gerrit-HasComments: Yes

[kudu-CR] Add a table renaming tool

Posted by "Hao Hao (Code Review)" <ge...@cloudera.org>.
Hao Hao has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/10337 )

Change subject: Add a table renaming tool
......................................................................

Add a table renaming tool

This commit introduces a tool to rename a table. When HMS integration
feature is enabled, users can use this tool to rename legacy tables
that have hive incompatible names. In order to allow these tables to be
upgraded.

Change-Id: I49a8c352ded124eef99f341ab552961fc3dc1260
Reviewed-on: http://gerrit.cloudera.org:8080/10337
Reviewed-by: Dan Burkert <da...@apache.org>
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <to...@apache.org>
---
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_table.cc
2 files changed, 58 insertions(+), 5 deletions(-)

Approvals:
  Dan Burkert: Looks good to me, but someone else must approve
  Kudu Jenkins: Verified
  Todd Lipcon: Looks good to me, approved

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I49a8c352ded124eef99f341ab552961fc3dc1260
Gerrit-Change-Number: 10337
Gerrit-PatchSet: 4
Gerrit-Owner: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] Add a table renaming tool

Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/10337 )

Change subject: Add a table renaming tool
......................................................................


Patch Set 3: Code-Review+1


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I49a8c352ded124eef99f341ab552961fc3dc1260
Gerrit-Change-Number: 10337
Gerrit-PatchSet: 3
Gerrit-Owner: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 08 May 2018 23:11:47 +0000
Gerrit-HasComments: No

[kudu-CR] Add a table renaming tool

Posted by "Hao Hao (Code Review)" <ge...@cloudera.org>.
Hello Dan Burkert, Kudu Jenkins, Todd Lipcon, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/10337

to look at the new patch set (#2).

Change subject: Add a table renaming tool
......................................................................

Add a table renaming tool

This commit introduces a tool to rename a table. When HMS integration
feature is enabled, users can use this tool to rename legacy tables
that have hive incompatible names. In order to allow these tables to be
upgraded.

Change-Id: I49a8c352ded124eef99f341ab552961fc3dc1260
---
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_table.cc
2 files changed, 57 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/37/10337/2
-- 
To view, visit http://gerrit.cloudera.org:8080/10337
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I49a8c352ded124eef99f341ab552961fc3dc1260
Gerrit-Change-Number: 10337
Gerrit-PatchSet: 2
Gerrit-Owner: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] Add a table renaming tool

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/10337 )

Change subject: Add a table renaming tool
......................................................................


Patch Set 1:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/10337/1/src/kudu/tools/kudu-tool-test.cc
File src/kudu/tools/kudu-tool-test.cc:

http://gerrit.cloudera.org:8080/#/c/10337/1/src/kudu/tools/kudu-tool-test.cc@1847
PS1, Line 1847:   workload.Start();
              :   workload.StopAndJoin();
nit: do we need to write any data?


http://gerrit.cloudera.org:8080/#/c/10337/1/src/kudu/tools/kudu-tool-test.cc@1850
PS1, Line 1850:   string master_addr = cluster_->master()->bound_rpc_addr().ToString();
              :   shared_ptr<KuduClient> client;
              :   ASSERT_OK(KuduClientBuilder()
              :       .add_master_server_addr(master_addr)
              :       .Build(&client));
nit: move this down below the tool call, since it's not used until later?


http://gerrit.cloudera.org:8080/#/c/10337/1/src/kudu/tools/tool_action_table.cc
File src/kudu/tools/tool_action_table.cc:

http://gerrit.cloudera.org:8080/#/c/10337/1/src/kudu/tools/tool_action_table.cc@121
PS1, Line 121:   const string& master_addresses_str = FindOrDie(context.required_args,
             :                                                  kMasterAddressesArg);
             :   vector<string> master_addresses = Split(master_addresses_str, ",");
             :   const string& table_name = FindOrDie(context.required_args, kTableNameArg);
             :   const string& new_table_name = FindOrDie(context.required_args, kNewTableNameArg);
             : 
             :   client::sp::shared_ptr<KuduClient> client;
             :   RETURN_NOT_OK(KuduClientBuilder()
             :                     .master_server_addrs(master_addresses)
             :                     .Build(&client));
seems this is the same code as lines 108-116 above. Can we factor it out somehow?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I49a8c352ded124eef99f341ab552961fc3dc1260
Gerrit-Change-Number: 10337
Gerrit-PatchSet: 1
Gerrit-Owner: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 08 May 2018 15:33:36 +0000
Gerrit-HasComments: Yes

[kudu-CR] Add a table renaming tool

Posted by "Hao Hao (Code Review)" <ge...@cloudera.org>.
Hello Dan Burkert, Kudu Jenkins, Todd Lipcon, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/10337

to look at the new patch set (#3).

Change subject: Add a table renaming tool
......................................................................

Add a table renaming tool

This commit introduces a tool to rename a table. When HMS integration
feature is enabled, users can use this tool to rename legacy tables
that have hive incompatible names. In order to allow these tables to be
upgraded.

Change-Id: I49a8c352ded124eef99f341ab552961fc3dc1260
---
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_table.cc
2 files changed, 58 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/37/10337/3
-- 
To view, visit http://gerrit.cloudera.org:8080/10337
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I49a8c352ded124eef99f341ab552961fc3dc1260
Gerrit-Change-Number: 10337
Gerrit-PatchSet: 3
Gerrit-Owner: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] Add a table renaming tool

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/10337 )

Change subject: Add a table renaming tool
......................................................................


Patch Set 3: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I49a8c352ded124eef99f341ab552961fc3dc1260
Gerrit-Change-Number: 10337
Gerrit-PatchSet: 3
Gerrit-Owner: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Wed, 09 May 2018 18:19:24 +0000
Gerrit-HasComments: No

[kudu-CR] Add a table renaming tool

Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/10337 )

Change subject: Add a table renaming tool
......................................................................


Patch Set 1:

LGTM modulo Todd's comments.


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I49a8c352ded124eef99f341ab552961fc3dc1260
Gerrit-Change-Number: 10337
Gerrit-PatchSet: 1
Gerrit-Owner: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 08 May 2018 19:10:21 +0000
Gerrit-HasComments: No