gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lewi...@apache.org
Subject svn commit: r1363762 - in /gora/trunk: CHANGES.txt gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java
Date Fri, 20 Jul 2012 13:00:30 GMT
Author: lewismc
Date: Fri Jul 20 13:00:29 2012
New Revision: 1363762

URL: http://svn.apache.org/viewvc?rev=1363762&view=rev
Log:
GORA-156 Properly implement getSchemaName in CassandraStore

Modified:
    gora/trunk/CHANGES.txt
    gora/trunk/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java
    gora/trunk/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java

Modified: gora/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/gora/trunk/CHANGES.txt?rev=1363762&r1=1363761&r2=1363762&view=diff
==============================================================================
--- gora/trunk/CHANGES.txt (original)
+++ gora/trunk/CHANGES.txt Fri Jul 20 13:00:29 2012
@@ -6,6 +6,8 @@ Gora Change Log
 
 0.3 (trunk) Current Development:
 
+* GORA-156 Properly implement getSchemaName in CassandraStore (lewismc)
+
 * GORA-153 gora-cassandra does not correctly handle DELETED State for MAP (kazk)
 
 * GORA-152 gora-core test incorrectly uses ByteBuffer's array() method to get its byte array
(kazk)

Modified: gora/trunk/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java?rev=1363762&r1=1363761&r2=1363762&view=diff
==============================================================================
--- gora/trunk/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java
(original)
+++ gora/trunk/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java
Fri Jul 20 13:00:29 2012
@@ -405,4 +405,12 @@ public class CassandraClient<K, T extend
 
 
   }
+
+  /**
+   * Obtain Schema/Keyspace name
+   * @return Keyspace
+   */
+  public String getKeyspaceName() {
+	return this.cassandraMapping.getKeyspaceName();
+  }
 }

Modified: gora/trunk/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java?rev=1363762&r1=1363761&r2=1363762&view=diff
==============================================================================
--- gora/trunk/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java
(original)
+++ gora/trunk/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java
Fri Jul 20 13:00:29 2012
@@ -64,7 +64,7 @@ import org.slf4j.LoggerFactory;
 
 public class CassandraStore<K, T extends Persistent> extends DataStoreBase<K, T>
{
   public static final Logger LOG = LoggerFactory.getLogger(CassandraStore.class);
-  
+
   private CassandraClient<K, T>  cassandraClient = new CassandraClient<K, T>();
 
   /**
@@ -97,7 +97,7 @@ public class CassandraStore<K, T extends
 
   @Override
   public void createSchema() {
-    LOG.debug("create schema");
+    LOG.debug("creating Cassandra keyspace");
     this.cassandraClient.checkKeyspace();
   }
 
@@ -256,10 +256,14 @@ public class CassandraStore<K, T extends
     partitions.add(new PartitionQueryImpl<K,T>(query));
     return partitions;
   }
-
+  
+  /**
+   * In Cassandra Schemas are referred to as Keyspaces
+   * @return Keyspace
+   */
   @Override
   public String getSchemaName() {
-    return null;
+	return this.cassandraClient.getKeyspaceName();
   }
 
   @Override



Mime
View raw message