<?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; Tag: cqlsh - Recent Posts</title>
		<link>http://www.datastax.com/support-forums/tags/cqlsh</link>
		<description>Software, Support, and Training for Apache Cassandra</description>
		<language>en-US</language>
		<pubDate>Wed, 19 Jun 2013 05:55:55 +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/tags/cqlsh" rel="self" type="application/rss+xml" />

		<item>
			<title>rob4you on "Nodes were Unavailable"</title>
			<link>http://www.datastax.com/support-forums/topic/nodes-were-unavailable/page/2#post-7242</link>
			<pubDate>Wed, 31 Oct 2012 00:09:58 +0000</pubDate>
			<dc:creator>rob4you</dc:creator>
			<guid isPermaLink="false">7242@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;The problem doesn't seem to have been fixed.&#60;/p&#62;
&#60;p&#62;Look at this snippet:&#60;/p&#62;
&#60;p&#62;&#38;gt; CREATE KEYSPACE a WITH strategy_class = 'org.apache.cassandra.locator.SimpleStrategy' AND strategy_options:replication_factor='1';&#60;/p&#62;
&#60;p&#62;&#38;gt; DESCRIBE KEYSPACE a;&#60;br /&#62;
CREATE KEYSPACE a WITH strategy_class = 'SimpleStrategy' AND strategy_options:replication_factor='1';&#60;/p&#62;
&#60;p&#62;&#38;gt; USE a;&#60;br /&#62;
&#38;gt; CREATE TABLE t (id int PRIMARY KEY, col1 text);&#60;/p&#62;
&#60;p&#62;&#38;gt; SELECT * FROM t:&#60;br /&#62;
Unable to complete request: one or more nodes were unavailable.&#60;/p&#62;
&#60;p&#62;&#38;gt; SHOW VERSION;&#60;br /&#62;
[cqlsh 2.2.0 &#124; Cassandra 1.1.5 &#124; CQL spec 3.0.0 &#124; Thrift protocol 19.32.0]&#60;/p&#62;
&#60;p&#62;I'm using DSE, latest release.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>thobbs on "Nodes were Unavailable"</title>
			<link>http://www.datastax.com/support-forums/topic/nodes-were-unavailable/page/2#post-5799</link>
			<pubDate>Fri, 10 Aug 2012 19:11:28 +0000</pubDate>
			<dc:creator>thobbs</dc:creator>
			<guid isPermaLink="false">5799@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Thanks for the post! I sent a note to the docs team, so that should be fixed shortly.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tstarbow on "Nodes were Unavailable"</title>
			<link>http://www.datastax.com/support-forums/topic/nodes-were-unavailable/page/2#post-5688</link>
			<pubDate>Thu, 09 Aug 2012 17:48:53 +0000</pubDate>
			<dc:creator>tstarbow</dc:creator>
			<guid isPermaLink="false">5688@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;It is pretty annoying that the &#34;Getting Started Using the Cassandra CLI&#34; for Cassandra 1.0 (&#60;a href=&#34;http://www.datastax.com/docs/1.0/dml/using_cql&#34; rel=&#34;nofollow&#34;&#62;http://www.datastax.com/docs/1.0/dml/using_cql&#60;/a&#62;) code doesn't work as written. It looks like it has been fixed on 1.1 docs:&#60;/p&#62;
&#60;p&#62;CREATE KEYSPACE twissandra&#60;br /&#62;
         WITH strategy_class = 'org.apache.cassandra.locator.SimpleStrategy'&#60;br /&#62;
         AND strategy_options:replication_factor='1';
&#60;/p&#62;</description>
		</item>
		<item>
			<title>thepaul on "CLI v/s CQL"</title>
			<link>http://www.datastax.com/support-forums/topic/cli-vs-cql#post-1916</link>
			<pubDate>Tue, 15 May 2012 19:49:30 +0000</pubDate>
			<dc:creator>thepaul</dc:creator>
			<guid isPermaLink="false">1916@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;By CLI, I think you mean cassandra-cli, and by CQL, I think you mean cqlsh.  They have a lot of differences.  Cqlsh is intended to be a command-line tool which natively speaks the CQL language.  The CQL language is intended to be the main way to interface with Cassandra going forward, although the Thrift interface will be supported for some time still.  The CQL language can be used in your application code using drivers (existing for Python, Java, PHP, node.js, Ruby, and more), so you can use the same syntax in your code and in the command-line inspection tool.&#60;/p&#62;
&#60;p&#62;The cassandra-cli tool is lower-level than Cqlsh, and uses the Thrift interface instead of CQL.  It has its own special syntax for creating columnfamilies and keyspaces, for inserting data, and for making queries.  You'll find that while it's not as user-friendly, there are a few things it can still do that Cqlsh can't, like show column timestamps and show the storage engine rows underlying cql3 composite columnfamilies, as opposed to the transformed CQL rows.  But for the most part, new users should probably be using the CQL interface and the Cqlsh tool.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "CLI v/s CQL"</title>
			<link>http://www.datastax.com/support-forums/topic/cli-vs-cql#post-1915</link>
			<pubDate>Tue, 15 May 2012 19:36:47 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">1915@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;What are the exact differences between CLI and CQL , i.e.&#60;br /&#62;
Do the CLI and CQL support all featuresets offered by cassandra ?&#60;br /&#62;
Is there a difference between creating a keyspace in CLI v/s CQL ?&#60;br /&#62;
Similarly is there a difference between creating a columnfamily in CLI v/s CQL ?&#60;br /&#62;
Are objects created with one tool useable/operable with the another ?&#60;br /&#62;
Going forward what's the future of CLI and CQL ? Will they be both maintained and developed in parallel, or will CQL be the eventual winner ?&#60;br /&#62;
For a new development, what is the recommendation, use CLI or CQL ? and why ?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>purblind on "integers inserted with cqlsh are not the same as integers inserted with hector"</title>
			<link>http://www.datastax.com/support-forums/topic/integers-inserted-with-cqlsh-are-not-the-same-as-integers-inserted-with-hector#post-1079</link>
			<pubDate>Wed, 01 Feb 2012 16:07:53 +0000</pubDate>
			<dc:creator>purblind</dc:creator>
			<guid isPermaLink="false">1079@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;description:&#60;br /&#62;
setting integer column values with cqlsh does not return the same values when read back with Hector; &#60;/p&#62;
&#60;p&#62;cassandra version 1.0.7&#60;br /&#62;
hector version 1.0-2&#60;/p&#62;
&#60;p&#62;mycf: 1-row, multi-column CF with integer values:&#60;br /&#62;
ColumnFamily: mycf&#60;br /&#62;
      Key Validation Class: org.apache.cassandra.db.marshal.AsciiType&#60;br /&#62;
      Default column value validator: org.apache.cassandra.db.marshal.IntegerType&#60;br /&#62;
      Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type&#60;br /&#62;
      Row cache size / save period in seconds / keys to save : 0.0/0/all&#60;br /&#62;
      Row Cache Provider: org.apache.cassandra.cache.SerializingCacheProvider&#60;br /&#62;
      Key cache size / save period in seconds: 200000.0/14400&#60;br /&#62;
      GC grace seconds: 864000&#60;br /&#62;
      Compaction min/max thresholds: 4/32&#60;br /&#62;
      Read repair chance: 1.0&#60;br /&#62;
      Replicate on write: true&#60;br /&#62;
      Bloom Filter FP chance: default&#60;br /&#62;
      Built indexes: []&#60;/p&#62;
&#60;p&#62;cqlsh:&#60;br /&#62;
update mycf set alt = 81001 where KEY = 'alt';&#60;/p&#62;
&#60;p&#62;java:&#60;br /&#62;
public void write(final String alt, final int hash) {&#60;br /&#62;
        final Mutator&#38;lt;String&#38;gt; mut = HFactory.createMutator(&#60;br /&#62;
                HFactory.createKeyspace(&#34;test&#34;, cluster),&#60;br /&#62;
                StringSerializer.get());&#60;br /&#62;
        mut.addInsertion(&#34;alt&#34;, &#34;mycf&#34;, HFactory.createColumn(alt, hash,&#60;br /&#62;
                StringSerializer.get(), IntegerSerializer.get()));&#60;br /&#62;
        mut.execute();&#60;br /&#62;
    }&#60;/p&#62;
&#60;p&#62; public int read(final String alt) {&#60;br /&#62;
        final RangeSlicesQuery&#38;lt;String, String, Integer&#38;gt; query = HFactory&#60;br /&#62;
                .createRangeSlicesQuery(&#60;br /&#62;
                        HFactory.createKeyspace(&#34;test&#34;, cluster),&#60;br /&#62;
                        StringSerializer.get(), StringSerializer.get(),&#60;br /&#62;
                        IntegerSerializer.get()).setColumnFamily(&#34;mycf&#34;)&#60;br /&#62;
                .setRange(null, null, false, 13).setColumnNames(alt);&#60;/p&#62;
&#60;p&#62;        final ArrayList&#38;lt;Byte&#38;gt; arrayList = new ArrayList&#38;lt;Byte&#38;gt;();&#60;br /&#62;
        Integer result = null;&#60;br /&#62;
        for (final Row&#38;lt;String, String, Integer&#38;gt; item : query.setRowCount(10)&#60;br /&#62;
                .execute().get().getList()) {&#60;/p&#62;
&#60;p&#62;            final HColumn&#38;lt;String, Integer&#38;gt; i = item.getColumnSlice()&#60;br /&#62;
                    .getColumnByName(alt);&#60;br /&#62;
            log.debug(Arrays.toString(i.getValueBytes().array()));&#60;br /&#62;
            result = i.getValue();&#60;/p&#62;
&#60;p&#62;        }&#60;/p&#62;
&#60;p&#62;        return result;&#60;br /&#62;
    }&#60;/p&#62;
&#60;p&#62;writing an integer with hector, and reading with hector:&#60;br /&#62;
[-128, 1, 0, 2, 0, 0, 0, 16, 103, 101, 116, 95, 114, 97, 110, 103, 101, 95, 115, 108, 105, 99, 101, 115, 0, 0, 0, 5, 15, 0, 0, 12, 0, 0, 0, 1, 11, 0, 1, 0, 0, 0, 3, 97, 108,&#60;br /&#62;
116, 15, 0, 2, 12, 0, 0, 0, 1, 12, 0, 1, 11, 0, 1, 0, 0, 0, 6, 68, 69, 78, 73, 83, 50, 11, 0, 2, 0, 0, 0, 4, 0, 1, 60, 105, 10, 0, 3, 0, 4, -73, -24, -127, -39, 107, -128, 0, 0, 0, 0]&#60;/p&#62;
&#60;p&#62;writing an integer with cqlsh, reading with hector:&#60;br /&#62;
[-128, 1, 0, 2, 0, 0, 0, 16, 103, 101, 116, 95, 114, 97, 110, 103, 101, 95, 115, 108, 105, 99, 101, 115, 0, 0, 0, 3, 15, 0, 0, 12, 0, 0, 0, 1, 11, 0, 1, 0, 0, 0, 3, 97, 108,&#60;br /&#62;
116, 15, 0, 2, 12, 0, 0, 0, 1, 12, 0, 1, 11, 0, 1, 0, 0, 0, 6, 68, 69, 78, 73, 83, 50, 11, 0, 2, 0, 0, 0, 3, 1, 60, 105, 10, 0, 3, 0, 4, -73, -24, -111, 104, 96, 56, 0, 0, 0, 0]
&#60;/p&#62;</description>
		</item>
		<item>
			<title>thepaul on "Importing CQL scripts"</title>
			<link>http://www.datastax.com/support-forums/topic/importing-cql-scripts#post-1032</link>
			<pubDate>Mon, 09 Jan 2012 15:30:34 +0000</pubDate>
			<dc:creator>thepaul</dc:creator>
			<guid isPermaLink="false">1032@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;You can pipe (or copy and paste) CQL commands into cqlsh directly, but there isn't (yet) any good way to have it stop on error. &#60;a href=&#34;https://issues.apache.org/jira/browse/CASSANDRA-3479&#34; rel=&#34;nofollow&#34;&#62;https://issues.apache.org/jira/browse/CASSANDRA-3479&#60;/a&#62; is tracking the addition of that feature.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Importing CQL scripts"</title>
			<link>http://www.datastax.com/support-forums/topic/importing-cql-scripts#post-901</link>
			<pubDate>Wed, 21 Dec 2011 06:54:55 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">901@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Is there any way to import a set of CQL commands using 'cqlsh' or 'schematool' ?&#60;/p&#62;
&#60;p&#62;I see the 'import' option in 'schematool', not sure if its for CQL scripts.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Nodes were Unavailable"</title>
			<link>http://www.datastax.com/support-forums/topic/nodes-were-unavailable/page/2#post-765</link>
			<pubDate>Thu, 24 Nov 2011 07:25:41 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">765@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;This is the link I followed : &#60;a href=&#34;http://www.datastax.com/docs/1.0/dml/using_cql&#34; rel=&#34;nofollow&#34;&#62;http://www.datastax.com/docs/1.0/dml/using_cql&#60;/a&#62;.&#60;/p&#62;
&#60;p&#62;Here there is nothing like replcaition factot in the command.&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Raju.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>zznate on "Nodes were Unavailable"</title>
			<link>http://www.datastax.com/support-forums/topic/nodes-were-unavailable/page/2#post-758</link>
			<pubDate>Wed, 23 Nov 2011 17:22:46 +0000</pubDate>
			<dc:creator>zznate</dc:creator>
			<guid isPermaLink="false">758@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Can you tell me where you found that Keyspace creation script? It looks like you created the keyspace with a replication_factor (3) which is un-achievable on a single node. &#60;/p&#62;
&#60;p&#62;Re-create the keyspace similar to the following:&#60;br /&#62;
CREATE KEYSPACE twissandra&#60;br /&#62;
with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy'&#60;br /&#62;
and strategy_options = [{replication_factor:1}];
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Nodes were Unavailable"</title>
			<link>http://www.datastax.com/support-forums/topic/nodes-were-unavailable/page/2#post-756</link>
			<pubDate>Wed, 23 Nov 2011 16:55:20 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">756@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I had run in debug mode.  Please find the exception.&#60;/p&#62;
&#60;p&#62;###############&#60;/p&#62;
&#60;p&#62;[default@twissandra] SET users['bobby']['state']='tx';&#60;br /&#62;
null&#60;br /&#62;
UnavailableException()&#60;br /&#62;
	at org.apache.cassandra.thrift.Cassandra$insert_result.read(Cassandra.java:15206)&#60;br /&#62;
	at org.apache.cassandra.thrift.Cassandra$Client.recv_insert(Cassandra.java:858)&#60;br /&#62;
	at org.apache.cassandra.thrift.Cassandra$Client.insert(Cassandra.java:830)&#60;br /&#62;
	at org.apache.cassandra.cli.CliClient.executeSet(CliClient.java:892)&#60;br /&#62;
	at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:216)&#60;br /&#62;
	at org.apache.cassandra.cli.CliMain.processStatementInteractive(CliMain.java:222)&#60;br /&#62;
	at org.apache.cassandra.cli.CliMain.main(CliMain.java:350)&#60;/p&#62;
&#60;p&#62;############&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Raju
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Nodes were Unavailable"</title>
			<link>http://www.datastax.com/support-forums/topic/nodes-were-unavailable/page/2#post-755</link>
			<pubDate>Wed, 23 Nov 2011 16:51:08 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">755@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Hi, Please find the describe twissandra --&#60;/p&#62;
&#60;p&#62;[default@twissandra] describe twissandra;&#60;br /&#62;
##############&#60;br /&#62;
Keyspace: twissandra:&#60;br /&#62;
  Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy&#60;br /&#62;
  Durable Writes: true&#60;br /&#62;
    Options: [DC1:3]&#60;br /&#62;
  Column Families:&#60;br /&#62;
    ColumnFamily: users&#60;br /&#62;
      Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type&#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;
      Row cache size / save period in seconds / keys to save : 0.0/0/all&#60;br /&#62;
      Key cache size / save period in seconds: 200000.0/14400&#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;
      Replicate on write: true&#60;br /&#62;
      Built indexes: []&#60;br /&#62;
      Column Metadata:&#60;br /&#62;
        Column Name: birth_year&#60;br /&#62;
          Validation Class: org.apache.cassandra.db.marshal.LongType&#60;br /&#62;
        Column Name: gender&#60;br /&#62;
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type&#60;br /&#62;
        Column Name: password&#60;br /&#62;
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type&#60;br /&#62;
        Column Name: session_token&#60;br /&#62;
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type&#60;br /&#62;
        Column Name: state&#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;
##############&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Raju.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>zznate on "Nodes were Unavailable"</title>
			<link>http://www.datastax.com/support-forums/topic/nodes-were-unavailable#post-754</link>
			<pubDate>Wed, 23 Nov 2011 16:05:20 +0000</pubDate>
			<dc:creator>zznate</dc:creator>
			<guid isPermaLink="false">754@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;The 'null' implies there was an exception swallowed on the operations. When you start the cli, use the option --debug this will give you more information.&#60;/p&#62;
&#60;p&#62;Can you also post the output of 'describe keyspace Twissandra' to verify that the secondary index was created correctly?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Nodes were Unavailable"</title>
			<link>http://www.datastax.com/support-forums/topic/nodes-were-unavailable#post-753</link>
			<pubDate>Wed, 23 Nov 2011 05:16:17 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">753@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;yeah, i have tried thru cli.  It is showing the keyspace twissandra.  I used the command to insert &#34;SET users['bobby']['state']='tx';&#34;.  It returned &#34;null&#34;.  Please let me know whether I used the command properly or not.  I used the same schema that is mentioned in the tutorial.  Also please let me know why this is not happening in CQLSH.&#60;/p&#62;
&#60;p&#62;I had run cli keyspaces demo etc as shown in the tutorial.  It worked properly.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>zznate on "Nodes were Unavailable"</title>
			<link>http://www.datastax.com/support-forums/topic/nodes-were-unavailable#post-731</link>
			<pubDate>Tue, 22 Nov 2011 16:27:38 +0000</pubDate>
			<dc:creator>zznate</dc:creator>
			<guid isPermaLink="false">731@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Try connecting to the keyspace through cassandra-cli program to verify that the keyspace and column family are both visible:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.datastax.com/docs/1.0/dml/using_cli&#34; rel=&#34;nofollow&#34;&#62;http://www.datastax.com/docs/1.0/dml/using_cli&#60;/a&#62;
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
