You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2009/09/17 23:15:51 UTC

svn commit: r816386 - in /incubator/cassandra/trunk: interface/cassandra.thrift interface/gen-java/org/apache/cassandra/service/Constants.java src/java/org/apache/cassandra/service/CassandraServer.java

Author: jbellis
Date: Thu Sep 17 21:15:49 2009
New Revision: 816386

URL: http://svn.apache.org/viewvc?rev=816386&view=rev
Log:
add thrift version string.
patch by jbellis; reviewed by Michael Greene for CASSANDRA-412

Added:
    incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Constants.java
Modified:
    incubator/cassandra/trunk/interface/cassandra.thrift
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/CassandraServer.java

Modified: incubator/cassandra/trunk/interface/cassandra.thrift
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/interface/cassandra.thrift?rev=816386&r1=816385&r2=816386&view=diff
==============================================================================
--- incubator/cassandra/trunk/interface/cassandra.thrift (original)
+++ incubator/cassandra/trunk/interface/cassandra.thrift Thu Sep 17 21:15:49 2009
@@ -1,4 +1,3 @@
-
 #!/usr/local/bin/thrift --java --php --py
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
@@ -32,6 +31,18 @@
 # Cassandra::Cassandra::Client.
 namespace rb CassandraThrift
 
+
+#
+# constants
+#
+
+# for clients checking that server and it have same thrift definitions.
+# no promises are made other than "if both are equal, you're good."
+# in particular, don't try to parse numeric information out and assume
+# that a "greater" version is a superset of a "smaller" one.
+const string VERSION = "0.5-dev-1"
+
+
 #
 # data structures
 #

Added: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Constants.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Constants.java?rev=816386&view=auto
==============================================================================
--- incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Constants.java (added)
+++ incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Constants.java Thu Sep 17 21:15:49 2009
@@ -0,0 +1,45 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.cassandra.service;
+/*
+ * 
+ * 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.
+ * 
+ */
+
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Constants {
+
+  public static final String VERSION = "0.5-dev-1";
+
+}

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/service/CassandraServer.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/service/CassandraServer.java?rev=816386&r1=816385&r2=816386&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/service/CassandraServer.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/service/CassandraServer.java Thu Sep 17 21:15:49 2009
@@ -511,7 +511,7 @@
         }
         else if (propertyName.equals("version"))
         {
-            return "0.4.0";
+            return Constants.VERSION;
         }
         else
         {