You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ee...@apache.org on 2010/06/16 21:38:34 UTC
svn commit: r955358 - in /cassandra/trunk: build.xml
interface/cassandra.avpr interface/cassandra.genavro ivy.xml
Author: eevans
Date: Wed Jun 16 19:38:34 2010
New Revision: 955358
URL: http://svn.apache.org/viewvc?rev=955358&view=rev
Log:
make cassandra.genavro the canonical proto schema
cassandra.avpr has been removed from version control is now generated
from cassandra.genavro by ant. Future changes to the protocol schema
should take place in cassandra.genavro; do not hand-edit the .avpr
Patch by eevans
Removed:
cassandra/trunk/interface/cassandra.avpr
Modified:
cassandra/trunk/build.xml
cassandra/trunk/interface/cassandra.genavro
cassandra/trunk/ivy.xml
Modified: cassandra/trunk/build.xml
URL: http://svn.apache.org/viewvc/cassandra/trunk/build.xml?rev=955358&r1=955357&r2=955358&view=diff
==============================================================================
--- cassandra/trunk/build.xml (original)
+++ cassandra/trunk/build.xml Wed Jun 16 19:38:34 2010
@@ -165,7 +165,7 @@
-->
<target name="check-avro-generate">
<uptodate property="avroUpToDate"
- srcfile="${interface.dir}/cassandra.avpr"
+ srcfile="${interface.dir}/cassandra.genavro"
targetfile="${interface.avro.dir}/org/apache/cassandra/avro/Cassandra.java" />
<taskdef name="protocol"
classname="org.apache.avro.specific.ProtocolTask">
@@ -182,6 +182,15 @@
<target name="avro-generate" unless="avroUpToDate"
depends="init,check-avro-generate">
<echo>Generating avro code...</echo>
+ <!-- Generate json schema from genavro IDL -->
+ <java classname="org.apache.avro.tool.Main" fork="true">
+ <classpath refid="cassandra.classpath" />
+ <arg value="genavro" />
+ <arg value="interface/cassandra.genavro" />
+ <arg value="interface/cassandra.avpr" />
+ </java>
+
+ <!-- Generate java code from json protocol schema -->
<protocol destdir="${interface.avro.dir}">
<fileset dir="${interface.dir}">
<include name="**/*.avpr" />
@@ -195,6 +204,7 @@
</schema>
</target>
+
<!--
Generate thrift code. We have targets to build java because
Cassandra depends on it, and python because that is what the system
Modified: cassandra/trunk/interface/cassandra.genavro
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/cassandra.genavro?rev=955358&r1=955357&r2=955358&view=diff
==============================================================================
--- cassandra/trunk/interface/cassandra.genavro (original)
+++ cassandra/trunk/interface/cassandra.genavro Wed Jun 16 19:38:34 2010
@@ -1,4 +1,22 @@
/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
* Cassandra protocol
*/
@namespace("org.apache.cassandra.avro")
@@ -71,6 +89,7 @@ protocol Cassandra {
union { string, null } clock_type;
union { string, null } comparator_type;
union { string, null } subcomparator_type;
+ union { string, null } reconciler;
union { string, null } comment;
union { double, null } row_cache_size;
union { boolean, null } preload_row_cache;
Modified: cassandra/trunk/ivy.xml
URL: http://svn.apache.org/viewvc/cassandra/trunk/ivy.xml?rev=955358&r1=955357&r2=955358&view=diff
==============================================================================
--- cassandra/trunk/ivy.xml (original)
+++ cassandra/trunk/ivy.xml Wed Jun 16 19:38:34 2010
@@ -28,6 +28,7 @@
<dependency org="commons-logging" name="commons-logging" rev="1.1.1"/>
<dependency org="org.apache.rat" name="apache-rat" rev="0.6" />
<dependency org="org.apache.hadoop" name="hadoop-core" rev="0.20.2"/>
+ <dependency org="net.sf.jopt-simple" name="jopt-simple" rev="3.2"/>
</dependencies>
</ivy-module>