Details

      Description

      In the spirit of MongoDBDataModel I'd like to add a CassandraDataModel as a backing store for non-distributed recommenders.
      It takes a somewhat different approach, heavily reliant on in-memory caching, as Cassandra is a different beast.
      Patch is attached. This goes in integration, not core. It uses Hector, not the raw Thrift API.

        Activity

        Hide
        Hudson added a comment -

        Integrated in Mahout-Quality #960 (See https://builds.apache.org/job/Mahout-Quality/960/)
        MAHOUT-770 Cassandra data models support

        srowen : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1150696
        Files :

        • /mahout/trunk/integration/src/main/java/org/apache/mahout/cf/taste/impl/model/cassandra/CassandraDataModel.java
        • /mahout/trunk/pom.xml
        • /mahout/trunk/integration/src/main/java/org/apache/mahout/cf/taste/impl/model/cassandra
        • /mahout/trunk/integration/pom.xml
        Show
        Hudson added a comment - Integrated in Mahout-Quality #960 (See https://builds.apache.org/job/Mahout-Quality/960/ ) MAHOUT-770 Cassandra data models support srowen : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1150696 Files : /mahout/trunk/integration/src/main/java/org/apache/mahout/cf/taste/impl/model/cassandra/CassandraDataModel.java /mahout/trunk/pom.xml /mahout/trunk/integration/src/main/java/org/apache/mahout/cf/taste/impl/model/cassandra /mahout/trunk/integration/pom.xml
        Hide
        Henry Saputra added a comment -

        Liking the choice of Hector instead of Thrift API

        Show
        Henry Saputra added a comment - Liking the choice of Hector instead of Thrift API
        Hide
        Patricio Echague added a comment -

        There is a newest Hector version in case you want to update your patch: 0.8.0-2

        Show
        Patricio Echague added a comment - There is a newest Hector version in case you want to update your patch: 0.8.0-2
        Hide
        Patricio Echague added a comment -

        Also, you might want to try the templates in Hector. That will reduce the amount of code a lot.

        for example, in the method SetPreference.

        Show
        Patricio Echague added a comment - Also, you might want to try the templates in Hector. That will reduce the amount of code a lot. for example, in the method SetPreference.
        Hide
        Eduardo Gurgel Pinho added a comment -

        The removePreference method does not remove things from the column families userIDs and itemIDs. Why this behavior?

        @Override
          public void removePreference(long userID, long itemID) {
            Mutator<Long> mutator = HFactory.createMutator(keyspace, LongSerializer.get());
            mutator.addDeletion(userID, USERS_CF, itemID, LongSerializer.get());
            mutator.addDeletion(itemID, ITEMS_CF, userID, LongSerializer.get());
            mutator.execute();
            // Not deleting from userIDs, itemIDs though
          }
        
        Show
        Eduardo Gurgel Pinho added a comment - The removePreference method does not remove things from the column families userIDs and itemIDs. Why this behavior? @Override public void removePreference( long userID, long itemID) { Mutator< Long > mutator = HFactory.createMutator(keyspace, LongSerializer.get()); mutator.addDeletion(userID, USERS_CF, itemID, LongSerializer.get()); mutator.addDeletion(itemID, ITEMS_CF, userID, LongSerializer.get()); mutator.execute(); // Not deleting from userIDs, itemIDs though }

          People

          • Assignee:
            Sean Owen
            Reporter:
            Sean Owen
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:
              Resolved:

              Development