You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Kehua Wu <wu...@zte.com.cn> on 2019/09/10 11:17:02 UTC
Review Request 71462: RANGER-2563 Optimize the code,
keep the code style consistent and remove the invalid code in the
embeddedwebserver project
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71462/
-----------------------------------------------------------
Review request for ranger, Ankita Sinha, Don Bosco Durai, Colm O hEigeartaigh, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Nitin Galave, pengjianhua, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, sam rome, Venkat Ranganathan, Velmurugan Periasamy, Qiang Zhang, and Barna Zsombor Klara.
Bugs: RANGER-2563
https://issues.apache.org/jira/browse/RANGER-2563
Repository: ranger
Description
-------
1. Change from "System.err.println("err response: " + response);"
to "logger.severe("Error response: " + response);"
2. Remove invalid code
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;
}
3. Change the parameter "CrendentialProviderPath" to "crendentialProviderPath"
Diffs
-----
embeddedwebserver/src/main/java/org/apache/ranger/server/tomcat/EmbeddedServer.java b39212a
embeddedwebserver/src/main/java/org/apache/ranger/server/tomcat/SolrCollectionBootstrapper.java ce268fd
Diff: https://reviews.apache.org/r/71462/diff/1/
Testing
-------
Thanks,
Kehua Wu