[
https://issues.apache.org/jira/browse/RANGER-3945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Xuze Yang updated RANGER-3945:
------------------------------
Attachment: 0001-RANGER-3945-enable-agent.sh-can-t-disable-sqoop-and-.patch
> enable-agent.sh can't disable sqoop and kylin's properties file
> ---------------------------------------------------------------
>
> Key: RANGER-3945
> URL: https://issues.apache.org/jira/browse/RANGER-3945
> Project: Ranger
> Issue Type: Bug
> Components: plugins
> Affects Versions: 2.1.0
> Reporter: Xuze Yang
> Priority: Major
> Attachments:
> 0001-RANGER-3945-enable-agent.sh-can-t-disable-sqoop-and-.patch
>
>
> Take sqoop for example, when the behaviour is disable, the authName will be
> "".
> {code:java}
> if [ "${action}" = "enable" ]
> then
>
> authName="org.apache.ranger.authorization.sqoop.authorizer.RangerSqoopAuthorizer"
> else
> authName=""
> fi {code}
> AuthName will be passed into the addOrUpdatePropertyToFile method as second
> parameter.
> {code:java}
> addOrUpdatePropertyToFile org.apache.sqoop.security.authorization.validator
> $authName ${fn} {code}
> However, when $authName is "", $authName will not be considered as a
> parameter. AddOrUpdatePropertyToFile will think there only two parameters and
> then caused a series of errors.
> {code:java}
> addOrUpdatePropertyToFile(){
> checkPropertyInFile $1 $3
> if [ $? -eq 1 ]
> then
> addPropertyToFile $1 $2 $3
> else
> updatePropertyToFile $1 $2 $3
> fi
> } {code}
> In addition, kafka also needs to modify server.properties but there is no
> corresponding implementation in this script.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)