cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [2/2] git commit: Merge branch 'cassandra-1.2' into trunk
Date Tue, 02 Jul 2013 21:15:23 GMT
Merge branch 'cassandra-1.2' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9c0ca5d6
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9c0ca5d6
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9c0ca5d6

Branch: refs/heads/trunk
Commit: 9c0ca5d6037d6e620c84af801de5b08a2e62491d
Parents: b068a9c 56c9d2f
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Wed Jul 3 00:13:03 2013 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Wed Jul 3 00:13:03 2013 +0300

----------------------------------------------------------------------
 bin/cqlsh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9c0ca5d6/bin/cqlsh
----------------------------------------------------------------------
diff --cc bin/cqlsh
index ee5b951,999d1d1..80fcefa
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@@ -557,17 -596,61 +557,17 @@@ class Shell(cmd.Cmd)
          vers['cql'] = self.cql_version
          print "[cqlsh %(shver)s | Cassandra %(build)s | CQL spec %(cql)s | Thrift protocol
%(thrift)s]" % vers
  
 -    def show_assumptions(self):
 -        all_overrides = self.schema_overrides.items()
 -        all_overrides.sort()
 -        if all_overrides:
 -            print
 -        else:
 -            print 'No overrides.'
 -            return
 -        for keyspace, ksoverrides in groupby(all_overrides, key=lambda x:x[0][0]):
 -            keyspace = self.cql_protect_name(keyspace)
 -            print 'USE %s;' % keyspace
 -            print
 -            for (ks, cf), override in ksoverrides:
 -                cf = self.cql_protect_name(cf)
 -                if override.default_name_type:
 -                    print 'ASSUME %s NAMES ARE %s;' \
 -                          % (cf, cql_typename(override.default_name_type))
 -                if override.default_value_type:
 -                    print 'ASSUME %s VALUES ARE %s;' \
 -                          % (cf, cql_typename(override.default_value_type))
 -                for colname, vtype in override.value_types.items():
 -                    colname = self.cql_protect_name(colname)
 -                    print 'ASSUME %s(%s) VALUES ARE %s;' \
 -                          % (cf, colname, cql_typename(vtype))
 -        print
 -
      def get_connection_versions(self):
 -        try:
 -            self.cursor.execute("select * from system.local where key = 'local'")
 -        except cql.ProgrammingError:
 -            vers = self.get_connection_versions_fallback()
 -        else:
 -            result = self.fetchdict()
 -            vers = {
 -                'build': result['release_version'],
 -                'thrift': result['thrift_version'],
 -                'cql': result['cql_version'],
 -            }
 +        self.cursor.execute("select * from system.local where key = 'local'")
 +        result = self.fetchdict()
 +        vers = {
 +            'build': result['release_version'],
 +            'thrift': result['thrift_version'],
 +            'cql': result['cql_version'],
 +        }
          self.connection_versions = vers
-         self.cass_ver_tuple = tuple(map(int, vers['build'].split('-', 1)[0].split('.', 2)))
+         self.cass_ver_tuple = tuple(map(int, vers['build'].split('-', 1)[0].split('.')[:3]))
  
 -    def get_connection_versions_fallback(self):
 -        if self.cqlver_atleast(3):
 -            query = 'select component, version from system."Versions"'
 -        else:
 -            query = 'select component, version from system.Versions'
 -        try:
 -            self.cursor.execute(query)
 -            vers = dict(self.cursor)
 -        except cql.ProgrammingError:
 -            # older Cassandra; doesn't have system.Versions
 -            thrift_ver = self.get_thrift_version()
 -            return {'build': '0.0.0', 'cql': 'unknown', 'thrift': thrift_ver}
 -        return vers
 -
      def fetchdict(self):
          row = self.cursor.fetchone()
          if row is None:


Mime
View raw message