cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tylerho...@apache.org
Subject [3/4] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Date Fri, 26 Jun 2015 18:43:57 GMT
Merge branch 'cassandra-2.1' into cassandra-2.2


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

Branch: refs/heads/trunk
Commit: 239927d324408a7975966910ce91633290a8f619
Parents: a9a8483 d5698f4
Author: Tyler Hobbs <tylerlhobbs@gmail.com>
Authored: Fri Jun 26 13:43:15 2015 -0500
Committer: Tyler Hobbs <tylerlhobbs@gmail.com>
Committed: Fri Jun 26 13:43:15 2015 -0500

----------------------------------------------------------------------
 CHANGES.txt                                  | 1 +
 pylib/cqlshlib/cql3handling.py               | 1 +
 pylib/cqlshlib/test/basecase.py              | 1 +
 pylib/cqlshlib/test/cassconnect.py           | 4 ++--
 pylib/cqlshlib/test/test_cqlsh_completion.py | 6 ++++++
 5 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/239927d3/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 8469232,0611bac..811e955
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,30 -1,12 +1,31 @@@
 -2.1.8
 +2.2
 + * Allow JMX over SSL directly from nodetool (CASSANDRA-9090)
 + * Update cqlsh for UDFs (CASSANDRA-7556)
 + * Change Windows kernel default timer resolution (CASSANDRA-9634)
 + * Deprected sstable2json and json2sstable (CASSANDRA-9618)
 + * Allow native functions in user-defined aggregates (CASSANDRA-9542)
 + * Don't repair system_distributed by default (CASSANDRA-9621)
 + * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622)
 + * Rename class for DATE type in Java driver (CASSANDRA-9563)
 + * Duplicate compilation of UDFs on coordinator (CASSANDRA-9475)
 + * Fix connection leak in CqlRecordWriter (CASSANDRA-9576)
 + * Mlockall before opening system sstables & remove boot_without_jna option (CASSANDRA-9573)
 + * Add functions to convert timeuuid to date or time, deprecate dateOf and unixTimestampOf
(CASSANDRA-9229)
 + * Make sure we cancel non-compacting sstables from LifecycleTransaction (CASSANDRA-9566)
 + * Fix deprecated repair JMX API (CASSANDRA-9570)
 + * Add logback metrics (CASSANDRA-9378)
 + * Update and refactor ant test/test-compression to run the tests in parallel (CASSANDRA-9583)
 +Merged from 2.1:
   * Fix IndexOutOfBoundsException when inserting tuple with too many
     elements using the string literal notation (CASSANDRA-9559)
 - * Allow JMX over SSL directly from nodetool (CASSANDRA-9090)
 - * Fix incorrect result for IN queries where column not found (CASSANDRA-9540)
   * Enable describe on indices (CASSANDRA-7814)
 + * Fix incorrect result for IN queries where column not found (CASSANDRA-9540)
   * ColumnFamilyStore.selectAndReference may block during compaction (CASSANDRA-9637)
 + * Fix bug in cardinality check when compacting (CASSANDRA-9580)
 + * Fix memory leak in Ref due to ConcurrentLinkedQueue.remove() behaviour (CASSANDRA-9549)
 + * Make rebuild only run one at a time (CASSANDRA-9119)
  Merged from 2.0
+  * (cqlsh) Add min_threshold to DTCS option autocomplete (CASSANDRA-9385)
   * Fix error message when attempting to create an index on a column
     in a COMPACT STORAGE table with clustering columns (CASSANDRA-9527)
   * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/239927d3/pylib/cqlshlib/cql3handling.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/239927d3/pylib/cqlshlib/test/basecase.py
----------------------------------------------------------------------
diff --cc pylib/cqlshlib/test/basecase.py
index 5600f1a,5600f1a..42ef49e
--- a/pylib/cqlshlib/test/basecase.py
+++ b/pylib/cqlshlib/test/basecase.py
@@@ -45,6 -45,6 +45,7 @@@ os.symlink(path_to_cqlsh, modulepath
  sys.path.append(rundir)
  import cqlsh
  cql = cqlsh.cassandra.cluster.Cluster
++policy = cqlsh.cassandra.policies.RoundRobinPolicy()
  
  TEST_HOST = os.environ.get('CQL_TEST_HOST', '127.0.0.1')
  TEST_PORT = int(os.environ.get('CQL_TEST_PORT', 9042))

http://git-wip-us.apache.org/repos/asf/cassandra/blob/239927d3/pylib/cqlshlib/test/cassconnect.py
----------------------------------------------------------------------
diff --cc pylib/cqlshlib/test/cassconnect.py
index 21dddcd,21dddcd..0095502
--- a/pylib/cqlshlib/test/cassconnect.py
+++ b/pylib/cqlshlib/test/cassconnect.py
@@@ -19,7 -19,7 +19,7 @@@ from __future__ import with_statemen
  import contextlib
  import tempfile
  import os.path
--from .basecase import cql, cqlsh, cqlshlog, TEST_HOST, TEST_PORT, rundir
++from .basecase import cql, cqlsh, cqlshlog, TEST_HOST, TEST_PORT, rundir, policy
  from .run_cqlsh import run_cqlsh, call_cqlsh
  
  test_keyspace_init = os.path.join(rundir, 'test_keyspace_init.cql')
@@@ -27,7 -27,7 +27,7 @@@
  def get_cassandra_connection(cql_version=cqlsh.DEFAULT_CQLVER):
      if cql_version is None:
          cql_version = cqlsh.DEFAULT_CQLVER
--    conn = cql((TEST_HOST,), TEST_PORT, cql_version=cql_version)
++    conn = cql((TEST_HOST,), TEST_PORT, cql_version=cql_version, load_balancing_policy=policy)
      # until the cql lib does this for us
      conn.cql_version = cql_version
      return conn

http://git-wip-us.apache.org/repos/asf/cassandra/blob/239927d3/pylib/cqlshlib/test/test_cqlsh_completion.py
----------------------------------------------------------------------
diff --cc pylib/cqlshlib/test/test_cqlsh_completion.py
index d6ccaf7,97bd96b..8232248
--- a/pylib/cqlshlib/test/test_cqlsh_completion.py
+++ b/pylib/cqlshlib/test/test_cqlsh_completion.py
@@@ -515,150 -428,11 +515,156 @@@ class TestCqlshCompletion(CqlshCompleti
          self.trycompletions("create keyspace blah with replication = {'class': 'Sim",
                              "pleStrategy'")
  
 +    def test_complete_in_drop(self):
 +        self.trycompletions('DR', immediate='OP ')
 +        self.trycompletions('DROP ',
 +                            choices=['AGGREGATE', 'COLUMNFAMILY', 'FUNCTION',
 +                                     'INDEX', 'KEYSPACE', 'ROLE', 'TABLE',
 +                                     'TRIGGER', 'TYPE', 'USER'])
 +
      def test_complete_in_drop_keyspace(self):
 -        pass
 +        self.trycompletions('DROP K', immediate='EYSPACE ')
 +        quoted_keyspace = '"' + self.cqlsh.keyspace + '"'
 +        self.trycompletions('DROP KEYSPACE ',
 +                            choices=['IF', quoted_keyspace])
 +
 +        self.trycompletions('DROP KEYSPACE ' + quoted_keyspace,
 +                            choices=[';'])
 +
 +        self.trycompletions('DROP KEYSPACE I',
 +                            immediate='F EXISTS ' + quoted_keyspace + ';')
 +
 +    def create_columnfamily_table_template(self, name):
 +        """Parameterized test for CREATE COLUMNFAMILY and CREATE TABLE. Since
 +        they're synonyms, they should have the same completion behavior, so this
 +        test avoids duplication between tests for the two statements."""
 +        prefix = 'CREATE ' + name + ' '
 +        quoted_keyspace = '"' + self.cqlsh.keyspace + '"'
 +        self.trycompletions(prefix + '',
 +                            choices=['IF', quoted_keyspace, '<new_table_name>'])
 +        self.trycompletions(prefix + 'IF ',
 +                            immediate='NOT EXISTS ')
 +        self.trycompletions(prefix + 'IF NOT EXISTS ',
 +                            choices=['<new_table_name>', quoted_keyspace])
 +        self.trycompletions(prefix + 'IF NOT EXISTS new_table ',
 +                            immediate='( ')
 +
 +        self.trycompletions(prefix + quoted_keyspace, choices=['.', '('])
 +
 +        self.trycompletions(prefix + quoted_keyspace + '( ',
 +                            choices=['<new_column_name>', '<identifier>',
 +                                     '<quotedName>'])
 +
 +        self.trycompletions(prefix + quoted_keyspace + '.',
 +                            choices=['<new_table_name>'])
 +        self.trycompletions(prefix + quoted_keyspace + '.new_table ',
 +                            immediate='( ')
 +        self.trycompletions(prefix + quoted_keyspace + '.new_table ( ',
 +                            choices=['<new_column_name>', '<identifier>',
 +                                     '<quotedName>'])
 +
 +        self.trycompletions(prefix + ' new_table ( ',
 +                            choices=['<new_column_name>', '<identifier>',
 +                                     '<quotedName>'])
 +        self.trycompletions(prefix + ' new_table (col_a ine',
 +                            immediate='t ')
 +        self.trycompletions(prefix + ' new_table (col_a int ',
 +                            choices=[',', 'PRIMARY'])
 +        self.trycompletions(prefix + ' new_table (col_a int P',
 +                            immediate='RIMARY KEY ')
 +        self.trycompletions(prefix + ' new_table (col_a int PRIMARY KEY ',
 +                            choices=[')', ','])
 +
 +        self.trycompletions(prefix + ' new_table (col_a int PRIMARY KEY,',
 +                            choices=['<identifier>', '<quotedName>'])
 +        self.trycompletions(prefix + ' new_table (col_a int PRIMARY KEY)',
 +                            immediate=' ')
 +        self.trycompletions(prefix + ' new_table (col_a int PRIMARY KEY) ',
 +                            choices=[';', 'WITH'])
 +        self.trycompletions(prefix + ' new_table (col_a int PRIMARY KEY) W',
 +                            immediate='ITH ')
 +        self.trycompletions(prefix + ' new_table (col_a int PRIMARY KEY) WITH ',
 +                            choices=['bloom_filter_fp_chance', 'compaction',
 +                                     'compression',
 +                                     'dclocal_read_repair_chance',
 +                                     'default_time_to_live', 'gc_grace_seconds',
 +                                     'max_index_interval',
 +                                     'memtable_flush_period_in_ms',
 +                                     'read_repair_chance', 'CLUSTERING',
 +                                     'COMPACT', 'caching', 'comment',
 +                                     'min_index_interval', 'speculative_retry'])
 +        self.trycompletions(prefix + ' new_table (col_a int PRIMARY KEY) WITH ',
 +                            choices=['bloom_filter_fp_chance', 'compaction',
 +                                     'compression',
 +                                     'dclocal_read_repair_chance',
 +                                     'default_time_to_live', 'gc_grace_seconds',
 +                                     'max_index_interval',
 +                                     'memtable_flush_period_in_ms',
 +                                     'read_repair_chance', 'CLUSTERING',
 +                                     'COMPACT', 'caching', 'comment',
 +                                     'min_index_interval', 'speculative_retry'])
 +        self.trycompletions(prefix + ' new_table (col_a int PRIMARY KEY) WITH bloom_filter_fp_chance
',
 +                            immediate='= ')
 +        self.trycompletions(prefix + ' new_table (col_a int PRIMARY KEY) WITH bloom_filter_fp_chance
= ',
 +                            choices=['<float_between_0_and_1>'])
 +
 +        self.trycompletions(prefix + ' new_table (col_a int PRIMARY KEY) WITH compaction
',
 +                            immediate="= {'class': '")
 +        self.trycompletions(prefix + " new_table (col_a int PRIMARY KEY) WITH compaction
= "
 +                            + "{'class': '",
 +                            choices=['SizeTieredCompactionStrategy',
 +                                     'LeveledCompactionStrategy',
 +                                     'DateTieredCompactionStrategy'])
 +        self.trycompletions(prefix + " new_table (col_a int PRIMARY KEY) WITH compaction
= "
 +                            + "{'class': 'S",
 +                            immediate="izeTieredCompactionStrategy'")
 +        self.trycompletions(prefix + " new_table (col_a int PRIMARY KEY) WITH compaction
= "
 +                            + "{'class': 'SizeTieredCompactionStrategy",
 +                            immediate="'")
 +        self.trycompletions(prefix + " new_table (col_a int PRIMARY KEY) WITH compaction
= "
 +                            + "{'class': 'SizeTieredCompactionStrategy'",
 +                            choices=['}', ','])
 +        self.trycompletions(prefix + " new_table (col_a int PRIMARY KEY) WITH compaction
= "
 +                            + "{'class': 'SizeTieredCompactionStrategy', ",
 +                            immediate="'")
 +        self.trycompletions(prefix + " new_table (col_a int PRIMARY KEY) WITH compaction
= "
 +                            + "{'class': 'SizeTieredCompactionStrategy', '",
 +                            choices=['bucket_high', 'bucket_low', 'class',
 +                                     'enabled', 'max_threshold',
 +                                     'min_sstable_size', 'min_threshold',
 +                                     'tombstone_compaction_interval',
 +                                     'tombstone_threshold',
 +                                     'unchecked_tombstone_compaction', ])
 +        self.trycompletions(prefix + " new_table (col_a int PRIMARY KEY) WITH compaction
= "
 +                            + "{'class': 'SizeTieredCompactionStrategy'}",
 +                            choices=[';', 'AND'])
 +        self.trycompletions(prefix + " new_table (col_a int PRIMARY KEY) WITH compaction
= "
 +                            + "{'class': 'SizeTieredCompactionStrategy'} AND ",
 +                            choices=['bloom_filter_fp_chance', 'compaction',
 +                                     'compression',
 +                                     'dclocal_read_repair_chance',
 +                                     'default_time_to_live', 'gc_grace_seconds',
 +                                     'max_index_interval',
 +                                     'memtable_flush_period_in_ms',
 +                                     'read_repair_chance', 'CLUSTERING',
 +                                     'COMPACT', 'caching', 'comment',
 +                                     'min_index_interval', 'speculative_retry'])
++        self.trycompletions(prefix + " new_table (col_a int PRIMARY KEY) WITH compaction
= "
++                            + "{'class': 'DateTieredCompactionStrategy', '",
++                            choices=['base_time_seconds', 'max_sstable_age_days',
++                                    'timestamp_resolution', 'min_threshold', 'class', 'max_threshold',
++                                    'tombstone_compaction_interval', 'tombstone_threshold',
++                                    'enabled', 'unchecked_tombstone_compaction'])
  
      def test_complete_in_create_columnfamily(self):
 -        pass
 +        self.trycompletions('CREATE C', choices=['COLUMNFAMILY', 'CUSTOM'])
 +        self.trycompletions('CREATE CO', immediate='LUMNFAMILY ')
 +        self.create_columnfamily_table_template('COLUMNFAMILY')
 +
 +    def test_complete_in_create_table(self):
 +        self.trycompletions('CREATE T', choices=['TRIGGER', 'TABLE', 'TYPE'])
 +        self.trycompletions('CREATE TA', immediate='BLE ')
 +        self.create_columnfamily_table_template('TABLE')
  
      def test_complete_in_drop_columnfamily(self):
          pass


Mime
View raw message