Database Reference
In-Depth Information
System.out.println("writing");
keys.put("key",
ByteBufferUtil.bytes(word.toString()));
context.write(keys,
getBindVariables(word, sum));
}
private List<ByteBuffer>
getBindVariables(Text word, int sum)
{
List<ByteBuffer> variables = new
ArrayList<ByteBuffer>();
variables.add(Int32Type.instance.decompose(sum));
return variables;
}
}
}
Finally, after running the HDFS job ( see TwitterHDFSCQLJob, source referenced
after the output), we can see the output using the cqlsh client:
select * from tweetcount_cql;
key | count
------------------------------+-------
Mon May 11 06:16:04 IST 2009 | 334
Hazem Saleh | 334
cessprin | 334
Thu Feb 23 00:24:16 IST 2012 | 334
Hunter Scott | 334
Tue Sep 29 22:01:16 IST 2009 | 334
Elena Vielva Gómez | 334
Sun Dec 18 20:13:39 IST 2011 | 334
Alejandro || Serras | 334
Tue Jul 06 18:01:47 IST 2010 | 334
Wed Mar 07 05:11:11 IST 2012 | 334
Wed Nov 07 14:04:18 IST 2012 | 334
Search WWH ::




Custom Search