Nishanth Prasad | 4 Oct 13:42 2011
Picon

Regarding Comparator Types

hi all, 



I am new to cassandra and using the following version for my application.

cassandra===>apache-cassandra-0.8.6
GUI=========> cassandra-gui-0.8.0-beta1
hector======> hector-core-0.8.0-2.tgz


I want to insert the value of type integer, double, date, datetime ( as of mySql) ... how can i achieve this using this version of hector where there is no double, date, datetime data type...

Please do the needful... 
Thanks in advance...

Aaron Turner | 4 Oct 17:41 2011
Picon

Re: Regarding Comparator Types

On Tue, Oct 4, 2011 at 4:42 AM, Nishanth Prasad
<nishanth.java@...> wrote:
> hi all,
>
> I am new to cassandra and using the following version for my application.
> cassandra===>apache-cassandra-0.8.6
> GUI=========> cassandra-gui-0.8.0-beta1
> hector======> hector-core-0.8.0-2.tgz
>
> I want to insert the value of type integer, double, date, datetime ( as of
> mySql) ... how can i achieve this using this version of hector where there
> is no double, date, datetime data type...
> Please do the needful...
> Thanks in advance...

There are double and date types:

http://www.datastax.com/docs/0.8/ddl/column_family#about-data-types-comparators-and-validators

One thing that isn't obvious from the documentation is that the
integer, long, etc are SIGNED types.

--

-- 
Aaron Turner
http://synfin.net/         Twitter:  <at> synfinatic
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
    -- Benjamin Franklin
"carpe diem quam minimum credula postero"

Yi Yang | 4 Oct 17:56 2011

Re: Regarding Comparator Types

According to the most recent change in 1.0.0 rc2 there's another Int32Type

FYI if you're going to use generic programming techniques - aka using mixed types for mutator, you can always use ByteType serializer.

On Tue, Oct 4, 2011 at 11:41 PM, Aaron Turner <synfinatic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
On Tue, Oct 4, 2011 at 4:42 AM, Nishanth Prasad <nishanth.java <at> gmail.com> wrote:
> hi all,
>
> I am new to cassandra and using the following version for my application.
> cassandra===>apache-cassandra-0.8.6
> GUI=========> cassandra-gui-0.8.0-beta1
> hector======> hector-core-0.8.0-2.tgz
>
> I want to insert the value of type integer, double, date, datetime ( as of
> mySql) ... how can i achieve this using this version of hector where there
> is no double, date, datetime data type...
> Please do the needful...
> Thanks in advance...

There are double and date types:

http://www.datastax.com/docs/0.8/ddl/column_family#about-data-types-comparators-and-validators

One thing that isn't obvious from the documentation is that the
integer, long, etc are SIGNED types.


--
Aaron Turner
http://synfin.net/         Twitter: <at> synfinatic
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
    -- Benjamin Franklin
"carpe diem quam minimum credula postero"


Gmane