cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r979500 - in /cassandra/branches/cassandra-0.6: ./ lib/ lib/licenses/ src/java/org/apache/cassandra/avro/ src/java/org/apache/cassandra/service/ src/java/org/apache/cassandra/utils/
Date Tue, 27 Jul 2010 02:48:30 GMT
Author: jbellis
Date: Tue Jul 27 02:48:30 2010
New Revision: 979500

URL: http://svn.apache.org/viewvc?rev=979500&view=rev
Log:
r/m vestigal avro code from 0.6.  patch by jbellis

Removed:
    cassandra/branches/cassandra-0.6/lib/avro-1.2.0-dev.jar
    cassandra/branches/cassandra-0.6/lib/licenses/avro-1.2.0-dev.txt
    cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/avro/
    cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/ReadRepairManager.java
Modified:
    cassandra/branches/cassandra-0.6/build.xml
    cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/ReadResponseResolver.java
    cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/utils/ExpiringMap.java

Modified: cassandra/branches/cassandra-0.6/build.xml
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/build.xml?rev=979500&r1=979499&r2=979500&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/build.xml (original)
+++ cassandra/branches/cassandra-0.6/build.xml Tue Jul 27 02:48:30 2010
@@ -35,7 +35,6 @@
     <property name="interface.dir" value="${basedir}/interface"/>
     <property name="interface.thrift.dir" value="${interface.dir}/thrift"/>
     <property name="interface.thrift.gen-java" value="${interface.thrift.dir}/gen-java"/>
-    <property name="interface.avro.dir" value="${interface.dir}/avro/gen-java"/>
     <property name="test.dir" value="${basedir}/test"/>
     <property name="test.resources" value="${test.dir}/resources"/>
     <property name="test.classes" value="${build.dir}/test/classes"/>
@@ -98,7 +97,6 @@
         <delete dir="${build.test.dir}" />
         <delete dir="${build.classes}" />
         <delete dir="${build.src.gen-java}" />
-        <delete dir="${interface.avro.dir}" />
     </target>
     <target depends="clean" name="cleanall"/>
 
@@ -153,41 +151,6 @@
     </target>
 
     <!--
-       Generate avro code
-    -->
-    <target name="check-avro-generate">
-        <uptodate property="avroUpToDate"
-                  srcfile="${interface.dir}/cassandra.avpr"
-                  targetfile="${interface.avro.dir}/org/apache/cassandra/avro/Cassandra.java"
/>
-      <taskdef name="protocol"
-               classname="org.apache.avro.specific.ProtocolTask">
-        <classpath refid="cassandra.classpath" />
-      </taskdef>
-      <taskdef name="schema" classname="org.apache.avro.specific.SchemaTask">
-        <classpath refid="cassandra.classpath" />
-      </taskdef>
-      <taskdef name="paranamer" 
-          classname="com.thoughtworks.paranamer.ant.ParanamerGeneratorTask">
-        <classpath refid="cassandra.classpath" />
-      </taskdef>
-    </target>
-    <target name="avro-generate" unless="avroUpToDate"
-            depends="init,check-avro-generate">
-      <echo>Generating avro code...</echo>
-      <protocol destdir="${interface.avro.dir}">
-        <fileset dir="${interface.dir}">
-          <include name="**/*.avpr" />
-        </fileset>
-      </protocol>
-  
-      <schema destdir="${interface.avro.dir}">
-        <fileset dir="${interface.dir}">
-          <include name="**/*.avsc" />
-        </fileset>
-      </schema>
-    </target>
-
-    <!--
        Generate thrift code
     -->
     <target name="gen-thrift-java">
@@ -219,22 +182,18 @@
 	The build target builds all the .class files
     -->
     <target name="build"
-        depends="ivy-retrieve-build,avro-generate,build-subprojects,build-project"/>
+        depends="ivy-retrieve-build,build-subprojects,build-project"/>
     <target name="build-subprojects"/>
     <target name="codecoverage" depends="cobertura-instrument,test,cobertura-report"/>
     	
-    <target depends="init,avro-generate,gen-cli-grammar" name="build-project">
+    <target depends="init,gen-cli-grammar" name="build-project">
         <echo message="${ant.project.name}: ${ant.file}"/>
         <javac debug="true" debuglevel="${debuglevel}" destdir="${build.classes}">
             <src path="${build.src}"/>
             <src path="${build.src.gen-java}"/>
             <src path="${interface.thrift.dir}/gen-java"/>
-            <src path="${interface.avro.dir}"/>
             <classpath refid="cassandra.classpath"/>
         </javac>
-
-        <paranamer sourceDirectory="${interface.avro.dir}"
-               outputDirectory="${build.classes}"/>
     </target>
 
     <!--
@@ -323,7 +282,6 @@
           <include name="**"/>
           <exclude name="build/**" />
           <exclude name="src/gen-java/**" />
-          <exclude name="interface/avro/**" />
           <exclude name=".git/**" />
         </tarfileset>
       </tar>

Modified: cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/ReadResponseResolver.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/ReadResponseResolver.java?rev=979500&r1=979499&r2=979500&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/ReadResponseResolver.java
(original)
+++ cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/ReadResponseResolver.java
Tue Jul 27 02:48:30 2010
@@ -20,6 +20,7 @@ package org.apache.cassandra.service;
 
 import java.io.ByteArrayInputStream;
 import java.io.DataInputStream;
+import java.io.IOError;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -33,6 +34,7 @@ import org.apache.cassandra.db.RowMutati
 import org.apache.cassandra.db.RowMutationMessage;
 import java.net.InetAddress;
 import org.apache.cassandra.net.Message;
+import org.apache.cassandra.net.MessagingService;
 import org.apache.cassandra.utils.FBUtilities;
 import org.apache.cassandra.config.DatabaseDescriptor;
 
@@ -135,7 +137,16 @@ public class ReadResponseResolver implem
             RowMutation rowMutation = new RowMutation(table, key);
             rowMutation.add(diffCf);
             RowMutationMessage rowMutationMessage = new RowMutationMessage(rowMutation);
-            ReadRepairManager.instance.schedule(endPoints.get(i), rowMutationMessage);
+            Message repairMessage;
+            try
+            {
+                repairMessage = rowMutationMessage.makeRowMutationMessage(StorageService.Verb.READ_REPAIR);
+            }
+            catch (IOException e)
+            {
+                throw new IOError(e);
+            }
+            MessagingService.instance.sendOneWay(repairMessage, endPoints.get(i));
         }
     }
 

Modified: cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/utils/ExpiringMap.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/utils/ExpiringMap.java?rev=979500&r1=979499&r2=979500&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/utils/ExpiringMap.java
(original)
+++ cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/utils/ExpiringMap.java
Tue Jul 27 02:48:30 2010
@@ -104,16 +104,11 @@ public class ExpiringMap<K, V>
                 {
                     hook.callMe(key, value);
                 }
-                else if (globalHook_ != null)
-                {
-                    globalHook_.callMe(key, value);
-                }
             }
             expungedValues.clear();
         }
     }
 
-    private ICacheExpungeHook<K, V> globalHook_;
     private Hashtable<K, CacheableObject> cache_;
     private Map<K, ICacheExpungeHook<K, V>> hooks_;
     private Timer timer_;
@@ -142,18 +137,6 @@ public class ExpiringMap<K, V>
         init(expiration);
     }
 
-    /*
-    * Specify the TTL for objects in the cache
-    * in milliseconds and a global expunge hook. If
-    * a key has a key-specific hook installed invoke that
-    * instead.
-    */
-    public ExpiringMap(long expiration, ICacheExpungeHook<K, V> global)
-    {
-        init(expiration);
-        globalHook_ = global;
-    }
-
     public void shutdown()
     {
         timer_.cancel();
@@ -202,11 +185,6 @@ public class ExpiringMap<K, V>
         return cache_.containsKey(key);
     }
 
-    public boolean containsValue(V value)
-    {
-        return cache_.containsValue(new CacheableObject(value));
-    }
-
     public boolean isEmpty()
     {
         return cache_.isEmpty();



Mime
View raw message