----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53943/#review157255 -----------------------------------------------------------
Fix it, then Ship it! ambari-server/src/main/java/org/apache/ambari/server/utils/RequestUtils.java (lines 53 - 55) <https://reviews.apache.org/r/53943/#comment227781> This would actually do indexOf twice in cases where there are 2 or more IPs. Why not just make a method called something like normalizeIPAddress(String address) which either returns the string or returns the indexOf. This way, you only do it once. - Jonathan Hurley On Nov. 29, 2016, 7:16 a.m., wang yaoxin wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/53943/ > ----------------------------------------------------------- > > (Updated Nov. 29, 2016, 7:16 a.m.) > > > Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Oliver > Szabo, Robert Levas, Robert Nettleton, and Sebastian Toader. > > > Bugs: AMBARI-18944 > https://issues.apache.org/jira/browse/AMBARI-18944 > > > Repository: ambari > > > Description > ------- > > Mutil-agent were configured in some production environments, RemoteIp > therefore will obtain mutilple IP addresses, like > (RemoteIp(172.16.0.66,172.16.193.56),)which causes errors in log output. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/utils/RequestUtils.java > 0ac782f > > ambari-server/src/test/java/org/apache/ambari/server/utils/RequestUtilsTest.java > 595127e > > Diff: https://reviews.apache.org/r/53943/diff/ > > > Testing > ------- > > RequestUtilsTest All Tests Passsed ,Process finished with exit code 0 > > > Thanks, > > wang yaoxin > >
