I'm receiving some strange behaviour from the columnsIteratee method. I am attempting to iterate over all columns (lots) in a specific row key. Here is a code fragment,
Hello,
I'm attempting to iterate over all columns in a row. There is quite a large number of columns, so as a test I'm just trying to count/print them all. Does anyone have experience using the columnsIteratee method? I'm receiving an error, which I do not understand...
/////////////////////////// code //////////////////////////
val flumeIndexcolumnFamily = keyspace.columnFamily("flumeindex", Utf8Codec, LexicalUUIDCodec, Utf8Codec)
// Iterate over all the columns in a row in groups of 100
// Currently throws a java.net.ConnectException: connection time out
val colsIt = flumeIndexcolumnFamily.columnsIteratee("
2012022503")
var count = 0
val indexFin = colsIt.foreach {
case(column) =>
count += 1
println("<" +
column.name + "> => " + column.value) // executed asynchronously on each row
}
indexFin()
///////////////////////////
This will iterate through a bunch of columns before finally throwing an exception, before completing the entire row:
[error] (run-main) com.twitter.finagle.WriteException: java.net.ConnectException: connection timed out
com.twitter.finagle.WriteException: java.net.ConnectException: connection timed out
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.processConnectTimeout(NioClientSocketPipelineSink.java:387)
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.run(NioClientSocketPipelineSink.java:291)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.ConnectException: connection timed out
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.processConnectTimeout(NioClientSocketPipelineSink.java:387)
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.run(NioClientSocketPipelineSink.java:291)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)