Csaba Ringhofer has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/16717 )

Change subject: IMPALA-10161: User LDAP Search bind support
......................................................................


Patch Set 7:

(10 comments)

http://gerrit.cloudera.org:8080/#/c/16717/7/be/src/util/ldap-search-bind.cc
File be/src/util/ldap-search-bind.cc:

http://gerrit.cloudera.org:8080/#/c/16717/7/be/src/util/ldap-search-bind.cc@46
PS7, Line 46: std::string
Here and at other places: do you intentionally don't use "using namespace std" 
or "using std::string"? Is there some kind of ambiguity in that case?


http://gerrit.cloudera.org:8080/#/c/16717/7/be/src/util/ldap-search-bind.cc@53
PS7, Line 53:   Status ldapBaseValidateStatus = ImpalaLdap::ValidateFlags();
            :   if (!ldapBaseValidateStatus.ok()) return ldapBaseValidateStatus;
We generally use the RETURN_IF_ERROR macro for this pattern.


http://gerrit.cloudera.org:8080/#/c/16717/7/be/src/util/ldap-search-bind.cc@71
PS7, Line 71:   Status ldapBaseInitStatus = ImpalaLdap::Init(user_filter, 
group_filter);
            :   if (!ldapBaseInitStatus.ok()) return ldapBaseInitStatus;
RETURN_IF_ERROR


http://gerrit.cloudera.org:8080/#/c/16717/7/be/src/util/ldap-search-bind.cc@100
PS7, Line 100: std::string
not needed, user_filter_ is already a string


http://gerrit.cloudera.org:8080/#/c/16717/7/be/src/util/ldap-search-bind.cc@137
PS7, Line 137: group_filter_
I think it would be a bit clearer to call find on group_filter instead of 
group_filter_. The result should be the same.


http://gerrit.cloudera.org:8080/#/c/16717/7/be/src/util/ldap-search-bind.cc@142
PS7, Line 142:     if (user_dn.empty()) return false;
ldap_unbind_ext is not called if we return here


http://gerrit.cloudera.org:8080/#/c/16717/7/be/src/util/ldap-simple-bind.cc
File be/src/util/ldap-simple-bind.cc:

http://gerrit.cloudera.org:8080/#/c/16717/7/be/src/util/ldap-simple-bind.cc@56
PS7, Line 56:   Status ldapBaseValidateStatus = ImpalaLdap::ValidateFlags();
            :   if (!ldapBaseValidateStatus.ok()) return ldapBaseValidateStatus;
RETURN_IF_ERROR


http://gerrit.cloudera.org:8080/#/c/16717/7/be/src/util/ldap-simple-bind.cc@80
PS7, Line 80:   Status ldapBaseInitStatus = ImpalaLdap::Init(user_filter, 
group_filter);
            :   if (!ldapBaseInitStatus.ok()) return ldapBaseInitStatus;
RETURN_IF_ERROR


http://gerrit.cloudera.org:8080/#/c/16717/7/fe/src/test/java/org/apache/impala/customcluster/LdapSearchBindImpalaShellTest.java
File 
fe/src/test/java/org/apache/impala/customcluster/LdapSearchBindImpalaShellTest.java:

http://gerrit.cloudera.org:8080/#/c/16717/7/fe/src/test/java/org/apache/impala/customcluster/LdapSearchBindImpalaShellTest.java@46
PS7, Line 46: LdapSearchBindImpalaShellTest
I think that a lot of duplication could be potentially avoided with 
LdapSimpleBindImpalaShellTest, e.g. by creating a common base class. If you 
agree, even if you don't want to deal with this in the current review a 
followup jira could be created.


http://gerrit.cloudera.org:8080/#/c/16717/7/fe/src/test/java/org/apache/impala/customcluster/LdapSearchBindImpalaShellTest.java@291
PS7, Line 291: testLdapSearchBind
Can you make the name more descriptive? The whole file seems to be about 
testLdapSearchBind



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I978744ad05d9ef408328d1e4dd2d18c329f4d3b7
Gerrit-Change-Number: 16717
Gerrit-PatchSet: 7
Gerrit-Owner: Tamas Mate <[email protected]>
Gerrit-Reviewer: Attila Jeges <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Tamas Mate <[email protected]>
Gerrit-Reviewer: Thomas Tauber-Marshall <[email protected]>
Gerrit-Comment-Date: Mon, 01 Feb 2021 23:21:55 +0000
Gerrit-HasComments: Yes

Reply via email to