<?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; User Favorites: cartera_alex</title>
		<link><a href='http://www.datastax.com/support-forums/profile/cartera_alex'>cartera_alex</a></link>
		<description>Software, Support, and Training for Apache Cassandra</description>
		<language>en-US</language>
		<pubDate>Mon, 20 May 2013 19:22:31 +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/profile/" rel="self" type="application/rss+xml" />

		<item>
			<title>cartera_alex on "Using PigUnit with Pig scripts that write to CassandraStorage()"</title>
			<link>http://www.datastax.com/support-forums/topic/using-pigunit-with-pig-scripts-that-write-to-cassandrastorage#post-9758</link>
			<pubDate>Mon, 08 Apr 2013 22:09:06 +0000</pubDate>
			<dc:creator>cartera_alex</dc:creator>
			<guid isPermaLink="false">9758@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;Does anyone know if it's possible to use PigUnit to test scripts that use &#34;store... using CassandraStorage()&#34;?  I'd like to know so I don't waste time writing tests if this is not going to work.&#60;/p&#62;
&#60;p&#62;Thanks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cartera_alex on "Error defining Pig schema in DSE 3.0"</title>
			<link>http://www.datastax.com/support-forums/topic/error-defining-pig-schema-in-dse-30#post-9757</link>
			<pubDate>Mon, 08 Apr 2013 22:05:26 +0000</pubDate>
			<dc:creator>cartera_alex</dc:creator>
			<guid isPermaLink="false">9757@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;I was actually able to make it work like this:&#60;/p&#62;
&#60;p&#62;compo = load 'cassandra://keyspace/column_fam' using CassandraStorage()&#60;br /&#62;
        as (key:chararray, columns: bag{c:(name:(),value:int)});&#60;/p&#62;
&#60;p&#62;I can then do something like this:&#60;/p&#62;
&#60;p&#62;compo_cols = foreach compo generate key, flatten(columns.name) as compo_col;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>alexliu on "Error defining Pig schema in DSE 3.0"</title>
			<link>http://www.datastax.com/support-forums/topic/error-defining-pig-schema-in-dse-30#post-9701</link>
			<pubDate>Fri, 05 Apr 2013 18:50:29 +0000</pubDate>
			<dc:creator>alexliu</dc:creator>
			<guid isPermaLink="false">9701@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;The column family created by cql with &#34;COMPACT STORAGE&#34; and composite key doesn't have composite column defined. You can check it by cassandra-cli using show schema command.&#60;/p&#62;
&#60;p&#62;A workaround is &#60;/p&#62;
&#60;p&#62;e.g.&#60;br /&#62;
compo = load 'cassandra://keyspace/column_fam' using CassandraStorage();&#60;/p&#62;
&#60;p&#62;compo = foreach compo generate key as method, flatten(columns);&#60;/p&#62;
&#60;p&#62;dump compo;&#60;/p&#62;
&#60;p&#62;It shows composite key and values for each line, then you can use dump data a resource for more processing.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cartera_alex on "Error defining Pig schema in DSE 3.0"</title>
			<link>http://www.datastax.com/support-forums/topic/error-defining-pig-schema-in-dse-30#post-9641</link>
			<pubDate>Mon, 01 Apr 2013 17:43:41 +0000</pubDate>
			<dc:creator>cartera_alex</dc:creator>
			<guid isPermaLink="false">9641@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I'm trying to load data from a Cassandra column family defined with &#34;COMPACT STORAGE&#34; and composite key.&#60;br /&#62;
When I try the following load command in Pig&#60;/p&#62;
&#60;p&#62;grunt&#38;gt; data = load 'cassandra://keyspace/column_fam'&#60;br /&#62;
&#38;gt;&#38;gt; using CassandraStorage()&#60;br /&#62;
&#38;gt;&#38;gt; AS (mid: int, segs: {seg: (key: (b, d, s, m), o: int)} );    &#60;/p&#62;
&#60;p&#62;I get this error:&#60;/p&#62;
&#60;p&#62;2013-04-01 13:27:45,693 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: &#38;lt;line 3, column 54&#38;gt;  mismatched input ';' expecting RIGHT_PAREN&#60;/p&#62;
&#60;p&#62;As far as I can tell, all parens match.  The same statement works fine with DSE 2.2.&#60;/p&#62;
&#60;p&#62;Any ideas?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ernipur on "Using sqoop with --query option to import data into Cassandra column family doesn&#039;t seem to wor"</title>
			<link>http://www.datastax.com/support-forums/topic/using-sqoop-with-query-option-to-import-data-into-cassandra-column-family-doesnt-seem-to-work#post-8154</link>
			<pubDate>Thu, 27 Dec 2012 12:05:44 +0000</pubDate>
			<dc:creator>ernipur</dc:creator>
			<guid isPermaLink="false">8154@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I would rather suggest to use outdir switch. As per my experience looks like RBDMS column name and Cassandra column name should be same for input to be successful. Some thing like this should work.&#60;/p&#62;
&#60;p&#62;dse sqoop import --connect jdbc:mysql://db.server.address/schema_name   --username user --p  --outdir /some/output/dir/ --query &#34;select x, y, z from table where cond1 and cond2 and \$CONDITIONS&#34;  --target-dir /some/dir   --split-by x   --cassandra-keyspace  cks1  --cassandra-column-family ccf1 --cassandra-row-key x --cassandra-thrift-host 127.0.0.1 --append&#60;/p&#62;
&#60;p&#62;Thanks ,&#60;/p&#62;
&#60;p&#62;_Nipur
&#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-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>
		<item>
			<title>cartera_alex on "Using sqoop with --query option to import data into Cassandra column family doesn&#039;t seem to wor"</title>
			<link>http://www.datastax.com/support-forums/topic/using-sqoop-with-query-option-to-import-data-into-cassandra-column-family-doesnt-seem-to-work#post-7098</link>
			<pubDate>Wed, 24 Oct 2012 15:18:31 +0000</pubDate>
			<dc:creator>cartera_alex</dc:creator>
			<guid isPermaLink="false">7098@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I'm trying to use sqoop to import some data from a MySQL database into a Cassandra column family.  I've been able to do this successfully when I used the --table option (like shown in the sqoop demo in the docs), but using --query option doesn't seem to work.&#60;/p&#62;
&#60;p&#62;If I run a command like this:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;dse sqoop import --connect jdbc:mysql://db.server.address/schema_name --username user -P --query &#38;quot;select x, y, z from table where cond1 and cond2 and \$CONDITIONS&#38;quot; --split-by x --cassandra-keyspace cks1 --cassandra-column-family ccf1 --cassandra-row-key x --cassandra-thrift-host 127.0.0.1&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;it fails and tells me that --target-dir option must be specified.&#60;/p&#62;
&#60;p&#62;If I then add the --target-dir option like this:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;dse sqoop import --connect jdbc:mysql://db.server.address/schema_name --username user -P --query &#38;quot;select x, y, z from table where cond1 and cond2 and \$CONDITIONS&#38;quot; --split-by x --target-dir /some/dir --cassandra-keyspace cks1 --cassandra-column-family ccf1 --cassandra-row-key x --cassandra-thrift-host 127.0.0.1&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;the job runs, but does not import any records.&#60;/p&#62;
&#60;p&#62;Running this import without the cassandra options works and dumps the data into CFS.&#60;/p&#62;
&#60;p&#62;Am I doing something wrong or is it just not possible to import directly into a Cassandra column family using the --query option?&#60;/p&#62;
&#60;p&#62;I am using DSE 2.2.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
