rantav/hector — Issue #301: NodeAutoDiscoverService should not discover nodes that CassandraHostRetryService already knows about
Author: lorrin
Created: 2011-10-12 23:31:24+00:00
State: open

See the following in the log when a node is down. Aside from being verbose, it seems like pointless work is being done.
```
CassandraHostRetryService 2011-10-12 23:31:57,747 -- WARN -- Downed 10.183.1.254(10.183.1.254):9160 host still appears to be down: Unable to open transport to 10.183.1.254(10.183.1.254):9160 , java.net.NoRouteToHostException: Network is unreachable
CassandraHostRetryService 2011-10-12 23:31:57,747 -- INFO -- Downed Host retry status false with host: 10.183.1.254(10.183.1.254):9160
NodeAutoDiscoverService 2011-10-12 23:31:57,906 -- INFO -- using existing hosts [10.183.1.253(10.183.1.253):9160, 10.183.2.0(10.183.2.0):9160]
NodeAutoDiscoverService 2011-10-12 23:31:57,908 -- INFO -- Found a node we don't know about 10.183.1.254(10.183.1.254):9160 for TokenRange TokenRange(start_token:119155528216427281472993688364183399179, end_token:34084936486192665607150036506241346315, endpoints:[10.183.2.0, 10.183.1.254], rpc_endpoints:[10.183.2.0, 10.183.1.254])
NodeAutoDiscoverService 2011-10-12 23:31:57,908 -- INFO -- Found a node we don't know about 10.183.1.254(10.183.1.254):9160 for TokenRange TokenRange(start_token:34084936486192665607150036506241346315, end_token:76620232351309973540071862435212372747, endpoints:[10.183.1.254, 10.183.1.253], rpc_endpoints:[10.183.1.254, 10.183.1.253])
NodeAutoDiscoverService 2011-10-12 23:31:57,908 -- INFO -- Found 1 new host(s) in Ring
NodeAutoDiscoverService 2011-10-12 23:31:57,908 -- INFO -- Addding found host 10.183.1.254(10.183.1.254):9160 to pool
HConnectionManager 2011-10-12 23:31:57,909 -- ERROR -- Transport exception host to HConnectionManager: 10.183.1.254(10.183.1.254):9160
me.prettyprint.hector.api.exceptions.HectorTransportException: Unable to open transport to 10.183.1.254(10.183.1.254):9160 , java.net.NoRouteToHostException: Network is unreachable
at me.prettyprint.cassandra.connection.HThriftClient.open(HThriftClient.java:129)
at me.prettyprint.cassandra.connection.ConcurrentHClientPool.(ConcurrentHClientPool.java:43)
at me.prettyprint.cassandra.connection.RoundRobinBalancingPolicy.createConnection(RoundRobinBalancingPolicy.java:68)
at me.prettyprint.cassandra.connection.HConnectionManager.addCassandraHost(HConnectionManager.java:103)
at me.prettyprint.cassandra.connection.NodeAutoDiscoverService.doAddNodes(NodeAutoDiscoverService.java:68)
at me.prettyprint.cassandra.connection.NodeAutoDiscoverService$QueryRing.run(NodeAutoDiscoverService.java:53)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
Caused by: org.apache.thrift.transport.TTransportException: java.net.NoRouteToHostException: Network is unreachable
at org.apache.thrift.transport.TSocket.open(TSocket.java:183)
at org.apache.thrift.transport.TFramedTransport.open(TFramedTransport.java:81)
at me.prettyprint.cassandra.connection.HThriftClient.open(HThriftClient.java:123)
... 13 more
Caused by: java.net.NoRouteToHostException: Network is unreachable
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
at java.net.Socket.connect(Socket.java:546)
at org.apache.thrift.transport.TSocket.open(TSocket.java:178)
... 15 more
```