Sailesh Mukil has posted comments on this change.

Change subject: IMPALA-1850 Allow fs.defaultFS to be set to a non-HDFS 
filesystem
......................................................................


Patch Set 12:

(8 comments)

http://gerrit.cloudera.org:8080/#/c/1121/12/be/src/runtime/exec-env.cc
File be/src/runtime/exec-env.cc:

Line 419: configured_defaultFs=config_response.value;
Don't we need to check config_response.__isset_value before accessing it?


Line 419: s=c
spaces before and after the '='


Line 420: c
Capital 'C' in "configured"


http://gerrit.cloudera.org:8080/#/c/1121/12/be/src/util/hdfs-util.cc
File be/src/util/hdfs-util.cc:

Line 67:   return (strncmp(path, "hdfs://", 7) == 0
       :           || (configured_defaultFs.length() >= 7
       :               && configured_defaultFs.compare(0,7,"hdfs://") == 0
       :               && !IsS3APath(path)));
Instead of explicitly checking for IsS3APath(), you can do the following:

if (strstr(path, ":/") == NULL) {
  return configured_defaultFs.compare(0,7,"hdfs://") == 0;
}
return strncmp(path, "hdfs://", 7) == 0;

This is so that we don't have to keep modifying this function if more 
filesystems are added.


http://gerrit.cloudera.org:8080/#/c/1121/12/be/src/util/hdfs-util.h
File be/src/util/hdfs-util.h:

Line 24: 
You can get rid of these extra lines.


Line 52:  
Remove extra space


Line 53: static std::string configured_defaultFs;
I'm okay with keeping it here. Henry and/or Dan can confirm if we should do so 
or not.


Line 57
Get rid of these extra lines too.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2f45bef6c94ece634045acb906d12591587ccfed
Gerrit-PatchSet: 12
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: anujphadke <[email protected]>
Gerrit-Reviewer: Casey Ching <[email protected]>
Gerrit-Reviewer: Dan Hecht <[email protected]>
Gerrit-Reviewer: Henry Robinson <[email protected]>
Gerrit-Reviewer: Juan Yu <[email protected]>
Gerrit-Reviewer: Sailesh Mukil <[email protected]>
Gerrit-Reviewer: anujphadke <[email protected]>
Gerrit-HasComments: Yes

Reply via email to