Hector – a Java Cassandra client

UPDATE 3: Comments are closed now and for the sake of information reuse, please post all your hector questions to the mailing list hector-users@googlegroups.com and please subscribe to it as well.

UPDATE: I added a downloads section, so you may simply download the jar and sources if you’re not into git or maven.

UPDATE 2: I added license clarification; the license it MIT, which is the most permissive license I know of and basically lets you do anything with the software: use it commercially or uncommercially, copy it, fork it (but I’ll be happy to accept patches and committers) and whatnot. I added a LICENSE file and over time I’ll add that block of comment to every file.

In the Greek Mythology, Hector was the builder of Troy, the greatest warrior ever and brother of Cassandra.

Nowdays, Cassandra is a high scale database and Hector is the Java client I’ve written for it.

Over the last couple of days I got the the conclusion that the java client I’ve been using so far to speak to cassanrda wasn’t satisfactory. I used the one simply called cassandra-java-client, which is a good start but had some shortcomings I could just not live with (no support for Cassandra v0.5, no JMX and no failover). So I’ve written my own.

For anyone not familiar with cassanra, it’s client API is just a simple thrift client. This means that, unlike other datastore clients such as jdbc etc, the client provided has somewhat limiter functionality; It can sent messages to cassanra, write values and read values of course, but other client goodies required for large scale applications are not provided, features such as monitoring, connection pooling etc. The client I initially used provides connection pooling, which is a very nice start, but I decided it was missing too much so I’d write my own.

As a good open-source citizen, I initially contacted the authors of cassandra-java-client asking their permission to contribute and make the suggested improvements, but after weeks without reply I realized I’ll need to go solo. I started with the concepts captured by the folks who had built the java-client, but pretty soon the code has morphed to be something completely different.

Here’s how code that uses Hector looks like. This is an implementation of a simple distributed hashtable over cassandra. By the virtue of cassandra, this hashtable can grow pretty large:

  /**
   * Insert a new value keyed by key
   * @param key Key for the value
   * @param value the String value to insert
   */
  public void insert(final String key, final String value) throws Exception {
    execute(new Command(){
      public Void execute(final Keyspace ks) throws Exception {
        ks.insert(key, createColumnPath(COLUMN_NAME), bytes(value));
        return null;
      }
    });
  }
 
  /**
   * Get a string value.
   * @return The string value; null if no value exists for the given key.
   */
  public String get(final String key) throws Exception {
    return execute(new Command(){
      public String execute(final Keyspace ks) throws Exception {
        try {
          return string(ks.getColumn(key, createColumnPath(COLUMN_NAME)).getValue());
        } catch (NotFoundException e) {
          return null;
        }
      }
    });
  }
 
  /**
   * Delete a key from cassandra
   */
  public void delete(final String key) throws Exception {
    execute(new Command(){
      public Void execute(final Keyspace ks) throws Exception {
        ks.remove(key, createColumnPath(COLUMN_NAME));
        return null;
      }
    });
  }

Out of the box Cassanra provides a raw thrift client, which is OK, but lacks many features essential to real world clients. I’ve built Hector to fill this gap.

Here are the high level features of Hector, currently hosted at github.

  • A high-level object oriented interface to cassandra. As noted before, Cassandra’s out of the box client is a thrift client, which isn’t always that nice and clean to work with. I wanted to provide higher level and cleaner API. This part was mainly inspired by the mentioned cassandra-java-client. The API is defined in the Keyspace interface. See for example methods such as Keyspace.insert() and keyspace.getColumn()
  • Failover support. Cassandra is a distributed data store and it may handle very well one or several hosts going down. However, out of the box thrift provides no support for failing clients. What it the client is configured to connect a cassandra host that just happened to be down right now? In hector, if a client is connected to one host in the ring and this host goes down, the client will automatically and transparently search for other available hosts to perform its operation before giving up  and returning an error to its user. There are currently 3 ways to configure the failover policy: FAIL_FAST (no retry, just fail if there are errors, nothing smart), ON_FAIL_TRY_ONE_NEXT_AVAILABLE (try one more host before giving up) and ON_FAIL_TRY_ALL_AVAILABLE (try all available hosts before giving up). See CassandraClient.FailoverPolicy.
  • Connection pooling. This is a real necessity for high scale applications. The usual pattern for DAOs (Data Access Objects) is large number of small reads/writes. Clients cannot afford to open a new connection with each and every request, not only because of the overhead in the tcp handshake (thrift uses tcp), but also because of the fact that sockets remain in TIME_WAIT so a client may easily run out of available sockets if it operates fast enough. This part was also inspired by cassandra-java-client but was improved in my version. Hector provides connection pooling and a nice framework that manages all its gory details.
  • JMX support. It’s a widely known fact that applications have a life of their own. You built it to do X but it does Y b/c you didn’t expect Z to happen. Running an application without the ability to monitor it is like walking blindfolded on a dark highway; sooner or later you’ll get hit by something. Hector exposes JMX for many important runtime metrics, such as number of available connections, idle connections, error statistics and more.
  • Support for the Command design pattern to allow clients to concentrate on their business logic and let hector take care of the required plumbing. This is demonstrated in the code above.

I’ve been using hector internally, at outbrain and so far so good. I’d be happy to get the comminuty feedback – API, implementation, features and so on and hope you can find it useful.

93 Responses to “Hector – a Java Cassandra client”

  1. Hey There,

    sounds like a charm, i just started using cassandra from the cli, and searched for an client :)

    I will try your client and get back to you.

    I already have a question:
    Is there a maven repo for hector?

    Cheers,
    Alex

    By Alex on Feb 23, 2010

  2. And the naming is nice :)

    i have to talk to Hector to get in touch with Cassandra, like in real life…

    Alex

    By Alex on Feb 23, 2010

  3. Very nice.
    Did you thought of contributing this to the spring framework. they have this notion of “template”.
    e.g JdbcTemplate,JmsTemplate,HibernateTemplate,LdapTemplate

    maybe you can add CassandraTemplate

    Eyal

    By Eyal on Feb 23, 2010

  4. There’s no maven repo, I’m sort of new to this maven thing. do you know how do I get my jar to a repo?
    Anyhow, I created a /releases directory, see http://github.com/rantav/hector/tree/master/releases/

    By Ran Tavory on Feb 23, 2010

  5. Hey Ran,

    i am no expert @ working with maven, but i got my own Repo which is a Sonatype Nexus™ Open Source Edition, Version: 1.4.1.

    I made a little video showing how i added Hector to mine.

    Maybe it is a help for you, if you have further questions let me know!

    url: http://www.brandfrisch.com/maven_artifact_upload_nexus.mov

    Cheers,
    Alex

    By Alex on Feb 24, 2010

  6. Thanks Alex, I have a Nexus repo, but it’s internal at work so I was hoping to get a hosted repo I can upload to freely, just like google-code is a free service and gitub is. I’ll keep looking… have no interest hosing my own world readable service…

    By Ran Tavory on Feb 24, 2010

  7. Ran,

    you can request to get your releases uploaded to maven central. See http://maven.apache.org/guides/mini/guide-central-repository-upload.html.

    If you don’t want to go through that trouble, you can host a repo in the source control system. See http://www.beeworks.be/hosting-maven-repository-google-code/ on to do it for svn. Should be simular for git I guess.

    regards,

    Wim

    By Wim Deblauwe on Feb 24, 2010

  8. Hi Ran!

    My first impression is that this project have a nice future (good name and good features). I will try Hector and then give my feedback to you.

    Good luck!

    By Jesus on Feb 24, 2010

  9. thanks, let me know if you have questions

    By Ran Tavory on Feb 24, 2010

  10. Awesomeness! I was just scouring the web for this last night and only found the other java client google code project which looked like it was sort of an abandoned project. I’ll have to check it out. Thanks man!

    By PC on Feb 24, 2010

  11. @Wim, looks like the trouble is that hector depends on 3rd parties which do not have public mvn repositories (such as cassandra or thrift…) so it disqualifies it from the apache public repo. I’ve created instead a releases directory and a download section http://github.com/rantav/hector/downloads

    By Ran Tavory on Feb 25, 2010

  12. Thanks!

    Could you clarify the license information for Hector? Is it Apache licensed? :)

    By HubertChang on Feb 25, 2010

  13. I basically want to say you can do whatever with the code, use it, copy it, contribute and whatnot. I’ll have to look for the appropriate license for this, any suggestions?

    By Ran Tavory on Feb 25, 2010

  14. Perfect! Thank you very much.

    By Siom on Feb 26, 2010

  15. Licensed as Cassandra, Apache License 2.0. :)

    By HubertChang on Feb 26, 2010

  16. OK license, here you go, I chose MIT and added UPDATE 2 to the post:
    UPDATE 2: I added license clarification; the license it MIT, which is the most permissive license I know of and basically lets you do anything with the software: use it commercially or uncommercially, copy it, fork it (but I’ll be happy to accept patches and committers) and whatnot. I added a LICENSE file and over time I’ll add that block of comment to every file.

    By Ran Tavory on Feb 26, 2010

  17. Perfect.
    I am trying Hector. Connection pooling, failover, and JMX, so great!
    The leader of Liftweb framework is working on Goat Rodeo, which integrated Zookeeper and Cassandra in Scala. How about integrate Zookeeper with Hector to make transactions aware? Thanks.

    By HubertChang on Feb 26, 2010

  18. It looks perfect. Thanks for writing this.

    By MKBB on Feb 26, 2010

  19. @HubertChang I don’t have plans integrating Zookeeper of transactions, at least not in the near future. I’m hesitant b/c it adds considerable complexity to users of Hector. One of the nicest things about Cassandra is its simplicity of deployment so adding zookeeper may ruin that.
    Adding transactions isn’t “natural” to cassandra and I suspect won’t be easy or natural to integrate into hector. So – not in the neat future, and as for the far future, I’ll have to think it over.

    By Ran Tavory on Feb 27, 2010

  20. Hey hector,
    I’m digging into this and am beginning to understand it and Cassandra (tis new to me). I took an the ExampleDao and it seems pretty straightforward. I’m wondering if you’ve built a generalized dao that exposes the other Keyspace methods. Or is it such that your dao classes call all the other keyspace methods directly and return whatever objects are specific to your app?

    Cheers.

    By PC on Feb 28, 2010

  21. Hi @PC, the second is correct, I don’t have a generalized DAO. The DAOs that I’ve built simply access the Keyspace methods, I think this is the correct abstraction layer, but let me know if you have other suggestions, I’m open for ideas.
    I don’t see how a generalized DAO may help, but what may be useful is a base class from which all DAOs inherit and which provides some basic functionality. That said, I’m not crazy about the idea of inheritance, so I’m still contemplating.

    By Ran Tavory on Feb 28, 2010

  22. Hey Ran,
    well done on putting this in place.
    One comment or needed feature is some kind of a Cassandra server lottery. Let me explain:
    one of the common bottlenecks using cassandra is if you always connect to the same node which delegates the calls to all the cluster. this node becomes the bottleneck. might be cool if the Hector instance will be configured with all the nodes in the cluster and will just run a lottery between them to evenly distribute the load.

    Ori

    By Ori Lahav on Feb 28, 2010

  23. Hi Ori, load balancing is certainly in my todo, but it turns out that it’s not as straight forward as you’d expect.
    First off, in some testing I made it seems that, at least with writes there are other bottlenecks and hammering the same host isn’t actually the first bottleneck.
    Still I assume load balancing is desired, but then you may choose to implement LB in different ways depending on your scenario.
    In general I prefer to leave LB to ops, and as a matter of fact, this is actually Cassandra’s team recommendation.
    In a scenario where several clients talk to cassandra I think it’s wise to leave LB to ops by configuring each client to which cassandra it should talk with.
    However, in the scenario of one single client hammering cassandra I’d prefer to implement LB internally in Hector. So what I’ll do, I’ll make LB an optional feature.
    I should note, though that I’ll need to require more data from the user of Hector to be able to implement LB effectively, namely the list of preferred hosts that can be balances, which is a sublist of the ring. Although Hector can learn the ring by itself, it may accidentally cross DC bounds and degrade performance, so in order to prevent that from happening I’ll need more data from the user, hence making the API a bit harder, but I think it’s worth it.

    By Ran Tavory on Feb 28, 2010

  24. @eyal, sorry for late approval, you’ve made your way to the trash section… Anyhow about spring, no I haven’t thought of this, I’ll need to take the time a learn it, so it’ll take a while…

    By Ran Tavory on Mar 1, 2010

  25. Not that you need anymore work but it would be great if someone (in general) implemented JPA (or some other sort of object-(non)relational mapping) library on top of Hector such that the persistence of POJOs can be done by annotation instead of manually mapping of data. I’ve seen other people ask about this on the cassandra mail list.

    By PC on Mar 2, 2010

  26. I just forked a clone, and I will revised it to support cassandra 0.6,but not 0.5 compatible.

    By HubertChang on Mar 8, 2010

  27. OK, sounds good, let me know if you’d like me to review the code.
    I’m currently working on JMX performance counters for hector.

    By Ran Tavory on Mar 8, 2010

  28. Sure. I will.

    By HubertChang on Mar 8, 2010

  29. Hi,
    Your current client example does not compile with 0.5.1 (current) release of cassandra.

    Thanks

    By Khalid on Mar 13, 2010

  30. interesting. I have not checked with 5.1, although I’m surprised since the interface of cassandra should not have changed. I will check

    By Ran Tavory on Mar 13, 2010

  31. I just tried, and using cassandra 0.5.1 works as is. Anyhow, I’ve also created a github branch for 0.5.1 http://github.com/rantav/hector/tree/0.5.1

    By Ran Tavory on Mar 14, 2010

  32. Great work.
    Did you implemented your own connection pool? If so, I think it would be better to use an existing (aka mature, stable, proven) one such as Apache commons-pool.

    Thank you.

    By Juanac on Mar 15, 2010

  33. You’re right, and I used apache GenericObjectPool.
    See http://github.com/rantav/hector/blob/master/src/main/java/me/prettyprint/cassandra/service/CassandraClientPoolByHostImpl.java#L30 (line 30)

    By Ran Tavory on Mar 15, 2010

  34. Hi, I’m trying to run the simple client example and I’m getting the following exception:

    Caught: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

    Could you tell me what other libraries are required in order to run this code, or point me to a spot where its documented?

    Thanks!

    By Bryan on Mar 15, 2010

  35. If you use maven, then:
    mvn test
    mvn eclipse:eclipse

    If an ant fan:
    ant test

    If only eclipse or other IDE, then please add all jars from
    lib, antlib and anttestlib

    By Ran Tavory on Mar 15, 2010

  36. Awesome, thanks!

    By Bryan on Mar 15, 2010

  37. I was beginning to take a look at hooking up Hector to Tomcat in order to provide Cassandra access to a web application. I was focusing on wiring up your CassandraClientFactory through Tomcat’s JNDI resource section. However, looking at the parameter list necessary to create a CassandraClientFactory, I would need to instantiate an instance of both CassandraClientMonitor and CassandraClientPool (through CassandraClientPoolImpl) along with the url/port. Is that how you envision someone using your factory classes?

    By Perry Hoekstra on Mar 16, 2010

  38. I’ll have to read up on jndi before I can answer that. Examples of how I envision hector usage can be found here, depending on your needs:
    http://github.com/rantav/hector/blob/master/src/main/java/me/prettyprint/cassandra/service/ExampleClient.java
    And
    http://github.com/rantav/hector/blob/master/src/main/java/me/prettyprint/cassandra/dao/ExampleDao.java

    So the simple case is just this:

    CassandraClientPool pool = CassandraClientPoolFactory.INSTANCE.get();
    CassandraClient client = pool.borrowClient(“cassandra:9160″);
    try {

    } finally {
    pool.releaseClient(client);
    }

    By Ran Tavory on Mar 16, 2010

  39. What is the purpose of CassandraClientFactory if not to create a pool of CassandraClient objects that would be used in accessing Cassandra and returned to the pool, similar to a database connection?

    By Perry Hoekstra on Mar 16, 2010

  40. Well, CassandraClientFactory is an internal implementation class (it’s visibility is package).
    It’s used by the apache GenericObjecPool implementation to create new cassandra client connection, just like a database connection, as you say, but it’s managed internally, and should not be managed by the container (not by tomcat).

    By Ran Tavory on Mar 16, 2010

  41. Okay, so what you are saying is that an externally usable client factory class is needed that can be integrated with Tomcat or any application server.

    This class would have a constructor that would take a single url/port or an array of url/ports and create a CassandraClientPool and CassandraClientMonitor.

    Would that be a valid statement?

    By Perry Hoekstra on Mar 16, 2010

  42. Something along these lines:

    public class ExternalCassandraClientFactory implements PoolableObjectFactory {

    ……

    /**
    * ExternalCassandraClientFactory constructor.
    *
    * @param url
    * @param port
    */
    public ExternalCassandraClientFactory(String url, int port) {
    this.clientMonitor = new CassandraClientMonitor();
    this.pool = new CassandraClientPoolImpl(this.clientMonitor);
    this.url = url;
    this.port = port;
    timeout = getTimeout();

    }

    ….
    }

    By Perry Hoekstra on Mar 16, 2010

  43. Hey Ran, wanted to commend you on pushing this out. Great work!

    By Nash on Mar 17, 2010

  44. Hello Ran,
    Been playing around a bit with the Hector library. Very nice work. A few questions, a few suggestions – there are a few things I’ll probably want to implement for my own use of cassandra that I’d be interested in your response as to how that’d integrate with Hector.

    First, as to the questions – The build contains a whole bunch of classes from the org.apache.cassandra.service package, which you’ve got in a “apache-cassandra-incubating” jar. I can’t find these classes in the cassandra source tree. As far as I can tell, this means that the client is incompatible with cassandra 6.0beta (?). Did the package move from cassandra 0.5 to 0.6? is it in a separate “client” project that I’m not seeing? Much confusion.

    As to changes, improvements, I’m going to need to add some simplification “wrapper” functionality for my own use that would probably benefit the driver. For one,I’m not seeing a way to be able to create and configure a connection pool in a way that allows access to all of the options you’ve got in your Client (probably just haven’t seen it yet), as well as some things like sockettimeout.

    Another issue is related to the “cassandra-ness” of the insert, find, etc. methods. I’ve been playing around a bit with a number of nosql datastores and the thing that jumps out is that they each enforce their own syntax on your interaction with the datastore, where ultimately my application would be simplified with a layer that hides the structure, vendor, etc. of the datastore, e.g. methods that look like (roughly, haven’t really thought this through completely):

    Map get(String key)…, or insert(String key, Map values). For our application the simplest thing ultimately ( although not necessarily the fastest) would be some sort of type-aware library to insert object values as a map via reflection or stored-method invocation.

    By Steve Benjamin on Mar 17, 2010

  45. @Steve:
    1. the packages moved a little bit in cassandra 0.6.0. A hector 0.6.0 version is in the works and sorry for confusion.
    2. You are correct, I haven’t bubbled all options all the way up yet. I add them per need basis and would be happy to do more.
    3. Of all nosql solutions, I only have meaningful experience with cassandra so my perspective is limited. I see your point making an API that’s more agnostic to the storage, however they all seem so far away from each other that I can’t see how this can work in a sane way. I’m open to suggestions…
    4. If you’re thinking about ORMs such as hibernate for cassandra, then first I think I need to see proof of concept how this can work + make things easy to work with per the interface; this can definitly work, but I personally don’t have enough experience with ORM that I feel I can build one and I can say that at a hibernate user many times I… well… simply hate it… but maybe it’s just me…
    github is great in forking and merging back so it would be great if you could fork, make some changes and ask me to review the code. If I think it fits hector I merge it back. Feel free to email me for more details rantav [at] gmail

    By Ran Tavory on Mar 17, 2010

  46. I tried your Example Client Code, while my eclipse says“
    The type org.apache.thrift.TException cannot be resolved. It is indirectly referenced from required .class files “ in line 31 “…Keyspace keyspace = client.getKeyspace(“Keyspace1″);…”

    By angelwing on Mar 20, 2010

  47. Please have a look at http://wiki.github.com/rantav/hector/how-to-build and let me know if it helps (add the required libs to eclipse)

    By Ran Tavory on Mar 20, 2010

  48. @Steve and @Ran
    I’ve been playing around with Cassandra and created what can be found as HelenaORM on Github which basically does reflective bean storing and loading to Cassandra using Hector. It’s just a toy project as I’m not having used it beside the examples that are in the repo, but maybe that is a starting point.

    http://github.com/marcust/HelenaORM

    By Marcus Thiesen on Mar 21, 2010

  49. Great work, keep it up.

    By Jel on Mar 25, 2010

  50. @Marcus Thiesen
    Your HelenaORM “toy project” looks very promising! Any reason why you’ve chosen the commercial unfriendly GPL license?

    By James on Apr 6, 2010

  51. I got Hector working from Scala with very minimal changes to the ExampleClient. I wrote a bit about my experience here: http://theikester.wordpress.com/2010/04/07/access-cassandra-from-scala-hector/.

    Thanks for the work on Hector!

    By Ike on Apr 7, 2010

  52. Hi,

    Sorry for posting such a newbie question here, I downloaded the source and linked to eclipse and when I tried to run the ExampleClient.java it gave me the error

    “main” org.apache.thrift.transport.TTransportException: Unable to open transport to localhost:9160 , java.net.ConnectException: Connection refused”

    But when I use ant test or package they all worked fine. What I want is just to run the ExampleClient ?

    It would be great if someone point me the error I am doing.

    Or, is there any easy of running ExampleClient ?
    -ruwan

    By Ruwan on Apr 10, 2010

  53. Hi, figured it out, it was my bad … Since when I ran ant test, it itself started the cassandra and I assumed it should be the case when I run it from the eclipse as well… which is not the case …

    So I am good now.

    thnx … and great work Ran … and thank you for sharing this with the rest of the community

    -ruwan

    By Ruwan on Apr 10, 2010

  54. Hector looks great. Thanks for the hard work.

    But…if you’re wondering what to do next, I’d suggest documentation.

    The blog post provides a bit of documentation but the implementation of a get/set interface is not very relatable compared to the standard kinds of things that most people will need to so. How about standard “blog post”, “user profile”, “employee record” type examples? Something a bit less abstract?

    Also, it would be nice if the README would point to API documentation.

    By Paul Prescod on Apr 11, 2010

  55. @paul, documentation can definitely be improved, but I have to admit this is where I’d really appreciate users help. If you’re interested, I’ll be happy to provide some initial pointers.

    By Ran Tavory on Apr 11, 2010

  56. @Ruwan, yep, you got it, the ExampleClient requires a running cassandra instance on localhost:9160. The tests start their own embedded server.

    By Ran Tavory on Apr 11, 2010

  57. Hi,

    If I am not mistaken “Hector” uses non-framed transport for Thrift right ? … If its so, how can I change it to use the framed transport …

    Thank You in advance …

    Ruwan

    By Ruwan on Apr 11, 2010

  58. @Ruwan Hector uses the default thrift transport.
    There isn’t currently a way to specify other transport. I’ve listed this as a possible enhancement http://github.com/rantav/hector/issues/issue/25
    We’re open to contributions, so if you’d like that we’d be happy if you fork the project on github, make the changes and let us know when you’re done.

    By Ran Tavory on Apr 12, 2010

  59. Hi, looks like i dont get getRangeslice() thing, i want to dump all keys/columns from one columnpath (cassandra 0.6 OPP). With code below i’m getting only duplicates:

    String last_key = new String(“”);
    for(;;){

    Map<String, List> map = keySpace.getRangeSlice(cp, sp, last_key, “”, count);

    if(map.isEmpty()) break;

    for (String s : map.keySet()) {

    if (s.equals(last_key)) continue;
    last_key = s;

    List columns = map.get(s);

    for (Column column : columns) {
    writer.write(new String(column.getName()) + “\t” + new String(column.getValue()) + “\n”);
    }
    }

    }

    p.s. sorry for my bad java, this is first java expiriance

    By mj on Apr 13, 2010

  60. Shouldn’t the end value be a string that’s larger than the max key you have?
    Anyway, I think user@cassandra is the better place to ask this

    By Ran Tavory on Apr 13, 2010

  61. Hi,

    Is there an efficient way to get a list of keys per node/host instead of using get_range_slice?

    Thanks in advance

    By Dror on Apr 13, 2010

  62. @Dror, I’m actually not sure what the right answer is. I don’t think getRangeSlice will help you get keys per host. I’m also not familiar with other ways to do that, but it’s best that you send the question to user@cassandra

    By Ran Tavory on Apr 13, 2010

  63. Can you add a reference of how to add superColumns via Hector?

    By Dror on Apr 15, 2010

  64. @Dror you can see here http://github.com/rantav/hector/blob/0.6.0/src/test/java/me/prettyprint/cassandra/service/KeyspaceTest.java

    By Ran Tavory on Apr 15, 2010

  65. Ran,

    Great effort thanx.

    is the project published in any public maven repo yet?

    Thanx

    By tc on Apr 16, 2010

  66. @tc it’s not on a public repo since it has dependencies that aren’t in public repos (such as cassandra or thrift)

    By Ran Tavory on Apr 17, 2010

  67. Thanks Ran :-)

    By Dror on Apr 18, 2010

  68. Hi Ran, I need you help again.
    Can you add an example of how to insert and get a column which has a type of TimeUUIDType? Thanks

    By Dror on Apr 18, 2010

  69. Hi @Dror, I don’t have an answer up my sleeve but perhaps you could post the question at hector-users@googlegroups.com and someone will have that.

    By Ran Tavory on Apr 18, 2010

  70. Hi Ran

    Here I’m again.

    I tried to add the following dependency to my pom.xml by it’s failed.

    me.prettyprint
    hector
    0.6.0-11

    The error is: 4/21/10 3:55:26 PM IDT: Missing artifact me.prettyprint:hector:jar:0.6.0-11:compile

    What’s wrong with these configuration?

    Thanks again

    By Dror on Apr 21, 2010

  71. @dror, let’s do this on the mailing list hector-users@googlegroups

    The thing is, hector is not in a public repo, so you’ll have to download the jar and add as a system dep. If you ask on the mailing list I’ll ad more details

    By Ran Tavory on Apr 21, 2010

  72. Awesome work. I’ve been using Hector for a few days now.
    As far as I am concerned Hector has been an excellent bootstrap to understand Cassandra.

    I have a question though : how comes the keyspace.insert() method does not work to update an existing column ? I thought it would work the same as the ‘set’ method in cassandra command lines. Am I wrong ?

    Thank you, and let us know how we can help you to enrich this excellent work.

    By Cyrille on Apr 22, 2010

  73. Hi Cyrille, for the sake of information reuse, do you mind posting your question to the mailing list? hector-users@googlegroups.com (and subscribe to the list…)
    In short, yes, inset should work exactly like set, I’m surprised that it’s not working for you. If you can send more details to the list we can debug it together.
    As far as enriching, just the partial list is here http://github.com/rantav/hector/issues

    By Ran Tavory on Apr 22, 2010

  74. Can you add a reference of how to insert/retrieve superColumnFamilies via Hector?

    By eac on Apr 22, 2010

  75. please future questions to the mailing list hector-users@googlegroups.com
    you may look at KeyspaceTest.java

    By Ran Tavory on Apr 22, 2010

18 Trackback(s)

  1. Mar 3, 2010: Load balancing and improved failover in Hector | PrettyPrint.me
  2. Mar 29, 2010: Sodeso » Installing and using Apache Cassandra With Java Part 4 (Thrift Client)
  3. Apr 3, 2010: JMX in Hector | PrettyPrint.me
  4. Apr 12, 2010: Keksrolle.de » Blog Archive » Cassandra Distributed Database – a link list for beginners
  5. May 2, 2010: Understanding Cassandra Code Base | PrettyPrint.me
  6. May 7, 2010: Confluence: Research and Engineering
  7. May 12, 2010: [译文]理解Cassandra源代码 » 我有分寸
  8. Jun 21, 2010: Confluence: Tools & Software Development
  9. Jun 21, 2010: Confluence: Tools & Software Development
  10. Aug 6, 2010: Hector API v2 | PrettyPrint.me
  11. Aug 11, 2010: Apache Cassandra « Java Tutorials
  12. Aug 30, 2010: Eamonn O’Brien-Strain » links for 2010-08-29
  13. Aug 30, 2010: Initial Cassandra Impressions « Andre's Tech Blog
  14. Aug 30, 2010: Cassandra Java Annotations « Andre's Tech Blog
  15. Dec 4, 2010: Confluence: Ligatus DMS 2.x Development
  16. Jan 24, 2011: Cassandra, Getting Started, Hector | Thread.currentThread().join()
  17. Mar 5, 2011: Cassandra Tip: How much time did that query take? « Bits that interest me
  18. Jun 18, 2011: Einführung in Cassandra und Hector // Christian Straube . Software-Engineering

Sorry, comments for this entry are closed at this time.