Re: Getting Exception when doing a range query using token (worked in 6.5 not in 6.6)

2010-11-16 Thread Jonathan Ellis
Sorry, my mistake: this is bug
http://issues.apache.org/jira/browse/CASSANDRA-1700.  I've committed
the fix to the 0.6 svn branch; it will be in 0.6.9.

On Mon, Nov 15, 2010 at 7:34 PM, Jonathan Ellis  wrote:
> TimedOutException means the host that your client is talking to sent
> the request to another machine, which threw the logged exception and
> thus did not reply.
>
> You're doing an illegal query; token-based queries have to be on
> non-wrapping ranges (left token < right token), or a wrapping range of
> (mintoken, mintoken).  This was changed as part of the range scan
> fixes post-0.6.5.
>
> On Mon, Nov 15, 2010 at 6:32 PM, Anand Somani  wrote:
>> Hi
>>
>> Problem:
>>  Call - client.get_range_slices(). Using tokens (not keys), fails with
>> TimedoutException which I think is misleading (Read on)
>>  Server : Works with 6.5 server, but not with 6.6 or 6.8
>>  Client: have tried both 6.5 and 6.6
>>
>> I am getting a TimedoutException when I do a get_range_slices() passing in
>> tokens (not keys). I only have 1 node at this time. This is working with
>> 6.5, but is broken in 6.6 and 6.8. Basically I see the exception below on
>> the server side, so not sure how it translates to TimedoutException. I tried
>> to play with setting the timeout, but keep getting the TimedOutException in
>> exactly 10 seconds, the set value seems to have no impact.
>>
>> The exception on the server side:
>>
>> ERROR [ROW-READ-STAGE:4] 2010-11-15 22:55:39,261 CassandraDaemon.java (line
>> 87) Uncaught exception in thread Thread[ROW-READ-STAGE:4,5,main]
>> java.lang.AssertionError:
>> (99318701746171979556028978387039718369,99318701746171979556028978387039718369]
>>     at
>> org.apache.cassandra.db.ColumnFamilyStore.getRangeSlice(ColumnFamilyStore.java:1154)
>>     at
>> org.apache.cassandra.service.RangeSliceVerbHandler.doVerb(RangeSliceVerbHandler.java:41)
>>     at
>> org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:49)
>>     at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>     at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>     at java.lang.Thread.run(Thread.java:619)
>>
>>
>> I am doing something wrong or what?
>>
>> Thanks
>> Anand
>>
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com


Re: Rows missing after new node bootstrapped

2010-11-16 Thread Jonathan Ellis
I'm pretty sure that "reading an index" and "using pig" are not
compatible right now.  the m/r support that pig builds on always does
sequential-scan range queries.

can you see the missing rows if you do a normal get_slice query for it
without pig?

On Mon, Nov 15, 2010 at 7:03 AM, Christian Decker
 wrote:
> I'm using tag cassandra-0.7.0-beta3. I wouldn't know why I need range scans
> since I perform a multi_get on the indexed keys.
>
> Regards,
> Chris
>
> On Sun, Nov 14, 2010 at 9:51 AM, Jonathan Ellis  wrote:
>>
>> Are you using a version with working range scans?
>>
>> On Sat, Nov 13, 2010 at 6:11 PM, Christian Decker
>>  wrote:
>> > Hi all,
>> >
>> > I'm having some doubts about the current state of my cluster. I started
>> > with
>> > one node, filled it with some 10 million rows, then flushed and
>> > compacted
>> > the node. Then I ran a small pig script that read an index and fetched
>> > the
>> > matching rows, no problem until this point. Now I add a new node with
>> > AutoBootStrap turned on, it all seems to work as it chooses a token to
>> > take
>> > over some of the first nodes responsibilities, it seems to transfer all
>> > the
>> > relevant data and everything looks fine. Now if I run the pig script
>> > again
>> > it'll produce many empty rows, which points me to believe that these
>> > rows
>> > were read from the new node which doesn't yet have the corresponding
>> > data.
>> > Now this puzzles me, since I thought the bootstrap would transfer the
>> > needed
>> > data, will this eventually return to give me no empty rows or have I
>> > done
>> > something terribly wrong?
>> >
>> > Regards,
>> > Chris
>> >
>>
>>
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of Riptano, the source for professional Cassandra support
>> http://riptano.com
>
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com


Re: avro + cassandra + ruby

2010-11-16 Thread Jonathan Ellis
On Tue, Sep 28, 2010 at 6:35 PM, Ryan King  wrote:
> One thing you should try is to make thrift use
> BinaryProtocolAccelerated, rather than the pure-ruby implementation
> (we should change the default).

Dumb question time: how do you do this?

$ find . -name "*.rb" |xargs grep -i binaryprotocol

in the fauna cassandra gem repo turns up no hits.

-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com


Starting up cassandra 0.7

2010-11-16 Thread CassUser CassUser
Here is the yaml:

# Cassandra YAML generated from previous config
# Configuration wiki: http://wiki.apache.org/cassandra/StorageConfiguration
authenticator: org.apache.cassandra.auth.AllowAllAuthenticator
auto_bootstrap: false
binary_memtable_throughput_in_mb: 256
cluster_name: Test Cluster
column_index_size_in_kb: 64
commitlog_rotation_threshold_in_mb: 128
commitlog_sync: periodic
commitlog_sync_period_in_ms: 1
compaction_thread_priority: 1
concurrent_reads: 8
concurrent_writes: 32
disk_access_mode: auto
dynamic_snitch: false
endpoint_snitch: org.apache.cassandra.locator.SimpleSnitch
request_scheduler: org.apache.cassandra.scheduler.RoundRobinScheduler
request_scheduler_id: keyspace
hinted_handoff_enabled: true
in_memory_compaction_limit_in_mb: 128
index_interval: 128
keyspaces:
- name: myKeyspace
  replica_placement_strategy:
org.apache.cassandra.locator.SimpleStrategy
  replication_factor: 1
  column_families:
- name: Standard1
  rows_cached: 100
  keys_cached: 1
  compare_with: UTF8Type
memtable_flush_after_mins: 60
memtable_operations_in_millions: 0.3
memtable_throughput_in_mb: 64
partitioner: org.apache.cassandra.dht.RandomPartitioner
phi_convict_threshold: 8
rpc_keepalive: true
rpc_port: 9160
rpc_timeout_in_ms: 1
sliced_buffer_size_in_kb: 64
snapshot_before_compaction: false
storage_port: 7000
thrift_framed_transport_size_in_mb: 15
thrift_max_message_length_in_mb: 16

and here is the exception i'm receiving:

Caused by: Can't construct a java object for
tag:yaml.org,2002:org.apache.cassandra.config.Config;
exception=Cannot create property=keyspaces for Java
bean=org.apache.cassandra.config.con...@12e43f1; Cannot create
property=column_families for
javabean=org.apache.cassandra.config.rawkeysp...@1a8bd74;
null
 in "", line 3, column 1:
authenticator: org.apache.cassan ...
^

at
org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:372)
at
org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:177)
at
org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:136)
at
org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:122)
at org.yaml.snakeyaml.Loader.load(Loader.java:52)
at org.yaml.snakeyaml.Yaml.load(Yaml.java:166)
at
com.atsid.cassandra.testutils.CassandraTestRunner.updateYamlConfig(CassandraTestRunner.java:134)
at
com.atsid.cassandra.testutils.CassandraTestRunner.init(CassandraTestRunner.java:119)
at
com.atsid.cassandra.testutils.CassandraTestRunner.main(CassandraTestRunner.java:272)
... 6 more
Caused by: org.yaml.snakeyaml.error.YAMLException: Cannot create
property=keyspaces for javabean=org.apache.cassandra.config.con...@12e43f1;
Cannot cr
eate property=column_families for
javabean=org.apache.cassandra.config.rawkeysp...@1a8bd74; null
at
org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:305)
at
org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:184)
at
org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:370)
... 14 more
Caused by: org.yaml.snakeyaml.error.YAMLException: Cannot create
property=column_families for
javabean=org.apache.cassandra.config.rawkeysp...@1a8bd74
; null
at
org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:305)
at
org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:184)
at
org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:177)
at
org.yaml.snakeyaml.constructor.BaseConstructor.constructSequenceStep2(BaseConstructor.java:239)
at
org.yaml.snakeyaml.constructor.BaseConstructor.constructSequence(BaseConstructor.java:233)
at
org.yaml.snakeyaml.constructor.Constructor$ConstructSequence.construct(Constructor.java:543)
at
org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:177)
at
org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:298)
... 16 more
Caused by: java.lang.ArrayStoreException
at java.lang.System.arraycopy(Native Method)
at java.util.Arrays.copyOf(Arrays.java:2763)
at java.util.ArrayList.toArray(ArrayList.java:305)
at
org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:301)
... 23 more


Re: Starting up cassandra 0.7

2010-11-16 Thread Aaron Morton
AFAIK the ArrayStoreException is similar to a type mismatch. Is it possible you have something mixed up in your class path or source code if you built from source? It looks like the column family info was deserialised into a o.a.c.config.RawColumnFamily but when that object was added to the RawColumnFamily[] array on o.a.c.config.RawKeyspace if was the wrong type. Have you tried a clean build ? There are some things in the call stack which look custom, are you starting from the command line or is this embedded for testing?Hope that helps.AaronOn 17 Nov, 2010,at 08:09 AM, CassUser CassUser  wrote:Here is the yaml:# Cassandra YAML generated from previous config# Configuration wiki: http://wiki.apache.org/cassandra/StorageConfiguration

authenticator: org.apache.cassandra.auth.AllowAllAuthenticatorauto_bootstrap: falsebinary_memtable_throughput_in_mb: 256cluster_name: Test Clustercolumn_index_size_in_kb: 64commitlog_rotation_threshold_in_mb: 128

commitlog_sync: periodiccommitlog_sync_period_in_ms: 1compaction_thread_priority: 1concurrent_reads: 8concurrent_writes: 32disk_access_mode: autodynamic_snitch: falseendpoint_snitch: org.apache.cassandra.locator.SimpleSnitch

request_scheduler: org.apache.cassandra.scheduler.RoundRobinSchedulerrequest_scheduler_id: keyspacehinted_handoff_enabled: truein_memory_compaction_limit_in_mb: 128index_interval: 128keyspaces:    - name: myKeyspace

  replica_placement_strategy: orgapache.cassandra.locator.SimpleStrategy  replication_factor: 1  column_families:    - name: Standard1  rows_cached: 100  keys_cached: 1

  compare_with: UTF8Typememtable_flush_after_mins: 60memtable_operations_in_millions: 0.3memtable_throughput_in_mb: 64partitioner: org.apache.cassandra.dht.RandomPartitionerphi_convict_threshold: 8

rpc_keepalive: truerpc_port: 9160rpc_timeout_in_ms: 1sliced_buffer_size_in_kb: 64snapshot_before_compaction: falsestorage_port: 7000thrift_framed_transport_size_in_mb: 15thrift_max_message_length_in_mb: 16
and here is the exception i'm receiving:Caused by: Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=Cannot create property=keyspaces for Java
bean=org.apache.cassandra.config.con...@12e43f1; Cannot create property=column_families for javabean=org.apache.cassandra.config.rawkeysp...@1a8bd74;null in "", line 3, column 1:    authenticator: org.apache.cassan ...
    ^    at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:372)    at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:177)
    at org.yaml.snakeyaml.constructor.BaseConstructorconstructDocument(BaseConstructor.java:136)    at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:122)    at org.yaml.snakeyaml.Loader.load(Loader.java:52)
    at org.yaml.snakeyaml.Yaml.load(Yaml.java:166)    at com.atsid.cassandra.testutils.CassandraTestRunner.updateYamlConfig(CassandraTestRunner.java:134)    at com.atsid.cassandra.testutils.CassandraTestRunner.init(CassandraTestRunner.java:119)
    at com.atsid.cassandra.testutils.CassandraTestRunner.main(CassandraTestRunner.java:272)    ... 6 moreCaused by: org.yaml.snakeyaml.error.YAMLException: Cannot create property=keyspaces for javabean=org.apache.cassandra.config.con...@12e43f1; Cannot cr
eate property=column_families for javabean=org.apache.cassandra.config.rawkeysp...@1a8bd74; null    at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:305)
    at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:184)    at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:370)    ... 14 more
Caused by: org.yaml.snakeyaml.error.YAMLException: Cannot create property=column_families for javabean=org.apache.cassandra.config.rawkeysp...@1a8bd74; null    at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:305)
    at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:184)    at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:177)    at org.yaml.snakeyaml.constructor.BaseConstructor.constructSequenceStep2(BaseConstructor.java:239)
    at org.yaml.snakeyaml.constructor.BaseConstructor.constructSequence(BaseConstructor.java:233)    at org.yaml.snakeyaml.constructorConstructor$ConstructSequence.construct(Constructor.java:543)    at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:177)
    at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:298)    ... 16 moreCaused by: java.lang.ArrayStoreException    at java.lang.System.arraycopy(Native Method)
    at java.util.Arr

Cassandra 0.7 beta3 doesn´t start any more

2010-11-16 Thread André Fiedler
I got the following log, how do i fix this? How can i reset the whole
database? (i´m only testing b now)

--- LOG --

 INFO 20:45:44,852 Heap size: 1069416448/1069416448
 INFO 20:45:44,913 JNA not found. Native methods will be disabled.
 INFO 20:45:44,963 Loading settings from
file:/Applications/apache-cassandra-0.7.0-beta3/conf/cassandra.yaml
 INFO 20:45:45,310 DiskAccessMode 'auto' determined to be mmap,
indexAccessMode is mmap
 INFO 20:45:45,573 Creating new commitlog segment
/var/lib/cassandra/commitlog/CommitLog-1289936745573.log
 INFO 20:45:45,848 Deleted /var/lib/cassandra/data/system/Schema-e-37-<>
 INFO 20:45:45,859 Deleted /var/lib/cassandra/data/system/Schema-e-39-<>
 INFO 20:45:45,887 Deleted /var/lib/cassandra/data/system/Schema-e-38-<>
 INFO 20:45:45,888 Deleted /var/lib/cassandra/data/system/Schema-e-40-<>
 INFO 20:45:46,029 read 1 from saved key cache
 INFO 20:45:46,037 Sampling index for
/var/lib/cassandra/data/system/IndexInfo-e-37-<>
 INFO 20:45:46,210 read 1 from saved key cache
 INFO 20:45:46,213 Sampling index for
/var/lib/cassandra/data/system/Schema-e-43-<>
 INFO 20:45:46,232 Sampling index for
/var/lib/cassandra/data/system/Schema-e-41-<>
 INFO 20:45:46,265 Sampling index for
/var/lib/cassandra/data/system/Schema-e-42-<>
 INFO 20:45:46,276 read 0 from saved key cache
 INFO 20:45:46,282 Sampling index for
/var/lib/cassandra/data/system/Migrations-e-42-<>
 INFO 20:45:46,302 Sampling index for
/var/lib/cassandra/data/system/Migrations-e-43-<>
 INFO 20:45:46,308 Sampling index for
/var/lib/cassandra/data/system/Migrations-e-41-<>
 INFO 20:45:46,329 read 1 from saved key cache
 INFO 20:45:46,331 Sampling index for
/var/lib/cassandra/data/system/LocationInfo-e-23-<>
 INFO 20:45:46,347 Sampling index for
/var/lib/cassandra/data/system/LocationInfo-e-22-<>
 INFO 20:45:46,353 Sampling index for
/var/lib/cassandra/data/system/LocationInfo-e-21-<>
 INFO 20:45:46,367 read 0 from saved key cache
 INFO 20:45:46,378 loading row cache for LocationInfo of system
 INFO 20:45:46,379 completed loading (1 ms; 0 keys)  row cache for
LocationInfo of system
 INFO 20:45:46,379 loading row cache for HintsColumnFamily of system
 INFO 20:45:46,380 completed loading (1 ms; 0 keys)  row cache for
HintsColumnFamily of system
 INFO 20:45:46,380 loading row cache for Migrations of system
 INFO 20:45:46,380 completed loading (0 ms; 0 keys)  row cache for
Migrations of system
 INFO 20:45:46,381 loading row cache for Schema of system
 INFO 20:45:46,381 completed loading (0 ms; 0 keys)  row cache for Schema of
system
 INFO 20:45:46,382 loading row cache for IndexInfo of system
 INFO 20:45:46,382 completed loading (1 ms; 0 keys)  row cache for IndexInfo
of system
 INFO 20:45:46,492 Loading schema version
5712cb3b-f1b8-11df-b584-e700f669bcfc
 WARN 20:45:47,792 Schema definitions were defined both locally and in
cassandra.yaml. Definitions in cassandra.yaml were ignored.
 INFO 20:45:47,860 read 2 from saved key cache
 INFO 20:45:47,879 read 0 from saved key cache
 INFO 20:45:47,885 read 0 from saved key cache
 INFO 20:45:47,888 read 0 from saved key cache
 INFO 20:45:47,890 read 0 from saved key cache
 INFO 20:45:47,893 read 0 from saved key cache
ERROR 20:45:47,894 Exception encountered during startup.
java.lang.IndexOutOfBoundsException
 at java.nio.Buffer.checkIndex(Buffer.java:520)
at java.nio.HeapByteBuffer.getLong(HeapByteBuffer.java:391)
 at
org.apache.cassandra.db.marshal.LexicalUUIDType.getUUID(LexicalUUIDType.java:37)
at
org.apache.cassandra.db.marshal.LexicalUUIDType.compare(LexicalUUIDType.java:51)
 at
org.apache.cassandra.db.marshal.LexicalUUIDType.compare(LexicalUUIDType.java:29)
at
java.util.concurrent.ConcurrentSkipListMap$ComparableUsingComparator.compareTo(ConcurrentSkipListMap.java:606)
 at
java.util.concurrent.ConcurrentSkipListMap.findPredecessor(ConcurrentSkipListMap.java:685)
at
java.util.concurrent.ConcurrentSkipListMap.doPut(ConcurrentSkipListMap.java:864)
 at
java.util.concurrent.ConcurrentSkipListMap.put(ConcurrentSkipListMap.java:1659)
at
org.apache.cassandra.db.ColumnFamilyStore.addIndex(ColumnFamilyStore.java:320)
 at
org.apache.cassandra.db.ColumnFamilyStore.(ColumnFamilyStore.java:256)
at
org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:443)
 at
org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:431)
at org.apache.cassandra.db.Table.initCf(Table.java:335)
 at org.apache.cassandra.db.Table.(Table.java:277)
at org.apache.cassandra.db.Table.open(Table.java:113)
 at
org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:137)
at
org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:55)
 at
org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:215)
at
org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:134)
Exception encountered during startup.
java.lang.IndexOutOfBoundsEx

Re: Starting up cassandra 0.7

2010-11-16 Thread CassUser CassUser
This is embedded for testing cassandra 0.7 beta2.  using
EmbeddedCassandraService.

and manually adding schema programmatically using:
for (KSMetaData table : DatabaseDescriptor.readTablesFromYaml()) {
for (CFMetaData cfm : table.cfMetaData().values()) {
CFMetaData.map(cfm);
}
DatabaseDescriptor.setTableDefinition(table,
DatabaseDescriptor.getDefsVersion());
}

Is this the correct way to start up a test server, with the schema loaded?


On Tue, Nov 16, 2010 at 11:41 AM, Aaron Morton wrote:

> AFAIK the ArrayStoreException is similar to a type mismatch. Is it possible
> you have something mixed up in your class path or source code if you built
> from source?
>
> It looks like the column family info was deserialised into a
> o.a.c.config.RawColumnFamily but when that object was added to the
> RawColumnFamily[] array on o.a.c.config.RawKeyspace if was the wrong type.
>
> Have you tried a clean build ? There are some things in the call stack
> which look custom, are you starting from the command line or is this
> embedded for testing?
>
> Hope that helps.
> Aaron
>
>
>
>
> On 17 Nov, 2010,at 08:09 AM, CassUser CassUser  wrote:
>
> Here is the yaml:
>
> # Cassandra YAML generated from previous config
> # Configuration wiki:
> http://wiki.apache.org/cassandra/StorageConfiguration
> authenticator: org.apache.cassandra.auth.AllowAllAuthenticator
> auto_bootstrap: false
> binary_memtable_throughput_in_mb: 256
> cluster_name: Test Cluster
> column_index_size_in_kb: 64
> commitlog_rotation_threshold_in_mb: 128
> commitlog_sync: periodic
> commitlog_sync_period_in_ms: 1
> compaction_thread_priority: 1
> concurrent_reads: 8
> concurrent_writes: 32
> disk_access_mode: auto
> dynamic_snitch: false
> endpoint_snitch: org.apache.cassandra.locator.SimpleSnitch
> request_scheduler: org.apache.cassandra.scheduler.RoundRobinScheduler
> request_scheduler_id: keyspace
> hinted_handoff_enabled: true
> in_memory_compaction_limit_in_mb: 128
> index_interval: 128
> keyspaces:
> - name: myKeyspace
>   replica_placement_strategy:
> orgapache.cassandra.locator.SimpleStrategy
>
>   replication_factor: 1
>   column_families:
> - name: Standard1
>   rows_cached: 100
>   keys_cached: 1
>   compare_with: UTF8Type
> memtable_flush_after_mins: 60
> memtable_operations_in_millions: 0.3
> memtable_throughput_in_mb: 64
> partitioner: org.apache.cassandra.dht.RandomPartitioner
> phi_convict_threshold: 8
> rpc_keepalive: true
> rpc_port: 9160
> rpc_timeout_in_ms: 1
> sliced_buffer_size_in_kb: 64
> snapshot_before_compaction: false
> storage_port: 7000
> thrift_framed_transport_size_in_mb: 15
> thrift_max_message_length_in_mb: 16
>
> and here is the exception i'm receiving:
>
> Caused by: Can't construct a java object for 
> tag:yaml.org,2002:org.apache.cassandra.config.Config;
> exception=Cannot create property=keyspaces for Java
> bean=org.apache.cassandra.config.con...@12e43f1; Cannot create
> property=column_families for
> javabean=org.apache.cassandra.config.rawkeysp...@1a8bd74;
> null
>  in "", line 3, column 1:
> authenticator: org.apache.cassan ...
> ^
>
> at
> org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:372)
> at
> org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:177)
> at
> org.yaml.snakeyaml.constructor.BaseConstructorconstructDocument(BaseConstructor.java:136)
>
> at
> org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:122)
> at org.yaml.snakeyaml.Loader.load(Loader.java:52)
> at org.yaml.snakeyaml.Yaml.load(Yaml.java:166)
> at
> com.atsid.cassandra.testutils.CassandraTestRunner.updateYamlConfig(CassandraTestRunner.java:134)
> at
> com.atsid.cassandra.testutils.CassandraTestRunner.init(CassandraTestRunner.java:119)
> at
> com.atsid.cassandra.testutils.CassandraTestRunner.main(CassandraTestRunner.java:272)
> ... 6 more
> Caused by: org.yaml.snakeyaml.error.YAMLException: Cannot create
> property=keyspaces for javabean=org.apache.cassandra.config.con...@12e43f1;
> Cannot cr
> eate property=column_families for
> javabean=org.apache.cassandra.config.rawkeysp...@1a8bd74; null
> at
> org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:305)
> at
> org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:184)
> at
> org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:370)
> ... 14 more
> Caused by: org.yaml.snakeyaml.error.YAMLException: Cannot create
> property=column_families for
> javabean=org.apache.cassandra.config.rawkeysp...@1a8bd74
> ; null
> at
> org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.j

Re: Cassandra 0.7 beta3 doesn´t start any more

2010-11-16 Thread Aaron Morton
To reset the whole DB delete everything in the data and commit log directories, they are specified in cassandra.yaml . What does your yaml file look like ? This looks like an error trying to add an index at startup, it would be good to know why. You may need to roll back to the initial yaml file. Hope that helpsAaronOn 17 Nov, 2010,at 08:52 AM, André Fiedler  wrote:I got the following log, how do i fix this? How can i reset the whole database? (i´m only testing b now)--- LOG -- INFO 20:45:44,852 Heap size: 1069416448/1069416448

 INFO 20:45:44,913 JNA not found. Native methods will be disabled. INFO 20:45:44,963 Loading settings from file:/Applications/apache-cassandra-0.7.0-beta3/conf/cassandra.yaml INFO 20:45:45,310 DiskAccessMode 'auto' determined to be mmap, indexAccessMode is mmap

 INFO 20:45:45,573 Creating new commitlog segment /var/lib/cassandra/commitlog/CommitLog-1289936745573.log INFO 20:45:45,848 Deleted /var/lib/cassandra/data/system/Schema-e-37-<> INFO 20:45:45,859 Deleted /var/lib/cassandra/data/system/Schema-e-39-<>

 INFO 20:45:45,887 Deleted /var/lib/cassandra/data/system/Schema-e-38-<> INFO 20:45:45,888 Deleted /var/lib/cassandra/data/system/Schema-e-40-<> INFO 20:45:46,029 read 1 from saved key cache

 INFO 20:45:46,037 Sampling index for /var/lib/cassandra/data/system/IndexInfo-e-37-<> INFO 20:45:46,210 read 1 from saved key cache INFO 20:45:46,213 Sampling index for /var/lib/cassandra/data/system/Schema-e-43-<>

 INFO 20:45:46,232 Sampling index for /var/lib/cassandra/data/system/Schema-e-41-<> INFO 20:45:46,265 Sampling index for /var/lib/cassandra/data/system/Schema-e-42-<> INFO 20:45:46,276 read 0 from saved key cache

 INFO 20:45:46,282 Sampling index for /var/lib/cassandra/data/system/Migrations-e-42-<> INFO 20:45:46,302 Sampling index for /var/lib/cassandra/data/system/Migrations-e-43-<> INFO 20:45:46,308 Sampling index for /var/lib/cassandra/data/system/Migrations-e-41-<>

 INFO 20:45:46,329 read 1 from saved key cache INFO 20:45:46,331 Sampling index for /var/lib/cassandra/data/system/LocationInfo-e-23-<> INFO 20:45:46,347 Sampling index for /var/lib/cassandra/data/system/LocationInfo-e-22-<>

 INFO 20:45:46,353 Sampling index for /var/lib/cassandra/data/system/LocationInfo-e-21-<> INFO 20:45:46,367 read 0 from saved key cache INFO 20:45:46,378 loading row cache for LocationInfo of system

 INFO 20:45:46,379 completed loading (1 ms; 0 keys)  row cache for LocationInfo of system INFO 20:45:46,379 loading row cache for HintsColumnFamily of system INFO 20:45:46,380 completed loading (1 ms; 0 keys)  row cache for HintsColumnFamily of system

 INFO 20:45:46,380 loading row cache for Migrations of system INFO 20:45:46,380 completed loading (0 ms; 0 keys)  row cache for Migrations of system INFO 20:45:46,381 loading row cache for Schema of system

 INFO 20:45:46,381 completed loading (0 ms; 0 keys)  row cache for Schema of system INFO 20:45:46,382 loading row cache for IndexInfo of system INFO 20:45:46,382 completed loading (1 ms; 0 keys)  row cache for IndexInfo of system

 INFO 20:45:46,492 Loading schema version 5712cb3b-f1b8-11df-b584-e700f669bcfc WARN 20:45:47,792 Schema definitions were defined both locally and in cassandra.yaml. Definitions in cassandra.yaml were ignored.

 INFO 20:45:47,860 read 2 from saved key cache INFO 20:45:47,879 read 0 from saved key cache INFO 20:45:47,885 read 0 from saved key cache INFO 20:45:47,888 read 0 from saved key cache

 INFO 20:45:47,890 read 0 from saved key cache INFO 20:45:47,893 read 0 from saved key cacheERROR 20:45:47,894 Exception encountered during startup.java.lang.IndexOutOfBoundsException

	at java.nio.Buffer.checkIndex(Buffer.java:520)	at java.nio.HeapByteBuffer.getLong(HeapByteBuffer.java:391)

	at org.apache.cassandra.db.marshal.LexicalUUIDType.getUUID(LexicalUUIDType.java:37)	at org.apache.cassandra.db.marshal.LexicalUUIDType.compare(LexicalUUIDType.java:51)

	at org.apache.cassandra.db.marshal.LexicalUUIDType.compare(LexicalUUIDType.java:29)	at java.util.concurrent.ConcurrentSkipListMap$ComparableUsingComparator.compareTo(ConcurrentSkipListMap.java:606)

	at java.util.concurrent.ConcurrentSkipListMap.findPredecessor(ConcurrentSkipListMap.java:685)	at java.util.concurrent.ConcurrentSkipListMap.doPut(ConcurrentSkipListMap.java:864)

	at java.util.concurrent.ConcurrentSkipListMap.put(ConcurrentSkipListMap.java:1659)	at org.apache.cassandra.db.ColumnFamilyStore.addIndex(ColumnFamilyStore.java:320)

	at org.apache.cassandra.db.ColumnFamilyStore.(ColumnFamilyStore.java:256)	at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:443)

	at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:431)	at org.apache.cassandra.db.Table.initCf(Table.java:335)

	at org.apache.cassandra.db.Table.(Table.java:277)	at org.apache.cassandra.db.Table.open(Table.java:113)

	at org.apache.cassandra.service.AbstractCassandraDaemon.setu

Re: Cassandra 0.7 beta3 doesn´t start any more

2010-11-16 Thread André Fiedler
Ok, i deleted all folders inside

/var/lib/cassandra/data/

and all files inside

/var/lib/cassandra/saved_caches/

that did the trick :o)

How can i avoid this exception in the past?




2010/11/16 André Fiedler 

> I got the following log, how do i fix this? How can i reset the whole
> database? (i´m only testing b now)
>
> --- LOG --
>
>  INFO 20:45:44,852 Heap size: 1069416448/1069416448
>  INFO 20:45:44,913 JNA not found. Native methods will be disabled.
>  INFO 20:45:44,963 Loading settings from
> file:/Applications/apache-cassandra-0.7.0-beta3/conf/cassandra.yaml
>  INFO 20:45:45,310 DiskAccessMode 'auto' determined to be mmap,
> indexAccessMode is mmap
>  INFO 20:45:45,573 Creating new commitlog segment
> /var/lib/cassandra/commitlog/CommitLog-1289936745573.log
>  INFO 20:45:45,848 Deleted /var/lib/cassandra/data/system/Schema-e-37-<>
>  INFO 20:45:45,859 Deleted /var/lib/cassandra/data/system/Schema-e-39-<>
>  INFO 20:45:45,887 Deleted /var/lib/cassandra/data/system/Schema-e-38-<>
>  INFO 20:45:45,888 Deleted /var/lib/cassandra/data/system/Schema-e-40-<>
>  INFO 20:45:46,029 read 1 from saved key cache
>  INFO 20:45:46,037 Sampling index for
> /var/lib/cassandra/data/system/IndexInfo-e-37-<>
>  INFO 20:45:46,210 read 1 from saved key cache
>  INFO 20:45:46,213 Sampling index for
> /var/lib/cassandra/data/system/Schema-e-43-<>
>  INFO 20:45:46,232 Sampling index for
> /var/lib/cassandra/data/system/Schema-e-41-<>
>  INFO 20:45:46,265 Sampling index for
> /var/lib/cassandra/data/system/Schema-e-42-<>
>  INFO 20:45:46,276 read 0 from saved key cache
>  INFO 20:45:46,282 Sampling index for
> /var/lib/cassandra/data/system/Migrations-e-42-<>
>  INFO 20:45:46,302 Sampling index for
> /var/lib/cassandra/data/system/Migrations-e-43-<>
>  INFO 20:45:46,308 Sampling index for
> /var/lib/cassandra/data/system/Migrations-e-41-<>
>  INFO 20:45:46,329 read 1 from saved key cache
>  INFO 20:45:46,331 Sampling index for
> /var/lib/cassandra/data/system/LocationInfo-e-23-<>
>  INFO 20:45:46,347 Sampling index for
> /var/lib/cassandra/data/system/LocationInfo-e-22-<>
>  INFO 20:45:46,353 Sampling index for
> /var/lib/cassandra/data/system/LocationInfo-e-21-<>
>  INFO 20:45:46,367 read 0 from saved key cache
>  INFO 20:45:46,378 loading row cache for LocationInfo of system
>  INFO 20:45:46,379 completed loading (1 ms; 0 keys)  row cache for
> LocationInfo of system
>  INFO 20:45:46,379 loading row cache for HintsColumnFamily of system
>  INFO 20:45:46,380 completed loading (1 ms; 0 keys)  row cache for
> HintsColumnFamily of system
>  INFO 20:45:46,380 loading row cache for Migrations of system
>  INFO 20:45:46,380 completed loading (0 ms; 0 keys)  row cache for
> Migrations of system
>  INFO 20:45:46,381 loading row cache for Schema of system
>  INFO 20:45:46,381 completed loading (0 ms; 0 keys)  row cache for Schema
> of system
>  INFO 20:45:46,382 loading row cache for IndexInfo of system
>  INFO 20:45:46,382 completed loading (1 ms; 0 keys)  row cache for
> IndexInfo of system
>  INFO 20:45:46,492 Loading schema version
> 5712cb3b-f1b8-11df-b584-e700f669bcfc
>  WARN 20:45:47,792 Schema definitions were defined both locally and in
> cassandra.yaml. Definitions in cassandra.yaml were ignored.
>  INFO 20:45:47,860 read 2 from saved key cache
>  INFO 20:45:47,879 read 0 from saved key cache
>  INFO 20:45:47,885 read 0 from saved key cache
>  INFO 20:45:47,888 read 0 from saved key cache
>  INFO 20:45:47,890 read 0 from saved key cache
>  INFO 20:45:47,893 read 0 from saved key cache
> ERROR 20:45:47,894 Exception encountered during startup.
> java.lang.IndexOutOfBoundsException
>  at java.nio.Buffer.checkIndex(Buffer.java:520)
> at java.nio.HeapByteBuffer.getLong(HeapByteBuffer.java:391)
>  at
> org.apache.cassandra.db.marshal.LexicalUUIDType.getUUID(LexicalUUIDType.java:37)
> at
> org.apache.cassandra.db.marshal.LexicalUUIDType.compare(LexicalUUIDType.java:51)
>  at
> org.apache.cassandra.db.marshal.LexicalUUIDType.compare(LexicalUUIDType.java:29)
> at
> java.util.concurrent.ConcurrentSkipListMap$ComparableUsingComparator.compareTo(ConcurrentSkipListMap.java:606)
>  at
> java.util.concurrent.ConcurrentSkipListMap.findPredecessor(ConcurrentSkipListMap.java:685)
> at
> java.util.concurrent.ConcurrentSkipListMap.doPut(ConcurrentSkipListMap.java:864)
>  at
> java.util.concurrent.ConcurrentSkipListMap.put(ConcurrentSkipListMap.java:1659)
> at
> org.apache.cassandra.db.ColumnFamilyStore.addIndex(ColumnFamilyStore.java:320)
>  at
> org.apache.cassandra.db.ColumnFamilyStore.(ColumnFamilyStore.java:256)
> at
> org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:443)
>  at
> org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:431)
> at org.apache.cassandra.db.Table.initCf(Table.java:335)
>  at org.apache.cassandra.db.Table.(Table.java:277)
> at org.apache.cassandra.db.Table.open(Table.java:113)
>  at
> org.ap

Re: Cassandra 0.7 beta3 doesn´t start any more

2010-11-16 Thread André Fiedler
Thanks aaron! I think i was a bit too fast. Maybe i added an index at
startup. Good to know, thx a lot! :o)


2010/11/16 Aaron Morton 

> To reset the whole DB delete everything in the data and commit log
> directories, they are specified in cassandra.yaml .
>
> What does your yaml file look like ? This looks like an error trying to add
> an index at startup, it would be good to know why.
>
> You may need to roll back to the initial yaml file.
>
> Hope that helps
> Aaron
>
>
>
>
> On 17 Nov, 2010,at 08:52 AM, André Fiedler 
> wrote:
>
> I got the following log, how do i fix this? How can i reset the whole
> database? (i´m only testing b now)
>
> --- LOG --
>
>  INFO 20:45:44,852 Heap size: 1069416448/1069416448
>  INFO 20:45:44,913 JNA not found. Native methods will be disabled.
>  INFO 20:45:44,963 Loading settings from
> file:/Applications/apache-cassandra-0.7.0-beta3/conf/cassandra.yaml
>  INFO 20:45:45,310 DiskAccessMode 'auto' determined to be mmap,
> indexAccessMode is mmap
>  INFO 20:45:45,573 Creating new commitlog segment
> /var/lib/cassandra/commitlog/CommitLog-1289936745573.log
>  INFO 20:45:45,848 Deleted /var/lib/cassandra/data/system/Schema-e-37-<>
>  INFO 20:45:45,859 Deleted /var/lib/cassandra/data/system/Schema-e-39-<>
>  INFO 20:45:45,887 Deleted /var/lib/cassandra/data/system/Schema-e-38-<>
>  INFO 20:45:45,888 Deleted /var/lib/cassandra/data/system/Schema-e-40-<>
>  INFO 20:45:46,029 read 1 from saved key cache
>  INFO 20:45:46,037 Sampling index for
> /var/lib/cassandra/data/system/IndexInfo-e-37-<>
>  INFO 20:45:46,210 read 1 from saved key cache
>  INFO 20:45:46,213 Sampling index for
> /var/lib/cassandra/data/system/Schema-e-43-<>
>  INFO 20:45:46,232 Sampling index for
> /var/lib/cassandra/data/system/Schema-e-41-<>
>  INFO 20:45:46,265 Sampling index for
> /var/lib/cassandra/data/system/Schema-e-42-<>
>  INFO 20:45:46,276 read 0 from saved key cache
>  INFO 20:45:46,282 Sampling index for
> /var/lib/cassandra/data/system/Migrations-e-42-<>
>  INFO 20:45:46,302 Sampling index for
> /var/lib/cassandra/data/system/Migrations-e-43-<>
>  INFO 20:45:46,308 Sampling index for
> /var/lib/cassandra/data/system/Migrations-e-41-<>
>  INFO 20:45:46,329 read 1 from saved key cache
>  INFO 20:45:46,331 Sampling index for
> /var/lib/cassandra/data/system/LocationInfo-e-23-<>
>  INFO 20:45:46,347 Sampling index for
> /var/lib/cassandra/data/system/LocationInfo-e-22-<>
>  INFO 20:45:46,353 Sampling index for
> /var/lib/cassandra/data/system/LocationInfo-e-21-<>
>  INFO 20:45:46,367 read 0 from saved key cache
>  INFO 20:45:46,378 loading row cache for LocationInfo of system
>  INFO 20:45:46,379 completed loading (1 ms; 0 keys)  row cache for
> LocationInfo of system
>  INFO 20:45:46,379 loading row cache for HintsColumnFamily of system
>  INFO 20:45:46,380 completed loading (1 ms; 0 keys)  row cache for
> HintsColumnFamily of system
>  INFO 20:45:46,380 loading row cache for Migrations of system
>  INFO 20:45:46,380 completed loading (0 ms; 0 keys)  row cache for
> Migrations of system
>  INFO 20:45:46,381 loading row cache for Schema of system
>  INFO 20:45:46,381 completed loading (0 ms; 0 keys)  row cache for Schema
> of system
>  INFO 20:45:46,382 loading row cache for IndexInfo of system
>  INFO 20:45:46,382 completed loading (1 ms; 0 keys)  row cache for
> IndexInfo of system
>  INFO 20:45:46,492 Loading schema version
> 5712cb3b-f1b8-11df-b584-e700f669bcfc
>  WARN 20:45:47,792 Schema definitions were defined both locally and in
> cassandra.yaml. Definitions in cassandra.yaml were ignored.
>  INFO 20:45:47,860 read 2 from saved key cache
>  INFO 20:45:47,879 read 0 from saved key cache
>  INFO 20:45:47,885 read 0 from saved key cache
>  INFO 20:45:47,888 read 0 from saved key cache
>  INFO 20:45:47,890 read 0 from saved key cache
>  INFO 20:45:47,893 read 0 from saved key cache
> ERROR 20:45:47,894 Exception encountered during startup.
> java.lang.IndexOutOfBoundsException
>  at java.nio.Buffer.checkIndex(Buffer.java:520)
> at java.nio.HeapByteBuffer.getLong(HeapByteBuffer.java:391)
>  at
> org.apache.cassandra.db.marshal.LexicalUUIDType.getUUID(LexicalUUIDType.java:37)
> at
> org.apache.cassandra.db.marshal.LexicalUUIDType.compare(LexicalUUIDType.java:51)
>  at
> org.apache.cassandra.db.marshal.LexicalUUIDType.compare(LexicalUUIDType.java:29)
> at
> java.util.concurrent.ConcurrentSkipListMap$ComparableUsingComparator.compareTo(ConcurrentSkipListMap.java:606)
>  at
> java.util.concurrent.ConcurrentSkipListMap.findPredecessor(ConcurrentSkipListMap.java:685)
> at
> java.util.concurrent.ConcurrentSkipListMap.doPut(ConcurrentSkipListMap.java:864)
>  at
> java.util.concurrent.ConcurrentSkipListMap.put(ConcurrentSkipListMap.java:1659)
> at
> org.apache.cassandra.db.ColumnFamilyStore.addIndex(ColumnFamilyStore.java:320)
>  at
> org.apache.cassandra.db.ColumnFamilyStore.(ColumnFamilyStore.java:256)
> at
> org.apache.cassandra.db.ColumnFamilyStore.createCol

Re: Starting up cassandra 0.7

2010-11-16 Thread CassUser CassUser
Loading yaml file like so:
FileInputStream yamlInputStream = new FileInputStream(
configTemplateFile);
Constructor constructor = new Constructor(Config.class);
Yaml yaml = new Yaml(new Loader(constructor));
Config conf = (Config) yaml.load(yamlInputStream);

Fails on the last line.

Although if i have the CFs defined like this:
keyspaces:
- column_families:
  - !!org.apache.cassandra.config.RawColumnFamily
column_metadata: []
column_type: null
comment: null
compare_subcolumns_with: null
compare_with: BytesType
default_validation_class: null
gc_grace_seconds: 864000
keys_cached: 20.0
max_compaction_threshold: 32
min_compaction_threshold: 4
name: Similarity
preload_row_cache: false
read_repair_chance: 1.0
rows_cached: 0.0


it appears to startup.  Any idea whats going on here?


On Tue, Nov 16, 2010 at 11:58 AM, CassUser CassUser wrote:

> This is embedded for testing cassandra 0.7 beta2.  using
> EmbeddedCassandraService.
>
> and manually adding schema programmatically using:
> for (KSMetaData table : DatabaseDescriptor.readTablesFromYaml()) {
> for (CFMetaData cfm : table.cfMetaData().values()) {
> CFMetaData.map(cfm);
> }
> DatabaseDescriptor.setTableDefinition(table,
> DatabaseDescriptor.getDefsVersion());
> }
>
> Is this the correct way to start up a test server, with the schema loaded?
>
>
>
> On Tue, Nov 16, 2010 at 11:41 AM, Aaron Morton wrote:
>
>> AFAIK the ArrayStoreException is similar to a type mismatch. Is it
>> possible you have something mixed up in your class path or source code if
>> you built from source?
>>
>> It looks like the column family info was deserialised into a
>> o.a.c.config.RawColumnFamily but when that object was added to the
>> RawColumnFamily[] array on o.a.c.config.RawKeyspace if was the wrong type.
>>
>> Have you tried a clean build ? There are some things in the call stack
>> which look custom, are you starting from the command line or is this
>> embedded for testing?
>>
>> Hope that helps.
>> Aaron
>>
>>
>>
>>
>> On 17 Nov, 2010,at 08:09 AM, CassUser CassUser 
>> wrote:
>>
>> Here is the yaml:
>>
>> # Cassandra YAML generated from previous config
>> # Configuration wiki:
>> http://wiki.apache.org/cassandra/StorageConfiguration
>> authenticator: org.apache.cassandra.auth.AllowAllAuthenticator
>> auto_bootstrap: false
>> binary_memtable_throughput_in_mb: 256
>> cluster_name: Test Cluster
>> column_index_size_in_kb: 64
>> commitlog_rotation_threshold_in_mb: 128
>> commitlog_sync: periodic
>> commitlog_sync_period_in_ms: 1
>> compaction_thread_priority: 1
>> concurrent_reads: 8
>> concurrent_writes: 32
>> disk_access_mode: auto
>> dynamic_snitch: false
>> endpoint_snitch: org.apache.cassandra.locator.SimpleSnitch
>> request_scheduler: org.apache.cassandra.scheduler.RoundRobinScheduler
>> request_scheduler_id: keyspace
>> hinted_handoff_enabled: true
>> in_memory_compaction_limit_in_mb: 128
>> index_interval: 128
>> keyspaces:
>> - name: myKeyspace
>>replica_placement_strategy:
>> orgapache.cassandra.locator.SimpleStrategy
>>
>>   replication_factor: 1
>>   column_families:
>> - name: Standard1
>>   rows_cached: 100
>>   keys_cached: 1
>>   compare_with: UTF8Type
>> memtable_flush_after_mins: 60
>> memtable_operations_in_millions: 0.3
>> memtable_throughput_in_mb: 64
>> partitioner: org.apache.cassandra.dht.RandomPartitioner
>> phi_convict_threshold: 8
>> rpc_keepalive: true
>> rpc_port: 9160
>> rpc_timeout_in_ms: 1
>> sliced_buffer_size_in_kb: 64
>> snapshot_before_compaction: false
>> storage_port: 7000
>> thrift_framed_transport_size_in_mb: 15
>> thrift_max_message_length_in_mb: 16
>>
>> and here is the exception i'm receiving:
>>
>> Caused by: Can't construct a java object for 
>> tag:yaml.org,2002:org.apache.cassandra.config.Config;
>> exception=Cannot create property=keyspaces for Java
>> bean=org.apache.cassandra.config.con...@12e43f1; Cannot create
>> property=column_families for
>> javabean=org.apache.cassandra.config.rawkeysp...@1a8bd74;
>> null
>>  in "", line 3, column 1:
>> authenticator: org.apache.cassan ...
>> ^
>>
>> at
>> org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:372)
>> at
>> org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:177)
>>  at
>> org.yaml.snakeyaml.constructor.BaseConstructorconstructDocument(BaseConstructor.java:136)
>>
>> at
>> org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:122)
>> at org.yaml.snakeyaml.Loader.load(Loader.java:52)
>> at org.yaml.snakeyaml.Yaml.load(Yaml.java:166)
>> at
>> com.atsid.cassandra.testutils.CassandraTestRunner.updateYamlConfig(CassandraTestRunner.java:134)
>> at
>> com.atsid.cassa

Re: Starting up cassandra 0.7

2010-11-16 Thread Aaron Morton
I've not used the embedded service. The code in o.a.c.service.EmbeddedCassandraService says it will read the yaml file. If the cluster does not have a schema stored I think it will load the one from yaml. Have you tried starting it up with an empty system data dir ? Does it pickup the schema from the yaml?Aaron On 17 Nov, 2010,at 09:17 AM, CassUser CassUser  wrote:Loading yaml file like so:        FileInputStream yamlInputStream = new FileInputStream(                configTemplateFile);        Constructor constructor = new Constructor(Config.class);        Yaml yaml = new Yaml(new Loader(constructor));
        Config conf = (Config) yaml.load(yamlInputStream);Fails on the last line.Although if i have the CFs defined like this:keyspaces:- column_families:  - !!org.apache.cassandra.config.RawColumnFamily
    column_metadata: []    column_type: null    comment: null    compare_subcolumns_with: null    compare_with: BytesType    default_validation_class: null    gc_grace_seconds: 864000    keys_cached: 20.0
    max_compaction_threshold: 32    min_compaction_threshold: 4    name: Similarity    preload_row_cache: false    read_repair_chance: 1.0    rows_cached: 0.0it appears to startup.  Any idea whats going on here?
On Tue, Nov 16, 2010 at 11:58 AM, CassUser CassUser  wrote:
This is embedded for testing cassandra 0.7 beta2.  using EmbeddedCassandraService.and manually adding schema programmatically using:        for (KSMetaData table : DatabaseDescriptor.readTablesFromYaml()) {

            for (CFMetaData cfm : table.cfMetaData().values()) {                CFMetaData.map(cfm);            }            DatabaseDescriptor.setTableDefinition(table,                    DatabaseDescriptor.getDefsVersion());

        }Is this the correct way to start up a test server, with the schema loaded?On Tue, Nov 16, 2010 at 11:41 AM, Aaron Morton  wrote:

AFAIK the ArrayStoreException is similar to a type mismatch. Is it possible you have something mixed up in your class path or source code if you built from source? 

It looks like the column family info was deserialised into a o.a.c.config.RawColumnFamily but when that object was added to the RawColumnFamily[] array on o.a.c.config.RawKeyspace if was the wrong type. 

Have you tried a clean build ? There are some things in the call stack which look custom, are you starting from the command line or is this embedded for testing?Hope that helps.

AaronOn 17 Nov, 2010,at 08:09 AM, CassUser CassUser  wrote:

Here is the yaml:# Cassandra YAML generated from previous config# Configuration wiki: http://wiki.apache.org/cassandra/StorageConfiguration



authenticator: org.apache.cassandraauth.AllowAllAuthenticatorauto_bootstrap: falsebinary_memtable_throughput_in_mb: 256cluster_name: Test Clustercolumn_index_size_in_kb: 64commitlog_rotation_threshold_in_mb: 128



commitlog_sync: periodiccommitlog_sync_period_in_ms: 1compaction_thread_priority: 1concurrent_reads: 8concurrent_writes: 32disk_access_mode: autodynamic_snitch: falseendpoint_snitch: org.apache.cassandra.locator.SimpleSnitch



request_scheduler: org.apache.cassandra.scheduler.RoundRobinSchedulerrequest_scheduler_id: keyspacehinted_handoff_enabled: truein_memory_compaction_limit_in_mb: 128index_interval: 128keyspaces:    - name: myKeyspace



  replica_placement_strategy: orgapache.cassandra.locator.SimpleStrategy  replication_factor: 1  column_families:    - name: Standard1  rows_cached: 100
  keys_cached: 1

  compare_with: UTF8Typememtable_flush_after_mins: 60memtable_operations_in_millions: 0.3memtable_throughput_in_mb: 64partitioner: org.apache.cassandra.dht.RandomPartitionerphi_convict_threshold: 8



rpc_keepalive: truerpc_port: 9160rpc_timeout_in_ms: 1sliced_buffer_size_in_kb: 64snapshot_before_compaction: falsestorage_port: 7000thrift_framed_transport_size_in_mb: 15thrift_max_message_length_in_mb: 16


and here is the exception i'm receiving:Caused by: Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=Cannot create property=keyspaces for Java


bean=org.apache.cassandra.config.con...@12e43f1; Cannot create property=column_families for javabean=org.apache.cassandra.config.rawkeysp...@1a8bd74;null in "", line 3, column 1:    authenticator: org.apache.cassan ...


    ^    at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:372)    at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:177)


    at org.yaml.snakeyamlconstructor.BaseConstructorconstructDocument(BaseConstructor.java:136)    at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:122)
    at org.yaml.snakeyaml.Loader.load(Loader.java:52)
    at org.yaml.snakeyaml.Yaml.load(Yaml.java:166)    at com.atsid.cassandra.testutils.CassandraTestRunner.updateYamlConfig(Cassand

Cassandra 0.7-beta3 - IndexOutOfBoundsException when create column family

2010-11-16 Thread André Fiedler
I try to perform the following action after a clean startup. And get the log
below. How to fix this?

- Action --

   create column family Test with comparator=LexicalUUIDType and
column_metadata=[

{column_name:test1, validation_class:LexicalUUIDType, index_type:0,
index_name:test1},

{column_name:test2, validation_class:UTF8Type, index_type:0,
index_name:test2},

{column_name:test3, validation_class:UTF8Type},

{column_name:test4, validation_class:LexicalUUIDType, index_type:0,
index_name:test4},

{column_name:test5, validation_class:BytesType, index_type:0,
index_name:test5},

{column_name:test6, validation_class:BytesType, index_type:0,
index_name:test6},

{column_name:test7, validation_class:LongType, index_type:0,
index_name:test7},

{column_name:test8, validation_class:BytesType, index_type:0,
index_name:test8},

{column_name:test9, validation_class:UTF8Type},

{column_name:test10, validation_class:LongType},

{column_name:test11, validation_class:UTF8Type},

{column_name:test12, validation_class:LongType},

{column_name:test13, validation_class:LongType},

{column_name:test14, validation_class:LexicalUUIDType, index_type:0,
index_name:test14}

]


- Log --

 INFO 21:30:40,004 Heap size: 1069416448/1069416448
 INFO 21:30:40,098 JNA not found. Native methods will be disabled.
 INFO 21:30:40,151 Loading settings from
file:/Applications/apache-cassandra-0.7.0-beta3/conf/cassandra.yaml
 INFO 21:30:40,569 DiskAccessMode 'auto' determined to be mmap,
indexAccessMode is mmap
 INFO 21:30:40,822 Creating new commitlog segment
/var/lib/cassandra/commitlog/CommitLog-1289939440822.log
 INFO 21:30:40,944 read 0 from saved key cache
 INFO 21:30:40,949 read 0 from saved key cache
 INFO 21:30:40,950 read 0 from saved key cache
 INFO 21:30:40,952 read 0 from saved key cache
 INFO 21:30:40,953 read 0 from saved key cache
 INFO 21:30:41,007 loading row cache for LocationInfo of system
 INFO 21:30:41,007 completed loading (1 ms; 0 keys)  row cache for
LocationInfo of system
 INFO 21:30:41,008 loading row cache for HintsColumnFamily of system
 INFO 21:30:41,009 completed loading (1 ms; 0 keys)  row cache for
HintsColumnFamily of system
 INFO 21:30:41,010 loading row cache for Migrations of system
 INFO 21:30:41,010 completed loading (1 ms; 0 keys)  row cache for
Migrations of system
 INFO 21:30:41,014 loading row cache for Schema of system
 INFO 21:30:41,014 completed loading (0 ms; 0 keys)  row cache for Schema of
system
 INFO 21:30:41,015 loading row cache for IndexInfo of system
 INFO 21:30:41,016 completed loading (0 ms; 0 keys)  row cache for IndexInfo
of system
 INFO 21:30:41,121 Couldn't detect any schema definitions in local storage.
 INFO 21:30:41,123 Found table data in data directories. Consider using JMX
to call org.apache.cassandra.service.StorageService.loadSchemaFromYaml().
 INFO 21:30:41,126 No commitlog files found; skipping replay
 INFO 21:30:41,165 Upgrading to 0.7. Purging hints if there are any. Old
hints will be snapshotted.
 INFO 21:30:41,223 Cassandra version: 0.7.0-beta3
 INFO 21:30:41,224 Thrift API version: 19.4.0
 INFO 21:30:41,240 Loading persisted ring state
 INFO 21:30:41,251 Starting up server gossip
 INFO 21:30:41,268 switching in a fresh Memtable for LocationInfo at
CommitLogContext(file='/var/lib/cassandra/commitlog/CommitLog-1289939440822.log',
position=700)
 INFO 21:30:41,270 Enqueuing flush of memtable-locationi...@1085278557(227
bytes, 4 operations)
 INFO 21:30:41,272 Writing memtable-locationi...@1085278557(227 bytes, 4
operations)
 INFO 21:30:41,536 Completed flushing
/var/lib/cassandra/data/system/LocationInfo-e-1-Data.db
 WARN 21:30:41,622 Generated random token
77213727368801109223786819704694530797. Random tokens will result in an
unbalanced ring; see http://wiki.apache.org/cassandra/Operations
 INFO 21:30:41,623 switching in a fresh Memtable for LocationInfo at
CommitLogContext(file='/var/lib/cassandra/commitlog/CommitLog-1289939440822.log',
position=848)
 INFO 21:30:41,623 Enqueuing flush of memtable-locationi...@767012386(36
bytes, 1 operations)
 INFO 21:30:41,623 Writing memtable-locationi...@767012386(36 bytes, 1
operations)
 INFO 21:30:41,717 Completed flushing
/var/lib/cassandra/data/system/LocationInfo-e-2-Data.db
 INFO 21:30:41,723 Will not load MX4J, mx4j-tools.jar is not in the
classpath
 INFO 21:30:41,823 Binding thrift service to localhost/127.0.0.1:9160
 INFO 21:30:41,828 Using TFramedTransport with a max frame size of 15728640
bytes.
 INFO 21:30:41,850 Listening for thrift clients...
 INFO 21:31:20,385 switching in a fresh Memtable for Migrations at
CommitLogContext(file='/var/lib/cassandra/commitlog/CommitLog-1289939440822.log',
position=11605)
 INFO 21:31:20,386 Enqueuing flush of memtable-migrati...@1217256339(6082
bytes, 1 operations)
 INFO 21:31:20,386 switching in a fresh Memtable for Schema at
Com

Re: Cassandra 0.7-beta3 - IndexOutOfBoundsException when create column family

2010-11-16 Thread Jake Luciani
This is a bug in beta3, if you checkout the cassandra-0.7 branch it should
work for you.

On Tue, Nov 16, 2010 at 3:38 PM, André Fiedler  wrote:

> I try to perform the following action after a clean startup. And get the
> log below. How to fix this?
>
> - Action --
>
> create column family Test with comparator=LexicalUUIDType and
> column_metadata=[
>
> {column_name:test1, validation_class:LexicalUUIDType, index_type:0,
> index_name:test1},
>
> {column_name:test2, validation_class:UTF8Type, index_type:0,
> index_name:test2},
>
> {column_name:test3, validation_class:UTF8Type},
>
> {column_name:test4, validation_class:LexicalUUIDType, index_type:0,
> index_name:test4},
>
> {column_name:test5, validation_class:BytesType, index_type:0,
> index_name:test5},
>
> {column_name:test6, validation_class:BytesType, index_type:0,
> index_name:test6},
>
> {column_name:test7, validation_class:LongType, index_type:0,
> index_name:test7},
>
> {column_name:test8, validation_class:BytesType, index_type:0,
> index_name:test8},
>
> {column_name:test9, validation_class:UTF8Type},
>
> {column_name:test10, validation_class:LongType},
>
> {column_name:test11, validation_class:UTF8Type},
>
> {column_name:test12, validation_class:LongType},
>
> {column_name:test13, validation_class:LongType},
>
> {column_name:test14, validation_class:LexicalUUIDType, index_type:0,
> index_name:test14}
>
> ]
>
>
> - Log --
>
>  INFO 21:30:40,004 Heap size: 1069416448/1069416448
>  INFO 21:30:40,098 JNA not found. Native methods will be disabled.
>  INFO 21:30:40,151 Loading settings from
> file:/Applications/apache-cassandra-0.7.0-beta3/conf/cassandra.yaml
>  INFO 21:30:40,569 DiskAccessMode 'auto' determined to be mmap,
> indexAccessMode is mmap
>  INFO 21:30:40,822 Creating new commitlog segment
> /var/lib/cassandra/commitlog/CommitLog-1289939440822.log
>  INFO 21:30:40,944 read 0 from saved key cache
>  INFO 21:30:40,949 read 0 from saved key cache
>  INFO 21:30:40,950 read 0 from saved key cache
>  INFO 21:30:40,952 read 0 from saved key cache
>  INFO 21:30:40,953 read 0 from saved key cache
>  INFO 21:30:41,007 loading row cache for LocationInfo of system
>  INFO 21:30:41,007 completed loading (1 ms; 0 keys)  row cache for
> LocationInfo of system
>  INFO 21:30:41,008 loading row cache for HintsColumnFamily of system
>  INFO 21:30:41,009 completed loading (1 ms; 0 keys)  row cache for
> HintsColumnFamily of system
>  INFO 21:30:41,010 loading row cache for Migrations of system
>  INFO 21:30:41,010 completed loading (1 ms; 0 keys)  row cache for
> Migrations of system
>  INFO 21:30:41,014 loading row cache for Schema of system
>  INFO 21:30:41,014 completed loading (0 ms; 0 keys)  row cache for Schema
> of system
>  INFO 21:30:41,015 loading row cache for IndexInfo of system
>  INFO 21:30:41,016 completed loading (0 ms; 0 keys)  row cache for
> IndexInfo of system
>  INFO 21:30:41,121 Couldn't detect any schema definitions in local storage.
>  INFO 21:30:41,123 Found table data in data directories. Consider using JMX
> to call org.apache.cassandra.service.StorageService.loadSchemaFromYaml().
>  INFO 21:30:41,126 No commitlog files found; skipping replay
>  INFO 21:30:41,165 Upgrading to 0.7. Purging hints if there are any. Old
> hints will be snapshotted.
>  INFO 21:30:41,223 Cassandra version: 0.7.0-beta3
>  INFO 21:30:41,224 Thrift API version: 19.4.0
>  INFO 21:30:41,240 Loading persisted ring state
>  INFO 21:30:41,251 Starting up server gossip
>  INFO 21:30:41,268 switching in a fresh Memtable for LocationInfo at
> CommitLogContext(file='/var/lib/cassandra/commitlog/CommitLog-1289939440822.log',
> position=700)
>  INFO 21:30:41,270 Enqueuing flush of memtable-locationi...@1085278557(227
> bytes, 4 operations)
>  INFO 21:30:41,272 Writing memtable-locationi...@1085278557(227 bytes, 4
> operations)
>  INFO 21:30:41,536 Completed flushing
> /var/lib/cassandra/data/system/LocationInfo-e-1-Data.db
>  WARN 21:30:41,622 Generated random token
> 77213727368801109223786819704694530797. Random tokens will result in an
> unbalanced ring; see http://wiki.apache.org/cassandra/Operations
>  INFO 21:30:41,623 switching in a fresh Memtable for LocationInfo at
> CommitLogContext(file='/var/lib/cassandra/commitlog/CommitLog-1289939440822.log',
> position=848)
>  INFO 21:30:41,623 Enqueuing flush of memtable-locationi...@767012386(36
> bytes, 1 operations)
>  INFO 21:30:41,623 Writing memtable-locationi...@767012386(36 bytes, 1
> operations)
>  INFO 21:30:41,717 Completed flushing
> /var/lib/cassandra/data/system/LocationInfo-e-2-Data.db
>  INFO 21:30:41,723 Will not load MX4J, mx4j-tools.jar is not in the
> classpath
>  INFO 21:30:41,823 Binding thrift service to localhost/127.0.0.1:9160
>  INFO 21:30:41,828 Using TFramedTransport with a max frame size of 15728640
> bytes.
>  INFO 21:30:41,850 Listeni

Re: Cassandra 0.7-beta3 - IndexOutOfBoundsException when create column family

2010-11-16 Thread André Fiedler
Thx! :o) so i will do

2010/11/16 Jake Luciani 

> This is a bug in beta3, if you checkout the cassandra-0.7 branch it should
> work for you.
>
>
> On Tue, Nov 16, 2010 at 3:38 PM, André Fiedler <
> fiedler.an...@googlemail.com> wrote:
>
>> I try to perform the following action after a clean startup. And get the
>> log below. How to fix this?
>>
>> - Action --
>>
>> create column family Test with comparator=LexicalUUIDType and
>> column_metadata=[
>>
>> {column_name:test1, validation_class:LexicalUUIDType, index_type:0,
>> index_name:test1},
>>
>> {column_name:test2, validation_class:UTF8Type, index_type:0,
>> index_name:test2},
>>
>> {column_name:test3, validation_class:UTF8Type},
>>
>> {column_name:test4, validation_class:LexicalUUIDType, index_type:0,
>> index_name:test4},
>>
>> {column_name:test5, validation_class:BytesType, index_type:0,
>> index_name:test5},
>>
>> {column_name:test6, validation_class:BytesType, index_type:0,
>> index_name:test6},
>>
>> {column_name:test7, validation_class:LongType, index_type:0,
>> index_name:test7},
>>
>> {column_name:test8, validation_class:BytesType, index_type:0,
>> index_name:test8},
>>
>> {column_name:test9, validation_class:UTF8Type},
>>
>> {column_name:test10, validation_class:LongType},
>>
>> {column_name:test11, validation_class:UTF8Type},
>>
>> {column_name:test12, validation_class:LongType},
>>
>> {column_name:test13, validation_class:LongType},
>>
>> {column_name:test14, validation_class:LexicalUUIDType, index_type:0,
>> index_name:test14}
>>
>> ]
>>
>>
>> - Log --
>>
>>  INFO 21:30:40,004 Heap size: 1069416448/1069416448
>>  INFO 21:30:40,098 JNA not found. Native methods will be disabled.
>>  INFO 21:30:40,151 Loading settings from
>> file:/Applications/apache-cassandra-0.7.0-beta3/conf/cassandra.yaml
>>  INFO 21:30:40,569 DiskAccessMode 'auto' determined to be mmap,
>> indexAccessMode is mmap
>>  INFO 21:30:40,822 Creating new commitlog segment
>> /var/lib/cassandra/commitlog/CommitLog-1289939440822.log
>>  INFO 21:30:40,944 read 0 from saved key cache
>>  INFO 21:30:40,949 read 0 from saved key cache
>>  INFO 21:30:40,950 read 0 from saved key cache
>>  INFO 21:30:40,952 read 0 from saved key cache
>>  INFO 21:30:40,953 read 0 from saved key cache
>>  INFO 21:30:41,007 loading row cache for LocationInfo of system
>>  INFO 21:30:41,007 completed loading (1 ms; 0 keys)  row cache for
>> LocationInfo of system
>>  INFO 21:30:41,008 loading row cache for HintsColumnFamily of system
>>  INFO 21:30:41,009 completed loading (1 ms; 0 keys)  row cache for
>> HintsColumnFamily of system
>>  INFO 21:30:41,010 loading row cache for Migrations of system
>>  INFO 21:30:41,010 completed loading (1 ms; 0 keys)  row cache for
>> Migrations of system
>>  INFO 21:30:41,014 loading row cache for Schema of system
>>  INFO 21:30:41,014 completed loading (0 ms; 0 keys)  row cache for Schema
>> of system
>>  INFO 21:30:41,015 loading row cache for IndexInfo of system
>>  INFO 21:30:41,016 completed loading (0 ms; 0 keys)  row cache for
>> IndexInfo of system
>>  INFO 21:30:41,121 Couldn't detect any schema definitions in local
>> storage.
>>  INFO 21:30:41,123 Found table data in data directories. Consider using
>> JMX to call
>> org.apache.cassandra.service.StorageService.loadSchemaFromYaml().
>>  INFO 21:30:41,126 No commitlog files found; skipping replay
>>  INFO 21:30:41,165 Upgrading to 0.7. Purging hints if there are any. Old
>> hints will be snapshotted.
>>  INFO 21:30:41,223 Cassandra version: 0.7.0-beta3
>>  INFO 21:30:41,224 Thrift API version: 19.4.0
>>  INFO 21:30:41,240 Loading persisted ring state
>>  INFO 21:30:41,251 Starting up server gossip
>>  INFO 21:30:41,268 switching in a fresh Memtable for LocationInfo at
>> CommitLogContext(file='/var/lib/cassandra/commitlog/CommitLog-1289939440822.log',
>> position=700)
>>  INFO 21:30:41,270 Enqueuing flush of memtable-locationi...@1085278557(227
>> bytes, 4 operations)
>>  INFO 21:30:41,272 Writing memtable-locationi...@1085278557(227 bytes, 4
>> operations)
>>  INFO 21:30:41,536 Completed flushing
>> /var/lib/cassandra/data/system/LocationInfo-e-1-Data.db
>>  WARN 21:30:41,622 Generated random token
>> 77213727368801109223786819704694530797. Random tokens will result in an
>> unbalanced ring; see http://wiki.apache.org/cassandra/Operations
>>  INFO 21:30:41,623 switching in a fresh Memtable for LocationInfo at
>> CommitLogContext(file='/var/lib/cassandra/commitlog/CommitLog-1289939440822.log',
>> position=848)
>>  INFO 21:30:41,623 Enqueuing flush of memtable-locationi...@767012386(36
>> bytes, 1 operations)
>>  INFO 21:30:41,623 Writing memtable-locationi...@767012386(36 bytes, 1
>> operations)
>>  INFO 21:30:41,717 Completed flushing
>> /var/lib/cassandra/data/system/LocationInfo-e-2-Data.db
>>  INFO 21:30:41,723 Will not load MX4J, mx4j-tools.jar is not

Re: Cassandra 0.7-beta3 - IndexOutOfBoundsException when create column family

2010-11-16 Thread André Fiedler
Latest branch doesn´t start:

- Log --

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/cassandra/thrift/CassandraDaemon
Caused by: java.lang.ClassNotFoundException:
org.apache.cassandra.thrift.CassandraDaemon
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
 at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:248)



2010/11/16 André Fiedler 

> Thx! :o) so i will do
>
> 2010/11/16 Jake Luciani 
>
> This is a bug in beta3, if you checkout the cassandra-0.7 branch it should
>> work for you.
>>
>>
>> On Tue, Nov 16, 2010 at 3:38 PM, André Fiedler <
>> fiedler.an...@googlemail.com> wrote:
>>
>>> I try to perform the following action after a clean startup. And get the
>>> log below. How to fix this?
>>>
>>> - Action --
>>>
>>> create column family Test with comparator=LexicalUUIDType and
>>> column_metadata=[
>>>
>>> {column_name:test1, validation_class:LexicalUUIDType, index_type:0,
>>> index_name:test1},
>>>
>>> {column_name:test2, validation_class:UTF8Type, index_type:0,
>>> index_name:test2},
>>>
>>> {column_name:test3, validation_class:UTF8Type},
>>>
>>> {column_name:test4, validation_class:LexicalUUIDType, index_type:0,
>>> index_name:test4},
>>>
>>> {column_name:test5, validation_class:BytesType, index_type:0,
>>> index_name:test5},
>>>
>>> {column_name:test6, validation_class:BytesType, index_type:0,
>>> index_name:test6},
>>>
>>> {column_name:test7, validation_class:LongType, index_type:0,
>>> index_name:test7},
>>>
>>> {column_name:test8, validation_class:BytesType, index_type:0,
>>> index_name:test8},
>>>
>>> {column_name:test9, validation_class:UTF8Type},
>>>
>>> {column_name:test10, validation_class:LongType},
>>>
>>> {column_name:test11, validation_class:UTF8Type},
>>>
>>> {column_name:test12, validation_class:LongType},
>>>
>>> {column_name:test13, validation_class:LongType},
>>>
>>> {column_name:test14, validation_class:LexicalUUIDType, index_type:0,
>>> index_name:test14}
>>>
>>> ]
>>>
>>>
>>> - Log --
>>>
>>>  INFO 21:30:40,004 Heap size: 1069416448/1069416448
>>>  INFO 21:30:40,098 JNA not found. Native methods will be disabled.
>>>  INFO 21:30:40,151 Loading settings from
>>> file:/Applications/apache-cassandra-0.7.0-beta3/conf/cassandra.yaml
>>>  INFO 21:30:40,569 DiskAccessMode 'auto' determined to be mmap,
>>> indexAccessMode is mmap
>>>  INFO 21:30:40,822 Creating new commitlog segment
>>> /var/lib/cassandra/commitlog/CommitLog-1289939440822.log
>>>  INFO 21:30:40,944 read 0 from saved key cache
>>>  INFO 21:30:40,949 read 0 from saved key cache
>>>  INFO 21:30:40,950 read 0 from saved key cache
>>>  INFO 21:30:40,952 read 0 from saved key cache
>>>  INFO 21:30:40,953 read 0 from saved key cache
>>>  INFO 21:30:41,007 loading row cache for LocationInfo of system
>>>  INFO 21:30:41,007 completed loading (1 ms; 0 keys)  row cache for
>>> LocationInfo of system
>>>  INFO 21:30:41,008 loading row cache for HintsColumnFamily of system
>>>  INFO 21:30:41,009 completed loading (1 ms; 0 keys)  row cache for
>>> HintsColumnFamily of system
>>>  INFO 21:30:41,010 loading row cache for Migrations of system
>>>  INFO 21:30:41,010 completed loading (1 ms; 0 keys)  row cache for
>>> Migrations of system
>>>  INFO 21:30:41,014 loading row cache for Schema of system
>>>  INFO 21:30:41,014 completed loading (0 ms; 0 keys)  row cache for Schema
>>> of system
>>>  INFO 21:30:41,015 loading row cache for IndexInfo of system
>>>  INFO 21:30:41,016 completed loading (0 ms; 0 keys)  row cache for
>>> IndexInfo of system
>>>  INFO 21:30:41,121 Couldn't detect any schema definitions in local
>>> storage.
>>>  INFO 21:30:41,123 Found table data in data directories. Consider using
>>> JMX to call
>>> org.apache.cassandra.service.StorageService.loadSchemaFromYaml().
>>>  INFO 21:30:41,126 No commitlog files found; skipping replay
>>>  INFO 21:30:41,165 Upgrading to 0.7. Purging hints if there are any. Old
>>> hints will be snapshotted.
>>>  INFO 21:30:41,223 Cassandra version: 0.7.0-beta3
>>>  INFO 21:30:41,224 Thrift API version: 19.4.0
>>>  INFO 21:30:41,240 Loading persisted ring state
>>>  INFO 21:30:41,251 Starting up server gossip
>>>  INFO 21:30:41,268 switching in a fresh Memtable for LocationInfo at
>>> CommitLogContext(file='/var/lib/cassandra/commitlog/CommitLog-1289939440822.log',
>>> position=700)
>>>  INFO 21:30:41,270 Enqueuing flush of memtable-locationi...@1085278557(227
>>> bytes, 4 operations)
>>>  INFO 21:30:41,272 Writing memtable-locationi...@1085278557(227 bytes, 4
>>> operations)
>>>  INFO 21:30:41,536 Compl

Re: Cassandra 0.7-beta3 - IndexOutOfBoundsException when create column family

2010-11-16 Thread André Fiedler
Ups, sry... checked out the trunk, not branch... my fault :D


2010/11/16 André Fiedler 

> Latest branch doesn´t start:
>
> - Log --
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/cassandra/thrift/CassandraDaemon
> Caused by: java.lang.ClassNotFoundException:
> org.apache.cassandra.thrift.CassandraDaemon
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>  at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>
>
>
> 2010/11/16 André Fiedler 
>
> Thx! :o) so i will do
>>
>> 2010/11/16 Jake Luciani 
>>
>> This is a bug in beta3, if you checkout the cassandra-0.7 branch it should
>>> work for you.
>>>
>>>
>>> On Tue, Nov 16, 2010 at 3:38 PM, André Fiedler <
>>> fiedler.an...@googlemail.com> wrote:
>>>
 I try to perform the following action after a clean startup. And get the
 log below. How to fix this?

 - Action --

 create column family Test with comparator=LexicalUUIDType and
 column_metadata=[

 {column_name:test1, validation_class:LexicalUUIDType, index_type:0,
 index_name:test1},

 {column_name:test2, validation_class:UTF8Type, index_type:0,
 index_name:test2},

 {column_name:test3, validation_class:UTF8Type},

 {column_name:test4, validation_class:LexicalUUIDType, index_type:0,
 index_name:test4},

 {column_name:test5, validation_class:BytesType, index_type:0,
 index_name:test5},

 {column_name:test6, validation_class:BytesType, index_type:0,
 index_name:test6},

 {column_name:test7, validation_class:LongType, index_type:0,
 index_name:test7},

 {column_name:test8, validation_class:BytesType, index_type:0,
 index_name:test8},

 {column_name:test9, validation_class:UTF8Type},

 {column_name:test10, validation_class:LongType},

 {column_name:test11, validation_class:UTF8Type},

 {column_name:test12, validation_class:LongType},

 {column_name:test13, validation_class:LongType},

 {column_name:test14, validation_class:LexicalUUIDType, index_type:0,
 index_name:test14}

 ]


 - Log --

  INFO 21:30:40,004 Heap size: 1069416448/1069416448
  INFO 21:30:40,098 JNA not found. Native methods will be disabled.
  INFO 21:30:40,151 Loading settings from
 file:/Applications/apache-cassandra-0.7.0-beta3/conf/cassandra.yaml
  INFO 21:30:40,569 DiskAccessMode 'auto' determined to be mmap,
 indexAccessMode is mmap
  INFO 21:30:40,822 Creating new commitlog segment
 /var/lib/cassandra/commitlog/CommitLog-1289939440822.log
  INFO 21:30:40,944 read 0 from saved key cache
  INFO 21:30:40,949 read 0 from saved key cache
  INFO 21:30:40,950 read 0 from saved key cache
  INFO 21:30:40,952 read 0 from saved key cache
  INFO 21:30:40,953 read 0 from saved key cache
  INFO 21:30:41,007 loading row cache for LocationInfo of system
  INFO 21:30:41,007 completed loading (1 ms; 0 keys)  row cache for
 LocationInfo of system
  INFO 21:30:41,008 loading row cache for HintsColumnFamily of system
  INFO 21:30:41,009 completed loading (1 ms; 0 keys)  row cache for
 HintsColumnFamily of system
  INFO 21:30:41,010 loading row cache for Migrations of system
  INFO 21:30:41,010 completed loading (1 ms; 0 keys)  row cache for
 Migrations of system
  INFO 21:30:41,014 loading row cache for Schema of system
  INFO 21:30:41,014 completed loading (0 ms; 0 keys)  row cache for
 Schema of system
  INFO 21:30:41,015 loading row cache for IndexInfo of system
  INFO 21:30:41,016 completed loading (0 ms; 0 keys)  row cache for
 IndexInfo of system
  INFO 21:30:41,121 Couldn't detect any schema definitions in local
 storage.
  INFO 21:30:41,123 Found table data in data directories. Consider using
 JMX to call
 org.apache.cassandra.service.StorageService.loadSchemaFromYaml().
  INFO 21:30:41,126 No commitlog files found; skipping replay
  INFO 21:30:41,165 Upgrading to 0.7. Purging hints if there are any. Old
 hints will be snapshotted.
  INFO 21:30:41,223 Cassandra version: 0.7.0-beta3
  INFO 21:30:41,224 Thrift API version: 19.4.0
  INFO 21:30:41,240 Loading persisted ring state
  INFO 21:30:41,251 Starting up server gossip
  INFO 21:30:41,268 switching in a fresh Memtable for LocationInfo at
 CommitLogContext(file='/var/lib/cassandra/commitlog/CommitLog-1289939440822.log',
 position=700)
>

Re: Cassandra 0.7-beta3 - IndexOutOfBoundsException when create column family

2010-11-16 Thread Aaron Morton
did you do a clean and then build ? "ant clean" then "ant jar"AaronOn 17 Nov, 2010,at 10:10 AM, André Fiedler  wrote:Latest branch doesn´t start:- Log --Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/cassandra/thrift/CassandraDaemon

Caused by: java.lang.ClassNotFoundException: org.apache.cassandra.thrift.CassandraDaemon	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

	at java.security.AccessController.doPrivileged(Native Method)	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)2010/11/16 André Fiedler 

Thx! :o) so i will do2010/11/16 Jake Luciani 


This is a bug in beta3, if you checkout the cassandra-0.7 branch it should work for you.On Tue, Nov 16, 2010 at 3:38 PM, André Fiedler  wrote:



I try to perform the following action after a clean startup. And get the log below. How to fix this?



- Action --







create column family Test with comparator=LexicalUUIDType and column_metadata=[
    {column_name:test1, validation_class:LexicalUUIDType, index_type:0, index_name:test1},
    {column_name:test2, validation_class:UTF8Type, index_type:0, index_name:test2},
    {column_name:test3, validation_class:UTF8Type},
    {column_name:test4, validation_class:LexicalUUIDType, index_type:0, index_name:test4},
    {column_name:test5, validation_class:BytesType, index_type:0, index_name:test5},
    {column_name:test6, validation_class:BytesType, index_type:0, index_name:test6},
    {column_name:test7, validation_class:LongType, index_type:0, index_name:test7},
    {column_name:test8, validation_class:BytesType, index_type:0, index_name:test8},
    {column_name:test9, validation_class:UTF8Type},
    {column_name:test10, validation_class:LongType},
    {column_name:test11, validation_class:UTF8Type},
    {column_name:test12, validation_class:LongType},
    {column_name:test13, validation_class:LongType},
    {column_name:test14, validation_class:LexicalUUIDType, index_type:0, index_name:test14}
]- Log --

 INFO 21:30:40,004 Heap size: 1069416448/1069416448 INFO 21:30:40,098 JNA not found. Native methods will be disabled. INFO 21:30:40,151 Loading settings from file:/Applications/apache-cassandra-0.7.0-beta3/conf/cassandra.yaml





 INFO 21:30:40,569 DiskAccessMode 'auto' determined to be mmap, indexAccessMode is mmap INFO 21:30:40,822 Creating new commitlog segment /var/lib/cassandra/commitlog/CommitLog-1289939440822.log





 INFO 21:30:40,944 read 0 from saved key cache INFO 21:30:40,949 read 0 from saved key cache INFO 21:30:40,950 read 0 from saved key cache INFO 21:30:40,952 read 0 from saved key cache





 INFO 21:30:40,953 read 0 from saved key cache INFO 21:30:41,007 loading row cache for LocationInfo of system INFO 21:30:41,007 completed loading (1 ms; 0 keys)  row cache for LocationInfo of system





 INFO 21:30:41,008 loading row cache for HintsColumnFamily of system INFO 21:30:41,009 completed loading (1 ms; 0 keys)  row cache for HintsColumnFamily of system INFO 21:30:41,010 loading row cache for Migrations of system





 INFO 21:30:41,010 completed loading (1 ms; 0 keys)  row cache for Migrations of system INFO 21:30:41,014 loading row cache for Schema of system INFO 21:30:41,014 completed loading (0 ms; 0 keys)  row cache for Schema of system





 INFO 21:30:41,015 loading row cache for IndexInfo of system INFO 21:30:41,016 completed loading (0 ms; 0 keys)  row cache for IndexInfo of system INFO 21:30:41,121 Couldn't detect any schema definitions in local storage.





 INFO 21:30:41,123 Found table data in data directories. Consider using JMX to call orgapache.cassandra.service.StorageService.loadSchemaFromYaml(). INFO 21:30:41,126 No commitlog files found; skipping replay





 INFO 21:30:41,165 Upgrading to 0.7. Purging hints if there are any. Old hints will be snapshotted. INFO 21:30:41,223 Cassandra version: 0.7.0-beta3 INFO 21:30:41,224 Thrift API version: 19.4.0





 INFO 21:30:41,240 Loading persisted ring state INFO 21:30:41,251 Starting up server gossip INFO 21:30:41,268 switching in a fresh Memtable for LocationInfo at CommitLogContext(file='/var/lib/cassandra/commitlog/CommitLog-1289939440822.log', position=700)





 INFO 21:30:41,270 Enqueuing flush of memtable-locationi...@1085278557(227 bytes, 4 operations) INFO 21:30:41,272 Writing memtable-locationi...@1085278557(227 bytes, 4 operations) INFO 21:30:41,536 Completed flushing /var/lib/cassandra/data/system/LocationInfo-e-1-Data.db





 WARN 21:30:41,622 Generated random token 77213727368801109223786819704694530797. Random tokens will result in an unbalanced ring; see http:

Re: Cassandra 0.7-beta3 - IndexOutOfBoundsException when create column family

2010-11-16 Thread André Fiedler
Ah ok, didn´t know that. Now it starts up, but throws a new exception:

- Log --

[defa...@test] create column family Test with comparator=LexicalUUIDType and
column_metadata=[{column_name:test1, validation_class:LexicalUUIDType,
index_type:0, index_name:test1},{column_name:test2,
validation_class:UTF8Type, index_type:0,
index_name:test2},{column_name:test3,
validation_class:UTF8Type},{column_name:test4,
validation_class:LexicalUUIDType, index_type:0,
index_name:test4},{column_name:test5, validation_class:BytesType,
index_type:0, index_name:test5},{column_name:test6,
validation_class:BytesType, index_type:0,
index_name:test6},{column_name:test7, validation_class:LongType,
index_type:0, index_name:test7},{column_name:test8,
validation_class:BytesType, index_type:0,
index_name:test8},{column_name:test9,
validation_class:UTF8Type},{column_name:test10,
validation_class:LongType},{column_name:test11,
validation_class:UTF8Type},{column_name:test12,
validation_class:LongType},{column_name:test13,
validation_class:LongType},{column_name:test14,
validation_class:LexicalUUIDType, index_type:0, index_name:test14}]
Invalid UUID string: test1
[defa...@test]


2010/11/16 Aaron Morton 

> did you do a clean and then build ? "ant clean" then "ant jar"
>
> Aaron
>
>
> On 17 Nov, 2010,at 10:10 AM, André Fiedler 
> wrote:
>
> Latest branch doesn´t start:
>
> - Log --
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/cassandra/thrift/CassandraDaemon
> Caused by: java.lang.ClassNotFoundException:
> org.apache.cassandra.thrift.CassandraDaemon
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>  at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>
>
>
> 2010/11/16 André Fiedler 
>
>> Thx! :o) so i will do
>>
>> 2010/11/16 Jake Luciani 
>>
>>
>> This is a bug in beta3, if you checkout the cassandra-0.7 branch it should
>>> work for you.
>>>
>>>
>>>
>>> On Tue, Nov 16, 2010 at 3:38 PM, André Fiedler <
>>> fiedler.an...@googlemail.com> wrote:
>>>
 I try to perform the following action after a clean startup. And get the
 log below. How to fix this?

 - Action --

 create column family Test with comparator=LexicalUUIDType and
 column_metadata=[

 {column_name:test1, validation_class:LexicalUUIDType, index_type:0,
 index_name:test1},

 {column_name:test2, validation_class:UTF8Type, index_type:0,
 index_name:test2},

 {column_name:test3, validation_class:UTF8Type},

 {column_name:test4, validation_class:LexicalUUIDType, index_type:0,
 index_name:test4},

 {column_name:test5, validation_class:BytesType, index_type:0,
 index_name:test5},

 {column_name:test6, validation_class:BytesType, index_type:0,
 index_name:test6},

 {column_name:test7, validation_class:LongType, index_type:0,
 index_name:test7},

 {column_name:test8, validation_class:BytesType, index_type:0,
 index_name:test8},

 {column_name:test9, validation_class:UTF8Type},

 {column_name:test10, validation_class:LongType},

 {column_name:test11, validation_class:UTF8Type},

 {column_name:test12, validation_class:LongType},

 {column_name:test13, validation_class:LongType},

 {column_name:test14, validation_class:LexicalUUIDType, index_type:0,
 index_name:test14}

 ]


 - Log --

  INFO 21:30:40,004 Heap size: 1069416448/1069416448
  INFO 21:30:40,098 JNA not found. Native methods will be disabled.
  INFO 21:30:40,151 Loading settings from
 file:/Applications/apache-cassandra-0.7.0-beta3/conf/cassandra.yaml
  INFO 21:30:40,569 DiskAccessMode 'auto' determined to be mmap,
 indexAccessMode is mmap
  INFO 21:30:40,822 Creating new commitlog segment
 /var/lib/cassandra/commitlog/CommitLog-1289939440822.log
  INFO 21:30:40,944 read 0 from saved key cache
  INFO 21:30:40,949 read 0 from saved key cache
  INFO 21:30:40,950 read 0 from saved key cache
  INFO 21:30:40,952 read 0 from saved key cache
  INFO 21:30:40,953 read 0 from saved key cache
  INFO 21:30:41,007 loading row cache for LocationInfo of system
  INFO 21:30:41,007 completed loading (1 ms; 0 keys)  row cache for
 LocationInfo of system
  INFO 21:30:41,008 loading row cache for HintsColumnFamily of system
  INFO 21:30:41,009 completed loading (1 ms; 0 keys)  row cache for
 HintsColumnFamily of system
 

Re: Cassandra 0.7-beta3 - IndexOutOfBoundsException when create column family

2010-11-16 Thread Aaron Morton
Your CF meta data says the column names are UUID's (comparator=LexicalUUIDType) but your column_metadata says the name of one of the columns is "test1" (and test2 etc). This is not a valid UUID. Either change the comparator or use UUID's for the column names in the column_metadata.  AaronOn 17 Nov, 2010,at 10:29 AM, André Fiedler  wrote:Ah ok, didn´t know that. Now it starts up, but throws a new exception:- Log --[defa...@test] create column family Test with comparator=LexicalUUIDType and column_metadata=[{column_name:test1, validation_class:LexicalUUIDType, index_type:0, index_name:test1},{column_name:test2, validation_class:UTF8Type, index_type:0, index_name:test2},{column_name:test3, validation_class:UTF8Type},{column_name:test4, validation_class:LexicalUUIDType, index_type:0, index_name:test4},{column_name:test5, validation_class:BytesType, index_type:0, index_name:test5},{column_name:test6, validation_class:BytesType, index_type:0, index_name:test6},{column_name:test7, validation_class:LongType, index_type:0, index_name:test7},{column_name:test8, validation_class:BytesType, index_type:0, index_name:test8},{column_name:test9, validation_class:UTF8Type},{column_name:test10, validation_class:LongType},{column_name:test11, validation_class:UTF8Type},{column_name:test12, validation_class:LongType},{column_name:test13, validation_class:LongType},{column_name:test14, validation_class:LexicalUUIDType, index_type:0, index_name:test14}]

Invalid UUID string: test1[defa...@test] 2010/11/16 Aaron Morton 

did you do a clean and then build ? "ant clean" then "ant jar"

AaronOn 17 Nov, 2010,at 10:10 AM, André Fiedler  wrote:

Latest branch doesn´t start:- Log --

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/cassandra/thrift/CassandraDaemon

Caused by: java.lang.ClassNotFoundException: org.apache.cassandra.thrift.CassandraDaemon	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

	at java.security.AccessController.doPrivileged(Native Method)	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)



	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)



	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)2010/11/16 André Fiedler 



Thx! :o) so i will do2010/11/16 Jake Luciani 


This is a bug in beta3, if you checkout the cassandra-0.7 branch it should work for you.On Tue, Nov 16, 2010 at 3:38 PM, André Fiedler  wrote:





I try to perform the following action after a clean startup. And get the log below. How to fix this?





- Action --







create column family Test with comparator=LexicalUUIDType and column_metadata=[
    {column_name:test1, validation_class:LexicalUUIDType, index_type:0, index_name:test1},
    {column_name:test2, validation_class:UTF8Type, index_type:0, index_name:test2},
    {column_name:test3, validation_class:UTF8Type},
    {column_name:test4, validation_class:LexicalUUIDType, index_type:0, index_name:test4},
    {column_name:test5, validation_class:BytesType, index_type:0, index_name:test5},
    {column_name:test6, validation_class:BytesType, index_type:0, index_name:test6},
    {column_name:test7, validation_class:LongType, index_type:0, index_name:test7},
    {column_name:test8, validation_class:BytesType, index_type:0, index_name:test8},
    {column_name:test9, validation_class:UTF8Type},
    {column_name:test10, validation_class:LongType},
    {column_name:test11, validation_class:UTF8Type},
    {column_name:test12, validation_class:LongType},
    {column_name:test13, validation_class:LongType},
    {column_name:test14, validation_class:LexicalUUIDType, index_type:0, index_name:test14}
]- Log --

 INFO 21:30:40,004 Heap size: 1069416448/1069416448 INFO 21:30:40,098 JNA not found. Native methods will be disabled. INFO 21:30:40,151 Loading settings from file:/Applications/apache-cassandra-0.7.0-beta3/conf/cassandra.yaml







 INFO 21:30:40,569 DiskAccessMode 'auto' determined to be mmap, indexAccessMode is mmap INFO 21:30:40,822 Creating new commitlog segment /var/lib/cassandra/commitlog/CommitLog-1289939440822.log







 INFO 21:30:40,944 read 0 from saved key cache INFO 21:30:40,949 read 0 from saved key cache INFO 21:30:40,950 read 0 from saved key cache INFO 21:30:40,952 read 0 from saved key cache







 INFO 21:30:40,953 read 0 from saved key cache INFO 21:30:41,007 loading row cache for LocationInfo of system INFO 21:30:41,007 completed loading (1 ms; 0 keys)  row cache for LocationInfo of system







 INFO 21:30:41,008 loading row cache for HintsColumnFamily of system INFO 21:30:41,009 completed loading (1 ms; 0 keys)  row c

Question about load balancing.

2010-11-16 Thread Brayton Thompson
.7 beta 2 here
I've been reading about load balancing and some sites seem to imply that using 
the random partitioner will keeps your nodes fairly well balanced. I am
using a 3 node cluster. 1 seed and two others with AutoBootstrap on. 

Now i have read that autobootstrap can leave your nodes unbalanced, but doesn't 
that only effect existing data? So all new data should be distributed evenly 
from here on out? 

This is not what I am experiencing, so I must be wrong. Of the three nodes, one 
is twice as big as another and the third has less than 1% of total data. I have 
inserted roughly 1.5 million rows into a single CF totaling roughly 600 mb's in 
data. Is this too small to be a good test?

Thank you for your time.

Re: Cassandra 0.7-beta3 - IndexOutOfBoundsException when create column family

2010-11-16 Thread André Fiedler
Ah ok, i thougt the comparator is used to compare CF keys... now the
exception makes sense to me. Thx! :o)


2010/11/16 Aaron Morton 

> Your CF meta data says the column names are UUID's
> (comparator=LexicalUUIDType) but your column_metadata says the name of one
> of the columns is "test1" (and test2 etc). This is not a valid UUID.
>
> Either change the comparator or use UUID's for the column names in the
> column_metadata.
>
>
> Aaron
>
>
> On 17 Nov, 2010,at 10:29 AM, André Fiedler 
> wrote:
>
> Ah ok, didn´t know that. Now it starts up, but throws a new exception:
>
> - Log --
>
> [defa...@test] create column family Test with comparator=LexicalUUIDType
> and column_metadata=[{column_name:test1, validation_class:LexicalUUIDType,
> index_type:0, index_name:test1},{column_name:test2,
> validation_class:UTF8Type, index_type:0,
> index_name:test2},{column_name:test3,
> validation_class:UTF8Type},{column_name:test4,
> validation_class:LexicalUUIDType, index_type:0,
> index_name:test4},{column_name:test5, validation_class:BytesType,
> index_type:0, index_name:test5},{column_name:test6,
> validation_class:BytesType, index_type:0,
> index_name:test6},{column_name:test7, validation_class:LongType,
> index_type:0, index_name:test7},{column_name:test8,
> validation_class:BytesType, index_type:0,
> index_name:test8},{column_name:test9,
> validation_class:UTF8Type},{column_name:test10,
> validation_class:LongType},{column_name:test11,
> validation_class:UTF8Type},{column_name:test12,
> validation_class:LongType},{column_name:test13,
> validation_class:LongType},{column_name:test14,
> validation_class:LexicalUUIDType, index_type:0, index_name:test14}]
> Invalid UUID string: test1
> [defa...@test]
>
>
> 2010/11/16 Aaron Morton 
>
>> did you do a clean and then build ? "ant clean" then "ant jar"
>>
>> Aaron
>>
>>
>>
>> On 17 Nov, 2010,at 10:10 AM, André Fiedler 
>> wrote:
>>
>>
>> Latest branch doesn´t start:
>>
>> - Log --
>>
>>
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/apache/cassandra/thrift/CassandraDaemon
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.cassandra.thrift.CassandraDaemon
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>>  at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>>  at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>>  at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>>
>>
>>
>>
>> 2010/11/16 André Fiedler 
>>
>>>
>>> Thx! :o) so i will do
>>>
>>>
>>> 2010/11/16 Jake Luciani 
>>>
>>>
>>>
 This is a bug in beta3, if you checkout the cassandra-0.7 branch it
 should work for you.




 On Tue, Nov 16, 2010 at 3:38 PM, André Fiedler <
 fiedler.an...@googlemail.com> wrote:

>
> I try to perform the following action after a clean startup. And get
> the log below. How to fix this?
>
> - Action --
>
>
> create column family Test with comparator=LexicalUUIDType and
> column_metadata=[
>
> {column_name:test1, validation_class:LexicalUUIDType, index_type:0,
> index_name:test1},
>
> {column_name:test2, validation_class:UTF8Type, index_type:0,
> index_name:test2},
>
> {column_name:test3, validation_class:UTF8Type},
>
> {column_name:test4, validation_class:LexicalUUIDType, index_type:0,
> index_name:test4},
>
> {column_name:test5, validation_class:BytesType, index_type:0,
> index_name:test5},
>
> {column_name:test6, validation_class:BytesType, index_type:0,
> index_name:test6},
>
> {column_name:test7, validation_class:LongType, index_type:0,
> index_name:test7},
>
> {column_name:test8, validation_class:BytesType, index_type:0,
> index_name:test8},
>
> {column_name:test9, validation_class:UTF8Type},
>
> {column_name:test10, validation_class:LongType},
>
> {column_name:test11, validation_class:UTF8Type},
>
> {column_name:test12, validation_class:LongType},
>
> {column_name:test13, validation_class:LongType},
>
> {column_name:test14, validation_class:LexicalUUIDType,
> index_type:0, index_name:test14}
>
> ]
>
>
> - Log --
>
>
>  INFO 21:30:40,004 Heap size: 1069416448/1069416448
>  INFO 21:30:40,098 JNA not found. Native methods will be disabled.
>  INFO 21:30:40,151 Loading settings from
> file:/Applications/apache-cassandra-0.7.0-beta3/conf/cassandra.yaml
>  INFO 21:30:40,569 DiskAccessMode 'auto' determined to be mmap,
> indexAccessMode is mmap
>  INFO 21:30:40,822 Crea

Re: Question about load balancing.

2010-11-16 Thread Aaron Morton
Take a look at the sections on Load Balance and Token Selection here http://wiki.apache.org/cassandra/OperationsAFAIK the best approach is to list the initial tokens for your nodes in their cassandra.yaml. Nodes will choose random tokens with the Random Partitioner, which will not result in an even distribution. The best approach is to manually select them using approach linked above. AOn 17 Nov, 2010,at 10:56 AM, Brayton Thompson  wrote:.7 beta 2 here
I've been reading about load balancing and some sites seem to imply that using the random partitioner will keeps your nodes fairly well balanced. I am
using a 3 node cluster. 1 seed and two others with AutoBootstrap on. 

Now i have read that autobootstrap can leave your nodes unbalanced, but doesn't that only effect existing data? So all new data should be distributed evenly from here on out? 

This is not what I am experiencing, so I must be wrong. Of the three nodes, one is twice as big as another and the third has less than 1% of total data. I have inserted roughly 1.5 million rows into a single CF totaling roughly 600 mb's in data. Is this too small to be a good test?

Thank you for your time.

Re: Starting up cassandra 0.7

2010-11-16 Thread CassUser CassUser
Looked at how DatabaseDescriptor is loading the yaml file.  Using that
approach solves the problem with the column_families mapping exception.

The problems we are running into currently is regarding a known dataset not
being loaded into our test instance correctly.

Steps:
1.  Create temp directory to host cassandra test instance
2.  Create keyspace directories
3.  Update yaml file, and copy to test location
4.  Add schema from yaml using DatabaseDescriptor.
readTablesFromYaml() & DatabaseDescriptor.
setTableDefinition
4.  Use SSTableImport.importJson to setup a known dataset.  We have JSON
files converted to 0.7 compliant (byte [] rows)
5.  Start Cassandra instance using the EmbeddedCassandraService class

Everything appears to work from the log messages.  I get the message "
Sampling index for ..", and finally "Listening for thrift clients...".  When
i use a client to query the data in test instance, I notice keys with no
columns/values stored (via keyrange slice).  Using a open ended column slice
for a known key I'm getting zero results.

I'm currently running cassandra 0.7. beta2.  Is the steps I've outlined
above suppose to work in 0.7?  We did something similar in 0.6.4 without any
problems.  Is there known bugs I can look into?

Thanks.


On Tue, Nov 16, 2010 at 12:24 PM, Aaron Morton wrote:

> I've not used the embedded service.
>
> The code in o.a.c.service.EmbeddedCassandraService says it will read the
> yaml file. If the cluster does not have a schema stored I think it will load
> the one from yaml.
>
> Have you tried starting it up with an empty system data dir ? Does it
> pickup the schema from the yaml?
>
> Aaron
>
> On 17 Nov, 2010,at 09:17 AM, CassUser CassUser  wrote:
>
> Loading yaml file like so:
> FileInputStream yamlInputStream = new FileInputStream(
> configTemplateFile);
> Constructor constructor = new Constructor(Config.class);
> Yaml yaml = new Yaml(new Loader(constructor));
> Config conf = (Config) yaml.load(yamlInputStream);
>
> Fails on the last line.
>
> Although if i have the CFs defined like this:
> keyspaces:
> - column_families:
>   - !!org.apache.cassandra.config.RawColumnFamily
> column_metadata: []
> column_type: null
> comment: null
> compare_subcolumns_with: null
> compare_with: BytesType
> default_validation_class: null
> gc_grace_seconds: 864000
> keys_cached: 20.0
> max_compaction_threshold: 32
> min_compaction_threshold: 4
> name: Similarity
> preload_row_cache: false
> read_repair_chance: 1.0
> rows_cached: 0.0
>
>
> it appears to startup.  Any idea whats going on here?
>
>
> On Tue, Nov 16, 2010 at 11:58 AM, CassUser CassUser wrote:
>
>> This is embedded for testing cassandra 0.7 beta2.  using
>> EmbeddedCassandraService.
>>
>> and manually adding schema programmatically using:
>> for (KSMetaData table : DatabaseDescriptor.readTablesFromYaml()) {
>> for (CFMetaData cfm : table.cfMetaData().values()) {
>> CFMetaData.map(cfm);
>> }
>> DatabaseDescriptor.setTableDefinition(table,
>> DatabaseDescriptor.getDefsVersion());
>> }
>>
>> Is this the correct way to start up a test server, with the schema loaded?
>>
>>
>>
>>
>> On Tue, Nov 16, 2010 at 11:41 AM, Aaron Morton 
>> wrote:
>>
>>> AFAIK the ArrayStoreException is similar to a type mismatch. Is it
>>> possible you have something mixed up in your class path or source code if
>>> you built from source?
>>>
>>> It looks like the column family info was deserialised into a
>>> o.a.c.config.RawColumnFamily but when that object was added to the
>>> RawColumnFamily[] array on o.a.c.config.RawKeyspace if was the wrong type.
>>>
>>> Have you tried a clean build ? There are some things in the call stack
>>> which look custom, are you starting from the command line or is this
>>> embedded for testing?
>>>
>>> Hope that helps.
>>> Aaron
>>>
>>>
>>>
>>>
>>>
>>> On 17 Nov, 2010,at 08:09 AM, CassUser CassUser 
>>> wrote:
>>>
>>>
>>> Here is the yaml:
>>>
>>> # Cassandra YAML generated from previous config
>>> # Configuration wiki:
>>> http://wiki.apache.org/cassandra/StorageConfiguration
>>> authenticator: org.apache.cassandraauth.AllowAllAuthenticator
>>>
>>> auto_bootstrap: false
>>> binary_memtable_throughput_in_mb: 256
>>> cluster_name: Test Cluster
>>> column_index_size_in_kb: 64
>>> commitlog_rotation_threshold_in_mb: 128
>>> commitlog_sync: periodic
>>> commitlog_sync_period_in_ms: 1
>>> compaction_thread_priority: 1
>>> concurrent_reads: 8
>>> concurrent_writes: 32
>>> disk_access_mode: auto
>>> dynamic_snitch: false
>>> endpoint_snitch: org.apache.cassandra.locator.SimpleSnitch
>>> request_scheduler: org.apache.cassandra.scheduler.RoundRobinScheduler
>>> request_scheduler_id: keyspace
>>> hinted_handoff_enabled: true
>>> in_memory_compaction_limit_in_mb: 128
>>> index_interval: 128
>>> keyspaces:
>>> - name: myKeyspace
>

Re: Starting up cassandra 0.7

2010-11-16 Thread CassUser CassUser
Looking at this closer.  I noticed the following in the SSTableImport Class:

if (col.isDeleted) {
cfamily.addColumn(path, hexToBytes(col.value), new
TimestampClock(col.timestamp));
} else {
cfamily.addTombstone(path, hexToBytes(col.value), new
TimestampClock(col.timestamp));
}

This appears to be backwards.


On Tue, Nov 16, 2010 at 4:03 PM, CassUser CassUser wrote:

> Looked at how DatabaseDescriptor is loading the yaml file.  Using that
> approach solves the problem with the column_families mapping exception.
>
> The problems we are running into currently is regarding a known dataset not
> being loaded into our test instance correctly.
>
> Steps:
> 1.  Create temp directory to host cassandra test instance
> 2.  Create keyspace directories
> 3.  Update yaml file, and copy to test location
> 4.  Add schema from yaml using DatabaseDescriptor.
> readTablesFromYaml() & DatabaseDescriptor.
> setTableDefinition
> 4.  Use SSTableImport.importJson to setup a known dataset.  We have JSON
> files converted to 0.7 compliant (byte [] rows)
> 5.  Start Cassandra instance using the EmbeddedCassandraService class
>
> Everything appears to work from the log messages.  I get the message "
> Sampling index for ..", and finally "Listening for thrift clients...".  When
> i use a client to query the data in test instance, I notice keys with no
> columns/values stored (via keyrange slice).  Using a open ended column slice
> for a known key I'm getting zero results.
>
> I'm currently running cassandra 0.7. beta2.  Is the steps I've outlined
> above suppose to work in 0.7?  We did something similar in 0.6.4 without any
> problems.  Is there known bugs I can look into?
>
> Thanks.
>
>
>
> On Tue, Nov 16, 2010 at 12:24 PM, Aaron Morton wrote:
>
>> I've not used the embedded service.
>>
>> The code in o.a.c.service.EmbeddedCassandraService says it will read the
>> yaml file. If the cluster does not have a schema stored I think it will load
>> the one from yaml.
>>
>> Have you tried starting it up with an empty system data dir ? Does it
>> pickup the schema from the yaml?
>>
>> Aaron
>>
>> On 17 Nov, 2010,at 09:17 AM, CassUser CassUser 
>> wrote:
>>
>> Loading yaml file like so:
>> FileInputStream yamlInputStream = new FileInputStream(
>> configTemplateFile);
>> Constructor constructor = new Constructor(Config.class);
>> Yaml yaml = new Yaml(new Loader(constructor));
>> Config conf = (Config) yaml.load(yamlInputStream);
>>
>> Fails on the last line.
>>
>> Although if i have the CFs defined like this:
>> keyspaces:
>> - column_families:
>>   - !!org.apache.cassandra.config.RawColumnFamily
>> column_metadata: []
>> column_type: null
>> comment: null
>> compare_subcolumns_with: null
>> compare_with: BytesType
>> default_validation_class: null
>> gc_grace_seconds: 864000
>> keys_cached: 20.0
>> max_compaction_threshold: 32
>> min_compaction_threshold: 4
>> name: Similarity
>> preload_row_cache: false
>> read_repair_chance: 1.0
>> rows_cached: 0.0
>>
>>
>> it appears to startup.  Any idea whats going on here?
>>
>>
>> On Tue, Nov 16, 2010 at 11:58 AM, CassUser CassUser 
>> wrote:
>>
>>> This is embedded for testing cassandra 0.7 beta2.  using
>>> EmbeddedCassandraService.
>>>
>>> and manually adding schema programmatically using:
>>> for (KSMetaData table : DatabaseDescriptor.readTablesFromYaml())
>>> {
>>> for (CFMetaData cfm : table.cfMetaData().values()) {
>>> CFMetaData.map(cfm);
>>> }
>>> DatabaseDescriptor.setTableDefinition(table,
>>> DatabaseDescriptor.getDefsVersion());
>>> }
>>>
>>> Is this the correct way to start up a test server, with the schema
>>> loaded?
>>>
>>>
>>>
>>>
>>> On Tue, Nov 16, 2010 at 11:41 AM, Aaron Morton 
>>> wrote:
>>>
 AFAIK the ArrayStoreException is similar to a type mismatch. Is it
 possible you have something mixed up in your class path or source code if
 you built from source?

 It looks like the column family info was deserialised into a
 o.a.c.config.RawColumnFamily but when that object was added to the
 RawColumnFamily[] array on o.a.c.config.RawKeyspace if was the wrong type.

 Have you tried a clean build ? There are some things in the call stack
 which look custom, are you starting from the command line or is this
 embedded for testing?

 Hope that helps.
 Aaron





 On 17 Nov, 2010,at 08:09 AM, CassUser CassUser 
 wrote:


 Here is the yaml:

 # Cassandra YAML generated from previous config
 # Configuration wiki:
 http://wiki.apache.org/cassandra/StorageConfiguration
  authenticator: org.apache.cassandraauth.AllowAllAuthenticator

 auto_bootstrap: false
 binary_memtable_throughput_in_mb: 256
 cluster_n

Re: avro + cassandra + ruby

2010-11-16 Thread Ryan King
On Tue, Nov 16, 2010 at 10:25 AM, Jonathan Ellis  wrote:
> On Tue, Sep 28, 2010 at 6:35 PM, Ryan King  wrote:
>> One thing you should try is to make thrift use
>> BinaryProtocolAccelerated, rather than the pure-ruby implementation
>> (we should change the default).
>
> Dumb question time: how do you do this?
>
> $ find . -name "*.rb" |xargs grep -i binaryprotocol
>
> in the fauna cassandra gem repo turns up no hits.

I believe we're relying on the default from thrift_client (which
defaults to BinaryProtocol): https://github.com/fauna/thrift_client/

-ryan


Efficienct RangeSlice of SuperColumn and Columns in one call

2010-11-16 Thread E S
I am going to have a supercolumn family where some rows can be quite large 
(10-100 mb).  I'd like to be able to pull a subset of this data without having 
to pull the whole thing into memory and send it over the wire.

Each query will be for only one row.  The supercolumn key and the child column 
keys are going to be dates.  I want to query:

"For row 123, give me all the column values whose date are between 1/1/2000 and 
1/1/2005 for the first supercolumn whose date is before 1/1/2009."

Since super columns and columns are sorted by date, it seems like it should be 
pretty efficient to do this in 1 query, but I can't figure out how to do this 
in 
the API.  If I knew the super column name, I could do a slicerange for the key 
with the target supercolumn as parent on a range of dates (1/1/2000-1/1/2005), 
but I only know that I want the first supercolumn before a date.

Thanks for any help!


  


Smart Client Routing

2010-11-16 Thread E S
I am considering building a system as follows:

1.  Data stored in Cassandra
2.  Webservice cluster (stateless) will pull data from cassandra and do 
business 
operations plus security enforcement
3.  Clients will hit the webservice cluster

I'm trying to maintain a low read latency and am worried about the number of 
hops.  Client will hit the webservice.  The webservice will hit a random node 
in 
the cassandra cluster.  The cassandra cluster will then route the the 
appropriate node and the data will flow all the way back.

How many of these hops can I remove?  I would bundle the cassandra and 
webservice processes onto each box.  If I route the webservice to always go to 
the local node, I'll remove one hop.  Is it possible to optimize this further 
so 
that the client can use the cassandra routing logic to go to the webservice 
that 
also houses a cassandra node that contains the data?  In this case, there would 
only be one hop, and if the data is used frequently, I it will likely reside in 
memory without requiring a separate caching layer.  This is an internal 
webservice, so I would be ok with a library on the client side to help with the 
routing.

Is any of this possible?  I was looking at the cassandra apis and couldn't 
figure out a way.

Thanks for any help!



  


Re: Starting up cassandra 0.7

2010-11-16 Thread Aaron Morton
It's certainly looks suspect. I've had a look at the code around SSTableImport and SSTableExport and the isDeleted value for the col is based on IColumn.isMarkedForDelete read when the data was exported. I'll try to have a look tonight, or if someone is still up in the states they may help. The current 0.7 branch has the same code. Are there any other errors in the log? The code sample you've got there uses the TimestampClocks that were once a part of the 0.7 development, but have been removed. So your data sample may not be usable going forwards. Can you jump to beta3?AaronOn 17 Nov, 2010,at 02:03 PM, CassUser CassUser  wrote:Looking at this closer.  I noticed the following in the SSTableImport Class:    if (col.isDeleted) {    cfamily.addColumn(path, hexToBytes(col.value), new TimestampClock(col.timestamp));
    } else {    cfamily.addTombstone(path, hexToBytes(col.value), new TimestampClock(col.timestamp));    }This appears to be backwards.On Tue, Nov 16, 2010 at 4:03 PM, CassUser CassUser  wrote:
Looked at how DatabaseDescriptor is loading the yaml file.  Using that approach solves the problem with the column_families mapping exception.
The problems we are running into currently is regarding a known dataset not being loaded into our test instance correctly.
Steps:1.  Create temp directory to host cassandra test instance2.  Create keyspace directories3  Update yaml file, and copy to test location4.  Add schema from yaml using DatabaseDescriptor.
readTablesFromYaml() & DatabaseDescriptor.setTableDefinition4.  Use SSTableImport.importJson to setup a known dataset.  We have JSON files converted to 0.7 compliant (byte [] rows)5.  Start Cassandra instance using the EmbeddedCassandraService class

Everything appears to work from the log messages.  I get the message " Sampling index for ..", and finally "Listening for thrift clients...".  When i use a client to query the data in test instance, I notice keys with no columns/values stored (via keyrange slice).  Using a open ended column slice for a known key I'm getting zero results.

I'm currently running cassandra 0.7. beta2.  Is the steps I've outlined above suppose to work in 0.7?  We did something similar in 0.6.4 without any problems.  Is there known bugs I can look into?Thanks.

On Tue, Nov 16, 2010 at 12:24 PM, Aaron Morton  wrote:

I've not used the embedded service. The code in o.a.c.service.EmbeddedCassandraService says it will read the yaml file. If the cluster does not have a schema stored I think it will load the one from yaml. 

Have you tried starting it up with an empty system data dir ? Does it pickup the schema from the yaml?Aaron On 17 Nov, 2010,at 09:17 AM, CassUser CassUser  wrote:

Loading yaml file like so:        FileInputStream yamlInputStream = new FileInputStream(                configTemplateFile);
        Constructor constructor = new Constructor(Config.class);        Yaml yaml = new Yaml(new Loader(constructor));
        Config conf = (Config) yaml.load(yamlInputStream);Fails on the last line.Although if i have the CFs defined like this:keyspaces:- column_families:  - !!org.apache.cassandra.config.RawColumnFamily


    column_metadata: []    column_type: null    comment: null    compare_subcolumns_with: null    compare_with: BytesType    default_validation_class: null    gc_grace_seconds: 864000    keys_cached: 20.0


    max_compaction_threshold: 32    min_compaction_threshold: 4    name: Similarity    preload_row_cache: false    read_repair_chance: 1.0    rows_cached: 0.0it appears to startup.  Any idea whats going on here?


On Tue, Nov 16, 2010 at 11:58 AM, CassUser CassUser  wrote:


This is embedded for testing cassandra 0.7 beta2.  using EmbeddedCassandraService.and manually adding schema programmatically using:        for (KSMetaData table : DatabaseDescriptor.readTablesFromYaml()) {



            for (CFMetaData cfm : table.cfMetaData().values()) {                CFMetaData.map(cfm);            }            DatabaseDescriptor.setTableDefinition(table,                    DatabaseDescriptorgetDefsVersion());



        }Is this the correct way to start up a test server, with the schema loaded?On Tue, Nov 16, 2010 at 11:41 AM, Aaron Morton  wrote:



AFAIK the ArrayStoreException is similar to a type mismatch. Is it possible you have something mixed up in your class path or source code if you built from source? 



It looks like the column family info was deserialised into a o.a.c.config.RawColumnFamily but when that object was added to the RawColumnFamily[] array on o.a.c.config.RawKeyspace if was the wrong type. 



Have you tried a clean build ? There are some things in the call stack which look custom, are you starting from the command line or is this embedded for testing?Hope that helps.



AaronOn 17 Nov, 2010,at 08:09 AM, CassUser CassUser 

Re: Efficienct RangeSlice of SuperColumn and Columns in one call

2010-11-16 Thread Aaron Morton
Super columns have some limitations http://wiki.apache.org/cassandra/CassandraLimitationsit's not possible to bring back a range of super columns, as you say you can specify one or zero super column names in your ColumnParent. You could use standard CF's, and do two reads. First one would be the Super Col part of your query below to find the first day. Second would be to get all the values for that day from one row. You can treat cassandra as an indexing building machine, and make a couple of requests to get your final data. There are also index operations available in 07. I'm not up to date enough with them to recommend an approach. Hope that helps. AaronOn 17 Nov, 2010,at 03:21 PM, E S  wrote:I am going to have a supercolumn family where some rows can be quite large 
(10-100 mb).  I'd like to be able to pull a subset of this data without having 
to pull the whole thing into memory and send it over the wire.

Each query will be for only one row.  The supercolumn key and the child column 
keys are going to be dates.  I want to query:

"For row 123, give me all the column values whose date are between 1/1/2000 and 
1/1/2005 for the first supercolumn whose date is before 1/1/2009."

Since super columns and columns are sorted by date, it seems like it should be 
pretty efficient to do this in 1 query, but I can't figure out how to do this in 
the API.  If I knew the super column name, I could do a slicerange for the key 
with the target supercolumn as parent on a range of dates (1/1/2000-1/1/2005), 
but I only know that I want the first supercolumn before a date.

Thanks for any help!


  


Re: Smart Client Routing

2010-11-16 Thread Aaron Morton
No need to worry. I run REST requests through Varnish box > nginx / Tornaod / Python box > Cassandra cluster and can get requests in and out of the stack in a couple of milliseconds. Using some old workstation HW and not paying much attention to tuning. Build it like a normal system and separate out the parts, if / when you have problems then you can look at tuning the cassandra cluster or other parts of the stack. There are normally a number of other issues to deal with before network IO.Hope that helps. AaronOn 17 Nov, 2010,at 03:31 PM, E S  wrote:I am considering building a system as follows:

1.  Data stored in Cassandra
2.  Webservice cluster (stateless) will pull data from cassandra and do business 
operations plus security enforcement
3.  Clients will hit the webservice cluster

I'm trying to maintain a low read latency and am worried about the number of 
hops.  Client will hit the webservice.  The webservice will hit a random node in 
the cassandra cluster.  The cassandra cluster will then route the the 
appropriate node and the data will flow all the way back.

How many of these hops can I remove?  I would bundle the cassandra and 
webservice processes onto each box.  If I route the webservice to always go to 
the local node, I'll remove one hop.  Is it possible to optimize this further so 
that the client can use the cassandra routing logic to go to the webservice that 
also houses a cassandra node that contains the data?  In this case, there would 
only be one hop, and if the data is used frequently, I it will likely reside in 
memory without requiring a separate caching layer.  This is an internal 
webservice, so I would be ok with a library on the client side to help with the 
routing.

Is any of this possible?  I was looking at the cassandra apis and couldn't 
figure out a way.

Thanks for any help!