----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/19342/#review37557 -----------------------------------------------------------
samza-yarn/src/main/scala/org/apache/samza/job/yarn/SamzaAppMasterService.scala <https://reviews.apache.org/r/19342/#comment69157> You can remove the import org.apache.samza.util.Util line above, since we're only using Util.randomBetween. samza-yarn/src/main/scala/org/apache/samza/job/yarn/SamzaAppMasterService.scala <https://reviews.apache.org/r/19342/#comment69154> I think we can remove this loop now, since we should never get collisions when binding to 0 (unless the box is out of free ports, in which case it will fail). samza-yarn/src/main/scala/org/apache/samza/job/yarn/SamzaAppMasterService.scala <https://reviews.apache.org/r/19342/#comment69155> If you remove the for loop (above) and the exception (below), you can remove return here. samza-yarn/src/main/scala/org/apache/samza/job/yarn/SamzaAppMasterService.scala <https://reviews.apache.org/r/19342/#comment69156> I don't think we need this anymore, since we should not have collisions when binding to port 0. samza-yarn/src/main/scala/org/apache/samza/webapp/WebAppServer.scala <https://reviews.apache.org/r/19342/#comment69158> Since the port is constant once it's resolved by the OS, I'd rather create a var port in the class, assign it at the end of start, and just return the port var in getPort. This way getPort is low overhead. - Chris Riccomini On March 18, 2014, 5:39 a.m., Zhijie Shen wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/19342/ > ----------------------------------------------------------- > > (Updated March 18, 2014, 5:39 a.m.) > > > Review request for samza. > > > Repository: samza > > > Description > ------- > > SAMZA-175 Bind AM Jetty server to 0 > > > Diffs > ----- > > > samza-yarn/src/main/scala/org/apache/samza/job/yarn/SamzaAppMasterService.scala > 82d90d4 > samza-yarn/src/main/scala/org/apache/samza/webapp/WebAppServer.scala > bb5c297 > > samza-yarn/src/test/scala/org/apache/samza/job/yarn/TestSamzaAppMasterService.scala > 1099ca3 > > Diff: https://reviews.apache.org/r/19342/diff/ > > > Testing > ------- > > > Thanks, > > Zhijie Shen > >
