Skip to content

Instantly share code, notes, and snippets.

cqlsh:ControlServerLogRequestCount> CREATE COLUMNFAMILY users (KEY varchar PRIMARY KEY,password varchar,gender varchar,session_token varchar,state varchar,birth_year bigint);
cqlsh:ControlServerLogRequestCount> INSERT INTO users (KEY, password) VALUES ('jsmith', 'ch@ngem3a');
cqlsh:ControlServerLogRequestCount> select * from users where KEY='jsmith';
Traceback (most recent call last):
File "bin/cqlsh", line 482, in perform_statement
self.cursor.execute(statement, decoder=decoder)
File "build/bdist.linux-x86_64/egg/cql/cursor.py", line 106, in execute
self.description = self.decoder.decode_description(self.result[0])
File "build/bdist.linux-x86_64/egg/cql/decoders.py", line 33, in decode_description
comparator = schema.name_types.get(name, schema.default_name_type)
@joestein
joestein / gist:1592895
Created January 11, 2012 03:41
thoughts on kafka-240
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@joestein
joestein / gist:1636208
Created January 18, 2012 22:24
kafka-240 read and write
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@joestein
joestein / gist:1655565
Created January 22, 2012 04:32
kafka-240patch in progress
Index: core/src/main/scala/kafka/producer/SyncProducer.scala
===================================================================
--- core/src/main/scala/kafka/producer/SyncProducer.scala (revision 1234442)
+++ core/src/main/scala/kafka/producer/SyncProducer.scala (working copy)
@@ -107,15 +107,18 @@
/**
* Send a message
*/
- def send(topic: String, partition: Int, messages: ByteBufferMessageSet) {
- verifyMessageSize(messages)
@joestein
joestein / gist:1735455
Created February 4, 2012 04:59
kafka-240 ProducerRequest
Index: core/src/main/scala/kafka/producer/ProducerPool.scala
===================================================================
--- core/src/main/scala/kafka/producer/ProducerPool.scala (revision 1234442)
+++ core/src/main/scala/kafka/producer/ProducerPool.scala (working copy)
@@ -26,6 +26,8 @@
import kafka.common.{UnavailableProducerException, InvalidConfigException}
import kafka.utils.{Utils, Logging}
import kafka.message.{NoCompressionCodec, ByteBufferMessageSet}
+import collection.mutable.{HashMap, ListBuffer}
+import kafka.api.{WiredTopic, WiredPartition}
@joestein
joestein / gist:1743161
Created February 5, 2012 05:35
latest 240
Index: core/src/test/scala/unit/kafka/utils/TestUtils.scala
===================================================================
--- core/src/test/scala/unit/kafka/utils/TestUtils.scala (revision 1234442)
+++ core/src/test/scala/unit/kafka/utils/TestUtils.scala (working copy)
@@ -29,6 +29,7 @@
import kafka.message._
import org.I0Itec.zkclient.ZkClient
import kafka.consumer.ConsumerConfig
+import kafka.api.{WiredTopic, WiredPartition}
@joestein
joestein / gist:1748005
Created February 5, 2012 21:23
kafka-240 latest
Index: core/src/test/scala/unit/kafka/utils/TestUtils.scala
===================================================================
--- core/src/test/scala/unit/kafka/utils/TestUtils.scala (revision 1234442)
+++ core/src/test/scala/unit/kafka/utils/TestUtils.scala (working copy)
@@ -29,6 +29,7 @@
import kafka.message._
import org.I0Itec.zkclient.ZkClient
import kafka.consumer.ConsumerConfig
+import kafka.api.{WiredTopic, WiredPartition}
@joestein
joestein / gist:1778740
Created February 9, 2012 09:30
failing test kafka240
Index: core/src/test/scala/unit/kafka/utils/TestUtils.scala
===================================================================
--- core/src/test/scala/unit/kafka/utils/TestUtils.scala (revision 1234442)
+++ core/src/test/scala/unit/kafka/utils/TestUtils.scala (working copy)
@@ -29,6 +29,7 @@
import kafka.message._
import org.I0Itec.zkclient.ZkClient
import kafka.consumer.ConsumerConfig
+import kafka.api.{WiredTopic, WiredPartition}
@joestein
joestein / gist:1940798
Created February 29, 2012 13:22
sort on linux vs mac
Josephs-MacBook-Pro:~ josephstein$ cat test
1,,2
1,1,2
Josephs-MacBook-Pro:~ josephstein$ cat test |sort
1,,2
1,1,2
[root@megatron joestein]# cat test
1,,2
1,1,2
Index: lib/sbt-launch.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: project/plugins/Plugins.scala
===================================================================
--- project/plugins/Plugins.scala (revision 1338516)
+++ project/plugins/Plugins.scala (working copy)
@@ -1,23 +0,0 @@
-/**