You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by st...@apache.org on 2016/04/18 02:30:50 UTC
cassandra git commit: Make number of cores used by cqlsh COPY visible
to testing code
Repository: cassandra
Updated Branches:
refs/heads/trunk a600920cb -> 754379507
Make number of cores used by cqlsh COPY visible to testing code
patch by Stefania Alborghetti; reviewed by Jim Witschey for CASSANDRA-11437
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/75437950
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/75437950
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/75437950
Branch: refs/heads/trunk
Commit: 754379507c413c65a0f7ba0bf0eb68b45793c8f5
Parents: a600920
Author: Stefania Alborghetti <st...@datastax.com>
Authored: Thu Apr 7 10:35:11 2016 +0800
Committer: Stefania Alborghetti <st...@datastax.com>
Committed: Mon Apr 18 08:03:03 2016 +0800
----------------------------------------------------------------------
CHANGES.txt | 1 +
pylib/cqlshlib/copyutil.py | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/75437950/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 7bb97e5..94f3c81 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
3.6
+ * Make number of cores used by cqlsh COPY visible to testing code (CASSANDRA-11437)
* Allow filtering on clustering columns for queries without secondary indexes (CASSANDRA-11310)
* Refactor Restriction hierarchy (CASSANDRA-11354)
* Eliminate allocations in R/W path (CASSANDRA-11421)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/75437950/pylib/cqlshlib/copyutil.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/copyutil.py b/pylib/cqlshlib/copyutil.py
index 374062b..014fca4 100644
--- a/pylib/cqlshlib/copyutil.py
+++ b/pylib/cqlshlib/copyutil.py
@@ -370,8 +370,11 @@ class CopyTask(object):
"""
try:
num_cores_for_testing = os.environ.get('CQLSH_COPY_TEST_NUM_CORES', '')
- return int(num_cores_for_testing) if num_cores_for_testing else mp.cpu_count()
+ ret = int(num_cores_for_testing) if num_cores_for_testing else mp.cpu_count()
+ printdebugmsg("Detected %d core(s)" % (ret,))
+ return ret
except NotImplementedError:
+ printdebugmsg("Failed to detect number of cores, returning 1")
return 1
@staticmethod