Adar Dembo has posted comments on this change.

Change subject: env: add RWFile::GetExtentMap for analyzing file extents
......................................................................


Patch Set 1:

(5 comments)

http://gerrit.cloudera.org:8080/#/c/6583/1/src/kudu/util/env-test.cc
File src/kudu/util/env-test.cc:

PS1, Line 875:   char buf[1024];
             :   memset(buf, 0, sizeof(buf));
> I think it's possible to write 
No longer an issue; I'm now going to preallocate the file instead of writing 
zeroes to it.


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

PS1, Line 728: OVERRIDE
> nit: consider replacing with C++11-ish
Just trying to be consistent with the rest of the file.


PS1, Line 737: unique_ptr<char[]> buf(new char[kBufSize]);
> Is it crucial to allocate this on the heap?  Would stack allocated array su
I was worried about stack allocating a large buffer (say, a megabyte). But I 
suppose 4K isn't too bad.


PS1, Line 747: ~(0ULL)
> Would using FIEMAP_MAX_OFFSET macro be more idiomatic?
Ah neat, didn't know about that.


PS1, Line 749:       int ret = ioctl(fd_, FS_IOC_FIEMAP, fm);
             :       if (ret == -1) {
> nit: since the 'ret' variable is not referenced anywhere else, consider
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I35bd1bdb9e1a839af2ab95ea73b79217c1f4a2b3
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <dral...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-HasComments: Yes

Reply via email to