<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>DataStax Support Forums &#187; Topic: Using composite columns in MapReduce</title>
		<link>http://www.datastax.com/support-forums/topic/using-composite-columns-in-mapreduce</link>
		<description>Software, Support, and Training for Apache Cassandra</description>
		<language>en-US</language>
		<pubDate>Mon, 20 May 2013 21:51:06 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.3</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.datastax.com/support-forums/search.php</link>
		</textInput>
		<atom:link href="http://www.datastax.com/support-forums/rss/topic/using-composite-columns-in-mapreduce" rel="self" type="application/rss+xml" />

		<item>
			<title>cartera_alex on "Using composite columns in MapReduce"</title>
			<link>http://www.datastax.com/support-forums/topic/using-composite-columns-in-mapreduce#post-8051</link>
			<pubDate>Fri, 21 Dec 2012 06:19:06 +0000</pubDate>
			<dc:creator>cartera_alex</dc:creator>
			<guid isPermaLink="false">8051@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;This is, in fact, a manifestation of &#60;a href=&#34;https://issues.apache.org/jira/browse/CASSANDRA-4377&#34; rel=&#34;nofollow&#34;&#62;https://issues.apache.org/jira/browse/CASSANDRA-4377&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cartera_alex on "Using composite columns in MapReduce"</title>
			<link>http://www.datastax.com/support-forums/topic/using-composite-columns-in-mapreduce#post-8050</link>
			<pubDate>Fri, 21 Dec 2012 05:32:48 +0000</pubDate>
			<dc:creator>cartera_alex</dc:creator>
			<guid isPermaLink="false">8050@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;I'm starting to think that this is a bug in Thrift.&#60;br /&#62;
Since posting the original post, I have implemented a whole new output format that uses the Astyanax client.  I have also tried this from a stand-alone program using Astyanax.&#60;/p&#62;
&#60;p&#62;What I noticed is that I am able to insert columns that have UTF8Type (string) values while any other insertions fail.  Surprisingly, if I attempt to insert a string value into a column that was defined as a non-&#34;varchar&#34; type in CQL3 from a Thrift-based client it succeeds!  I also noticed that cassandra-cli lists this CF as having default_validation_class = 'UTF8Type'.&#60;/p&#62;
&#60;p&#62;Inserting non-string values into this CF from cqlsh using CQL3 works fine.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cartera_alex on "Using composite columns in MapReduce"</title>
			<link>http://www.datastax.com/support-forums/topic/using-composite-columns-in-mapreduce#post-8008</link>
			<pubDate>Tue, 18 Dec 2012 15:47:40 +0000</pubDate>
			<dc:creator>cartera_alex</dc:creator>
			<guid isPermaLink="false">8008@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Hello,&#60;br /&#62;
I'm trying to use ColumnFamilyOutputFormat to write to a Cassandra column family with composite columns from my reducer.  Since Thrift is the only available API in this case (I wish it wasn't so), I followed an example outlined here: &#60;a href=&#34;http://stackoverflow.com/questions/11801288/inserting-and-getting-from-cassandra-with-composite-key-invalidrequestexception&#34; rel=&#34;nofollow&#34;&#62;http://stackoverflow.com/questions/11801288/inserting-and-getting-from-cassandra-with-composite-key-invalidrequestexception&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Unfortunately, I'm getting the following exception when I run the job:&#60;/p&#62;
&#60;p&#62;12/12/17 21:37:32 INFO mapred.JobClient: Task Id : attempt_201212120944_0011_r_000003_2, Status : FAILED&#60;br /&#62;
java.io.IOException: InvalidRequestException(why:(String didn't validate.) [c8][txnspermember][12:345:ac0a2000-effb-11e1-c000-000000000000:1234:56789:somememberid:txn_date] failed validation)&#60;br /&#62;
        at org.apache.cassandra.hadoop.ColumnFamilyRecordWriter$RangeClient.run(ColumnFamilyRecordWriter.java:316)&#60;br /&#62;
Caused by: InvalidRequestException(why:(String didn't validate.) [c8][txnspermember][12:345:ac0a2000-effb-11e1-c000-000000000000:1234:56789:somememberid:txn_date] failed validation)&#60;br /&#62;
        at org.apache.cassandra.thrift.Cassandra$batch_mutate_result.read(Cassandra.java:20253)&#60;br /&#62;
        at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)&#60;br /&#62;
        at org.apache.cassandra.thrift.Cassandra$Client.recv_batch_mutate(Cassandra.java:922)&#60;br /&#62;
        at org.apache.cassandra.thrift.Cassandra$Client.batch_mutate(Cassandra.java:908)&#60;br /&#62;
        at org.apache.cassandra.hadoop.ColumnFamilyRecordWriter$RangeClient.run(ColumnFamilyRecordWriter.java:308)&#60;/p&#62;
&#60;p&#62;Note that &#34;somememberid&#34; is what I would expect my row key to be, yet it appears in the middle of the composite string for some reason.&#60;/p&#62;
&#60;p&#62;My column family looks like this:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;CREATE TABLE txnspermember (
  member_id text,
  org_id int,
  brand_id int,
  post_date &#38;#039;TimeUUIDType&#38;#039;,
  merchant_id bigint,
  offer_id bigint,
  txn_id text,
  agreed_rebate text,
  catalog_id text,
  cb_elig boolean,
  cli_shr_pct double,
  conv_rate double,
  description text,
  first_four int,
  first_name text,
  g_merchant_id bigint,
  last_four int,
  mbr_shr_pct double,
  mcc bigint,
  member_zip text,
  mid text,
  mn_shr_pct double,
  rebate_amt double,
  rebate_val double,
  spend_amt double,
  txn_date &#38;#039;TimeUUIDType&#38;#039;,
  PRIMARY KEY (member_id, org_id, brand_id, post_date, merchant_id, offer_id, txn_id)
) WITH
  comment=&#38;#039;&#38;#039; AND
  caching=&#38;#039;KEYS_ONLY&#38;#039; AND
  read_repair_chance=0.100000 AND
  gc_grace_seconds=864000 AND
  replicate_on_write=&#38;#039;true&#38;#039; AND
  compaction_strategy_class=&#38;#039;SizeTieredCompactionStrategy&#38;#039; AND
  compression_parameters:sstable_compression=&#38;#039;SnappyCompressor&#38;#039;;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
