Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E2ED2CD9D for ; Thu, 31 May 2012 18:39:29 +0000 (UTC) Received: (qmail 62755 invoked by uid 500); 31 May 2012 18:39:27 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 62727 invoked by uid 500); 31 May 2012 18:39:27 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 62716 invoked by uid 99); 31 May 2012 18:39:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 May 2012 18:39:27 +0000 X-ASF-Spam-Status: No, hits=-9.7 required=5.0 tests=ENV_AND_HDR_SPF_MATCH,HTML_MESSAGE,RCVD_IN_DNSWL_HI,SPF_PASS,TRACKER_ID,USER_IN_DEF_SPF_WL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of simchen@paypal.com designates 216.33.244.6 as permitted sender) Received: from [216.33.244.6] (HELO rhv-mipot-001.corp.ebay.com) (216.33.244.6) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 May 2012 18:39:22 +0000 DomainKey-Signature: s=ppcorp; d=paypal.com; c=nofws; q=dns; h=X-EBay-Corp:X-IronPort-AV:Received:Received:From:To: Subject:Thread-Topic:Thread-Index:Date:Message-ID: Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:x-originating-ip:x-ems-proccessed: x-ems-stamp:Content-Type:MIME-Version:X-CFilter; b=ELgnzFe+jfB2jGMZUL0xiQYsKtNXwYiIehogc7hxO82Xc7KpzJLsmTb9 Yx2/hBaibXjzEXzTtqtJ7x8hPX4MeebTQeZTV1qmLg5zaFseHrLJRrp7E QKqRZrwT0GKTI2x; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paypal.com; i=simchen@paypal.com; q=dns/txt; s=ppcorp; t=1338489562; x=1370025562; h=from:to:subject:date:message-id:mime-version; bh=g59QBY31cvilEeoRy94IfQlS3NkIIE2SOPOIHYMflEI=; b=KDBWAwyOaMZ3JPCh+dklz1TaoQNgDfb+fH8rzPn22wjLEFj9JwVZZNOc kSwzRhZxx44vEYkWsSbKEBORDVro+7Rlio4SYV6KZ8honJH3WdW7Op6QO nGO82HAuX3H2eqS; X-EBay-Corp: Yes X-IronPort-AV: E=Sophos;i="4.75,693,1330934400"; d="scan'208,217";a="64352659" Received: from rhv-vtenf-002.corp.ebay.com (HELO RHV-EXMHT-002.corp.ebay.com) ([10.112.113.53]) by rhv-mipot-001.corp.ebay.com with ESMTP; 31 May 2012 11:39:01 -0700 Received: from RHV-EXRDA-S11.corp.ebay.com ([fe80::edc0:9413:d700:64f]) by RHV-EXMHT-002.corp.ebay.com ([fe80::28ad:1e3c:98e1:6821%14]) with mapi id 14.01.0339.001; Thu, 31 May 2012 11:38:57 -0700 From: "Chen, Simon" To: "user@cassandra.apache.org" Subject: newbie question :got error 'org.apache.thrift.transport.TTransportException' Thread-Topic: newbie question :got error 'org.apache.thrift.transport.TTransportException' Thread-Index: Ac0/XBuiFbf2idLnSgaXt4C1SjToFQ== Date: Thu, 31 May 2012 18:38:57 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.245.27.243] x-ems-proccessed: 10SqDH0iR7ekR7SRpKqm5A== x-ems-stamp: FzjXyUQzGM7+RXDvYLGqCQ== Content-Type: multipart/alternative; boundary="_000_E5424954A5504D4985F3124FFF20847102ABF3RHVEXRDAS11corpeb_" MIME-Version: 1.0 X-CFilter: Scanned X-Virus-Checked: Checked by ClamAV on apache.org --_000_E5424954A5504D4985F3124FFF20847102ABF3RHVEXRDAS11corpeb_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, I am new to Cassandra. I have started a Cassandra instance (Cassandra.bat), played with it for a = while, created a keyspace Zodiac. When I kill Cassandra instance and restarted, the keyspace is gone but when= I tried to recreate it, I got 'org.apache.thrift.transport.TTransportException' error. What have I = done wrong here? Following are screen shots: C:\cassandra-1.1.0>bin\cassandra-cli -host localhost -f C:\NoSqlProjects\dr= opZ.txt Starting Cassandra Client Connected to: "ssc2Cluster" on localhost/9160 Line 1 =3D> Keyspace 'Zodiac' not found. C:\cassandra-1.1.0>bin\cassandra-cli -host localhost -f C:\NoSqlProjects\us= ageDB.txt Starting Cassandra Client Connected to: "ssc2Cluster" on localhost/9160 Line 1 =3D> org.apache.thrift.transport.TTransportException Following is part of server error message: INFO 11:09:56,761 Node localhost/127.0.0.1 state jump to normal INFO 11:09:56,761 Bootstrap/Replace/Move completed! Now serving reads. INFO 11:09:56,761 Will not load MX4J, mx4j-tools.jar is not in the classpat= h INFO 11:09:56,781 Binding thrift service to localhost/127.0.0.1:9160 INFO 11:09:56,781 Using TFastFramedTransport with a max frame size of 15728= 640 bytes. INFO 11:09:56,791 Using synchronous/threadpool thrift server on localhost/1= 27.0.0.1 : 9160 INFO 11:09:56,791 Listening for thrift clients... INFO 11:20:06,044 Enqueuing flush of Memtable-schema_keyspaces@1062244145(1= 84/230 serialized/live bytes, 4 ops) INFO 11:20:06,054 Writing Memtable-schema_keyspaces@1062244145(184/230 seri= alized/live bytes, 4 ops) INFO 11:20:06,074 Completed flushing c:\cassandra_data\data\system\schema_k= eyspaces\system-schema_keyspaces-hc-62-Data. b (240 bytes) RROR 11:20:06,134 Exception in thread Thread[MigrationStage:1,5,main] ava.lang.AssertionError at org.apache.cassandra.db.DefsTable.updateKeyspace(DefsTable.java:4= 41) at org.apache.cassandra.db.DefsTable.mergeKeyspaces(DefsTable.java:3= 39) at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java:269) at org.apache.cassandra.service.MigrationManager$1.call(MigrationMan= ager.java:214) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown So= urce) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source= ) at java.lang.Thread.run(Unknown Source) RROR 11:20:06,134 Error occurred during processing of message. ava.lang.RuntimeException: java.util.concurrent.ExecutionException: java.la= ng.AssertionError usageDB.txt: create keyspace Zodiac with placement_strategy =3D 'org.apache.cassandra.locator.SimpleStrateg= y' and strategy_options =3D {replication_factor:1}; use Zodiac; create column family ServiceUsage with comparator =3D UTF8Type and default_validation_class =3D UTF8Type and key_validation_class =3D LongType AND column_metadata =3D [ {column_name: 'TASK_ID', validation_class: IntegerType} {column_name: 'USAGE_COUNT', validation_class: IntegerType} {column_name: 'USAGE_TYPE', validation_class: UTF8Type} ]; From: Chong Zhang [mailto:chongz.zhang@gmail.com] Sent: Thursday, May 31, 2012 8:47 AM To: user@cassandra.apache.org Subject: Re: tokens and RF for multiple phases of deployment Thanks Aaron. I might use LOCAL_QUORUM to avoid the waiting on the ack from DC2. Another question, after I setup a new node with token +1 in a new DC, and = updated a CF with RF {DC1:2, DC2:1}. When i update a column on one node in = DC1, it's also updated in the new node in DC2. But all the other rows are n= ot in the new node. Do I need to copy the data files from a node in DC1 to = the new node? The ring (2 in DC1, 1 in DC2) looks OK, but the load on the new node in DC2= is almost 0%. Address DC Rack Status State Load Owns= Token = 85070591730234615865843651857942052864 10.10.10.1 DC1 RAC1 Up Normal 313.99 MB 50.00%= 0 10.10.10.3 DC2 RAC1 Up Normal 7.07 MB 0.00= % 1 10.10.10.2 DC1 RAC1 Up Normal 288.91 MB 50.00%= 85070591730234615865843651857942052864 Thanks, Chong On Thu, May 31, 2012 at 5:48 AM, aaron morton > wrote: Could you provide some guide on how to assign the tokens in this growing de= ployment phases? background http://www.datastax.com/docs/1.0/install/cluster_init#calculatin= g-tokens-for-a-multi-data-center-cluster Start with tokens for a 4 node cluster. Add the next 4 between between each= of the ranges. Add 8 in the new DC to have the same tokens as the first DC= +1 Also if we use the same RF (3) in both DC, and use EACH_QUORUM for write an= d LOCAL_QUORUM for read, can the read also reach to the 2nd cluster? No. It will fail if there are not enough nodes available in the first DC. We'd like to keep both write and read on the same cluster. Writes go to all replicas. Using EACH_QUORUM means the client in the first = DC will be waiting for the quorum from the second DC to ack the write. Cheers ----------------- Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 31/05/2012, at 3:20 AM, Chong Zhang wrote: Hi all, We are planning to deploy a small cluster with 4 nodes in one DC first, and= will expend that to 8 nodes, then add another DC with 8 nodes for fail ove= r (not active-active), so all the traffic will go to the 1st cluster, and s= witch to 2nd cluster if the whole 1st cluster is down or on maintenance. Could you provide some guide on how to assign the tokens in this growing de= ployment phases? I looked at some docs but not very clear on how to assign = tokens on the fail-over case. Also if we use the same RF (3) in both DC, and use EACH_QUORUM for write an= d LOCAL_QUORUM for read, can the read also reach to the 2nd cluster? We'd l= ike to keep both write and read on the same cluster. Thanks in advance, Chong --_000_E5424954A5504D4985F3124FFF20847102ABF3RHVEXRDAS11corpeb_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

  I am new to Cassan= dra.

 I have started a Ca= ssandra instance (Cassandra.bat), played with it for a while, created a key= space Zodiac.

When I kill Cassandra ins= tance and restarted, the keyspace is gone but when I tried to recreate it,<= o:p>

I got 'org.apache.thrift.= transport.TTransportException’ error. What have I done wrong here?

 <= /p>

Following are screen shot= s:

 <= /p>

C:\cassandra-1.1.0>bin= \cassandra-cli -host localhost -f C:\NoSqlProjects\dropZ.txt

Starting Cassandra Client=

Connected to: "ssc2C= luster" on localhost/9160

Line 1 =3D> Keyspace '= Zodiac' not found.

 <= /p>

C:\cassandra-1.1.0>bin= \cassandra-cli -host localhost -f C:\NoSqlProjects\usageDB.txt

Starting Cassandra Client=

Connected to: "ssc2C= luster" on localhost/9160

Line 1 =3D> org.apache= .thrift.transport.TTransportException

 <= /p>

Following is part of serv= er error message:

 <= /p>

INFO 11:09:56,761 Node lo= calhost/127.0.0.1 state jump to normal

INFO 11:09:56,761 Bootstr= ap/Replace/Move completed! Now serving reads.

INFO 11:09:56,761 Will no= t load MX4J, mx4j-tools.jar is not in the classpath

INFO 11:09:56,781 Binding= thrift service to localhost/127.0.0.1:9160

INFO 11:09:56,781 Using T= FastFramedTransport with a max frame size of 15728640 bytes.

INFO 11:09:56,791 Using s= ynchronous/threadpool thrift server on localhost/127.0.0.1 : 9160

INFO 11:09:56,791 Listeni= ng for thrift clients...

INFO 11:20:06,044 Enqueui= ng flush of Memtable-schema_keyspaces@1062244145(184/230 serialized/live by= tes, 4 ops)

INFO 11:20:06,054 Writing= Memtable-schema_keyspaces@1062244145(184/230 serialized/live bytes, 4 ops)=

INFO 11:20:06,074 Complet= ed flushing c:\cassandra_data\data\system\schema_keyspaces\system-schema_ke= yspaces-hc-62-Data.

b (240 bytes)<= /span>

RROR 11:20:06,134 Excepti= on in thread Thread[MigrationStage:1,5,main]

ava.lang.AssertionError

    &= nbsp;  at org.apache.cassandra.db.DefsTable.updateKeyspace(DefsTable.j= ava:441)

    &= nbsp;  at org.apache.cassandra.db.DefsTable.mergeKeyspaces(DefsTable.j= ava:339)

    &= nbsp;  at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java= :269)

    &= nbsp;  at org.apache.cassandra.service.MigrationManager$1.call(Migrati= onManager.java:214)

     =   at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source= )

    &= nbsp;  at java.util.concurrent.FutureTask.run(Unknown Source)

    &= nbsp;  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno= wn Source)

    &= nbsp;  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown S= ource)

    &= nbsp;  at java.lang.Thread.run(Unknown Source)

RROR 11:20:06,134 Error o= ccurred during processing of message.

ava.lang.RuntimeException= : java.util.concurrent.ExecutionException: java.lang.AssertionError

 <= /p>

usageDB.txt:

 <= /p>

create keyspace Zodiac

    with p= lacement_strategy =3D 'org.apache.cassandra.locator.SimpleStrategy'

    and st= rategy_options =3D {replication_factor:1};

 <= /p>

use Zodiac;

 <= /p>

create column family Serv= iceUsage

    with c= omparator =3D UTF8Type

    and de= fault_validation_class =3D UTF8Type

    and ke= y_validation_class =3D LongType

    AND co= lumn_metadata =3D [

    &= nbsp; {column_name: 'TASK_ID', validation_class:  IntegerType}

    &= nbsp; {column_name: 'USAGE_COUNT', validation_class:  IntegerType}

    &= nbsp; {column_name: 'USAGE_TYPE', validation_class: UTF8Type}

   ];

 <= /p>

 <= /p>

 <= /p>

 <= /p>

From: Chong Zh= ang [mailto:chongz.zhang@gmail.com]
Sent: Thursday, May 31, 2012 8:47 AM
To: user@cassandra.apache.org
Subject: Re: tokens and RF for multiple phases of deployment

 

Thanks Aaron.

 

I might use LOCAL_QUORUM to avoid the waiting on the= ack from DC2.

 

Another question, after I setup a new node with toke= n +1 in a new DC,  and updated a CF with RF {DC1:2, DC2:1}. When i= update a column on one node in DC1, it's also updated in the new node in D= C2. But all the other rows are not in the new node. Do I need to copy the data files from a node in DC1 to the new node?=

 

The ring (2 in DC1, 1 in DC2) looks OK, but the load= on the new node in DC2 is almost 0%.

 

Address         DC    =      Rack        Status State   Lo= ad            Owns    Token   =                      = ;               

              &nb= sp;                     &= nbsp;                    =                     &nbs= p;85070591730234615865843651857942052864      

10.10.10.1    DC1       &nb= sp; RAC1        Up     Normal  313.99 MB=       50.00%  0           &nb= sp;                     &= nbsp;         

10.10.10.3    DC2       &nb= sp; RAC1        Up     Normal  7.07 MB &= nbsp;         0.00%   1        = ;                     &nb= sp;             

10.10.10.2    DC1       &nb= sp; RAC1        Up     Normal  288.91 MB=       50.00%  85070591730234615865843651857942052864 &= nbsp;    

 

Thanks,
Chong

 

On Thu, May 31, 2012 at 5:48 AM, aaron morton <aaron@thelastpic= kle.com> wrote:

 

Could you provide some guide on how to assign the to= kens in this growing deployment phases? 

 

background http://www.datastax.com/docs/1.0/install/cluster_in= it#calculating-tokens-for-a-multi-data-center-cluster

 

Start with tokens for a 4 node cluster. Add the next= 4 between between each of the ranges. Add 8 in the new DC to have the same= tokens as the first DC +1

 

Also if we use the same RF (3) in both DC, and use EACH_QUORUM for write and LOCAL_QUORUM for read, can th= e read also reach to the 2nd cluster?

No. It will fail if there are not enough nodes avail= able in the first DC. 

 

We'd like to keep both write and read on = the same cluster.

Writes go to all replicas. Using EACH_QUORUM means t= he client in the first DC will be waiting for the quorum from the second DC= to ack the write. 

 

 

Cheers

-----------------

Aaron Morton

Freelance Developer=

@aaronmorton

 

On 31/05/2012, at 3:20 AM, Chong Zhang wrote:



Hi all,

 

We are planning to deploy a small cluster with 4 nod= es in one DC first, and will expend that to 8 nodes, then add another DC wi= th 8 nodes for fail over (not active-active), so all the traffic will go to= the 1st cluster, and switch to 2nd cluster if the whole 1st cluster is down or on maintenance. 

 

Could you provide some guide on how to assign the to= kens in this growing deployment phases? I looked at some docs but not very = clear on how to assign tokens on the fail-over case.

Also if we use the same RF (3) in both DC, and use EACH_QUORUM for write and LOCAL_QUORUM for read, can th= e read also reach to the 2nd cluster? We'd like to keep both write and read on the same cluster.

 

Thanks in advance,

Chong

 

 

--_000_E5424954A5504D4985F3124FFF20847102ABF3RHVEXRDAS11corpeb_--