You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Dan Burkert (Code Review)" <ge...@cloudera.org> on 2016/12/03 00:39:41 UTC

[kudu-CR] Add file globbing to Env

Hello Adar Dembo, Todd Lipcon,

I'd like you to do a code review.  Please visit

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

to review the following change.

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

Add file globbing to Env

Change-Id: Ic71160b11b19811ac9669dc7a572a7e4d2e59e79
---
M src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc
M src/kudu/util/env-test.cc
M src/kudu/util/env.h
M src/kudu/util/env_posix.cc
4 files changed, 60 insertions(+), 6 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic71160b11b19811ac9669dc7a572a7e4d2e59e79
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] Add file globbing to Env

Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change.

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


Patch Set 4:

(5 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: 
> And I presume this is OK too (since it survived in PS2).
It appears the answer is "no", so I reverted this part of the change.


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

PS1, Line 266: matchin
> matching
Done


Line 268:   virtual Status Glob(const std::string& path_pattern, std::vector<std::string>* paths) = 0;
> error: no template named 'vector'; did you mean '__gnu_cxx::vector'? [clang
Done


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); });
> Since you retained this in PS2 I presume it's safe.
yes, it must be called in the event of an error.


Line 1165:     int ret = glob(path_pattern.c_str(), GLOB_TILDE | GLOB_ERR , NULL, &result);
> Don't think GLOB_TILDE_CHECK is a good idea?
GLOB_TILDE_CHECK is not defined on macOS.  I tried to test GLOB_ERR on macOS, but it doesn't seem to do anything.


-- 
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: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] Add file globbing to Env

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

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

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

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

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

Add file globbing to Env

Change-Id: Ic71160b11b19811ac9669dc7a572a7e4d2e59e79
---
M src/kudu/util/env-test.cc
M src/kudu/util/env.h
M src/kudu/util/env_posix.cc
3 files changed, 57 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/38/5338/4
-- 
To view, visit http://gerrit.cloudera.org:8080/5338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic71160b11b19811ac9669dc7a572a7e4d2e59e79
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] Add file globbing to Env

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

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

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

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

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

Add file globbing to Env

Change-Id: Ic71160b11b19811ac9669dc7a572a7e4d2e59e79
---
M src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc
M src/kudu/util/env-test.cc
M src/kudu/util/env.h
M src/kudu/util/env_posix.cc
4 files changed, 60 insertions(+), 6 deletions(-)


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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic71160b11b19811ac9669dc7a572a7e4d2e59e79
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] Add file globbing to Env

Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has submitted this change and it was merged.

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


Add file globbing to Env

Change-Id: Ic71160b11b19811ac9669dc7a572a7e4d2e59e79
Reviewed-on: http://gerrit.cloudera.org:8080/5338
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Kudu Jenkins
---
M src/kudu/util/env-test.cc
M src/kudu/util/env.h
M src/kudu/util/env_posix.cc
3 files changed, 57 insertions(+), 0 deletions(-)

Approvals:
  Adar Dembo: Looks good to me, approved
  Kudu Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic71160b11b19811ac9669dc7a572a7e4d2e59e79
Gerrit-PatchSet: 5
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] Add file globbing to Env

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change.

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


Patch Set 4: Code-Review+2

-- 
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: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] Add file globbing to Env

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change.

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


Patch Set 2: Code-Review+2

(3 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 pat
And I presume this is OK too (since it survived in PS2).


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?
Since you retained this in PS2 I presume it's safe.


Line 1165:     int ret = glob(path_pattern.c_str(), GLOB_TILDE | GLOB_ERR , NULL, &result);
> Maybe GLOB_TILDE_CHECK so that if tilde substitution fails, it's an error?
Don't think GLOB_TILDE_CHECK is a good idea?


-- 
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: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] Add file globbing to Env

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
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 <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes