impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sailesh Mukil (Code Review)" <ger...@cloudera.org>
Subject [Impala-CR](cdh5-trunk) IMPALA-1850 Allow fs.defaultFS to be set to a non-HDFS filesystem
Date Thu, 07 Apr 2016 17:01:49 GMT
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 <aphadke@cloudera.com>
Gerrit-Reviewer: Casey Ching <casey@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: Henry Robinson <henry@cloudera.com>
Gerrit-Reviewer: Juan Yu <jyu@cloudera.com>
Gerrit-Reviewer: Sailesh Mukil <sailesh@cloudera.com>
Gerrit-Reviewer: anujphadke <aphadke@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message