<?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: Question for hector CQL driver API</title>
		<link>http://www.datastax.com/support-forums/topic/question-for-hector-cql-driver-api</link>
		<description>Software, Support, and Training for Apache Cassandra</description>
		<language>en-US</language>
		<pubDate>Wed, 19 Jun 2013 16:18:32 +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/question-for-hector-cql-driver-api" rel="self" type="application/rss+xml" />

		<item>
			<title>mailme365 on "Question for hector CQL driver API"</title>
			<link>http://www.datastax.com/support-forums/topic/question-for-hector-cql-driver-api#post-6533</link>
			<pubDate>Mon, 17 Sep 2012 14:21:38 +0000</pubDate>
			<dc:creator>mailme365</dc:creator>
			<guid isPermaLink="false">6533@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Thank you Srini, I updated code following the link you provided, it worked. Thanks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Srini on "Question for hector CQL driver API"</title>
			<link>http://www.datastax.com/support-forums/topic/question-for-hector-cql-driver-api#post-6477</link>
			<pubDate>Fri, 14 Sep 2012 10:56:16 +0000</pubDate>
			<dc:creator>Srini</dc:creator>
			<guid isPermaLink="false">6477@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Already answered here,&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://stackoverflow.com/questions/7732651/how-to-use-cql-queries-to-get-different-datatypes-out-of-cassandra-with-java-cli&#34; rel=&#34;nofollow&#34;&#62;http://stackoverflow.com/questions/7732651/how-to-use-cql-queries-to-get-different-datatypes-out-of-cassandra-with-java-cli&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mailme365 on "Question for hector CQL driver API"</title>
			<link>http://www.datastax.com/support-forums/topic/question-for-hector-cql-driver-api#post-6475</link>
			<pubDate>Fri, 14 Sep 2012 09:14:12 +0000</pubDate>
			<dc:creator>mailme365</dc:creator>
			<guid isPermaLink="false">6475@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Hi All, &#60;/p&#62;
&#60;p&#62;Following Hector's cql code examples, I created an example and I could execute this example successfully.  &#60;/p&#62;
&#60;p&#62;However, when reviewing the source code, I have a question for it. &#60;/p&#62;
&#60;p&#62;Here is the source code I created: &#60;/p&#62;
&#60;p&#62;        Cluster tutorialCluster  = HFactory.getOrCreateCluster(&#34;TutorialCluster&#34;, &#34;16.158.81.59:9160&#34;);&#60;br /&#62;
        ConfigurableConsistencyLevel ccl = new ConfigurableConsistencyLevel();&#60;br /&#62;
        ccl.setDefaultReadConsistencyLevel(HConsistencyLevel.ONE);&#60;br /&#62;
        Keyspace keyspace = HFactory.createKeyspace(&#34;Tutorial&#34;, tutorialCluster, ccl);&#60;/p&#62;
&#60;p&#62;CqlQuery&#38;lt;String,String,String&#38;gt; cqlQuery = new CqlQuery&#38;lt;String,String,String&#38;gt;(keyspace, se, se, se);&#60;br /&#62;
cqlQuery.setQuery(&#34;select * from testcql&#34;);&#60;br /&#62;
QueryResult&#38;lt;CqlRows&#38;lt;String,String,String&#38;gt;&#38;gt; result = cqlQuery.execute();&#60;br /&#62;
CqlRows&#38;lt;String,String,String&#38;gt; rows = result.get();&#60;br /&#62;
System.out.println(&#34;size is: &#34; + rows.getList().size());&#60;/p&#62;
&#60;p&#62;And here is the testcql column family I created for this example:&#60;br /&#62;
create column family testcql&#60;br /&#62;
    with comparator = 'UTF8Type'&#60;br /&#62;
    and default_validation_class = 'UTF8Type'&#60;br /&#62;
    and key_validation_class = 'UTF8Type';&#60;/p&#62;
&#60;p&#62;As I said, the code could run successfully, and I'm able to get the total rows for the column family testcql.  However, I'm very confused with &#34;CqlQuery&#38;lt;String,String,String&#38;gt;&#34; declaration, I know the three &#38;lt;String&#38;gt; is for the key type, value name type and value type, but if I create a column family with multiple column name type and column value type, then, how do I declare CqlQuery? &#60;/p&#62;
&#60;p&#62;For example,&#60;br /&#62;
when I create a table using cqlsh as below:&#60;br /&#62;
create table temptest (id int, value1 varchar, value2 int, primary key (id));&#60;/p&#62;
&#60;p&#62;And I describe the table in cassandra-cli:&#60;br /&#62;
[default@demodb] describe temptest;&#60;br /&#62;
    ColumnFamily: temptest&#60;br /&#62;
      Key Validation Class: org.apache.cassandra.db.marshal.Int32Type&#60;br /&#62;
      Default column value validator: org.apache.cassandra.db.marshal.UTF8Type&#60;br /&#62;
      Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type&#60;br /&#62;
      GC grace seconds: 864000&#60;br /&#62;
      Compaction min/max thresholds: 4/32&#60;br /&#62;
      Read repair chance: 0.1&#60;br /&#62;
      DC Local Read repair chance: 0.0&#60;br /&#62;
      Replicate on write: true&#60;br /&#62;
      Caching: KEYS_ONLY&#60;br /&#62;
      Bloom Filter FP chance: default&#60;br /&#62;
      Built indexes: []&#60;br /&#62;
      Column Metadata:&#60;br /&#62;
        Column Name: value2&#60;br /&#62;
          Validation Class: org.apache.cassandra.db.marshal.Int32Type&#60;br /&#62;
        Column Name: value1&#60;br /&#62;
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type&#60;br /&#62;
      Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy&#60;br /&#62;
      Compression Options:&#60;br /&#62;
        sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor&#60;/p&#62;
&#60;p&#62;For this table(column family), how do we declare CqlQuery since the value could be a number or a String ? &#60;/p&#62;
&#60;p&#62;Thanks.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
