Adar Dembo has posted comments on this change. Change subject: env_util: Implement CreateDirsRecursively() ......................................................................
Patch Set 1: (3 comments) http://gerrit.cloudera.org:8080/#/c/5618/1/src/kudu/util/env_util.cc File src/kudu/util/env_util.cc: PS1, Line 199: dir_name.empty() I don't think this can happen. Take the path "/foo/bar/baz". Successive DirName() calls will yield "/foo/bar", "/foo", and "/" (and then "/" over and over). Line 202: for (auto path = paths.crbegin(); path != paths.crend(); ++path) { Nit: I think it'd be clearer to explicitly reverse the vector (there's probably something in <algorithm> for that), then do a normal "for (auto path : paths)" loop. http://gerrit.cloudera.org:8080/#/c/5618/1/src/kudu/util/env_util.h File src/kudu/util/env_util.h: Line 75: Status CreateDirsRecursively(Env* env, std::string path); Pass 'path' by cref? -- To view, visit http://gerrit.cloudera.org:8080/5618 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia664708a09493923abbf2ff4e56e3d49c62cf97e Gerrit-PatchSet: 1 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Mike Percy <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Dinesh Bhat <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Lars Volker <[email protected]> Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-HasComments: Yes
