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



samza-core/src/main/scala/org/apache/samza/util/Util.scala (line 312)
<https://reviews.apache.org/r/37039/#comment148445>

    the result is not correct, it returns something like 
fe80:0:0:0:3e15:c2ff:feca:f0fc%4
    
    also, need to test if the address is a isSiteLocalAddress. Sometimes, more 
than one address is site local adress.
    
    Looked at Spark's code for the reference:
    
    
https://github.com/apache/spark/blob/6b2baec04fa3d928f0ee84af8c2723ac03a4648c/core/src/main/scala/org/apache/spark/util/Utils.scala#L835-L874
    
    This code looks return desired result.
    
    Thank you.


- Yan Fang


On Aug. 3, 2015, 1:44 p.m., József Márton Jung wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37039/
> -----------------------------------------------------------
> 
> (Updated Aug. 3, 2015, 1:44 p.m.)
> 
> 
> Review request for samza.
> 
> 
> Repository: samza
> 
> 
> Description
> -------
> 
> We are using InetAddress.getLocalHost().getHostAddress() for the 
> org.apache.samza.coordinator.server.HttpServer#getUrl. But getLocalHost() may 
> return a loopback address, 127.0.0.1, which is not reachable by other 
> machines.
> 
> Added a method to Util.scala which resolves the first network address which 
> is not a loopback address.
> 
> 
> Diffs
> -----
> 
>   
> samza-core/src/main/java/org/apache/samza/coordinator/stream/CoordinatorStreamMessage.java
>  e5ab4fb 
>   samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala 
> 27b2517 
>   
> samza-core/src/main/scala/org/apache/samza/coordinator/server/HttpServer.scala
>  dfe3a45 
>   samza-core/src/main/scala/org/apache/samza/metrics/JmxServer.scala de45123 
>   
> samza-core/src/main/scala/org/apache/samza/metrics/reporter/MetricsSnapshotReporterFactory.scala
>  dcf0435 
>   samza-core/src/main/scala/org/apache/samza/util/Util.scala 419452c 
>   
> samza-log4j/src/main/java/org/apache/samza/logging/log4j/serializers/LoggingEventJsonSerde.java
>  cbf552c 
> 
> Diff: https://reviews.apache.org/r/37039/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> József Márton Jung
> 
>

Reply via email to