ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wu.kehua (Jira)" <j...@apache.org>
Subject [jira] [Updated] (RANGER-2563) Optimize the code, keep the code style consistent and remove the invalid code in the embeddedwebserver project
Date Tue, 10 Sep 2019 11:13:00 GMT

     [ https://issues.apache.org/jira/browse/RANGER-2563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

wu.kehua updated RANGER-2563:
-----------------------------
    Attachment: 0001-RANGER-2563-Optimize-the-code-keep-the-code-style-co.patch

> Optimize the code, keep the code style consistent and remove the invalid code in the
embeddedwebserver project
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: RANGER-2563
>                 URL: https://issues.apache.org/jira/browse/RANGER-2563
>             Project: Ranger
>          Issue Type: Bug
>          Components: Ranger
>    Affects Versions: 2.1.0
>            Reporter: wu.kehua
>            Assignee: wu.kehua
>            Priority: Major
>              Labels: patch
>         Attachments: 0001-RANGER-2563-Optimize-the-code-keep-the-code-style-co.patch
>
>
> 1. Change from "System.err.println("err response: " + response);"
>  to "logger.severe("Error response: " + response);"
> 2. RemoveĀ invalid code
> {code:java}
> private void uploadFileToZk(SolrZkClient zkClient, Path filePath,
> 		Path configsPath) throws FileNotFoundException {
> 	InputStream is = new FileInputStream(filePath.toString());
> 	try {
> 		if (zkClient.exists(configsPath.toString(), true)) {
> 			zkClient.setData(configsPath.toString(),
> 					IOUtils.toByteArray(is), true);
> 		} else {
> 			zkClient.create(configsPath.toString(),
> 					IOUtils.toByteArray(is), CreateMode.PERSISTENT, true);
> 		}
> 	} catch (Exception e) {
> 		throw new IllegalStateException(e);
> 	} finally {
> 		IOUtils.closeQuietly(is);
> 	}
> }
> private String getConfigFileName() { private String getConfigFileName() { 
>         return SOLR_CONFIG_FILE; 
> }
> {code}
> 3. Change the parameter "CrendentialProviderPath" to "crendentialProviderPath"



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Mime
View raw message