> On Feb. 24, 2015, 2:15 a.m., Gwen Shapira wrote:
> > core/src/main/scala/kafka/consumer/ZookeeperConsumerConnector.scala, line 
> > 133
> > <https://reviews.apache.org/r/31226/diff/1/?file=870240#file870240line133>
> >
> >     I think hostname will not be null because you set it to "localhost" 
> > when defining?

you are absolutely right, I added the hostname==null in there when I was trying 
to pull the first nic with a hostname attached, but it didn't work consistently 
for me (sometime it would find the host name (if it resolved originally) and 
sometimes not so that is when I added the default of localhost in to make sure 
it would never be null but forgot to take this out.

I will update the diff and get it back up here.


> On Feb. 24, 2015, 2:15 a.m., Gwen Shapira wrote:
> > core/src/test/scala/unit/kafka/consumer/ZookeeperConsumerConnectorTest.scala,
> >  lines 71-84
> > <https://reviews.apache.org/r/31226/diff/1/?file=870241#file870241line71>
> >
> >     since this test can't fail, why do we need it?

this test is needed really to just create an instance of the 
ZookeeperConsumerConnector that will have a consumerId of None so that an Id 
will attempt to be generated.  All the other ZKconsumerconnector tests I tried 
always prepopulated the consumerId with Some("consumerX") string so it never 
made it to the generation code which is why I made this test.


- Jonathan


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


On Feb. 20, 2015, 3:07 p.m., Jonathan Rafalski wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31226/
> -----------------------------------------------------------
> 
> (Updated Feb. 20, 2015, 3:07 p.m.)
> 
> 
> Review request for kafka.
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> adding try/catch to getting hostname to allow the use of the first 
> non-loopback IP address when hostname is not resolvable.
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/consumer/ZookeeperConsumerConnector.scala 3e1718b 
>   
> core/src/test/scala/unit/kafka/consumer/ZookeeperConsumerConnectorTest.scala 
> 8c4687b 
> 
> Diff: https://reviews.apache.org/r/31226/diff/
> 
> 
> Testing
> -------
> 
> for testing this code I included the unit test that forces the generation of 
> the ID however if you cannot get your local to not resovle you will need to 
> manually throw the exception in the try/catch in order to test.
> 
> 
> Thanks,
> 
> Jonathan Rafalski
> 
>

Reply via email to