cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eev...@apache.org
Subject svn commit: r987199 - in /cassandra/trunk: ./ lib/ src/java/org/apache/cassandra/avro/ src/java/org/apache/cassandra/config/
Date Thu, 19 Aug 2010 15:50:43 GMT
Author: eevans
Date: Thu Aug 19 15:50:42 2010
New Revision: 987199

URL: http://svn.apache.org/viewvc?rev=987199&view=rev
Log:
upgrade avro to 1.4.0 devel snapshot

* upgraded jars
* replace some use of Utf8 for java.lang.CharSequence
* actually start http server by invoking start()

Patch by eevans

Added:
    cassandra/trunk/lib/avro-1.4.0-sources~r986959.jar
    cassandra/trunk/lib/avro-1.4.0~r986959.jar
Removed:
    cassandra/trunk/lib/avro-1.3.3-sources~cust1.jar
    cassandra/trunk/lib/avro-1.3.3~cust2.jar
Modified:
    cassandra/trunk/build.xml
    cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraDaemon.java
    cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java
    cassandra/trunk/src/java/org/apache/cassandra/config/KSMetaData.java

Modified: cassandra/trunk/build.xml
URL: http://svn.apache.org/viewvc/cassandra/trunk/build.xml?rev=987199&r1=987198&r2=987199&view=diff
==============================================================================
--- cassandra/trunk/build.xml (original)
+++ cassandra/trunk/build.xml Thu Aug 19 15:50:42 2010
@@ -202,7 +202,7 @@
         <!-- Generate json schema from genavro IDL -->
         <java classname="org.apache.avro.tool.Main" fork="true">
           <classpath refid="cassandra.classpath" />
-          <arg value="genavro" />
+          <arg value="idl" />
           <arg value="@{inputfile}" />
           <arg value="@{outputdir}/cassandra.avpr" />
         </java>

Added: cassandra/trunk/lib/avro-1.4.0-sources~r986959.jar
URL: http://svn.apache.org/viewvc/cassandra/trunk/lib/avro-1.4.0-sources%7Er986959.jar?rev=987199&view=auto
==============================================================================
Files cassandra/trunk/lib/avro-1.4.0-sources~r986959.jar (added) and cassandra/trunk/lib/avro-1.4.0-sources~r986959.jar
Thu Aug 19 15:50:42 2010 differ

Added: cassandra/trunk/lib/avro-1.4.0~r986959.jar
URL: http://svn.apache.org/viewvc/cassandra/trunk/lib/avro-1.4.0%7Er986959.jar?rev=987199&view=auto
==============================================================================
Files cassandra/trunk/lib/avro-1.4.0~r986959.jar (added) and cassandra/trunk/lib/avro-1.4.0~r986959.jar
Thu Aug 19 15:50:42 2010 differ

Modified: cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraDaemon.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraDaemon.java?rev=987199&r1=987198&r2=987199&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraDaemon.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraDaemon.java Thu Aug 19 15:50:42
2010
@@ -133,6 +133,7 @@ public class CassandraDaemon extends org
         Mx4jTool.maybeLoad();
         // FIXME: This isn't actually binding to listenAddr (it should).
         server = new HttpServer(responder, listenPort);
+        server.start();
     }
     
     /** hook for JSVC */

Modified: cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java?rev=987199&r1=987198&r2=987199&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java Thu Aug 19 15:50:42
2010
@@ -453,9 +453,9 @@ public class CassandraServer implements 
         for (MutationsMapEntry pair: mutationMap)
         {
             AvroValidation.validateKey(pair.key.array());
-            Map<Utf8, GenericArray<Mutation>> cfToMutations = pair.mutations;
+            Map<CharSequence, GenericArray<Mutation>> cfToMutations = pair.mutations;
             
-            for (Map.Entry<Utf8, GenericArray<Mutation>> cfMutations : cfToMutations.entrySet())
+            for (Map.Entry<CharSequence, GenericArray<Mutation>> cfMutations
: cfToMutations.entrySet())
             {
                 String cfName = cfMutations.getKey().toString();
                 
@@ -493,11 +493,11 @@ public class CassandraServer implements 
     }
     
     // FIXME: This is copypasta from o.a.c.db.RowMutation, (RowMutation.getRowMutation uses
Thrift types directly).
-    private static RowMutation getRowMutationFromMutations(String keyspace, byte[] key, Map<Utf8,
GenericArray<Mutation>> cfMap)
+    private static RowMutation getRowMutationFromMutations(String keyspace, byte[] key, Map<CharSequence,
GenericArray<Mutation>> cfMap)
     {
         RowMutation rm = new RowMutation(keyspace, key);
         
-        for (Map.Entry<Utf8, GenericArray<Mutation>> entry : cfMap.entrySet())
+        for (Map.Entry<CharSequence, GenericArray<Mutation>> entry : cfMap.entrySet())
         {
             String cfName = entry.getKey().toString();
             
@@ -563,7 +563,7 @@ public class CassandraServer implements 
     }
 
     @Override
-    public Void set_keyspace(Utf8 keyspace) throws InvalidRequestException
+    public Void set_keyspace(CharSequence keyspace) throws InvalidRequestException
     {
         String keyspaceStr = keyspace.toString();
         
@@ -638,7 +638,7 @@ public class CassandraServer implements 
             if (ksDef.strategy_options != null && !ksDef.strategy_options.isEmpty())
             {
                 strategyOptions = new HashMap<String, String>();
-                for (Map.Entry<Utf8, Utf8> option : ksDef.strategy_options.entrySet())
+                for (Map.Entry<CharSequence, CharSequence> option : ksDef.strategy_options.entrySet())
                 {
                     strategyOptions.put(option.getKey().toString(), option.getValue().toString());
                 }
@@ -678,11 +678,11 @@ public class CassandraServer implements 
     }
 
     @Override
-    public GenericArray<Utf8> describe_keyspaces() throws AvroRemoteException
+    public GenericArray<CharSequence> describe_keyspaces() throws AvroRemoteException
     {
         Set<String> keyspaces = DatabaseDescriptor.getTables();
         Schema schema = Schema.createArray(Schema.create(Schema.Type.STRING));
-        GenericArray<Utf8> avroResults = new GenericData.Array<Utf8>(keyspaces.size(),
schema);
+        GenericArray<CharSequence> avroResults = new GenericData.Array<CharSequence>(keyspaces.size(),
schema);
         
         for (String ksp : keyspaces)
             avroResults.add(new Utf8(ksp));

Modified: cassandra/trunk/src/java/org/apache/cassandra/config/KSMetaData.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/config/KSMetaData.java?rev=987199&r1=987198&r2=987199&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/KSMetaData.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/KSMetaData.java Thu Aug 19 15:50:42
2010
@@ -78,7 +78,7 @@ public final class KSMetaData
         ks.strategy_class = new Utf8(strategyClass.getName());
         if (strategyOptions != null)
         {
-            ks.strategy_options = new HashMap<Utf8, Utf8>();
+            ks.strategy_options = new HashMap<CharSequence, CharSequence>();
             for (Map.Entry<String, String> e : strategyOptions.entrySet())
             {
                 ks.strategy_options.put(new Utf8(e.getKey()), new Utf8(e.getValue()));
@@ -106,7 +106,7 @@ public final class KSMetaData
         if (ks.strategy_options != null)
         {
             strategyOptions = new HashMap<String, String>();
-            for (Map.Entry<Utf8, Utf8> e : ks.strategy_options.entrySet())
+            for (Map.Entry<CharSequence, CharSequence> e : ks.strategy_options.entrySet())
             {
                 strategyOptions.put(e.getKey().toString(), e.getValue().toString());
             }



Mime
View raw message