Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 85535 invoked from network); 27 Apr 2010 10:33:36 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Apr 2010 10:33:36 -0000 Received: (qmail 75472 invoked by uid 500); 27 Apr 2010 10:33:35 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 75357 invoked by uid 500); 27 Apr 2010 10:33:33 -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 75337 invoked by uid 99); 27 Apr 2010 10:33:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Apr 2010 10:33:32 +0000 X-ASF-Spam-Status: No, hits=1.8 required=10.0 tests=AWL,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rantav@gmail.com designates 209.85.223.171 as permitted sender) Received: from [209.85.223.171] (HELO mail-iw0-f171.google.com) (209.85.223.171) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Apr 2010 10:33:27 +0000 Received: by iwn1 with SMTP id 1so9814255iwn.27 for ; Tue, 27 Apr 2010 03:33:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=qyALtDwucEzinfz6RL3Q/Xo54z3HGyuxYcJvy4fgWIM=; b=JWKnUrdTCaKuK1GJzFM+0qrPSjgPfufSoL9kqGfrQlk3YgPZigHQ3K/WS98/L2/V/m ycNGygs6LkWOa6s8K6wIvGNo6A7e00Vk3aSIMU7GwBzuG10FjxoDh+rj1gJIC97g/DIO BcYUgTcgc3MjIrctfFUW/3ogj7+ipT0IMgzDU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=qnFe+6uvz+NvuMGM5O4xQSxyCunIID0qiPf9WngvhrViRo5fp6sR1zw1geYZ38oTtW ZFH6wjJaqZefYP40HxeLFadXGl/688eBpooB9iGZ9TFqqhhFv57VOrbY+kTNpHq7uWCJ 4pt0MM+2kI+WLx28NNF1dmuzjvIcU+lC7722M= MIME-Version: 1.0 Received: by 10.231.147.15 with SMTP id j15mr1790402ibv.91.1272364386628; Tue, 27 Apr 2010 03:33:06 -0700 (PDT) Received: by 10.231.147.13 with HTTP; Tue, 27 Apr 2010 03:33:06 -0700 (PDT) In-Reply-To: References: Date: Tue, 27 Apr 2010 13:33:06 +0300 Message-ID: Subject: Re: Thrift vs. Hector From: Ran Tavory To: user@cassandra.apache.org Cc: hector-users@googlegroups.com Content-Type: multipart/alternative; boundary=001485ebaa2a4a33d00485356bc8 --001485ebaa2a4a33d00485356bc8 Content-Type: text/plain; charset=UTF-8 On Tue, Apr 27, 2010 at 1:14 PM, David Boxenhorn wrote: > Thanks, Ran. Very nice to meet you! > :) > > Responses inline. Summary: I downloaded and unzipped Thrift and Hector. I > included them in my project. What do I do now? > On Tue, Apr 27, 2010 at 1:01 PM, Ran Tavory wrote: > >> Hi David, I have a few questions (and answers), see inline >> >> On Tue, Apr 27, 2010 at 12:49 PM, David Boxenhorn wrote: >> >>> Hi all, >>> >>> I'm trying to install a Cassandra development environment for Java. It is >>> much harder than I thought it would be!!!! >>> >>> I got Cassandra up and running with the CLI. So now I'm trying to get the >>> Java interface up. >>> >>> Thrift is installed, supposedly. >>> >> Installed? What did you install? >> To use cassandra from the client side you only need some jars (cassandra >> jar, and thrift jar iirc). No need to install something. >> >> > > I downloaded the Thrift and Hector jars and unzipped them. Do I have to do > anything else? There's like a gazillion classes there, which are the top > level classes that I care about? > If you work with an IDE you'll need to add the jars to your project's classpath. With hector you'll need to unzip and add those: apache-cassandra-0.6.0.jar commons-codec-1.4.jar hector-0.6.0-11-sources.jar libthrift-r917130.jar slf4j-api-1.5.8.jar cassandra-javautils.jar commons-pool-1.5.3.jar hector-0.6.0-11.jar log4j-1.2.14.jar slf4j-log4j12-1.5.8.jar clhm-production.jar google-collections-1.0.jar high-scale-lib.jar perf4j-0.9.12.jar (half of them are only use for unit-tests, so they won't actually be loaded. I have to clean up this mess a little bit...) The fact that you're speaking in "classes" worries me. you should be speaking in jars ;) > > >> >>> Basic questions (thanks in advance): >>> >>> 1. Is it easier to get Thrift or Hector up? I just want to get SOMETHING >>> to work right now, even if it's not the best. >>> >> If you just need to get something really simple up then use thrift. Hector >> isn't hard as well, just just requires you to download one more zip file and >> add the jars to your classpath. >> See http://wiki.apache.org/cassandra/ThriftExamples#Java >> >> > > I don't mind downloading another jar. In fact, my first try is with Hector > - I was hoping that it would be an easier API. > If you need something fast and dirty then just copy-paste the code from the apache wiki. If you want to develop an application that live more than one day and has some nice management and scaling features I'd suggest hector. > > >> 2. Do I need Thrift for Hector? >>> >> You need to have thrift.jar in your classpath as well as cassandra.jar. If >> you choose to use hector, there are a few more jars to add to the classpath, >> see the ones from the lib folder here >> http://github.com/downloads/rantav/hector/hector-0.6.0-11.zip >> > > > Done. > Sorry, in hector there's no lib folder, all jars are at the top-level > > >> >> >>> 3. Is there any good documentation for working with Thrift and/or >>> Hector??? >>> >> here it is ;) >> >>> 4. I tried to use Hector and I'm getting the following, does anyone >>> know what it means? >>> >> What program spits out this output? >> Is this maven? If so, hector, although it uses maven, isn't published on a >> public repo. >> > > Yes, it's Maven (I think). So what do I do? > It boils down to the question of are you using an IDE to test and run? If yes, you can forget about maven, this is the easiest usually. If you do want to use maven to compile and run then that's also possible (that's what I do) but you'll have to do some maven magic for that by adding the jars to the system scope. > > > >> To use hector you don't have to compile, just download the zip from here >> http://github.com/downloads/rantav/hector/hector-0.6.0-11.zip >> > > Done. > > >> If you do with to compile, both ant and mvn work. >> >>> >>> >>> 4/27/10 10:56:52 AM IDT: Can't find artifact for >>> C:\Cassandra\hector-0.6.0-11\hector-0.6.0-11.jar >>> >>> (not open) >>> >>> me.prettyprint.cassandra.dao (not open) >>> >>> me.prettyprint.cassandra.jndi (not open) >>> >>> me (not open) >>> >>> me.prettyprint.cassandra.testutils (not open) >>> >>> me.prettyprint.cassandra.utils (...) >>> >>> me.prettyprint.cassandra (not open) >>> >>> me.prettyprint.cassandra.service (...) >>> >>> me.prettyprint (not open) >>> >>> 4/27/10 10:56:57 AM IDT: Can't find artifact for >>> C:\Cassandra\hector-0.6.0-11\hector-0.6.0-11.jar >>> >>> (...) >>> >>> me.prettyprint.cassandra.dao (...) >>> >>> me.prettyprint.cassandra.jndi (...) >>> >>> me (...) >>> >>> me.prettyprint.cassandra.testutils (...) >>> >>> me.prettyprint.cassandra.utils (...) >>> >>> me.prettyprint.cassandra (...) >>> >>> me.prettyprint.cassandra.service (...) >>> >>> me.prettyprint (...) >>> >>> 4/27/10 10:58:16 AM IDT: Can't find artifact for >>> C:\Cassandra\hector-0.6.0-11\hector-0.6.0-11.jar >>> >>> (...) >>> >>> me.prettyprint.cassandra.dao (...) >>> >>> me.prettyprint.cassandra.jndi (...) >>> >>> me (...) >>> >>> me.prettyprint.cassandra.testutils (...) >>> >>> me.prettyprint.cassandra.utils (...) >>> >>> me.prettyprint.cassandra (...) >>> >>> me.prettyprint.cassandra.service (...) >>> >>> me.prettyprint (...) >>> >>> 4/27/10 10:58:20 AM IDT: Can't find artifact for >>> C:\Cassandra\hector-0.6.0-11\hector-0.6.0-11.jar >>> >>> (...) >>> >>> me.prettyprint.cassandra.dao (...) >>> >>> me.prettyprint.cassandra.jndi (...) >>> >>> me (...) >>> >>> me.prettyprint.cassandra.testutils (...) >>> >>> me.prettyprint.cassandra.utils (...) >>> >>> me.prettyprint.cassandra (...) >>> >>> me.prettyprint.cassandra.service (...) >>> >>> me.prettyprint (...) >>> >>> 4/27/10 11:51:13 AM IDT: Can't find artifact for >>> C:\Cassandra\hector-0.6.0-11\hector-0.6.0-11.jar >>> >>> (...) >>> >>> me.prettyprint.cassandra.dao (...) >>> >>> me.prettyprint.cassandra.jndi (...) >>> >>> me (...) >>> >>> me.prettyprint.cassandra.testutils (...) >>> >>> me.prettyprint.cassandra.utils (...) >>> >>> me.prettyprint.cassandra (...) >>> >>> me.prettyprint.cassandra.service (...) >>> >>> me.prettyprint (...) >>> >>> 4/27/10 11:51:24 AM IDT: Can't find artifact for >>> C:\Cassandra\hector-0.6.0-11\hector-0.6.0-11.jar >>> >>> (...) >>> >>> me.prettyprint.cassandra.dao (...) >>> >>> me.prettyprint.cassandra.jndi (...) >>> >>> me (...) >>> >>> me.prettyprint.cassandra.testutils (...) >>> >>> me.prettyprint.cassandra.utils (...) >>> >>> me.prettyprint.cassandra (...) >>> >>> me.prettyprint.cassandra.service (...) >>> >>> me.prettyprint (...) >>> >>> 4/27/10 11:52:12 AM IDT: Can't find artifact for >>> C:\Cassandra\hector-0.6.0-11\hector-0.6.0-11.jar >>> >>> (...) >>> >>> me.prettyprint.cassandra.dao (...) >>> >>> me.prettyprint.cassandra.jndi (...) >>> >>> me (...) >>> >>> me.prettyprint.cassandra.testutils (...) >>> >>> me.prettyprint.cassandra.utils (...) >>> >>> me.prettyprint.cassandra (...) >>> >>> me.prettyprint.cassandra.service (...) >>> >>> me.prettyprint (...) >>> >>> 4/27/10 11:52:16 AM IDT: Can't find artifact for >>> C:\Cassandra\hector-0.6.0-11\hector-0.6.0-11.jar >>> >>> (...) >>> >>> me.prettyprint.cassandra.dao (...) >>> >>> me.prettyprint.cassandra.jndi (...) >>> >>> me (...) >>> >>> me.prettyprint.cassandra.testutils (...) >>> >>> me.prettyprint.cassandra.utils (...) >>> >>> me.prettyprint.cassandra (...) >>> >>> me.prettyprint.cassandra.service (...) >>> >>> me.prettyprint (...) >>> >>> 4/27/10 11:52:24 AM IDT: Can't find artifact for >>> C:\Cassandra\hector-0.6.0-11\hector-0.6.0-11.jar >>> >>> (...) >>> >>> me.prettyprint.cassandra.dao (...) >>> >>> me.prettyprint.cassandra.jndi (...) >>> >>> me (...) >>> >>> me.prettyprint.cassandra.testutils (...) >>> >>> me.prettyprint.cassandra.utils (...) >>> >>> me.prettyprint.cassandra (...) >>> >>> me.prettyprint.cassandra.service (...) >>> >>> me.prettyprint (...) >>> >>> 4/27/10 11:52:28 AM IDT: Can't find artifact for >>> C:\Cassandra\hector-0.6.0-11\hector-0.6.0-11.jar >>> >>> (...) >>> >>> me.prettyprint.cassandra.dao (...) >>> >>> me.prettyprint.cassandra.jndi (...) >>> >>> me (...) >>> >>> me.prettyprint.cassandra.testutils (...) >>> >>> me.prettyprint.cassandra.utils (...) >>> >>> me.prettyprint.cassandra (...) >>> >>> me.prettyprint.cassandra.service (...) >>> >>> me.prettyprint (...) >>> >>> 4/27/10 11:53:03 AM IDT: Can't find artifact for >>> C:\Cassandra\hector-0.6.0-11\hector-0.6.0-11.jar >>> >>> (...) >>> >>> me.prettyprint.cassandra.dao (...) >>> >>> me.prettyprint.cassandra.jndi (...) >>> >>> me (...) >>> >>> me.prettyprint.cassandra.testutils (...) >>> >>> me.prettyprint.cassandra.utils (...) >>> >>> me.prettyprint.cassandra (...) >>> >>> me.prettyprint.cassandra.service (...) >>> >>> me.prettyprint (...) >>> >>> 4/27/10 12:17:19 PM IDT: Can't find artifact for >>> C:\Cassandra\hector-0.6.0-11\hector-0.6.0-11.jar >>> >>> (...) >>> >>> me.prettyprint.cassandra.dao (...) >>> >>> me.prettyprint.cassandra.jndi (...) >>> >>> me (...) >>> >>> me.prettyprint.cassandra.testutils (...) >>> >>> me.prettyprint.cassandra.utils (...) >>> >>> me.prettyprint.cassandra (...) >>> >>> me.prettyprint.cassandra.service (...) >>> >>> me.prettyprint (...) >>> >>> >>> >>> >>> >> >> > --001485ebaa2a4a33d00485356bc8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Tue, Apr 27, 2010 at= 1:14 PM, David Boxenhorn <david@lookin2.com> wrote:
Thanks, Ran. Very nice to meet you!
:)=C2=A0
=C2=A0
Responses inline. Summary: I downloaded and unzipped Thrift and Hector= . I included them in my project. What do I do now?
If you work with an IDE you'll need to add the jars to your projec= t's classpath. With hector you'll need to unzip and add those:
apache-cassandra-0.6.0.jar =C2=A0 commons-codec-1.4.jar =C2=A0 = =C2=A0 =C2=A0 =C2=A0hector-0.6.0-11-sources.jar =C2=A0libthrift-r917130.jar= =C2=A0 =C2=A0 =C2=A0 =C2=A0slf4j-api-1.5.8.jar =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0
cassandra-javautils.jar =C2=A0 =C2=A0 =C2=A0commons-pool-1.5.3.jar =C2= =A0 =C2=A0 =C2=A0 hector-0.6.0-11.jar =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0log= 4j-1.2.14.jar =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 slf4j-log4j12-1.5.8= .jar =C2=A0 =C2=A0 =C2=A0
clhm-production.jar =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0google-collections-1.0.jar =C2=A0 high-scale-lib.jar =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 perf4j-0.9.12.jar=C2=A0
(half of them are only use for unit-tests, so they won't act= ually be loaded. I have to clean up this mess a little bit...)
The fact that you're speaking in "classes" worri= es me. you should be speaking in jars ;)
If you want to develop an application that live more than one day and = has some nice management and scaling features I'd suggest hector.=C2=A0=
=C2=A0
=C2=A0
3. Is there any good documentation for working with Thrift and/or Hect= or???
here it is ;)=C2=A0
4. I tried to use Hector and I'm getting the following, does anyon= e know what it means?
What program spits out this output?
Is this maven? If so, hector, although it uses maven, isn't publis= hed on a public repo.
=C2=A0
Yes, it's Maven (I think). So what do I do?
=C2=A0
=C2=A0
If you do with to compile, both ant and mvn work.=C2=A0
=C2=A0

4/27/10 10:56:52 AM IDT: Can't find artifact for C:\C= assandra\hector-0.6.0-11\hector-0.6.0-11.jar

<default> (not open)

me.prettyprint.cassandra.dao (not open)

me.prettyprint.cassandra.jndi (not open)

me (not open)

me.prettyprint.cassandra.testutils (not open)

me.prettyprint.cassandra.utils (...)

me.prettyprint.cassandra (not open)

me.prettyprint.cassandra.service (...)

me.prettyprint (not open)

4/27/10 10:56:57 AM IDT: Can't find artifact for C:\C= assandra\hector-0.6.0-11\hector-0.6.0-11.jar

<default> (...)

me.prettyprint.cassandra.dao (...)

me.prettyprint.cassandra.jndi (...)

me (...)

me.prettyprint.cassandra.testutils (...)

me.prettyprint.cassandra.utils (...)

me.prettyprint.cassandra (...)

me.prettyprint.cassandra.service (...)

me.prettyprint (...)

4/27/10 10:58:16 AM IDT: Can't find artifact for C:\C= assandra\hector-0.6.0-11\hector-0.6.0-11.jar

<default> (...)

me.prettyprint.cassandra.dao (...)

me.prettyprint.cassandra.jndi (...)

me (...)

me.prettyprint.cassandra.testutils (...)

me.prettyprint.cassandra.utils (...)

me.prettyprint.cassandra (...)

me.prettyprint.cassandra.service (...)

me.prettyprint (...)

4/27/10 10:58:20 AM IDT: Can't find artifact for C:\C= assandra\hector-0.6.0-11\hector-0.6.0-11.jar

<default> (...)

me.prettyprint.cassandra.dao (...)

me.prettyprint.cassandra.jndi (...)

me (...)

me.prettyprint.cassandra.testutils (...)

me.prettyprint.cassandra.utils (...)

me.prettyprint.cassandra (...)

me.prettyprint.cassandra.service (...)

me.prettyprint (...)

4/27/10 11:51:13 AM IDT: Can't find artifact for C:\C= assandra\hector-0.6.0-11\hector-0.6.0-11.jar

<default> (...)

me.prettyprint.cassandra.dao (...)

me.prettyprint.cassandra.jndi (...)

me (...)

me.prettyprint.cassandra.testutils (...)

me.prettyprint.cassandra.utils (...)

me.prettyprint.cassandra (...)

me.prettyprint.cassandra.service (...)

me.prettyprint (...)

4/27/10 11:51:24 AM IDT: Can't find artifact for C:\C= assandra\hector-0.6.0-11\hector-0.6.0-11.jar

<default> (...)

me.prettyprint.cassandra.dao (...)

me.prettyprint.cassandra.jndi (...)

me (...)

me.prettyprint.cassandra.testutils (...)

me.prettyprint.cassandra.utils (...)

me.prettyprint.cassandra (...)

me.prettyprint.cassandra.service (...)

me.prettyprint (...)

4/27/10 11:52:12 AM IDT: Can't find artifact for C:\C= assandra\hector-0.6.0-11\hector-0.6.0-11.jar

<default> (...)

me.prettyprint.cassandra.dao (...)

me.prettyprint.cassandra.jndi (...)

me (...)

me.prettyprint.cassandra.testutils (...)

me.prettyprint.cassandra.utils (...)

me.prettyprint.cassandra (...)

me.prettyprint.cassandra.service (...)

me.prettyprint (...)

4/27/10 11:52:16 AM IDT: Can't find artifact for C:\C= assandra\hector-0.6.0-11\hector-0.6.0-11.jar

<default> (...)

me.prettyprint.cassandra.dao (...)

me.prettyprint.cassandra.jndi (...)

me (...)

me.prettyprint.cassandra.testutils (...)

me.prettyprint.cassandra.utils (...)

me.prettyprint.cassandra (...)

me.prettyprint.cassandra.service (...)

me.prettyprint (...)

4/27/10 11:52:24 AM IDT: Can't find artifact for C:\C= assandra\hector-0.6.0-11\hector-0.6.0-11.jar

<default> (...)

me.prettyprint.cassandra.dao (...)

me.prettyprint.cassandra.jndi (...)

me (...)

me.prettyprint.cassandra.testutils (...)

me.prettyprint.cassandra.utils (...)

me.prettyprint.cassandra (...)

me.prettyprint.cassandra.service (...)

me.prettyprint (...)

4/27/10 11:52:28 AM IDT: Can't find artifact for C:\C= assandra\hector-0.6.0-11\hector-0.6.0-11.jar

<default> (...)

me.prettyprint.cassandra.dao (...)

me.prettyprint.cassandra.jndi (...)

me (...)

me.prettyprint.cassandra.testutils (...)

me.prettyprint.cassandra.utils (...)

me.prettyprint.cassandra (...)

me.prettyprint.cassandra.service (...)

me.prettyprint (...)

4/27/10 11:53:03 AM IDT: Can't find artifact for C:\C= assandra\hector-0.6.0-11\hector-0.6.0-11.jar

<default> (...)

me.prettyprint.cassandra.dao (...)

me.prettyprint.cassandra.jndi (...)

me (...)

me.prettyprint.cassandra.testutils (...)

me.prettyprint.cassandra.utils (...)

me.prettyprint.cassandra (...)

me.prettyprint.cassandra.service (...)

me.prettyprint (...)

4/27/10 12:17:19 PM IDT: Can't find artifact for C:\C= assandra\hector-0.6.0-11\hector-0.6.0-11.jar

<default> (...)

me.prettyprint.cassandra.dao (...)

me.prettyprint.cassandra.jndi (...)

me (...)

me.prettyprint.cassandra.testutils (...)

me.prettyprint.cassandra.utils (...)

me.prettyprint.cassandra (...)

me.prettyprint.cassandra.service (...)

me.prettyprint (...)

=C2=A0
=C2=A0
=C2=A0
=C2=A0



--001485ebaa2a4a33d00485356bc8--