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 61271DE96 for ; Wed, 31 Oct 2012 17:31:03 +0000 (UTC) Received: (qmail 54811 invoked by uid 500); 31 Oct 2012 17:14:44 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 54750 invoked by uid 500); 31 Oct 2012 17:14:43 -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 54687 invoked by uid 99); 31 Oct 2012 17:14:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2012 17:14:42 +0000 X-ASF-Spam-Status: No, hits=2.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_REPLYTO_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [72.30.239.77] (HELO nm34-vm5.bullet.mail.bf1.yahoo.com) (72.30.239.77) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2012 17:14:30 +0000 Received: from [98.139.212.152] by nm34.bullet.mail.bf1.yahoo.com with NNFMP; 31 Oct 2012 17:14:09 -0000 Received: from [98.139.212.217] by tm9.bullet.mail.bf1.yahoo.com with NNFMP; 31 Oct 2012 17:14:09 -0000 Received: from [127.0.0.1] by omp1026.mail.bf1.yahoo.com with NNFMP; 31 Oct 2012 17:14:09 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 208951.81012.bm@omp1026.mail.bf1.yahoo.com Received: (qmail 21127 invoked by uid 60001); 31 Oct 2012 17:14:09 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1351703649; bh=HwHTov5+XfJA0BmACx6ntgtauI060Dpuc9YYHEqWWPY=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=ytzf7VYZ9NX+5eB84bnWPSrW7/PF/Lf15OuakL8zeHlDIxb5U348JrjmoqXAV3gBG3txgDYJzIZuUGfGjCJw+IpCV2gPYpraWMj8SaiugDzHucz7Qm1d8JdDmgEcZugAL67brN4+CGLRbU9UnIjvBA8hDCcp+K1AkakpubsPlaU= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=hwQQZq/XF/bt93lMjyppVa4WoN3K2Md+OAoItdoxcr2Ubv3FJgqM1OLfUyZLk0VrLdX2E8rTNy4GKQ/lpjblllKR7Ctm0iQlRItoAoaRDsVP6jPcXAhIusUsKLA7D+bWQQsyTySEovfNz3NeR7Bk1E9xf39ts0kyr2kyj1tEE1o=; X-YMail-OSG: AXkJCTYVM1lpsNcbf9TPuh0O5lwERC0zQGN2D0sFqVv8esl P5_jdaCBFvBLOPJ822e9uyTWnVPqU9_jvP4vPWXPq4vnNmNbkdL1Kevc5caA I6UnhjgNj4iSBi2TC8SWGKLTST5OK7DbAx4iXRGt9DArAEKKXx_SbA0LeuV4 T1wKN.TQjapQ9UtaMqegdnymIsflHzvkITqZ3Z286ZsfmqXTd4G.1jXXgVsy yNM60P9_ATNy63vvsjkBfSsJlUjqBdg2tgs5e6xquPbiqNzJPLY2HkcbjHrW 13mJYDoyevNQBQqONVBr1RtOj7O14ASAWCq.Y4D0_ZvMymx70UoFyU9fYet. NevDUtSiVg1C_tTVQglBPNbS69n7udQWalp8AQHxVRG2FUBEXzz3.chSAXPp Sh14lSqYORnvlm0Bw0Sl7UFLxKiKyCgZqadVc88fszC3GVHnbxRfEGMKAPD6 cYg77pAMxocbT_ZbhIoQjrsdsGHBEEE1CuUjSdg-- Received: from [199.21.86.226] by web160902.mail.bf1.yahoo.com via HTTP; Wed, 31 Oct 2012 10:14:09 PDT X-Rocket-MIMEInfo: 001.001,SSB0cnkgdG8gdXNlIENRTDMgdG8gY3JlYXRlIENGIHdpdGggY29tcG9zaXRlIGNvbHVtbnMsCgrCoENSRUFURSBUQUJMRSBGcmllbmRzICgKwqAgwqAgwqAgwqAgwqAuLi4gwqAgwqAgdXNlcl9pZCBiaWdpbnQsCsKgIMKgIMKgIMKgIMKgLi4uIMKgIMKgIGZyaWVuZF9pZCBiaWdpbnQsCsKgIMKgIMKgIMKgIMKgLi4uIMKgIMKgIHN0YXR1cyBpbnQsCsKgIMKgIMKgIMKgIMKgLi4uIMKgIMKgIHNvdXJjZSBpbnQsCsKgIMKgIMKgIMKgIMKgLi4uIMKgIMKgIGNyZWF0ZWQgdGltZXN0YW1wLArCoCDCoCDCoCDCoCABMAEBAQE- X-Mailer: YahooMailWebService/0.8.123.460 Message-ID: <1351703649.19424.YahooMailNeo@web160902.mail.bf1.yahoo.com> Date: Wed, 31 Oct 2012 10:14:09 -0700 (PDT) From: Wei Zhu Reply-To: Wei Zhu Subject: Create CF with composite column through CQL 3 To: Cassandr usergroup MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="498176207-613676090-1351703649=:19424" X-Virus-Checked: Checked by ClamAV on apache.org --498176207-613676090-1351703649=:19424 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable I try to use CQL3 to create CF with composite columns,=0A=0A=A0CREATE TABLE= Friends (=0A=A0 =A0 =A0 =A0 =A0... =A0 =A0 user_id bigint,=0A=A0 =A0 =A0 = =A0 =A0... =A0 =A0 friend_id bigint,=0A=A0 =A0 =A0 =A0 =A0... =A0 =A0 statu= s int,=0A=A0 =A0 =A0 =A0 =A0... =A0 =A0 source int,=0A=A0 =A0 =A0 =A0 =A0..= . =A0 =A0 created timestamp,=0A=A0 =A0 =A0 =A0 =A0... =A0 =A0 lastupdated t= imestamp,=0A=A0 =A0 =A0 =A0 =A0... =A0 =A0 PRIMARY KEY (user_id, friend_id,= status, source)=0A=A0 =A0 =A0 =A0 =A0... );=0A=0A=0AWhen I check it with c= li, the composite type is a bit odd, why it's defined as Long, Int32, Int32= , UTF8, is it supposed to be Long, Long, Int32, Int32? Did=A0=0AI do someth= ing wrong?=0A=0A=A0describe friends;=0A=A0 =A0 ColumnFamily: friends=0A=A0 = =A0 =A0 Key Validation Class: org.apache.cassandra.db.marshal.LongType=0A= =A0 =A0 =A0 Default column value validator: org.apache.cassandra.db.marshal= .UTF8Type=0A=A0 =A0=A0 Columns sorted by: org.apache.cassandra.db.marshal.C= ompositeType(=0Aorg.apache.cassandra.db.marshal.LongType,=0Aorg.apache.cass= andra.db.marshal.Int32Type,=0Aorg.apache.cassandra.db.marshal.Int32Type,=0A= org.apache.cassandra.db.marshal.UTF8Type)=0A=A0 =A0 =A0 GC grace seconds: 8= 64000=0A=A0 =A0 =A0 Compaction min/max thresholds: 4/32=0A=A0 =A0 =A0 Read = repair chance: 0.1=0A=A0 =A0 =A0 DC Local Read repair chance: 0.0=0A=A0 =A0= =A0 Replicate on write: true=0A=A0 =A0 =A0 Caching: KEYS_ONLY=0A=A0 =A0 = =A0 Bloom Filter FP chance: default=0A=A0 =A0 =A0 Built indexes: []=0A=A0 = =A0 =A0 Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredC= ompactionStrategy=0A=A0 =A0 =A0 Compression Options:=0A=A0 =A0 =A0 =A0 ssta= ble_compression: org.apache.cassandra.io.compress.SnappyCompressor=0A=0ATha= nks.=0A-Wei --498176207-613676090-1351703649=:19424 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
I try to use CQL3 to create= CF with composite columns,

 CREATE TABLE Friends (
        &n= bsp;...     user_id bigint,
         = ...     friend_id bigint,
         ..= .     status int,
         ...  =   source int,
         ...     = created timestamp,
         ...     l= astupdated timestamp,
         ... &= nbsp;   PRIMARY KEY (user_id, friend_id, status, source)
  &nb= sp;      ... );


When I check it with cli,= the composite type is a bit odd, why it's defined as Long, Int32, Int32, U= TF8, is it supposed to be Long, Long, Int32, Int32? Did 
I do s= omething wrong?

 = describe friends;
    ColumnFamily: friends
    &= nbsp; Key Validation Class: org.apache.cassandra.db.marshal.LongType
  &= nbsp;   Default column value validator: org.apache.cassandra.db.marsha= l.UTF8Type
      Columns sorted by: org.apache.cassandra.db.marshal.Composite= Type(
org.apache.= cassandra.db.marshal.LongType,
org.apache.cassandra.db.marshal.Int32Type,
org.apache.cassandra.db.marshal.Int32Type,
org.apache.cassandra.d= b.marshal.UTF8Type)
      GC grace seconds: 864000
      Compaction min/max thresholds: 4/32
&nbs= p;     Read repair chance: 0.1
      DC Local R= ead repair chance: 0.0
      Replicate on write: true
      Caching: KEYS_ONLY
      Bloom Fi= lter FP chance: default
      Built indexes: []
 =     Compaction Strategy: org.apache.cassandra.db.compaction.Size= TieredCompactionStrategy
      Compression Options:
=

Thanks.
-Wei
--498176207-613676090-1351703649=:19424--