Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/8911 )
Change subject: Add 'kudu fs list' tool ...................................................................... Patch Set 6: (12 comments) http://gerrit.cloudera.org:8080/#/c/8911/6//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/8911/6//COMMIT_MSG@9 PS6, Line 9: replace exploratory usages of 'kudu fs dump' and : 'kudu local_replica dump' > What's our stability policy for tools? Should we add (or plan to add after I'm not sure. I think they aren't considered as stable as other APIs, but I would definitely shy away from removing one without deprecation. In this case the new tool doesn't completely replace all of the functionality of the dump tools, instead it's meant as a kind of go-to swiss army knife for exploring on-disk metadata. The dump tools are still useful when the exact data on disk needs to be accessed. 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. Done 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@85 PS6, Line 85: tablet > rowset Done 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 swit We get a warning. I've also added the LOG(FATAL) to make sure it doesn't go off the rails. 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? This doesn't appear to be possible with enum classes. 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? It turns out that the min/max keys aren't part of the RowSetMetadata class, so it would require some non-trivial changes to expose them. I'd prefer to leave that to a follow-up commit if we want it. I have gone ahead and exposed per-cfile min/max key, since that was easier, as well as cfile delta stats. 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 er Done 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? Done 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? My reasoning was that if there is a corrupt tablet for whatever reason, we still want the tool to work. However, it can still work by filtering using the --tablet-id flag, so I've changed it to RETURN_NOT_OK. 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() ? Done 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 tabl Done 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 constru Done -- 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 <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <[email protected]> Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-Reviewer: Will Berkeley <[email protected]> Gerrit-Comment-Date: Sat, 06 Jan 2018 00:28:53 +0000 Gerrit-HasComments: Yes
