ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colm O hEigeartaigh <cohei...@apache.org>
Subject Re: Review Request 63351: RANGER-1859:Fix new findBugs in HdfsClient.java
Date Fri, 27 Oct 2017 09:23:55 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63351/#review189408
-----------------------------------------------------------


Ship it!




Ship It!

- Colm O hEigeartaigh


On Oct. 27, 2017, 9:12 a.m., Qiang Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63351/
> -----------------------------------------------------------
> 
> (Updated Oct. 27, 2017, 9:12 a.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Don Bosco Durai, Colm O hEigeartaigh, Gautam
Borad, Madhan Neethiraj, pengjianhua, Ramesh Mani, Selvamohan Neethiraj, sam  rome, Venkat
Ranganathan, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1859
>     https://issues.apache.org/jira/browse/RANGER-1859
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Fix new findBugs in HdfsClient.java
> 
> There is FindBugs: Performance  (FB.SBSC_USE_STRINGBUFFER_CONCATENATION) in org.apache.ranger.services.hdfs.client.HdfsClient.validateConnectionConfigs(Map<String,
String>)
> {code}
> if (fsDefaultNameElements != null && fsDefaultNameElements.length >= 2) {
> 	String cluster = "";
> 	StringBuffer clusters = new StringBuffer();
> 	configs.put("dfs.nameservices", "hdfscluster");
> 	configs.put("fs.default.name", "hdfs://" + configs.get("dfs.nameservices"));
> 	configs.put("dfs.client.failover.proxy.provider." + configs.get("dfs.nameservices"),
> 			"org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider");
> 	for (int i = 0; i < fsDefaultNameElements.length; i++) {
> 		cluster = "namenode" + (i + 1);
> 		configs.put("dfs.namenode.rpc-address." + configs.get("dfs.nameservices") + "." + cluster,
> 				fsDefaultNameElements[i]);
> 		if (i == (fsDefaultNameElements.length - 1)) {
> 				clusters.append(cluster);
> 		} else {
> 				clusters.append(cluster).append(",");
> 		}
> 	}
> 	configs.put("dfs.ha.namenodes." + configs.get("dfs.nameservices"), clusters.toString());
> }
> {code}
> 
> To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZSbhom32dlDl11LWEm9nX11zsOWMf5dv3Q9Mogo-2FGua3FsLRTFft2V-2FOFC9o0P2e0-3D_d04ZgyDzSjlwpjXIuOFYDNE6R93Lal83MDClQK32PZtwvLNyXEpALHHKXqGKvroU5mWNsNiM7OVRdsl6DJR5LTUChq42fVbU-2Fr1jlwSSZ3yR3k4ycwZTS0QkKayVUGYhpHjV8vMdPHJwfZIZjeDvW59RoGHYuxr3UvsJzGHNk6gAvr6OuaH0vx6ZtLRw-2F0NLST5sMrn2kXHvdALOtTEjnQ-3D-3D
> 
> 
> Diffs
> -----
> 
>   hdfs-agent/src/main/java/org/apache/ranger/services/hdfs/client/HdfsClient.java 39fb9e8

> 
> 
> Diff: https://reviews.apache.org/r/63351/diff/2/
> 
> 
> Testing
> -------
> 
> Tested
> 
> 
> Thanks,
> 
> Qiang Zhang
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message