> On June 22, 2012, 9:53 a.m., Mike Percy wrote:
> > Mubarak, in what cases can it be made to throw an exception? From a quick
> > look at the code, it's not obvious that getClient() can throw.
Mike,
If i specify incorrect hostname then i can see
Caused by: java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Net.java:30)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:480)
at
org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:140)
at
org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:103)
at
org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:60)
at org.jboss.netty.channel.Channels.connect(Channels.java:541)
at
org.jboss.netty.channel.AbstractChannel.connect(AbstractChannel.java:218)
at
org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227)
at
org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188)
at
org.apache.avro.ipc.NettyTransceiver.getChannel(NettyTransceiver.java:246)
then RpcClient never gets repaired for next available host in the list.
Thanks.
- Mubarak
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5503/#review8479
-----------------------------------------------------------
On June 21, 2012, 10:51 p.m., Mubarak Seyed wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5503/
> -----------------------------------------------------------
>
> (Updated June 21, 2012, 10:51 p.m.)
>
>
> Review request for Flume.
>
>
> Description
> -------
>
> LoadBalancingRpcClient should catch exception for invalid RpcClient and
> failover to valid one. I just moved
>
> RpcClient client = getClient(host);
>
> to try block.
>
>
> This addresses bug FLUME-1306.
> https://issues.apache.org/jira/browse/FLUME-1306
>
>
> Diffs
> -----
>
>
> trunk/flume-ng-sdk/src/main/java/org/apache/flume/api/LoadBalancingRpcClient.java
> 1352719
>
> Diff: https://reviews.apache.org/r/5503/diff/
>
>
> Testing
> -------
>
> Yes.
>
>
> Thanks,
>
> Mubarak Seyed
>
>