Adar Dembo has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8911 )

Change subject: Add 'kudu fs list' tool
......................................................................


Patch Set 6:

(10 comments)

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

http://gerrit.cloudera.org:8080/#/c/8911/6/src/kudu/tools/kudu-tool-test.cc@404
PS6, Line 404:     const vector<string> kFsModeRegexes = {
This should be updated.


http://gerrit.cloudera.org:8080/#/c/8911/6/src/kudu/tools/tool_action_fs.cc
File src/kudu/tools/tool_action_fs.cc:

http://gerrit.cloudera.org:8080/#/c/8911/6/src/kudu/tools/tool_action_fs.cc@396
PS6, Line 396:   switch (group) {
What happens if I add an entry to FieldGroup but forgot to update this switch? 
Do I get a compile error? A warning? Nothing?

If it's not a compile error, is there anything we should add here to guarantee 
good behavior? Like a default statement, a LOG(FATAL), or something like that?


http://gerrit.cloudera.org:8080/#/c/8911/6/src/kudu/tools/tool_action_fs.cc@415
PS6, Line 415:   static const Field kFieldVariants[] = {
Could you use the enum macros from gutil/casts.h to avoid this?


http://gerrit.cloudera.org:8080/#/c/8911/6/src/kudu/tools/tool_action_fs.cc@483
PS6, Line 483: // Returns rowset info for the field.
Worth logging the min/max keys of the rowset?


http://gerrit.cloudera.org:8080/#/c/8911/6/src/kudu/tools/tool_action_fs.cc@584
PS6, Line 584:     CHECK_OK(fs_manager->OpenBlock(block, &readable_block));
CHECK_OK seems wrong for a CLI tool; why not RETURN_NOT_OK and return an error 
from List if one of these fails?


http://gerrit.cloudera.org:8080/#/c/8911/6/src/kudu/tools/tool_action_fs.cc@620
PS6, Line 620:     tablet_ids.emplace_back(FLAGS_tablet_id);
Do we need to ToLowerCase this?


http://gerrit.cloudera.org:8080/#/c/8911/6/src/kudu/tools/tool_action_fs.cc@633
PS6, Line 633:     WARN_NOT_OK(TabletMetadata::Load(&fs_manager, tablet_id, 
&tablet_metadata),
Why not RETURN_NOT_OK on this?


http://gerrit.cloudera.org:8080/#/c/8911/6/src/kudu/tools/tool_action_fs.cc@652
PS6, Line 652:       if (FLAGS_rowset_id > 0 && FLAGS_rowset_id != rowset.id()) 
{
Shouldn't this be FLAGS_rowset_id != -1 && FLAGS_rowset_id != rowset.id() ?


http://gerrit.cloudera.org:8080/#/c/8911/6/src/kudu/tools/tool_action_fs.cc@688
PS6, Line 688:       // TODO(dan): should orphaned blocks be included, perhaps 
behind a flag?
Perhaps, but this comment is slightly misplaced; orphaned blocks are a 
tablet-level thing, not a rowset-level thing, so the comment should be outside 
the inner (rowset_metadata) loop.


http://gerrit.cloudera.org:8080/#/c/8911/6/src/kudu/tools/tool_action_fs.cc@786
PS6, Line 786:                                    "Possible values: table, 
table-id, tablet-id, partition, "
Seems like it might be easy to accidentally omit an entry; could we construct 
this list on-the-fly by iterating on the Field enum class?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7f5a63e636d95e3ee55bb4955cece7f5d0b7532d
Gerrit-Change-Number: 8911
Gerrit-PatchSet: 6
Gerrit-Owner: Dan Burkert <danburk...@apache.org>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <danburk...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mpe...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-Reviewer: Will Berkeley <wdberke...@gmail.com>
Gerrit-Comment-Date: Thu, 04 Jan 2018 00:22:53 +0000
Gerrit-HasComments: Yes

Reply via email to