[英]Output a row to Cassandra in Hadoop Mapreduce
I would like to write a row back to Cassandra in my Reducer and am following two word count examples provided by Cassandra ( an example using cql3 and an example using Mutation ), but they are both outputing a single column given a key. 我想在我的Reducer中写回Cassandra的行,并跟随Cassandra提供的两个字数示例( 使用cql3 的示例和使用Mutation的示例 ),但是它们都在给定键的情况下输出单个列。 Can I know how to output a row (ie, multiple columns) with a known key in a Reducer using either cql3 or Mutation?
我能否知道如何使用cql3或Mutation在Reducer中使用已知键输出一行(即多列)?
You need to look at 你需要看看
CqlConfigHelper.setOutputCql
CqlConfigHelper.setOutputCql
which you can use with a CQL string that has multiple replacements in it. 您可以将其与包含多个替换项的CQL字符串一起使用。 This is detailed here:
在这里详细说明:
https://stackoverflow.com/a/19035392/33 https://stackoverflow.com/a/19035392/33
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.