Adar Dembo has posted comments on this change.

Change subject: Add file globbing to Env
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/5338/1/src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc
File src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc:

PS1, Line 74: pattern.ToString()
I haven't looked at the callers to CountFilesInDir(), but I presume the pattern 
syntax expected by MatchPattern() is the same as for glob()?


http://gerrit.cloudera.org:8080/#/c/5338/1/src/kudu/util/env.h
File src/kudu/util/env.h:

PS1, Line 266: mathing
matching


http://gerrit.cloudera.org:8080/#/c/5338/1/src/kudu/util/env_posix.cc
File src/kudu/util/env_posix.cc:

Line 1163:     auto cleanup = MakeScopedCleanup([&] { globfree(&result); });
Are you sure we should be calling this in the event of error too?


Line 1165:     int ret = glob(path_pattern.c_str(), GLOB_TILDE, NULL, &result);
Maybe GLOB_TILDE_CHECK so that if tilde substitution fails, it's an error?

Also, consider GLOB_ERR (glob() will return early with GLOB_ABORTED in the 
event of a read error) and GLOB_NOSORT (glob() won't sort the results, slightly 
faster).


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic71160b11b19811ac9669dc7a572a7e4d2e59e79
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <danburk...@apache.org>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-HasComments: Yes

Reply via email to