Skip to content

Instantly share code, notes, and snippets.

@eevans
Created March 21, 2018 23:52
Show Gist options
  • Save eevans/af4e8e8b1893bd00e9d1accece3ff65f to your computer and use it in GitHub Desktop.
Save eevans/af4e8e8b1893bd00e9d1accece3ff65f to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
diff -u cassandra-2.2.6/debian/changelog cassandra-2.2.6/debian/changelog
--- cassandra-2.2.6/debian/changelog
+++ cassandra-2.2.6/debian/changelog
@@ -1,3 +1,9 @@
+cassandra (2.2.6-wmf3) unstable; urgency=medium
+
+ * Comment out JVM test invocation that blocks start up.
+
+ -- Eric Evans <eevans@wikimedia.org> Mon, 12 Mar 2018 11:06:06 -0500
+
cassandra (2.2.6-wmf2) unstable; urgency=medium
* Backported https://issues.apache.org/jira/browse/CASSANDRA-11752,
diff -u cassandra-2.2.6/debian/patches/00list cassandra-2.2.6/debian/patches/00list
--- cassandra-2.2.6/debian/patches/00list
+++ cassandra-2.2.6/debian/patches/00list
@@ -3,0 +4 @@
+110remove_cassandra-7254_test.dpatch
only in patch2:
unchanged:
--- cassandra-2.2.6.orig/README.wmf.md
+++ cassandra-2.2.6/README.wmf.md
@@ -0,0 +1,57 @@
+Building Cassandra for Wikimedia
+================================
+
+### Cleanup any locally generated cruft
+
+ $ rm -rf logs/ data/
+
+### Create a release artifact in the expected format
+
+ $ VERSION=2.2.6
+ $ git archive --format=tar --prefix=cassandra-$VERSION/ \
+ <treeish> | gzip > ../cassandra_$VERSION.orig.tar.gz
+
+### Build a Debian package
+
+ $ dpkg-buildpackage -rfakeroot -us -uc -i'\.git.*'
+
+Delta to 2.2.6 (release)
+-------------------------
+
+ commit c4dda2525fbe3c1f6f29fea8afa5bb6249d24070
+ Author: Eric Evans <eevans@wikimedia.org>
+ Date: Mon Mar 12 13:17:47 2018 -0500
+
+ prompt compiler to use utf-8 source encoding
+
+ commit feb033b34195ad993b57ad5192dec4471fb58aa4
+ Author: Eric Evans <eevans@wikimedia.org>
+ Date: Mon Mar 12 11:07:21 2018 -0500
+
+ Update for 2.2.6-wmf3 Debian package release
+
+ commit 3a5687f3d67240e0f6f260d9802b53ee52632e79
+ Author: Eric Evans <eevans@wikimedia.org>
+ Date: Mon Mar 12 10:57:37 2018 -0500
+
+ comment out startup test
+
+ https://issues.apache.org/jira/browse/CASSANDRA-7254 added a pre-start
+ invocation of the JVM that blocks when using the Prometheus JMX exporter. This
+ patch comments out this invocation, since the condition the test checks for
+ should not be a problem in our environment.
+
+ Bug: T186567
+
+ commit 9e94b97694c36d85ffc86e6ef00043758252df0f
+ Author: Eric Evans <eevans@wikimedia.org>
+ Date: Mon Mar 12 10:49:04 2018 -0500
+
+ import WMF build (2.2.6-wmf2)
+
+ commit e892e3e3ba1b687222915f1c4f523bb7d212d63f
+ Author: Eric Evans <eevans@wikimedia.org>
+ Date: Mon Mar 12 10:51:54 2018 -0500
+
+ README.wmf.md
+
only in patch2:
unchanged:
--- cassandra-2.2.6.orig/build.xml
+++ cassandra-2.2.6/build.xml
@@ -798,6 +798,7 @@
<src path="${build.src.gen-java}"/>
<compilerarg value="-XDignore.symbol.file"/>
<compilerarg value="-Xbootclasspath/p:${build.src.jdkoverride}"/>
+ <compilerarg line="-encoding utf-8"/>
<classpath refid="cassandra.classpath"/>
</javac>
<antcall target="createVersionPropFile"/>
@@ -1156,7 +1157,8 @@
<classpath>
<path refid="cassandra.classpath"/>
</classpath>
- <compilerarg value="-XDignore.symbol.file"/>
+ <compilerarg value="-XDignore.symbol.file"/>
+ <compilerarg line="-encoding utf-8"/>
<src path="${test.unit.src}"/>
<src path="${test.long.src}"/>
<src path="${test.burn.src}"/>
only in patch2:
unchanged:
--- cassandra-2.2.6.orig/debian/patches/110remove_cassandra-7254_test.dpatch
+++ cassandra-2.2.6/debian/patches/110remove_cassandra-7254_test.dpatch
@@ -0,0 +1,31 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 110remove_cassandra-7254_test.dpatch by Eric Evans <eevans@wikimedia.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff --git a/bin/cassandra b/bin/cassandra
+index c968c35636..f5d87f4f4f 100755
+--- a/bin/cassandra
++++ b/bin/cassandra
+@@ -257,12 +257,13 @@ while true; do
+ esac
+ done
+
+-# see CASSANDRA-7254
+-"$JAVA" -cp "$CLASSPATH" $JVM_OPTS 2>&1 | grep -q 'Error: Exception thrown by the agent : java.lang.NullPointerException'
+-if [ $? -ne "1" ]; then
+- echo Unable to bind JMX, is Cassandra already running?
+- exit 1;
+-fi
++# Blocks startup when using the Prometheus exporter agent (see: T186567)
++# # see CASSANDRA-7254
++# "$JAVA" -cp "$CLASSPATH" $JVM_OPTS 2>&1 | grep -q 'Error: Exception thrown by the agent : java.lang.NullPointerException'
++# if [ $? -ne "1" ]; then
++# echo Unable to bind JMX, is Cassandra already running?
++# exit 1;
++# fi
+
+ # Start up the service
+ launch_service "$pidfile" "$foreground" "$properties" "$classname"
only in patch2:
unchanged:
--- cassandra-2.2.6.orig/doc/cql3/CQL.html
+++ cassandra-2.2.6/doc/cql3/CQL.html
@@ -644,4 +644,4 @@
INSERT INTO atable (pk, val) VALUES (4,4);
SELECT average(val) FROM atable;
</pre></pre><p></p><p>See <a href="#createAggregateStmt"><code>CREATE AGGREGATE</code></a> and <a href="#dropAggregateStmt"><code>DROP AGGREGATE</code></a>.</p><h2 id="json">JSON Support</h2><p>Cassandra 2.2 introduces JSON support to <a href="#selectStmt"><code>SELECT</code></a> and <a href="#insertStmt"><code>INSERT</code></a> statements. This support does not fundamentally alter the CQL API (for example, the schema is still enforced), it simply provides a convenient way to work with JSON documents.</p><h3 id="selectJson">SELECT JSON</h3><p>With <code>SELECT</code> statements, the new <code>JSON</code> keyword can be used to return each row as a single <code>JSON</code> encoded map. The remainder of the <code>SELECT</code> statment behavior is the same.</p><p>The result map keys are the same as the column names in a normal result set. For example, a statement like "<code>SELECT JSON a, ttl(b) FROM ...</code>" would result in a map with keys <code>"a"</code> and <code>"ttl(b)"</code>. However, this is one notable exception: for symmetry with <code>INSERT JSON</code> behavior, case-sensitive column names with upper-case letters will be surrounded with double quotes. For example, "<code>SELECT JSON myColumn FROM ...</code>" would result in a map key <code>"\"myColumn\""</code> (note the escaped quotes).</p><p>The map values will <code>JSON</code>-encoded representations (as described below) of the result set values.</p><h3 id="insertJson">INSERT JSON</h3><p>With <code>INSERT</code> statements, the new <code>JSON</code> keyword can be used to enable inserting a <code>JSON</code> encoded map as a single row. The format of the <code>JSON</code> map should generally match that returned by a <code>SELECT JSON</code> statement on the same table. In particular, case-sensitive column names should be surrounded with double quotes. For example, to insert into a table with two columns named &#8220;myKey&#8221; and &#8220;value&#8221;, you would do the following:</p><pre class="sample"><pre>INSERT INTO mytable JSON '{"\"myKey\"": 0, "value": 0}'
-</pre></pre><p>Any columns which are ommitted from the <code>JSON</code> map will be defaulted to a <code>NULL</code> value (which will result in a tombstone being created).</p><h3 id="jsonEncoding">JSON Encoding of Cassandra Data Types</h3><p>Where possible, Cassandra will represent and accept data types in their native <code>JSON</code> representation. Cassandra will also accept string representations matching the CQL literal format for all single-field types. For example, floats, ints, UUIDs, and dates can be represented by CQL literal strings. However, compound types, such as collections, tuples, and user-defined types must be represented by native <code>JSON</code> collections (maps and lists) or a JSON-encoded string representation of the collection.</p><p>The following table describes the encodings that Cassandra will accept in <code>INSERT JSON</code> values (and <code>fromJson()</code> arguments) as well as the format Cassandra will use when returning data for <code>SELECT JSON</code> statements (and <code>fromJson()</code>):</p><table><tr><th>type </th><th>formats accepted </th><th>return format </th><th>notes</th></tr><tr><td><code>ascii</code> </td><td>string </td><td>string </td><td>Uses JSON&#8217;s <code>\u</code> character escape</td></tr><tr><td><code>bigint</code> </td><td>integer, string </td><td>integer </td><td>String must be valid 64 bit integer</td></tr><tr><td><code>blob</code> </td><td>string </td><td>string </td><td>String should be 0x followed by an even number of hex digits</td></tr><tr><td><code>boolean</code> </td><td>boolean, string </td><td>boolean </td><td>String must be &#8220;true&#8221; or "false"</td></tr><tr><td><code>date</code> </td><td>string </td><td>string </td><td>Date in format <code>YYYY-MM-DD</code>, timezone UTC</td></tr><tr><td><code>decimal</code> </td><td>integer, float, string</td><td>float </td><td>May exceed 32 or 64-bit IEEE-754 floating point precision in client-side decoder</td></tr><tr><td><code>double</code> </td><td>integer, float, string</td><td>float </td><td>String must be valid integer or float</td></tr><tr><td><code>float</code> </td><td>integer, float, string</td><td>float </td><td>String must be valid integer or float</td></tr><tr><td><code>inet</code> </td><td>string </td><td>string </td><td>IPv4 or IPv6 address</td></tr><tr><td><code>int</code> </td><td>integer, string </td><td>integer </td><td>String must be valid 32 bit integer</td></tr><tr><td><code>list</code> </td><td>list, string </td><td>list </td><td>Uses JSON&#8217;s native list representation</td></tr><tr><td><code>map</code> </td><td>map, string </td><td>map </td><td>Uses JSON&#8217;s native map representation</td></tr><tr><td><code>smallint</code> </td><td>integer, string </td><td>integer </td><td>String must be valid 16 bit integer</td></tr><tr><td><code>set</code> </td><td>list, string </td><td>list </td><td>Uses JSON&#8217;s native list representation</td></tr><tr><td><code>text</code> </td><td>string </td><td>string </td><td>Uses JSON&#8217;s <code>\u</code> character escape</td></tr><tr><td><code>time</code> </td><td>string </td><td>string </td><td>Time of day in format <code>HH-MM-SS[.fffffffff]</code></td></tr><tr><td><code>timestamp</code></td><td>integer, string </td><td>string </td><td>A timestamp. Strings constant are allow to input timestamps as dates, see <a href="#usingdates">Working with dates</a> below for more information. Datestamps with format <code>YYYY-MM-DD HH:MM:SS.SSS</code> are returned.</td></tr><tr><td><code>timeuuid</code> </td><td>string </td><td>string </td><td>Type 1 UUID. See <a href="#constants">Constants</a> for the UUID format</td></tr><tr><td><code>tinyint</code> </td><td>integer, string </td><td>integer </td><td>String must be valid 8 bit integer</td></tr><tr><td><code>tuple</code> </td><td>list, string </td><td>list </td><td>Uses JSON&#8217;s native list representation</td></tr><tr><td><code>UDT</code> </td><td>map, string </td><td>map </td><td>Uses JSON&#8217;s native map representation with field names as keys</td></tr><tr><td><code>uuid</code> </td><td>string </td><td>string </td><td>See <a href="#constants">Constants</a> for the UUID format</td></tr><tr><td><code>varchar</code> </td><td>string </td><td>string </td><td>Uses JSON&#8217;s <code>\u</code> character escape</td></tr><tr><td><code>varint</code> </td><td>integer, string </td><td>integer </td><td>Variable length; may overflow 32 or 64 bit integers in client-side decoder</td></tr></table><h3 id="fromJson">The fromJson() Function</h3><p>The <code>fromJson()</code> function may be used similarly to <code>INSERT JSON</code>, but for a single column value. It may only be used in the <code>VALUES</code> clause of an <code>INSERT</code> statement or as one of the column values in an <code>UPDATE</code>, <code>DELETE</code>, or <code>SELECT</code> statement. For example, it cannot be used in the selection clause of a <code>SELECT</code> statement.</p><h3 id="toJson">The toJson() Function</h3><p>The <code>toJson()</code> function may be used similarly to <code>SELECT JSON</code>, but for a single column value. It may only be used in the selection clause of a <code>SELECT</code> statement.</p><h2 id="appendixA">Appendix A: CQL Keywords</h2><p>CQL distinguishes between <em>reserved</em> and <em>non-reserved</em> keywords. Reserved keywords cannot be used as identifier, they are truly reserved for the language (but one can enclose a reserved keyword by double-quotes to use it as an identifier). Non-reserved keywords however only have a specific meaning in certain context but can used as identifer otherwise. The only <em>raison d'être</em> of these non-reserved keywords is convenience: some keyword are non-reserved when it was always easy for the parser to decide whether they were used as keywords or not.</p><table><tr><th>Keyword </th><th>Reserved? </th></tr><tr><td><code>ADD</code> </td><td>yes </td></tr><tr><td><code>AGGREGATE</code> </td><td>no </td></tr><tr><td><code>ALL</code> </td><td>no </td></tr><tr><td><code>ALLOW</code> </td><td>yes </td></tr><tr><td><code>ALTER</code> </td><td>yes </td></tr><tr><td><code>AND</code> </td><td>yes </td></tr><tr><td><code>APPLY</code> </td><td>yes </td></tr><tr><td><code>AS</code> </td><td>no </td></tr><tr><td><code>ASC</code> </td><td>yes </td></tr><tr><td><code>ASCII</code> </td><td>no </td></tr><tr><td><code>AUTHORIZE</code> </td><td>yes </td></tr><tr><td><code>BATCH</code> </td><td>yes </td></tr><tr><td><code>BEGIN</code> </td><td>yes </td></tr><tr><td><code>BIGINT</code> </td><td>no </td></tr><tr><td><code>BLOB</code> </td><td>no </td></tr><tr><td><code>BOOLEAN</code> </td><td>no </td></tr><tr><td><code>BY</code> </td><td>yes </td></tr><tr><td><code>CALLED</code> </td><td>no </td></tr><tr><td><code>CLUSTERING</code> </td><td>no </td></tr><tr><td><code>COLUMNFAMILY</code> </td><td>yes </td></tr><tr><td><code>COMPACT</code> </td><td>no </td></tr><tr><td><code>CONTAINS</code> </td><td>no </td></tr><tr><td><code>COUNT</code> </td><td>no </td></tr><tr><td><code>COUNTER</code> </td><td>no </td></tr><tr><td><code>CREATE</code> </td><td>yes </td></tr><tr><td><code>CUSTOM</code> </td><td>no </td></tr><tr><td><code>DATE</code> </td><td>no </td></tr><tr><td><code>DECIMAL</code> </td><td>no </td></tr><tr><td><code>DELETE</code> </td><td>yes </td></tr><tr><td><code>DESC</code> </td><td>yes </td></tr><tr><td><code>DESCRIBE</code> </td><td>yes </td></tr><tr><td><code>DISTINCT</code> </td><td>no </td></tr><tr><td><code>DOUBLE</code> </td><td>no </td></tr><tr><td><code>DROP</code> </td><td>yes </td></tr><tr><td><code>ENTRIES</code> </td><td>yes </td></tr><tr><td><code>EXECUTE</code> </td><td>yes </td></tr><tr><td><code>EXISTS</code> </td><td>no </td></tr><tr><td><code>FILTERING</code> </td><td>no </td></tr><tr><td><code>FINALFUNC</code> </td><td>no </td></tr><tr><td><code>FLOAT</code> </td><td>no </td></tr><tr><td><code>FROM</code> </td><td>yes </td></tr><tr><td><code>FROZEN</code> </td><td>no </td></tr><tr><td><code>FULL</code> </td><td>yes </td></tr><tr><td><code>FUNCTION</code> </td><td>no </td></tr><tr><td><code>FUNCTIONS</code> </td><td>no </td></tr><tr><td><code>GRANT</code> </td><td>yes </td></tr><tr><td><code>IF</code> </td><td>yes </td></tr><tr><td><code>IN</code> </td><td>yes </td></tr><tr><td><code>INDEX</code> </td><td>yes </td></tr><tr><td><code>INET</code> </td><td>no </td></tr><tr><td><code>INFINITY</code> </td><td>yes </td></tr><tr><td><code>INITCOND</code> </td><td>no </td></tr><tr><td><code>INPUT</code> </td><td>no </td></tr><tr><td><code>INSERT</code> </td><td>yes </td></tr><tr><td><code>INT</code> </td><td>no </td></tr><tr><td><code>INTO</code> </td><td>yes </td></tr><tr><td><code>JSON</code> </td><td>no </td></tr><tr><td><code>KEY</code> </td><td>no </td></tr><tr><td><code>KEYS</code> </td><td>no </td></tr><tr><td><code>KEYSPACE</code> </td><td>yes </td></tr><tr><td><code>KEYSPACES</code> </td><td>no </td></tr><tr><td><code>LANGUAGE</code> </td><td>no </td></tr><tr><td><code>LIMIT</code> </td><td>yes </td></tr><tr><td><code>LIST</code> </td><td>no </td></tr><tr><td><code>LOGIN</code> </td><td>no </td></tr><tr><td><code>MAP</code> </td><td>no </td></tr><tr><td><code>MODIFY</code> </td><td>yes </td></tr><tr><td><code>NAN</code> </td><td>yes </td></tr><tr><td><code>NOLOGIN</code> </td><td>no </td></tr><tr><td><code>NORECURSIVE</code> </td><td>yes </td></tr><tr><td><code>NOSUPERUSER</code> </td><td>no </td></tr><tr><td><code>NOT</code> </td><td>yes </td></tr><tr><td><code>NULL</code> </td><td>yes </td></tr><tr><td><code>OF</code> </td><td>yes </td></tr><tr><td><code>ON</code> </td><td>yes </td></tr><tr><td><code>OPTIONS</code> </td><td>no </td></tr><tr><td><code>OR</code> </td><td>yes </td></tr><tr><td><code>ORDER</code> </td><td>yes </td></tr><tr><td><code>PASSWORD</code> </td><td>no </td></tr><tr><td><code>PERMISSION</code> </td><td>no </td></tr><tr><td><code>PERMISSIONS</code> </td><td>no </td></tr><tr><td><code>PRIMARY</code> </td><td>yes </td></tr><tr><td><code>RENAME</code> </td><td>yes </td></tr><tr><td><code>REPLACE</code> </td><td>yes </td></tr><tr><td><code>RETURNS</code> </td><td>no </td></tr><tr><td><code>REVOKE</code> </td><td>yes </td></tr><tr><td><code>ROLE</code> </td><td>no </td></tr><tr><td><code>ROLES</code> </td><td>no </td></tr><tr><td><code>SCHEMA</code> </td><td>yes </td></tr><tr><td><code>SELECT</code> </td><td>yes </td></tr><tr><td><code>SET</code> </td><td>yes </td></tr><tr><td><code>SFUNC</code> </td><td>no </td></tr><tr><td><code>SMALLINT</code> </td><td>no </td></tr><tr><td><code>STATIC</code> </td><td>no </td></tr><tr><td><code>STORAGE</code> </td><td>no </td></tr><tr><td><code>STYPE</code> </td><td>no </td></tr><tr><td><code>SUPERUSER</code> </td><td>no </td></tr><tr><td><code>TABLE</code> </td><td>yes </td></tr><tr><td><code>TEXT</code> </td><td>no </td></tr><tr><td><code>TIME</code> </td><td>no </td></tr><tr><td><code>TIMESTAMP</code> </td><td>no </td></tr><tr><td><code>TIMEUUID</code> </td><td>no </td></tr><tr><td><code>TINYINT</code> </td><td>no </td></tr><tr><td><code>TO</code> </td><td>yes </td></tr><tr><td><code>TOKEN</code> </td><td>yes </td></tr><tr><td><code>TRIGGER</code> </td><td>no </td></tr><tr><td><code>TRUNCATE</code> </td><td>yes </td></tr><tr><td><code>TTL</code> </td><td>no </td></tr><tr><td><code>TUPLE</code> </td><td>no </td></tr><tr><td><code>TYPE</code> </td><td>no </td></tr><tr><td><code>UNLOGGED</code> </td><td>yes </td></tr><tr><td><code>UPDATE</code> </td><td>yes </td></tr><tr><td><code>USE</code> </td><td>yes </td></tr><tr><td><code>USER</code> </td><td>no </td></tr><tr><td><code>USERS</code> </td><td>no </td></tr><tr><td><code>USING</code> </td><td>yes </td></tr><tr><td><code>UUID</code> </td><td>no </td></tr><tr><td><code>VALUES</code> </td><td>no </td></tr><tr><td><code>VARCHAR</code> </td><td>no </td></tr><tr><td><code>VARINT</code> </td><td>no </td></tr><tr><td><code>WHERE</code> </td><td>yes </td></tr><tr><td><code>WITH</code> </td><td>yes </td></tr><tr><td><code>WRITETIME</code> </td><td>no </td></tr></table><h2 id="appendixB">Appendix B: CQL Reserved Types</h2><p>The following type names are not currently used by CQL, but are reserved for potential future use. User-defined types may not use reserved type names as their name.</p><table><tr><th>type </th></tr><tr><td><code>bitstring</code> </td></tr><tr><td><code>byte</code> </td></tr><tr><td><code>complex</code> </td></tr><tr><td><code>date</code> </td></tr><tr><td><code>enum</code> </td></tr><tr><td><code>interval</code> </td></tr><tr><td><code>macaddr</code> </td></tr><tr><td><code>smallint</code> </td></tr></table><h2 id="changes">Changes</h2><p>The following describes the changes in each version of CQL.</p><h3 id="a3.3.1">3.3.1</h3><ul><li>The syntax <code>TRUNCATE TABLE X</code> is now accepted as an alias for <code>TRUNCATE X</code></li></ul><h3 id="a3.3.0">3.3.0</h3><ul><li>Adds new <a href="#aggregates">aggregates</a></li><li>User-defined functions are now supported through <a href="#createFunctionStmt"><code>CREATE FUNCTION</code></a> and <a href="#dropFunctionStmt"><code>DROP FUNCTION</code></a>.</li><li>User-defined aggregates are now supported through <a href="#createAggregateStmt"><code>CREATE AGGREGATE</code></a> and <a href="#dropAggregateStmt"><code>DROP AGGREGATE</code></a>.</li><li>Allows double-dollar enclosed strings literals as an alternative to single-quote enclosed strings.</li><li>Introduces Roles to supercede user based authentication and access control</li><li><a href="#usingdates"><code>Date</code></a> and <a href="usingtime"><code>Time</code></a> data types have been added</li><li><a href="#json"><code>JSON</code></a> support has been added</li><li><code>Tinyint</code> and <code>Smallint</code> data types have been added</li><li>Adds new time conversion functions and deprecate <code>dateOf</code> and <code>unixTimestampOf</code>. See <a href="#timeFun"><code>Time conversion functions</code></a></li></ul><h3 id="a3.2.0">3.2.0</h3><ul><li>User-defined types are now supported through <a href="#createTypeStmt"><code>CREATE TYPE</code></a>, <a href="#alterTypeStmt"><code>ALTER TYPE</code></a>, and <a href="#dropTypeStmt"><code>DROP TYPE</code></a></li><li><a href="#createIndexStmt"><code>CREATE INDEX</code></a> now supports indexing collection columns, including indexing the keys of map collections through the <code>keys()</code> function</li><li>Indexes on collections may be queried using the new <code>CONTAINS</code> and <code>CONTAINS KEY</code> operators</li><li>Tuple types were added to hold fixed-length sets of typed positional fields (see the section on <a href="#types">types</a> )</li><li><a href="#dropIndexStmt"><code>DROP INDEX</code></a> now supports optionally specifying a keyspace</li></ul><h3 id="a3.1.7">3.1.7</h3><ul><li><code>SELECT</code> statements now support selecting multiple rows in a single partition using an <code>IN</code> clause on combinations of clustering columns. See <a href="#selectWhere">SELECT WHERE</a> clauses.</li><li><code>IF NOT EXISTS</code> and <code>IF EXISTS</code> syntax is now supported by <code>CREATE USER</code> and <code>DROP USER</code> statmenets, respectively.</li></ul><h3 id="a3.1.6">3.1.6</h3><ul><li>A new <a href="#uuidFun"><code>uuid</code> method</a> has been added.</li><li>Support for <code>DELETE ... IF EXISTS</code> syntax.</li></ul><h3 id="a3.1.5">3.1.5</h3><ul><li>It is now possible to group clustering columns in a relatiion, see <a href="#selectWhere">SELECT WHERE</a> clauses.</li><li>Added support for <code>STATIC</code> columns, see <a href="#createTableStatic">static in CREATE TABLE</a>.</li></ul><h3 id="a3.1.4">3.1.4</h3><ul><li><code>CREATE INDEX</code> now allows specifying options when creating CUSTOM indexes (see <a href="#createIndexStmt">CREATE INDEX reference</a> ).</li></ul><h3 id="a3.1.3">3.1.3</h3><ul><li>Millisecond precision formats have been added to the timestamp parser (see <a href="#usingtimestamps">working with dates</a> ).</li></ul><h3 id="a3.1.2">3.1.2</h3><ul><li><code>NaN</code> and <code>Infinity</code> has been added as valid float contants. They are now reserved keywords. In the unlikely case you we using them as a column identifier (or keyspace/table one), you will noew need to double quote them (see <a href="#identifiers">quote identifiers</a> ).</li></ul><h3 id="a3.1.1">3.1.1</h3><ul><li><code>SELECT</code> statement now allows listing the partition keys (using the <code>DISTINCT</code> modifier). See <a href="https://issues.apache.org/jira/browse/CASSANDRA-4536">CASSANDRA-4536</a>.</li><li>The syntax <code>c IN ?</code> is now supported in <code>WHERE</code> clauses. In that case, the value expected for the bind variable will be a list of whatever type <code>c</code> is.</li><li>It is now possible to use named bind variables (using <code>:name</code> instead of <code>?</code>).</li></ul><h3 id="a3.1.0">3.1.0</h3><ul><li><a href="#alterTableStmt">ALTER TABLE</a> <code>DROP</code> option has been reenabled for CQL3 tables and has new semantics now: the space formerly used by dropped columns will now be eventually reclaimed (post-compaction). You should not readd previously dropped columns unless you use timestamps with microsecond precision (see <a href="https://issues.apache.org/jira/browse/CASSANDRA-3919">CASSANDRA-3919</a> for more details).</li><li><code>SELECT</code> statement now supports aliases in select clause. Aliases in WHERE and ORDER BY clauses are not supported. See the <a href="#selectStmt">section on select</a> for details.</li><li><code>CREATE</code> statements for <code>KEYSPACE</code>, <code>TABLE</code> and <code>INDEX</code> now supports an <code>IF NOT EXISTS</code> condition. Similarly, <code>DROP</code> statements support a <code>IF EXISTS</code> condition.</li><li><code>INSERT</code> statements optionally supports a <code>IF NOT EXISTS</code> condition and <code>UPDATE</code> supports <code>IF</code> conditions.</li></ul><h3 id="a3.0.5">3.0.5</h3><ul><li><code>SELECT</code>, <code>UPDATE</code>, and <code>DELETE</code> statements now allow empty <code>IN</code> relations (see <a href="https://issues.apache.org/jira/browse/CASSANDRA-5626">CASSANDRA-5626</a>).</li></ul><h3 id="a3.0.4">3.0.4</h3><ul><li>Updated the syntax for custom <a href="#createIndexStmt">secondary indexes</a>.</li><li>Non-equal condition on the partition key are now never supported, even for ordering partitioner as this was not correct (the order was <strong>not</strong> the one of the type of the partition key). Instead, the <code>token</code> method should always be used for range queries on the partition key (see <a href="#selectWhere">WHERE clauses</a> ).</li></ul><h3 id="a3.0.3">3.0.3</h3><ul><li>Support for custom <a href="#createIndexStmt">secondary indexes</a> has been added.</li></ul><h3 id="a3.0.2">3.0.2</h3><ul><li>Type validation for the <a href="#constants">constants</a> has been fixed. For instance, the implementation used to allow <code>'2'</code> as a valid value for an <code>int</code> column (interpreting it has the equivalent of <code>2</code>), or <code>42</code> as a valid <code>blob</code> value (in which case <code>42</code> was interpreted as an hexadecimal representation of the blob). This is no longer the case, type validation of constants is now more strict. See the <a href="#types">data types</a> section for details on which constant is allowed for which type.</li><li>The type validation fixed of the previous point has lead to the introduction of <a href="#constants">blobs constants</a> to allow inputing blobs. Do note that while inputing blobs as strings constant is still supported by this version (to allow smoother transition to blob constant), it is now deprecated (in particular the <a href="#types">data types</a> section does not list strings constants as valid blobs) and will be removed by a future version. If you were using strings as blobs, you should thus update your client code ASAP to switch blob constants.</li><li>A number of functions to convert native types to blobs have also been introduced. Furthermore the token function is now also allowed in select clauses. See the <a href="#functions">section on functions</a> for details.</li></ul><h3 id="a3.0.1">3.0.1</h3><ul><li><a href="#usingtimestamps">Date strings</a> (and timestamps) are no longer accepted as valid <code>timeuuid</code> values. Doing so was a bug in the sense that date string are not valid <code>timeuuid</code>, and it was thus resulting in <a href="https://issues.apache.org/jira/browse/CASSANDRA-4936">confusing behaviors</a>. However, the following new methods have been added to help working with <code>timeuuid</code>: <code>now</code>, <code>minTimeuuid</code>, <code>maxTimeuuid</code> , <code>dateOf</code> and <code>unixTimestampOf</code>. See the <a href="#timeuuidFun">section dedicated to these methods</a> for more detail.</li><li>&#8220;Float constants&#8221;#constants now support the exponent notation. In other words, <code>4.2E10</code> is now a valid floating point value.</li></ul><h2 id="Versioning">Versioning</h2><p>Versioning of the CQL language adheres to the <a href="http://semver.org">Semantic Versioning</a> guidelines. Versions take the form X.Y.Z where X, Y, and Z are integer values representing major, minor, and patch level respectively. There is no correlation between Cassandra release versions and the CQL language version.</p><table><tr><th>version</th><th>description</th></tr><tr><td>Major </td><td>The major version <em>must</em> be bumped when backward incompatible changes are introduced. This should rarely occur.</td></tr><tr><td>Minor </td><td>Minor version increments occur when new, but backward compatible, functionality is introduced.</td></tr><tr><td>Patch </td><td>The patch version is incremented when bugs are fixed.</td></tr></table></body></html>
\ No newline at end of file
+</pre></pre><p>Any columns which are ommitted from the <code>JSON</code> map will be defaulted to a <code>NULL</code> value (which will result in a tombstone being created).</p><h3 id="jsonEncoding">JSON Encoding of Cassandra Data Types</h3><p>Where possible, Cassandra will represent and accept data types in their native <code>JSON</code> representation. Cassandra will also accept string representations matching the CQL literal format for all single-field types. For example, floats, ints, UUIDs, and dates can be represented by CQL literal strings. However, compound types, such as collections, tuples, and user-defined types must be represented by native <code>JSON</code> collections (maps and lists) or a JSON-encoded string representation of the collection.</p><p>The following table describes the encodings that Cassandra will accept in <code>INSERT JSON</code> values (and <code>fromJson()</code> arguments) as well as the format Cassandra will use when returning data for <code>SELECT JSON</code> statements (and <code>fromJson()</code>):</p><table><tr><th>type </th><th>formats accepted </th><th>return format </th><th>notes</th></tr><tr><td><code>ascii</code> </td><td>string </td><td>string </td><td>Uses JSON&#8217;s <code>\u</code> character escape</td></tr><tr><td><code>bigint</code> </td><td>integer, string </td><td>integer </td><td>String must be valid 64 bit integer</td></tr><tr><td><code>blob</code> </td><td>string </td><td>string </td><td>String should be 0x followed by an even number of hex digits</td></tr><tr><td><code>boolean</code> </td><td>boolean, string </td><td>boolean </td><td>String must be &#8220;true&#8221; or "false"</td></tr><tr><td><code>date</code> </td><td>string </td><td>string </td><td>Date in format <code>YYYY-MM-DD</code>, timezone UTC</td></tr><tr><td><code>decimal</code> </td><td>integer, float, string</td><td>float </td><td>May exceed 32 or 64-bit IEEE-754 floating point precision in client-side decoder</td></tr><tr><td><code>double</code> </td><td>integer, float, string</td><td>float </td><td>String must be valid integer or float</td></tr><tr><td><code>float</code> </td><td>integer, float, string</td><td>float </td><td>String must be valid integer or float</td></tr><tr><td><code>inet</code> </td><td>string </td><td>string </td><td>IPv4 or IPv6 address</td></tr><tr><td><code>int</code> </td><td>integer, string </td><td>integer </td><td>String must be valid 32 bit integer</td></tr><tr><td><code>list</code> </td><td>list, string </td><td>list </td><td>Uses JSON&#8217;s native list representation</td></tr><tr><td><code>map</code> </td><td>map, string </td><td>map </td><td>Uses JSON&#8217;s native map representation</td></tr><tr><td><code>smallint</code> </td><td>integer, string </td><td>integer </td><td>String must be valid 16 bit integer</td></tr><tr><td><code>set</code> </td><td>list, string </td><td>list </td><td>Uses JSON&#8217;s native list representation</td></tr><tr><td><code>text</code> </td><td>string </td><td>string </td><td>Uses JSON&#8217;s <code>\u</code> character escape</td></tr><tr><td><code>time</code> </td><td>string </td><td>string </td><td>Time of day in format <code>HH-MM-SS[.fffffffff]</code></td></tr><tr><td><code>timestamp</code></td><td>integer, string </td><td>string </td><td>A timestamp. Strings constant are allow to input timestamps as dates, see <a href="#usingdates">Working with dates</a> below for more information. Datestamps with format <code>YYYY-MM-DD HH:MM:SS.SSS</code> are returned.</td></tr><tr><td><code>timeuuid</code> </td><td>string </td><td>string </td><td>Type 1 UUID. See <a href="#constants">Constants</a> for the UUID format</td></tr><tr><td><code>tinyint</code> </td><td>integer, string </td><td>integer </td><td>String must be valid 8 bit integer</td></tr><tr><td><code>tuple</code> </td><td>list, string </td><td>list </td><td>Uses JSON&#8217;s native list representation</td></tr><tr><td><code>UDT</code> </td><td>map, string </td><td>map </td><td>Uses JSON&#8217;s native map representation with field names as keys</td></tr><tr><td><code>uuid</code> </td><td>string </td><td>string </td><td>See <a href="#constants">Constants</a> for the UUID format</td></tr><tr><td><code>varchar</code> </td><td>string </td><td>string </td><td>Uses JSON&#8217;s <code>\u</code> character escape</td></tr><tr><td><code>varint</code> </td><td>integer, string </td><td>integer </td><td>Variable length; may overflow 32 or 64 bit integers in client-side decoder</td></tr></table><h3 id="fromJson">The fromJson() Function</h3><p>The <code>fromJson()</code> function may be used similarly to <code>INSERT JSON</code>, but for a single column value. It may only be used in the <code>VALUES</code> clause of an <code>INSERT</code> statement or as one of the column values in an <code>UPDATE</code>, <code>DELETE</code>, or <code>SELECT</code> statement. For example, it cannot be used in the selection clause of a <code>SELECT</code> statement.</p><h3 id="toJson">The toJson() Function</h3><p>The <code>toJson()</code> function may be used similarly to <code>SELECT JSON</code>, but for a single column value. It may only be used in the selection clause of a <code>SELECT</code> statement.</p><h2 id="appendixA">Appendix A: CQL Keywords</h2><p>CQL distinguishes between <em>reserved</em> and <em>non-reserved</em> keywords. Reserved keywords cannot be used as identifier, they are truly reserved for the language (but one can enclose a reserved keyword by double-quotes to use it as an identifier). Non-reserved keywords however only have a specific meaning in certain context but can used as identifer otherwise. The only <em>raison d'��tre</em> of these non-reserved keywords is convenience: some keyword are non-reserved when it was always easy for the parser to decide whether they were used as keywords or not.</p><table><tr><th>Keyword </th><th>Reserved? </th></tr><tr><td><code>ADD</code> </td><td>yes </td></tr><tr><td><code>AGGREGATE</code> </td><td>no </td></tr><tr><td><code>ALL</code> </td><td>no </td></tr><tr><td><code>ALLOW</code> </td><td>yes </td></tr><tr><td><code>ALTER</code> </td><td>yes </td></tr><tr><td><code>AND</code> </td><td>yes </td></tr><tr><td><code>APPLY</code> </td><td>yes </td></tr><tr><td><code>AS</code> </td><td>no </td></tr><tr><td><code>ASC</code> </td><td>yes </td></tr><tr><td><code>ASCII</code> </td><td>no </td></tr><tr><td><code>AUTHORIZE</code> </td><td>yes </td></tr><tr><td><code>BATCH</code> </td><td>yes </td></tr><tr><td><code>BEGIN</code> </td><td>yes </td></tr><tr><td><code>BIGINT</code> </td><td>no </td></tr><tr><td><code>BLOB</code> </td><td>no </td></tr><tr><td><code>BOOLEAN</code> </td><td>no </td></tr><tr><td><code>BY</code> </td><td>yes </td></tr><tr><td><code>CALLED</code> </td><td>no </td></tr><tr><td><code>CLUSTERING</code> </td><td>no </td></tr><tr><td><code>COLUMNFAMILY</code> </td><td>yes </td></tr><tr><td><code>COMPACT</code> </td><td>no </td></tr><tr><td><code>CONTAINS</code> </td><td>no </td></tr><tr><td><code>COUNT</code> </td><td>no </td></tr><tr><td><code>COUNTER</code> </td><td>no </td></tr><tr><td><code>CREATE</code> </td><td>yes </td></tr><tr><td><code>CUSTOM</code> </td><td>no </td></tr><tr><td><code>DATE</code> </td><td>no </td></tr><tr><td><code>DECIMAL</code> </td><td>no </td></tr><tr><td><code>DELETE</code> </td><td>yes </td></tr><tr><td><code>DESC</code> </td><td>yes </td></tr><tr><td><code>DESCRIBE</code> </td><td>yes </td></tr><tr><td><code>DISTINCT</code> </td><td>no </td></tr><tr><td><code>DOUBLE</code> </td><td>no </td></tr><tr><td><code>DROP</code> </td><td>yes </td></tr><tr><td><code>ENTRIES</code> </td><td>yes </td></tr><tr><td><code>EXECUTE</code> </td><td>yes </td></tr><tr><td><code>EXISTS</code> </td><td>no </td></tr><tr><td><code>FILTERING</code> </td><td>no </td></tr><tr><td><code>FINALFUNC</code> </td><td>no </td></tr><tr><td><code>FLOAT</code> </td><td>no </td></tr><tr><td><code>FROM</code> </td><td>yes </td></tr><tr><td><code>FROZEN</code> </td><td>no </td></tr><tr><td><code>FULL</code> </td><td>yes </td></tr><tr><td><code>FUNCTION</code> </td><td>no </td></tr><tr><td><code>FUNCTIONS</code> </td><td>no </td></tr><tr><td><code>GRANT</code> </td><td>yes </td></tr><tr><td><code>IF</code> </td><td>yes </td></tr><tr><td><code>IN</code> </td><td>yes </td></tr><tr><td><code>INDEX</code> </td><td>yes </td></tr><tr><td><code>INET</code> </td><td>no </td></tr><tr><td><code>INFINITY</code> </td><td>yes </td></tr><tr><td><code>INITCOND</code> </td><td>no </td></tr><tr><td><code>INPUT</code> </td><td>no </td></tr><tr><td><code>INSERT</code> </td><td>yes </td></tr><tr><td><code>INT</code> </td><td>no </td></tr><tr><td><code>INTO</code> </td><td>yes </td></tr><tr><td><code>JSON</code> </td><td>no </td></tr><tr><td><code>KEY</code> </td><td>no </td></tr><tr><td><code>KEYS</code> </td><td>no </td></tr><tr><td><code>KEYSPACE</code> </td><td>yes </td></tr><tr><td><code>KEYSPACES</code> </td><td>no </td></tr><tr><td><code>LANGUAGE</code> </td><td>no </td></tr><tr><td><code>LIMIT</code> </td><td>yes </td></tr><tr><td><code>LIST</code> </td><td>no </td></tr><tr><td><code>LOGIN</code> </td><td>no </td></tr><tr><td><code>MAP</code> </td><td>no </td></tr><tr><td><code>MODIFY</code> </td><td>yes </td></tr><tr><td><code>NAN</code> </td><td>yes </td></tr><tr><td><code>NOLOGIN</code> </td><td>no </td></tr><tr><td><code>NORECURSIVE</code> </td><td>yes </td></tr><tr><td><code>NOSUPERUSER</code> </td><td>no </td></tr><tr><td><code>NOT</code> </td><td>yes </td></tr><tr><td><code>NULL</code> </td><td>yes </td></tr><tr><td><code>OF</code> </td><td>yes </td></tr><tr><td><code>ON</code> </td><td>yes </td></tr><tr><td><code>OPTIONS</code> </td><td>no </td></tr><tr><td><code>OR</code> </td><td>yes </td></tr><tr><td><code>ORDER</code> </td><td>yes </td></tr><tr><td><code>PASSWORD</code> </td><td>no </td></tr><tr><td><code>PERMISSION</code> </td><td>no </td></tr><tr><td><code>PERMISSIONS</code> </td><td>no </td></tr><tr><td><code>PRIMARY</code> </td><td>yes </td></tr><tr><td><code>RENAME</code> </td><td>yes </td></tr><tr><td><code>REPLACE</code> </td><td>yes </td></tr><tr><td><code>RETURNS</code> </td><td>no </td></tr><tr><td><code>REVOKE</code> </td><td>yes </td></tr><tr><td><code>ROLE</code> </td><td>no </td></tr><tr><td><code>ROLES</code> </td><td>no </td></tr><tr><td><code>SCHEMA</code> </td><td>yes </td></tr><tr><td><code>SELECT</code> </td><td>yes </td></tr><tr><td><code>SET</code> </td><td>yes </td></tr><tr><td><code>SFUNC</code> </td><td>no </td></tr><tr><td><code>SMALLINT</code> </td><td>no </td></tr><tr><td><code>STATIC</code> </td><td>no </td></tr><tr><td><code>STORAGE</code> </td><td>no </td></tr><tr><td><code>STYPE</code> </td><td>no </td></tr><tr><td><code>SUPERUSER</code> </td><td>no </td></tr><tr><td><code>TABLE</code> </td><td>yes </td></tr><tr><td><code>TEXT</code> </td><td>no </td></tr><tr><td><code>TIME</code> </td><td>no </td></tr><tr><td><code>TIMESTAMP</code> </td><td>no </td></tr><tr><td><code>TIMEUUID</code> </td><td>no </td></tr><tr><td><code>TINYINT</code> </td><td>no </td></tr><tr><td><code>TO</code> </td><td>yes </td></tr><tr><td><code>TOKEN</code> </td><td>yes </td></tr><tr><td><code>TRIGGER</code> </td><td>no </td></tr><tr><td><code>TRUNCATE</code> </td><td>yes </td></tr><tr><td><code>TTL</code> </td><td>no </td></tr><tr><td><code>TUPLE</code> </td><td>no </td></tr><tr><td><code>TYPE</code> </td><td>no </td></tr><tr><td><code>UNLOGGED</code> </td><td>yes </td></tr><tr><td><code>UPDATE</code> </td><td>yes </td></tr><tr><td><code>USE</code> </td><td>yes </td></tr><tr><td><code>USER</code> </td><td>no </td></tr><tr><td><code>USERS</code> </td><td>no </td></tr><tr><td><code>USING</code> </td><td>yes </td></tr><tr><td><code>UUID</code> </td><td>no </td></tr><tr><td><code>VALUES</code> </td><td>no </td></tr><tr><td><code>VARCHAR</code> </td><td>no </td></tr><tr><td><code>VARINT</code> </td><td>no </td></tr><tr><td><code>WHERE</code> </td><td>yes </td></tr><tr><td><code>WITH</code> </td><td>yes </td></tr><tr><td><code>WRITETIME</code> </td><td>no </td></tr></table><h2 id="appendixB">Appendix B: CQL Reserved Types</h2><p>The following type names are not currently used by CQL, but are reserved for potential future use. User-defined types may not use reserved type names as their name.</p><table><tr><th>type </th></tr><tr><td><code>bitstring</code> </td></tr><tr><td><code>byte</code> </td></tr><tr><td><code>complex</code> </td></tr><tr><td><code>date</code> </td></tr><tr><td><code>enum</code> </td></tr><tr><td><code>interval</code> </td></tr><tr><td><code>macaddr</code> </td></tr><tr><td><code>smallint</code> </td></tr></table><h2 id="changes">Changes</h2><p>The following describes the changes in each version of CQL.</p><h3 id="a3.3.1">3.3.1</h3><ul><li>The syntax <code>TRUNCATE TABLE X</code> is now accepted as an alias for <code>TRUNCATE X</code></li></ul><h3 id="a3.3.0">3.3.0</h3><ul><li>Adds new <a href="#aggregates">aggregates</a></li><li>User-defined functions are now supported through <a href="#createFunctionStmt"><code>CREATE FUNCTION</code></a> and <a href="#dropFunctionStmt"><code>DROP FUNCTION</code></a>.</li><li>User-defined aggregates are now supported through <a href="#createAggregateStmt"><code>CREATE AGGREGATE</code></a> and <a href="#dropAggregateStmt"><code>DROP AGGREGATE</code></a>.</li><li>Allows double-dollar enclosed strings literals as an alternative to single-quote enclosed strings.</li><li>Introduces Roles to supercede user based authentication and access control</li><li><a href="#usingdates"><code>Date</code></a> and <a href="usingtime"><code>Time</code></a> data types have been added</li><li><a href="#json"><code>JSON</code></a> support has been added</li><li><code>Tinyint</code> and <code>Smallint</code> data types have been added</li><li>Adds new time conversion functions and deprecate <code>dateOf</code> and <code>unixTimestampOf</code>. See <a href="#timeFun"><code>Time conversion functions</code></a></li></ul><h3 id="a3.2.0">3.2.0</h3><ul><li>User-defined types are now supported through <a href="#createTypeStmt"><code>CREATE TYPE</code></a>, <a href="#alterTypeStmt"><code>ALTER TYPE</code></a>, and <a href="#dropTypeStmt"><code>DROP TYPE</code></a></li><li><a href="#createIndexStmt"><code>CREATE INDEX</code></a> now supports indexing collection columns, including indexing the keys of map collections through the <code>keys()</code> function</li><li>Indexes on collections may be queried using the new <code>CONTAINS</code> and <code>CONTAINS KEY</code> operators</li><li>Tuple types were added to hold fixed-length sets of typed positional fields (see the section on <a href="#types">types</a> )</li><li><a href="#dropIndexStmt"><code>DROP INDEX</code></a> now supports optionally specifying a keyspace</li></ul><h3 id="a3.1.7">3.1.7</h3><ul><li><code>SELECT</code> statements now support selecting multiple rows in a single partition using an <code>IN</code> clause on combinations of clustering columns. See <a href="#selectWhere">SELECT WHERE</a> clauses.</li><li><code>IF NOT EXISTS</code> and <code>IF EXISTS</code> syntax is now supported by <code>CREATE USER</code> and <code>DROP USER</code> statmenets, respectively.</li></ul><h3 id="a3.1.6">3.1.6</h3><ul><li>A new <a href="#uuidFun"><code>uuid</code> method</a> has been added.</li><li>Support for <code>DELETE ... IF EXISTS</code> syntax.</li></ul><h3 id="a3.1.5">3.1.5</h3><ul><li>It is now possible to group clustering columns in a relatiion, see <a href="#selectWhere">SELECT WHERE</a> clauses.</li><li>Added support for <code>STATIC</code> columns, see <a href="#createTableStatic">static in CREATE TABLE</a>.</li></ul><h3 id="a3.1.4">3.1.4</h3><ul><li><code>CREATE INDEX</code> now allows specifying options when creating CUSTOM indexes (see <a href="#createIndexStmt">CREATE INDEX reference</a> ).</li></ul><h3 id="a3.1.3">3.1.3</h3><ul><li>Millisecond precision formats have been added to the timestamp parser (see <a href="#usingtimestamps">working with dates</a> ).</li></ul><h3 id="a3.1.2">3.1.2</h3><ul><li><code>NaN</code> and <code>Infinity</code> has been added as valid float contants. They are now reserved keywords. In the unlikely case you we using them as a column identifier (or keyspace/table one), you will noew need to double quote them (see <a href="#identifiers">quote identifiers</a> ).</li></ul><h3 id="a3.1.1">3.1.1</h3><ul><li><code>SELECT</code> statement now allows listing the partition keys (using the <code>DISTINCT</code> modifier). See <a href="https://issues.apache.org/jira/browse/CASSANDRA-4536">CASSANDRA-4536</a>.</li><li>The syntax <code>c IN ?</code> is now supported in <code>WHERE</code> clauses. In that case, the value expected for the bind variable will be a list of whatever type <code>c</code> is.</li><li>It is now possible to use named bind variables (using <code>:name</code> instead of <code>?</code>).</li></ul><h3 id="a3.1.0">3.1.0</h3><ul><li><a href="#alterTableStmt">ALTER TABLE</a> <code>DROP</code> option has been reenabled for CQL3 tables and has new semantics now: the space formerly used by dropped columns will now be eventually reclaimed (post-compaction). You should not readd previously dropped columns unless you use timestamps with microsecond precision (see <a href="https://issues.apache.org/jira/browse/CASSANDRA-3919">CASSANDRA-3919</a> for more details).</li><li><code>SELECT</code> statement now supports aliases in select clause. Aliases in WHERE and ORDER BY clauses are not supported. See the <a href="#selectStmt">section on select</a> for details.</li><li><code>CREATE</code> statements for <code>KEYSPACE</code>, <code>TABLE</code> and <code>INDEX</code> now supports an <code>IF NOT EXISTS</code> condition. Similarly, <code>DROP</code> statements support a <code>IF EXISTS</code> condition.</li><li><code>INSERT</code> statements optionally supports a <code>IF NOT EXISTS</code> condition and <code>UPDATE</code> supports <code>IF</code> conditions.</li></ul><h3 id="a3.0.5">3.0.5</h3><ul><li><code>SELECT</code>, <code>UPDATE</code>, and <code>DELETE</code> statements now allow empty <code>IN</code> relations (see <a href="https://issues.apache.org/jira/browse/CASSANDRA-5626">CASSANDRA-5626</a>).</li></ul><h3 id="a3.0.4">3.0.4</h3><ul><li>Updated the syntax for custom <a href="#createIndexStmt">secondary indexes</a>.</li><li>Non-equal condition on the partition key are now never supported, even for ordering partitioner as this was not correct (the order was <strong>not</strong> the one of the type of the partition key). Instead, the <code>token</code> method should always be used for range queries on the partition key (see <a href="#selectWhere">WHERE clauses</a> ).</li></ul><h3 id="a3.0.3">3.0.3</h3><ul><li>Support for custom <a href="#createIndexStmt">secondary indexes</a> has been added.</li></ul><h3 id="a3.0.2">3.0.2</h3><ul><li>Type validation for the <a href="#constants">constants</a> has been fixed. For instance, the implementation used to allow <code>'2'</code> as a valid value for an <code>int</code> column (interpreting it has the equivalent of <code>2</code>), or <code>42</code> as a valid <code>blob</code> value (in which case <code>42</code> was interpreted as an hexadecimal representation of the blob). This is no longer the case, type validation of constants is now more strict. See the <a href="#types">data types</a> section for details on which constant is allowed for which type.</li><li>The type validation fixed of the previous point has lead to the introduction of <a href="#constants">blobs constants</a> to allow inputing blobs. Do note that while inputing blobs as strings constant is still supported by this version (to allow smoother transition to blob constant), it is now deprecated (in particular the <a href="#types">data types</a> section does not list strings constants as valid blobs) and will be removed by a future version. If you were using strings as blobs, you should thus update your client code ASAP to switch blob constants.</li><li>A number of functions to convert native types to blobs have also been introduced. Furthermore the token function is now also allowed in select clauses. See the <a href="#functions">section on functions</a> for details.</li></ul><h3 id="a3.0.1">3.0.1</h3><ul><li><a href="#usingtimestamps">Date strings</a> (and timestamps) are no longer accepted as valid <code>timeuuid</code> values. Doing so was a bug in the sense that date string are not valid <code>timeuuid</code>, and it was thus resulting in <a href="https://issues.apache.org/jira/browse/CASSANDRA-4936">confusing behaviors</a>. However, the following new methods have been added to help working with <code>timeuuid</code>: <code>now</code>, <code>minTimeuuid</code>, <code>maxTimeuuid</code> , <code>dateOf</code> and <code>unixTimestampOf</code>. See the <a href="#timeuuidFun">section dedicated to these methods</a> for more detail.</li><li>&#8220;Float constants&#8221;#constants now support the exponent notation. In other words, <code>4.2E10</code> is now a valid floating point value.</li></ul><h2 id="Versioning">Versioning</h2><p>Versioning of the CQL language adheres to the <a href="http://semver.org">Semantic Versioning</a> guidelines. Versions take the form X.Y.Z where X, Y, and Z are integer values representing major, minor, and patch level respectively. There is no correlation between Cassandra release versions and the CQL language version.</p><table><tr><th>version</th><th>description</th></tr><tr><td>Major </td><td>The major version <em>must</em> be bumped when backward incompatible changes are introduced. This should rarely occur.</td></tr><tr><td>Minor </td><td>Minor version increments occur when new, but backward compatible, functionality is introduced.</td></tr><tr><td>Patch </td><td>The patch version is incremented when bugs are fixed.</td></tr></table></body></html>
only in patch2:
unchanged:
--- cassandra-2.2.6.orig/pylib/cqlshlib/copyutil.c
+++ cassandra-2.2.6/pylib/cqlshlib/copyutil.c
@@ -0,0 +1,79817 @@
+/* Generated by Cython 0.21.1 */
+
+#define PY_SSIZE_T_CLEAN
+#ifndef CYTHON_USE_PYLONG_INTERNALS
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#else
+#include "pyconfig.h"
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 1
+#else
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#endif
+#endif
+#endif
+#include "Python.h"
+#ifndef Py_PYTHON_H
+ #error Python headers needed to compile C extensions, please install development version of Python.
+#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
+ #error Cython requires Python 2.6+ or Python 3.2+.
+#else
+#define CYTHON_ABI "0_21_1"
+#include <stddef.h>
+#ifndef offsetof
+#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
+#endif
+#if !defined(WIN32) && !defined(MS_WINDOWS)
+ #ifndef __stdcall
+ #define __stdcall
+ #endif
+ #ifndef __cdecl
+ #define __cdecl
+ #endif
+ #ifndef __fastcall
+ #define __fastcall
+ #endif
+#endif
+#ifndef DL_IMPORT
+ #define DL_IMPORT(t) t
+#endif
+#ifndef DL_EXPORT
+ #define DL_EXPORT(t) t
+#endif
+#ifndef PY_LONG_LONG
+ #define PY_LONG_LONG LONG_LONG
+#endif
+#ifndef Py_HUGE_VAL
+ #define Py_HUGE_VAL HUGE_VAL
+#endif
+#ifdef PYPY_VERSION
+#define CYTHON_COMPILING_IN_PYPY 1
+#define CYTHON_COMPILING_IN_CPYTHON 0
+#else
+#define CYTHON_COMPILING_IN_PYPY 0
+#define CYTHON_COMPILING_IN_CPYTHON 1
+#endif
+#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600
+#define Py_OptimizeFlag 0
+#endif
+#define __PYX_BUILD_PY_SSIZE_T "n"
+#define CYTHON_FORMAT_SSIZE_T "z"
+#if PY_MAJOR_VERSION < 3
+ #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
+ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+ #define __Pyx_DefaultClassType PyClass_Type
+#else
+ #define __Pyx_BUILTIN_MODULE_NAME "builtins"
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
+ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+ #define __Pyx_DefaultClassType PyType_Type
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define Py_TPFLAGS_CHECKTYPES 0
+ #define Py_TPFLAGS_HAVE_INDEX 0
+ #define Py_TPFLAGS_HAVE_NEWBUFFER 0
+#endif
+#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
+ #define Py_TPFLAGS_HAVE_FINALIZE 0
+#endif
+#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
+ #define CYTHON_PEP393_ENABLED 1
+ #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \
+ 0 : _PyUnicode_Ready((PyObject *)(op)))
+ #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
+ #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+ #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
+ #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
+ #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
+#else
+ #define CYTHON_PEP393_ENABLED 0
+ #define __Pyx_PyUnicode_READY(op) (0)
+ #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
+ #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
+ #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
+ #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
+ #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+ #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
+ #define __Pyx_PyFrozenSet_Size(s) PyObject_Size(s)
+#else
+ #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
+ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
+ #define __Pyx_PyFrozenSet_Size(s) PySet_Size(s)
+#endif
+#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
+#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
+#else
+ #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define PyBaseString_Type PyUnicode_Type
+ #define PyStringObject PyUnicodeObject
+ #define PyString_Type PyUnicode_Type
+ #define PyString_Check PyUnicode_Check
+ #define PyString_CheckExact PyUnicode_CheckExact
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
+ #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
+#else
+ #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
+ #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
+#endif
+#ifndef PySet_CheckExact
+ #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
+#endif
+#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
+#if PY_MAJOR_VERSION >= 3
+ #define PyIntObject PyLongObject
+ #define PyInt_Type PyLong_Type
+ #define PyInt_Check(op) PyLong_Check(op)
+ #define PyInt_CheckExact(op) PyLong_CheckExact(op)
+ #define PyInt_FromString PyLong_FromString
+ #define PyInt_FromUnicode PyLong_FromUnicode
+ #define PyInt_FromLong PyLong_FromLong
+ #define PyInt_FromSize_t PyLong_FromSize_t
+ #define PyInt_FromSsize_t PyLong_FromSsize_t
+ #define PyInt_AsLong PyLong_AsLong
+ #define PyInt_AS_LONG PyLong_AS_LONG
+ #define PyInt_AsSsize_t PyLong_AsSsize_t
+ #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
+ #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+ #define PyNumber_Int PyNumber_Long
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define PyBoolObject PyLongObject
+#endif
+#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
+ #ifndef PyUnicode_InternFromString
+ #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
+ #endif
+#endif
+#if PY_VERSION_HEX < 0x030200A4
+ typedef long Py_hash_t;
+ #define __Pyx_PyInt_FromHash_t PyInt_FromLong
+ #define __Pyx_PyInt_AsHash_t PyInt_AsLong
+#else
+ #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
+ #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
+#else
+ #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
+#endif
+#ifndef CYTHON_INLINE
+ #if defined(__GNUC__)
+ #define CYTHON_INLINE __inline__
+ #elif defined(_MSC_VER)
+ #define CYTHON_INLINE __inline
+ #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define CYTHON_INLINE inline
+ #else
+ #define CYTHON_INLINE
+ #endif
+#endif
+#ifndef CYTHON_RESTRICT
+ #if defined(__GNUC__)
+ #define CYTHON_RESTRICT __restrict__
+ #elif defined(_MSC_VER) && _MSC_VER >= 1400
+ #define CYTHON_RESTRICT __restrict
+ #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define CYTHON_RESTRICT restrict
+ #else
+ #define CYTHON_RESTRICT
+ #endif
+#endif
+#ifdef NAN
+#define __PYX_NAN() ((float) NAN)
+#else
+static CYTHON_INLINE float __PYX_NAN() {
+ /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
+ a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
+ a quiet NaN. */
+ float value;
+ memset(&value, 0xFF, sizeof(value));
+ return value;
+}
+#endif
+#ifdef __cplusplus
+template<typename T>
+void __Pyx_call_destructor(T* x) {
+ x->~T();
+}
+#endif
+
+
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
+#else
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
+#endif
+
+#ifndef __PYX_EXTERN_C
+ #ifdef __cplusplus
+ #define __PYX_EXTERN_C extern "C"
+ #else
+ #define __PYX_EXTERN_C extern
+ #endif
+#endif
+
+#if defined(WIN32) || defined(MS_WINDOWS)
+#define _USE_MATH_DEFINES
+#endif
+#include <math.h>
+#define __PYX_HAVE__cqlshlib__copyutil
+#define __PYX_HAVE_API__cqlshlib__copyutil
+#ifdef _OPENMP
+#include <omp.h>
+#endif /* _OPENMP */
+
+#ifdef PYREX_WITHOUT_ASSERTIONS
+#define CYTHON_WITHOUT_ASSERTIONS
+#endif
+
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+# define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+# define CYTHON_UNUSED
+# endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+# define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+# define CYTHON_UNUSED
+# endif
+#endif
+typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
+ const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
+
+#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
+#define __PYX_DEFAULT_STRING_ENCODING ""
+#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
+#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#define __Pyx_fits_Py_ssize_t(v, type, is_signed) ( \
+ (sizeof(type) < sizeof(Py_ssize_t)) || \
+ (sizeof(type) > sizeof(Py_ssize_t) && \
+ likely(v < (type)PY_SSIZE_T_MAX || \
+ v == (type)PY_SSIZE_T_MAX) && \
+ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN || \
+ v == (type)PY_SSIZE_T_MIN))) || \
+ (sizeof(type) == sizeof(Py_ssize_t) && \
+ (is_signed || likely(v < (type)PY_SSIZE_T_MAX || \
+ v == (type)PY_SSIZE_T_MAX))) )
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
+#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
+#define __Pyx_PyBytes_FromString PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
+#if PY_MAJOR_VERSION < 3
+ #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
+ #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#else
+ #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
+ #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
+#endif
+#define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((const char*)s)
+#define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((const char*)s)
+#define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((const char*)s)
+#define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((const char*)s)
+#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((const char*)s)
+#if PY_MAJOR_VERSION < 3
+static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
+{
+ const Py_UNICODE *u_end = u;
+ while (*u_end++) ;
+ return (size_t)(u_end - u - 1);
+}
+#else
+#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
+#endif
+#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
+#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
+#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
+#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
+#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
+#else
+#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
+#endif
+#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+static int __Pyx_sys_getdefaultencoding_not_ascii;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+ PyObject* sys;
+ PyObject* default_encoding = NULL;
+ PyObject* ascii_chars_u = NULL;
+ PyObject* ascii_chars_b = NULL;
+ const char* default_encoding_c;
+ sys = PyImport_ImportModule("sys");
+ if (!sys) goto bad;
+ default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+ Py_DECREF(sys);
+ if (!default_encoding) goto bad;
+ default_encoding_c = PyBytes_AsString(default_encoding);
+ if (!default_encoding_c) goto bad;
+ if (strcmp(default_encoding_c, "ascii") == 0) {
+ __Pyx_sys_getdefaultencoding_not_ascii = 0;
+ } else {
+ char ascii_chars[128];
+ int c;
+ for (c = 0; c < 128; c++) {
+ ascii_chars[c] = c;
+ }
+ __Pyx_sys_getdefaultencoding_not_ascii = 1;
+ ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
+ if (!ascii_chars_u) goto bad;
+ ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
+ if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
+ PyErr_Format(
+ PyExc_ValueError,
+ "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
+ default_encoding_c);
+ goto bad;
+ }
+ Py_DECREF(ascii_chars_u);
+ Py_DECREF(ascii_chars_b);
+ }
+ Py_DECREF(default_encoding);
+ return 0;
+bad:
+ Py_XDECREF(default_encoding);
+ Py_XDECREF(ascii_chars_u);
+ Py_XDECREF(ascii_chars_b);
+ return -1;
+}
+#endif
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
+#else
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+static char* __PYX_DEFAULT_STRING_ENCODING;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+ PyObject* sys;
+ PyObject* default_encoding = NULL;
+ char* default_encoding_c;
+ sys = PyImport_ImportModule("sys");
+ if (!sys) goto bad;
+ default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+ Py_DECREF(sys);
+ if (!default_encoding) goto bad;
+ default_encoding_c = PyBytes_AsString(default_encoding);
+ if (!default_encoding_c) goto bad;
+ __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
+ if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
+ strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
+ Py_DECREF(default_encoding);
+ return 0;
+bad:
+ Py_XDECREF(default_encoding);
+ return -1;
+}
+#endif
+#endif
+
+
+/* Test for GCC > 2.95 */
+#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
+ #define likely(x) __builtin_expect(!!(x), 1)
+ #define unlikely(x) __builtin_expect(!!(x), 0)
+#else /* !__GNUC__ or GCC < 2.95 */
+ #define likely(x) (x)
+ #define unlikely(x) (x)
+#endif /* __GNUC__ */
+
+static PyObject *__pyx_m;
+static PyObject *__pyx_d;
+static PyObject *__pyx_b;
+static PyObject *__pyx_empty_tuple;
+static PyObject *__pyx_empty_bytes;
+static int __pyx_lineno;
+static int __pyx_clineno = 0;
+static const char * __pyx_cfilenm= __FILE__;
+static const char *__pyx_filename;
+
+
+static const char *__pyx_f[] = {
+ "cqlshlib/copyutil.py",
+};
+
+/*--- Type declarations ---*/
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct__recv_select;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_1_recv_polling;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_2_num_live_processes;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_3_genexpr;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_4_get_ranges;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_5_get_source;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_6_init_feeder_thread;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_7_num_requests;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_8_genexpr;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_9_get_session;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_10_attach_callbacks;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_11_prepare_export_query;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_12_genexpr;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_13__get_converter;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_14_get_convert_integer_fcn;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_15_get_convert_decimal_fcn;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_16_convert_tuple;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_17_genexpr;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_18_convert_list;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_19_genexpr;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_20_convert_set;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_21_genexpr;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_22_convert_map;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_23_genexpr;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_24_convert_user_type;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_25_genexpr;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_26_get_row_partition_key_values_fcn;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_27__initialize_ring;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_28_filter_replicas;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_29_make_query_plan;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_30_wrap_make_statement;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_31_convert_rows;
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_32_split_into_batches;
+struct __pyx_defaults;
+typedef struct __pyx_defaults __pyx_defaults;
+struct __pyx_defaults1;
+typedef struct __pyx_defaults1 __pyx_defaults1;
+struct __pyx_defaults2;
+typedef struct __pyx_defaults2 __pyx_defaults2;
+struct __pyx_defaults3;
+typedef struct __pyx_defaults3 __pyx_defaults3;
+struct __pyx_defaults4;
+typedef struct __pyx_defaults4 __pyx_defaults4;
+struct __pyx_defaults5;
+typedef struct __pyx_defaults5 __pyx_defaults5;
+struct __pyx_defaults6;
+typedef struct __pyx_defaults6 __pyx_defaults6;
+struct __pyx_defaults7;
+typedef struct __pyx_defaults7 __pyx_defaults7;
+struct __pyx_defaults8;
+typedef struct __pyx_defaults8 __pyx_defaults8;
+struct __pyx_defaults9;
+typedef struct __pyx_defaults9 __pyx_defaults9;
+struct __pyx_defaults10;
+typedef struct __pyx_defaults10 __pyx_defaults10;
+struct __pyx_defaults11;
+typedef struct __pyx_defaults11 __pyx_defaults11;
+struct __pyx_defaults12;
+typedef struct __pyx_defaults12 __pyx_defaults12;
+struct __pyx_defaults13;
+typedef struct __pyx_defaults13 __pyx_defaults13;
+struct __pyx_defaults14;
+typedef struct __pyx_defaults14 __pyx_defaults14;
+struct __pyx_defaults {
+ PyObject *__pyx_arg_adapter;
+};
+struct __pyx_defaults1 {
+ PyObject *__pyx_arg_adapter;
+};
+struct __pyx_defaults2 {
+ PyObject *__pyx_arg_ct;
+};
+struct __pyx_defaults3 {
+ PyObject *__pyx_arg_ct;
+};
+struct __pyx_defaults4 {
+ PyObject *__pyx_arg_ct;
+};
+struct __pyx_defaults5 {
+ PyObject *__pyx_arg_ct;
+};
+struct __pyx_defaults6 {
+ PyObject *__pyx_arg_ct;
+};
+struct __pyx_defaults7 {
+ PyObject *__pyx_arg_ct;
+};
+struct __pyx_defaults8 {
+ PyObject *__pyx_arg_ct;
+};
+struct __pyx_defaults9 {
+ PyObject *__pyx_arg_ct;
+};
+struct __pyx_defaults10 {
+ PyObject *__pyx_arg_ct;
+};
+struct __pyx_defaults11 {
+ PyObject *__pyx_arg_ct;
+};
+struct __pyx_defaults12 {
+ PyObject *__pyx_arg_ct;
+};
+struct __pyx_defaults13 {
+ PyObject *__pyx_arg_ct;
+};
+struct __pyx_defaults14 {
+ PyObject *__pyx_arg_ct;
+};
+
+/* "cqlshlib/copyutil.py":108
+ * self.recv = self.recv_select if IS_LINUX else self.recv_polling
+ *
+ * def recv_select(self, timeout): # <<<<<<<<<<<<<<
+ * """
+ * Implementation of the recv method for Linux, where select is available. Receive an object from
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct__recv_select {
+ PyObject_HEAD
+ PyObject *__pyx_v__;
+ PyObject *__pyx_v_r;
+ PyObject *__pyx_v_readable;
+ PyObject *__pyx_v_self;
+ PyObject *__pyx_v_timeout;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+ PyObject *__pyx_t_3;
+ PyObject *__pyx_t_4;
+ PyObject *__pyx_t_5;
+ PyObject *__pyx_t_6;
+ PyObject *__pyx_t_7;
+ PyObject *__pyx_t_8;
+ PyObject *__pyx_t_9;
+};
+
+
+/* "cqlshlib/copyutil.py":121
+ * continue
+ *
+ * def recv_polling(self, timeout): # <<<<<<<<<<<<<<
+ * """
+ * Implementation of the recv method for platforms where select() is not available for pipes.
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_1_recv_polling {
+ PyObject_HEAD
+ PyObject *__pyx_v_i;
+ PyObject *__pyx_v_r;
+ PyObject *__pyx_v_self;
+ PyObject *__pyx_v_start;
+ PyObject *__pyx_v_timeout;
+ PyObject *__pyx_t_0;
+ PyObject *__pyx_t_1;
+ Py_ssize_t __pyx_t_2;
+ PyObject *(*__pyx_t_3)(PyObject *);
+ PyObject *__pyx_t_4;
+ PyObject *__pyx_t_5;
+ PyObject *__pyx_t_6;
+ PyObject *__pyx_t_7;
+ PyObject *__pyx_t_8;
+ PyObject *__pyx_t_9;
+ PyObject *__pyx_t_10;
+};
+
+
+/* "cqlshlib/copyutil.py":349
+ * self.outmsg.close()
+ *
+ * def num_live_processes(self): # <<<<<<<<<<<<<<
+ * return sum(1 for p in self.processes if p.is_alive())
+ *
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_2_num_live_processes {
+ PyObject_HEAD
+ PyObject *__pyx_v_self;
+};
+
+
+/* "cqlshlib/copyutil.py":350
+ *
+ * def num_live_processes(self):
+ * return sum(1 for p in self.processes if p.is_alive()) # <<<<<<<<<<<<<<
+ *
+ * @staticmethod
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_3_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_2_num_live_processes *__pyx_outer_scope;
+ PyObject *__pyx_v_p;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "cqlshlib/copyutil.py":564
+ * self.writer.close()
+ *
+ * def get_ranges(self): # <<<<<<<<<<<<<<
+ * """
+ * return a queue of tuples, where the first tuple entry is a token range (from, to]
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_4_get_ranges {
+ PyObject_HEAD
+ PyObject *__pyx_v_begin_token;
+ PyObject *__pyx_v_end_token;
+ PyObject *__pyx_v_hostname;
+ PyObject *__pyx_v_local_dc;
+};
+
+
+/* "cqlshlib/copyutil.py":766
+ * self.num_read = 0
+ *
+ * def get_source(self, paths): # <<<<<<<<<<<<<<
+ * """
+ * Return a source generator. Each source is a named tuple
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_5_get_source {
+ PyObject_HEAD
+ PyObject *__pyx_v_f;
+ PyObject *__pyx_v_make_source;
+ PyObject *__pyx_v_path;
+ PyObject *__pyx_v_paths;
+ PyObject *__pyx_v_self;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+ PyObject *__pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+};
+
+
+/* "cqlshlib/copyutil.py":1408
+ * self.start_request(token_range, info)
+ *
+ * def init_feeder_thread(self): # <<<<<<<<<<<<<<
+ * """
+ * Start a thread to feed response messages to the parent process.
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_6_init_feeder_thread {
+ PyObject_HEAD
+ PyObject *__pyx_v_self;
+};
+
+
+/* "cqlshlib/copyutil.py":1471
+ * self.attach_callbacks(token_range, future, session)
+ *
+ * def num_requests(self): # <<<<<<<<<<<<<<
+ * return sum(session.num_requests() for session in self.hosts_to_sessions.values())
+ *
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_7_num_requests {
+ PyObject_HEAD
+ PyObject *__pyx_v_self;
+};
+
+
+/* "cqlshlib/copyutil.py":1472
+ *
+ * def num_requests(self):
+ * return sum(session.num_requests() for session in self.hosts_to_sessions.values()) # <<<<<<<<<<<<<<
+ *
+ * def get_session(self, hosts, token_range):
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_8_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_7_num_requests *__pyx_outer_scope;
+ PyObject *__pyx_v_session;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "cqlshlib/copyutil.py":1474
+ * return sum(session.num_requests() for session in self.hosts_to_sessions.values())
+ *
+ * def get_session(self, hosts, token_range): # <<<<<<<<<<<<<<
+ * """
+ * We return a session connected to one of the hosts passed in, which are valid replicas for
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_9_get_session {
+ PyObject_HEAD
+ PyObject *__pyx_v_self;
+};
+
+
+/* "cqlshlib/copyutil.py":1527
+ * return session
+ *
+ * def attach_callbacks(self, token_range, future, session): # <<<<<<<<<<<<<<
+ * def result_callback(rows):
+ * if future.has_more_pages:
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_10_attach_callbacks {
+ PyObject_HEAD
+ PyObject *__pyx_v_future;
+ PyObject *__pyx_v_self;
+ PyObject *__pyx_v_session;
+ PyObject *__pyx_v_token_range;
+};
+
+
+/* "cqlshlib/copyutil.py":1616
+ * return self.prepare_export_query(partition_key, token_range)
+ *
+ * def prepare_export_query(self, partition_key, token_range): # <<<<<<<<<<<<<<
+ * """
+ * Return a query where we select all the data for this token range
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_11_prepare_export_query {
+ PyObject_HEAD
+ PyObject *__pyx_v_partition_key;
+};
+
+
+/* "cqlshlib/copyutil.py":1620
+ * Return a query where we select all the data for this token range
+ * """
+ * pk_cols = ", ".join(protect_names(col.name for col in partition_key)) # <<<<<<<<<<<<<<
+ * columnlist = ', '.join(protect_names(self.columns))
+ * start_token, end_token = token_range
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_12_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_11_prepare_export_query *__pyx_outer_scope;
+ PyObject *__pyx_v_col;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "cqlshlib/copyutil.py":1692
+ * return parent.session.prepare(select_query)
+ *
+ * def _get_converter(self, cql_type): # <<<<<<<<<<<<<<
+ * """
+ * Return a function that converts a string into a value the can be passed
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_13__get_converter {
+ PyObject_HEAD
+ PyObject *__pyx_v_convert;
+ PyObject *__pyx_v_convert_single_subtype;
+ PyObject *__pyx_v_convert_unknown;
+ PyObject *__pyx_v_convert_user_type;
+ PyObject *__pyx_v_converters;
+ PyObject *__pyx_v_cql_type;
+ PyObject *__pyx_v_p;
+ PyObject *__pyx_v_self;
+ PyObject *__pyx_v_split;
+ PyObject *__pyx_v_unprotect;
+};
+
+
+/* "cqlshlib/copyutil.py":1717
+ * return True if v.lower() == self.boolean_styles[0].lower() else False
+ *
+ * def get_convert_integer_fcn(adapter=int): # <<<<<<<<<<<<<<
+ * """
+ * Return a slow and a fast integer conversion function depending on self.thousands_sep
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_14_get_convert_integer_fcn {
+ PyObject_HEAD
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_13__get_converter *__pyx_outer_scope;
+ PyObject *__pyx_v_adapter;
+};
+
+
+/* "cqlshlib/copyutil.py":1726
+ * return lambda v, ct=cql_type: adapter(v)
+ *
+ * def get_convert_decimal_fcn(adapter=float): # <<<<<<<<<<<<<<
+ * """
+ * Return a slow and a fast decimal conversion function depending on self.thousands_sep and self.decimal_sep
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_15_get_convert_decimal_fcn {
+ PyObject_HEAD
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_13__get_converter *__pyx_outer_scope;
+ PyObject *__pyx_v_adapter;
+};
+
+
+/* "cqlshlib/copyutil.py":1803
+ * return Time(v)
+ *
+ * def convert_tuple(val, ct=cql_type): # <<<<<<<<<<<<<<
+ * return tuple(convert(t, v) for t, v in zip(ct.subtypes, split(val)))
+ *
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_16_convert_tuple {
+ PyObject_HEAD
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_13__get_converter *__pyx_outer_scope;
+ PyObject *__pyx_v_ct;
+ PyObject *__pyx_v_val;
+};
+
+
+/* "cqlshlib/copyutil.py":1804
+ *
+ * def convert_tuple(val, ct=cql_type):
+ * return tuple(convert(t, v) for t, v in zip(ct.subtypes, split(val))) # <<<<<<<<<<<<<<
+ *
+ * def convert_list(val, ct=cql_type):
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_17_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_16_convert_tuple *__pyx_outer_scope;
+ PyObject *__pyx_v_t;
+ PyObject *__pyx_v_v;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "cqlshlib/copyutil.py":1806
+ * return tuple(convert(t, v) for t, v in zip(ct.subtypes, split(val)))
+ *
+ * def convert_list(val, ct=cql_type): # <<<<<<<<<<<<<<
+ * return list(convert(ct.subtypes[0], v) for v in split(val))
+ *
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_18_convert_list {
+ PyObject_HEAD
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_13__get_converter *__pyx_outer_scope;
+ PyObject *__pyx_v_ct;
+ PyObject *__pyx_v_val;
+};
+
+
+/* "cqlshlib/copyutil.py":1807
+ *
+ * def convert_list(val, ct=cql_type):
+ * return list(convert(ct.subtypes[0], v) for v in split(val)) # <<<<<<<<<<<<<<
+ *
+ * def convert_set(val, ct=cql_type):
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_19_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_18_convert_list *__pyx_outer_scope;
+ PyObject *__pyx_v_v;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "cqlshlib/copyutil.py":1809
+ * return list(convert(ct.subtypes[0], v) for v in split(val))
+ *
+ * def convert_set(val, ct=cql_type): # <<<<<<<<<<<<<<
+ * return frozenset(convert(ct.subtypes[0], v) for v in split(val))
+ *
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_20_convert_set {
+ PyObject_HEAD
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_13__get_converter *__pyx_outer_scope;
+ PyObject *__pyx_v_ct;
+ PyObject *__pyx_v_val;
+};
+
+
+/* "cqlshlib/copyutil.py":1810
+ *
+ * def convert_set(val, ct=cql_type):
+ * return frozenset(convert(ct.subtypes[0], v) for v in split(val)) # <<<<<<<<<<<<<<
+ *
+ * def convert_map(val, ct=cql_type):
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_21_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_20_convert_set *__pyx_outer_scope;
+ PyObject *__pyx_v_v;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "cqlshlib/copyutil.py":1812
+ * return frozenset(convert(ct.subtypes[0], v) for v in split(val))
+ *
+ * def convert_map(val, ct=cql_type): # <<<<<<<<<<<<<<
+ * """
+ * We need to pass to BoundStatement.bind() a dict() because it calls iteritems(),
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_22_convert_map {
+ PyObject_HEAD
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_13__get_converter *__pyx_outer_scope;
+ PyObject *__pyx_v_ct;
+ PyObject *__pyx_v_val;
+};
+
+
+/* "cqlshlib/copyutil.py":1822
+ * iteritems = frozenset.__iter__
+ *
+ * return ImmutableDict(frozenset((convert(ct.subtypes[0], v[0]), convert(ct.subtypes[1], v[1])) # <<<<<<<<<<<<<<
+ * for v in [split('{%s}' % vv, sep=':') for vv in split(val)]))
+ *
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_23_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_22_convert_map *__pyx_outer_scope;
+ PyObject *__pyx_v_v;
+ PyObject *__pyx_v_vv;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+};
+
+
+/* "cqlshlib/copyutil.py":1825
+ * for v in [split('{%s}' % vv, sep=':') for vv in split(val)]))
+ *
+ * def convert_user_type(val, ct=cql_type): # <<<<<<<<<<<<<<
+ * """
+ * A user type is a dictionary except that we must convert each key into
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_24_convert_user_type {
+ PyObject_HEAD
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_13__get_converter *__pyx_outer_scope;
+ PyObject *__pyx_v_ct;
+ PyObject *__pyx_v_vals;
+};
+
+
+/* "cqlshlib/copyutil.py":1834
+ * vals = [v for v in [split('{%s}' % vv, sep=':') for vv in split(val)]]
+ * ret_type = namedtuple(ct.typename, [unprotect(v[0]) for v in vals])
+ * return ret_type(*tuple(convert(t, v[1]) for t, v in zip(ct.subtypes, vals))) # <<<<<<<<<<<<<<
+ *
+ * def convert_single_subtype(val, ct=cql_type):
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_25_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_24_convert_user_type *__pyx_outer_scope;
+ PyObject *__pyx_v_t;
+ PyObject *__pyx_v_v;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "cqlshlib/copyutil.py":1905
+ * return message
+ *
+ * def get_row_partition_key_values_fcn(self): # <<<<<<<<<<<<<<
+ * """
+ * Return a function to convert a row into a string composed of the partition key values serialized
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_26_get_row_partition_key_values_fcn {
+ PyObject_HEAD
+ PyObject *__pyx_v_partition_key_indexes;
+ PyObject *__pyx_v_self;
+ PyObject *__pyx_v_serialize;
+};
+
+
+/* "cqlshlib/copyutil.py":1963
+ * # making each batch
+ *
+ * def _initialize_ring(self): # <<<<<<<<<<<<<<
+ * token_map = self.metadata.token_map
+ * if token_map is None:
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_27__initialize_ring {
+ PyObject_HEAD
+ PyObject *__pyx_v_from_key;
+};
+
+
+/* "cqlshlib/copyutil.py":1984
+ * return idx if idx < len(ring) else 0
+ *
+ * def filter_replicas(self, hosts): # <<<<<<<<<<<<<<
+ * shuffled = tuple(sorted(hosts, key=lambda k: random.random()))
+ * return filter(lambda r: r.is_up and r.datacenter == self.local_dc, shuffled) if hosts else ()
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_28_filter_replicas {
+ PyObject_HEAD
+ PyObject *__pyx_v_self;
+};
+
+
+/* "cqlshlib/copyutil.py":1997
+ * DCAwareRoundRobinPolicy.__init__(self, local_dc, used_hosts_per_remote_dc)
+ *
+ * def make_query_plan(self, working_keyspace=None, query=None): # <<<<<<<<<<<<<<
+ * """
+ * Extend TokenAwarePolicy.make_query_plan() so that we choose the same replicas in preference
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_29_make_query_plan {
+ PyObject_HEAD
+ PyObject *__pyx_v_query;
+ PyObject *__pyx_v_r;
+ PyObject *__pyx_v_replicas;
+ PyObject *__pyx_v_self;
+ PyObject *__pyx_v_working_keyspace;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "cqlshlib/copyutil.py":2134
+ * self.report_error(exc, chunk, chunk['rows'])
+ *
+ * def wrap_make_statement(self, inner_make_statement): # <<<<<<<<<<<<<<
+ * def make_statement(query, conv, chunk, batch, replicas):
+ * try:
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_30_wrap_make_statement {
+ PyObject_HEAD
+ PyObject *__pyx_v_inner_make_statement;
+ PyObject *__pyx_v_make_statement;
+ PyObject *__pyx_v_self;
+};
+
+
+/* "cqlshlib/copyutil.py":2192
+ * return statement
+ *
+ * def convert_rows(self, conv, chunk): # <<<<<<<<<<<<<<
+ * """
+ * Return converted rows and report any errors during conversion.
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_31_convert_rows {
+ PyObject_HEAD
+ PyObject *__pyx_v_conv;
+ PyObject *__pyx_v_errors;
+ PyObject *__pyx_v_self;
+};
+
+
+/* "cqlshlib/copyutil.py":2246
+ * return {'id': batch_id, 'rows': rows, 'attempts': attempts}
+ *
+ * def split_into_batches(self, chunk, conv, tm): # <<<<<<<<<<<<<<
+ * """
+ * Batch rows by ring position or replica.
+ */
+struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_32_split_into_batches {
+ PyObject_HEAD
+ PyObject *__pyx_v_chunk;
+ PyObject *__pyx_v_conv;
+ PyObject *__pyx_v_e;
+ PyObject *__pyx_v_errors;
+ PyObject *__pyx_v_filter_replicas;
+ PyObject *__pyx_v_get_ring_pos;
+ PyObject *__pyx_v_get_row_partition_key_values;
+ PyObject *__pyx_v_i;
+ PyObject *__pyx_v_make_batch;
+ PyObject *__pyx_v_max_batch_size;
+ PyObject *__pyx_v_min_batch_size;
+ PyObject *__pyx_v_msg;
+ PyObject *__pyx_v_pk;
+ PyObject *__pyx_v_pk_to_token_value;
+ PyObject *__pyx_v_replicas;
+ PyObject *__pyx_v_ring;
+ PyObject *__pyx_v_ring_pos;
+ PyObject *__pyx_v_row;
+ PyObject *__pyx_v_rows;
+ PyObject *__pyx_v_rows_by_replica;
+ PyObject *__pyx_v_rows_by_ring_pos;
+ PyObject *__pyx_v_self;
+ PyObject *__pyx_v_tm;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+ Py_ssize_t __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+};
+
+#ifndef CYTHON_REFNANNY
+ #define CYTHON_REFNANNY 0
+#endif
+#if CYTHON_REFNANNY
+ typedef struct {
+ void (*INCREF)(void*, PyObject*, int);
+ void (*DECREF)(void*, PyObject*, int);
+ void (*GOTREF)(void*, PyObject*, int);
+ void (*GIVEREF)(void*, PyObject*, int);
+ void* (*SetupContext)(const char*, int, const char*);
+ void (*FinishContext)(void**);
+ } __Pyx_RefNannyAPIStruct;
+ static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
+ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
+ #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
+#ifdef WITH_THREAD
+ #define __Pyx_RefNannySetupContext(name, acquire_gil) \
+ if (acquire_gil) { \
+ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
+ PyGILState_Release(__pyx_gilstate_save); \
+ } else { \
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
+ }
+#else
+ #define __Pyx_RefNannySetupContext(name, acquire_gil) \
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
+#endif
+ #define __Pyx_RefNannyFinishContext() \
+ __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
+ #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
+ #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
+ #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
+ #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
+#else
+ #define __Pyx_RefNannyDeclarations
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)
+ #define __Pyx_RefNannyFinishContext()
+ #define __Pyx_INCREF(r) Py_INCREF(r)
+ #define __Pyx_DECREF(r) Py_DECREF(r)
+ #define __Pyx_GOTREF(r)
+ #define __Pyx_GIVEREF(r)
+ #define __Pyx_XINCREF(r) Py_XINCREF(r)
+ #define __Pyx_XDECREF(r) Py_XDECREF(r)
+ #define __Pyx_XGOTREF(r)
+ #define __Pyx_XGIVEREF(r)
+#endif
+#define __Pyx_XDECREF_SET(r, v) do { \
+ PyObject *tmp = (PyObject *) r; \
+ r = v; __Pyx_XDECREF(tmp); \
+ } while (0)
+#define __Pyx_DECREF_SET(r, v) do { \
+ PyObject *tmp = (PyObject *) r; \
+ r = v; __Pyx_DECREF(tmp); \
+ } while (0)
+#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
+#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+ PyTypeObject* tp = Py_TYPE(obj);
+ if (likely(tp->tp_getattro))
+ return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+ if (likely(tp->tp_getattr))
+ return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+ return PyObject_GetAttr(obj, attr_name);
+}
+#else
+#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
+#endif
+
+static PyObject *__Pyx_GetBuiltinName(PyObject *name);
+
+#ifndef CYTHON_PROFILE
+ #define CYTHON_PROFILE 1
+#endif
+#ifndef CYTHON_TRACE
+ #define CYTHON_TRACE 0
+#endif
+#if CYTHON_TRACE
+ #undef CYTHON_PROFILE_REUSE_FRAME
+#endif
+#ifndef CYTHON_PROFILE_REUSE_FRAME
+ #define CYTHON_PROFILE_REUSE_FRAME 0
+#endif
+#if CYTHON_PROFILE || CYTHON_TRACE
+ #include "compile.h"
+ #include "frameobject.h"
+ #include "traceback.h"
+ #if CYTHON_PROFILE_REUSE_FRAME
+ #define CYTHON_FRAME_MODIFIER static
+ #define CYTHON_FRAME_DEL
+ #else
+ #define CYTHON_FRAME_MODIFIER
+ #define CYTHON_FRAME_DEL Py_CLEAR(__pyx_frame)
+ #endif
+ #define __Pyx_TraceDeclarations \
+ static PyCodeObject *__pyx_frame_code = NULL; \
+ CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL; \
+ int __Pyx_use_tracing = 0;
+ #define __Pyx_TraceCall(funcname, srcfile, firstlineno) \
+ if (unlikely(PyThreadState_GET()->use_tracing && \
+ (PyThreadState_GET()->c_profilefunc || (CYTHON_TRACE && PyThreadState_GET()->c_tracefunc)))) { \
+ __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, funcname, srcfile, firstlineno); \
+ }
+ #define __Pyx_TraceException() \
+ if (unlikely(__Pyx_use_tracing) && PyThreadState_GET()->use_tracing && \
+ (PyThreadState_GET()->c_profilefunc || (CYTHON_TRACE && PyThreadState_GET()->c_tracefunc))) { \
+ PyThreadState* tstate = PyThreadState_GET(); \
+ tstate->use_tracing = 0; \
+ PyObject *exc_info = __Pyx_GetExceptionTuple(); \
+ if (exc_info) { \
+ if (CYTHON_TRACE && tstate->c_tracefunc) \
+ tstate->c_tracefunc( \
+ tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info); \
+ tstate->c_profilefunc( \
+ tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info); \
+ Py_DECREF(exc_info); \
+ } \
+ tstate->use_tracing = 1; \
+ }
+ #define __Pyx_TraceReturn(result) \
+ if (unlikely(__Pyx_use_tracing) && PyThreadState_GET()->use_tracing) { \
+ PyThreadState* tstate = PyThreadState_GET(); \
+ tstate->use_tracing = 0; \
+ if (CYTHON_TRACE && tstate->c_tracefunc) \
+ tstate->c_tracefunc( \
+ tstate->c_traceobj, __pyx_frame, PyTrace_RETURN, (PyObject*)result); \
+ if (tstate->c_profilefunc) \
+ tstate->c_profilefunc( \
+ tstate->c_profileobj, __pyx_frame, PyTrace_RETURN, (PyObject*)result); \
+ CYTHON_FRAME_DEL; \
+ tstate->use_tracing = 1; \
+ }
+ static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno);
+ static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, const char *funcname, const char *srcfile, int firstlineno);
+#else
+ #define __Pyx_TraceDeclarations
+ #define __Pyx_TraceCall(funcname, srcfile, firstlineno)
+ #define __Pyx_TraceException()
+ #define __Pyx_TraceReturn(result)
+#endif
+#if CYTHON_TRACE
+ #define __Pyx_TraceLine(lineno) \
+ if (unlikely(__Pyx_use_tracing) && unlikely(PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_tracefunc)) { \
+ PyThreadState* tstate = PyThreadState_GET(); \
+ __pyx_frame->f_lineno = lineno; \
+ tstate->use_tracing = 0; \
+ tstate->c_tracefunc(tstate->c_traceobj, __pyx_frame, PyTrace_LINE, NULL); \
+ tstate->use_tracing = 1; \
+ }
+#else
+ #define __Pyx_TraceLine(lineno)
+#endif
+
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
+#else
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
+#endif
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
+#endif
+
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
+
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
+
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
+
+static CYTHON_INLINE int __Pyx_IterFinish(void);
+
+static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
+
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
+static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
+ PyTypeObject* tp = Py_TYPE(obj);
+ if (likely(tp->tp_setattro))
+ return tp->tp_setattro(obj, attr_name, value);
+#if PY_MAJOR_VERSION < 3
+ if (likely(tp->tp_setattr))
+ return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
+#endif
+ return PyObject_SetAttr(obj, attr_name, value);
+}
+#else
+#define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
+#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
+#endif
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
+#else
+#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
+#endif
+
+static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
+ Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
+
+static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
+
+static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
+ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
+ const char* function_name);
+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000
+static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
+ PyObject *res;
+ PyTypeObject *tp = Py_TYPE(obj);
+#if PY_MAJOR_VERSION < 3
+ if (unlikely(PyInstance_Check(obj)))
+ return __Pyx_PyObject_GetAttrStr(obj, attr_name);
+#endif
+ res = _PyType_Lookup(tp, attr_name);
+ if (likely(res)) {
+ descrgetfunc f = Py_TYPE(res)->tp_descr_get;
+ if (!f) {
+ Py_INCREF(res);
+ } else {
+ res = f(res, obj, (PyObject *)tp);
+ }
+ } else {
+ PyErr_SetObject(PyExc_AttributeError, attr_name);
+ }
+ return res;
+}
+#else
+#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
+#endif
+
+static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb);
+static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb);
+
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
+
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb);
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb);
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
+ PyListObject* L = (PyListObject*) list;
+ Py_ssize_t len = Py_SIZE(list);
+ if (likely(L->allocated > len)) {
+ Py_INCREF(x);
+ PyList_SET_ITEM(list, len, x);
+ Py_SIZE(list) = len+1;
+ return 0;
+ }
+ return PyList_Append(list, x);
+}
+#else
+#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
+#endif
+
+#include <string.h>
+
+static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
+
+static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
+
+#if PY_MAJOR_VERSION >= 3
+#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
+#else
+#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
+#endif
+
+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
+
+#define __Pyx_CyFunction_USED 1
+#include <structmember.h>
+#define __Pyx_CYFUNCTION_STATICMETHOD 0x01
+#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
+#define __Pyx_CYFUNCTION_CCLASS 0x04
+#define __Pyx_CyFunction_GetClosure(f) \
+ (((__pyx_CyFunctionObject *) (f))->func_closure)
+#define __Pyx_CyFunction_GetClassObj(f) \
+ (((__pyx_CyFunctionObject *) (f))->func_classobj)
+#define __Pyx_CyFunction_Defaults(type, f) \
+ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
+#define __Pyx_CyFunction_SetDefaultsGetter(f, g) \
+ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
+typedef struct {
+ PyCFunctionObject func;
+#if PY_VERSION_HEX < 0x030500A0
+ PyObject *func_weakreflist;
+#endif
+ PyObject *func_dict;
+ PyObject *func_name;
+ PyObject *func_qualname;
+ PyObject *func_doc;
+ PyObject *func_globals;
+ PyObject *func_code;
+ PyObject *func_closure;
+ PyObject *func_classobj;
+ void *defaults;
+ int defaults_pyobjects;
+ int flags;
+ PyObject *defaults_tuple;
+ PyObject *defaults_kwdict;
+ PyObject *(*defaults_getter)(PyObject *);
+ PyObject *func_annotations;
+} __pyx_CyFunctionObject;
+static PyTypeObject *__pyx_CyFunctionType = 0;
+#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code) \
+ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
+static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
+ int flags, PyObject* qualname,
+ PyObject *self,
+ PyObject *module, PyObject *globals,
+ PyObject* code);
+static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
+ size_t size,
+ int pyobjects);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
+ PyObject *tuple);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
+ PyObject *dict);
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
+ PyObject *dict);
+static int __Pyx_CyFunction_init(void);
+
+static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
+
+static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
+
+static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);
+
+static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2,
+ int is_tuple, int has_known_size, int decref_tuple);
+
+static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
+ Py_ssize_t* p_orig_length, int* p_is_dict);
+static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
+ PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);
+
+#if PY_MAJOR_VERSION >= 3
+static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
+ PyObject *value;
+ value = PyDict_GetItemWithError(d, key);
+ if (unlikely(!value)) {
+ if (!PyErr_Occurred()) {
+ PyObject* args = PyTuple_Pack(1, key);
+ if (likely(args))
+ PyErr_SetObject(PyExc_KeyError, args);
+ Py_XDECREF(args);
+ }
+ return NULL;
+ }
+ Py_INCREF(value);
+ return value;
+}
+#else
+ #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
+#endif
+
+static double __Pyx__PyObject_AsDouble(PyObject* obj);
+#if CYTHON_COMPILING_IN_PYPY
+#define __Pyx_PyObject_AsDouble(obj) \
+(likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) : \
+ likely(PyInt_CheckExact(obj)) ? \
+ PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
+#else
+#define __Pyx_PyObject_AsDouble(obj) \
+((likely(PyFloat_CheckExact(obj))) ? \
+ PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
+#endif
+
+#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \
+ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \
+ __Pyx_GetItemInt_Generic(o, to_py_func(i))))
+#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
+ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+ int wraparound, int boundscheck);
+#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
+ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+ int wraparound, int boundscheck);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+ int is_list, int wraparound, int boundscheck);
+
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
+ PyListObject* L = (PyListObject*) list;
+ Py_ssize_t len = Py_SIZE(list);
+ if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
+ Py_INCREF(x);
+ PyList_SET_ITEM(list, len, x);
+ Py_SIZE(list) = len+1;
+ return 0;
+ }
+ return PyList_Append(list, x);
+}
+#else
+#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
+#endif
+
+#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+ __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) : \
+ (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \
+ __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
+static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
+static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
+ int is_list, int wraparound, int boundscheck);
+
+#if PY_MAJOR_VERSION < 3
+#define __Pyx_PyString_Join __Pyx_PyBytes_Join
+#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
+#else
+#define __Pyx_PyString_Join PyUnicode_Join
+#define __Pyx_PyBaseString_Join PyUnicode_Join
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON
+ #if PY_MAJOR_VERSION < 3
+ #define __Pyx_PyBytes_Join _PyString_Join
+ #else
+ #define __Pyx_PyBytes_Join _PyBytes_Join
+ #endif
+#else
+static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
+#endif
+
+static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);
+
+static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
+ int result = PySequence_Contains(seq, item);
+ return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+}
+
+static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
+
+static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
+
+static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
+
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
+ PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
+ PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
+ int has_cstart, int has_cstop, int wraparound);
+
+#define __Pyx_PyNumber_Power2(a, b) PyNumber_Power(a, b, Py_None)
+
+static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value);
+
+static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) {
+ if (it) {
+ PyObject* result;
+#if CYTHON_COMPILING_IN_PYPY
+ PyObject* args;
+ args = PyTuple_Pack(1, it);
+ if (unlikely(!args))
+ return NULL;
+ result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL);
+ Py_DECREF(args);
+ return result;
+#else
+ if (PyFrozenSet_CheckExact(it)) {
+ Py_INCREF(it);
+ return it;
+ }
+ result = PyFrozenSet_New(it);
+ if (unlikely(!result))
+ return NULL;
+ if (likely(PySet_GET_SIZE(result)))
+ return result;
+ Py_DECREF(result);
+#endif
+ }
+#if CYTHON_COMPILING_IN_CPYTHON
+ return PyFrozenSet_Type.tp_new(&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
+#else
+ return PyObject_Call((PyObject*)&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
+#endif
+}
+
+static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
+
+static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
+ PyObject *mkw, PyObject *modname, PyObject *doc);
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
+ PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
+
+static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
+
+typedef struct {
+ int code_line;
+ PyCodeObject* code_object;
+} __Pyx_CodeObjectCacheEntry;
+struct __Pyx_CodeObjectCache {
+ int count;
+ int max_count;
+ __Pyx_CodeObjectCacheEntry* entries;
+};
+static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
+static PyCodeObject *__pyx_find_code_object(int code_line);
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
+
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+ int py_line, const char *filename);
+
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
+
+static int __Pyx_Print(PyObject*, PyObject *, int);
+#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3
+static PyObject* __pyx_print = 0;
+static PyObject* __pyx_print_kwargs = 0;
+#endif
+
+static int __Pyx_PrintOne(PyObject* stream, PyObject *o);
+
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
+
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
+
+#define __Pyx_Generator_USED
+#include <structmember.h>
+#include <frameobject.h>
+typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *);
+typedef struct {
+ PyObject_HEAD
+ __pyx_generator_body_t body;
+ PyObject *closure;
+ PyObject *exc_type;
+ PyObject *exc_value;
+ PyObject *exc_traceback;
+ PyObject *gi_weakreflist;
+ PyObject *classobj;
+ PyObject *yieldfrom;
+ PyObject *gi_name;
+ PyObject *gi_qualname;
+ int resume_label;
+ char is_running;
+} __pyx_GeneratorObject;
+static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
+ PyObject *closure, PyObject *name, PyObject *qualname);
+static int __pyx_Generator_init(void);
+static int __Pyx_Generator_clear(PyObject* self);
+#if 1 || PY_VERSION_HEX < 0x030300B0
+static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
+#else
+#define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue)
+#endif
+
+static int __Pyx_check_binary_version(void);
+
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
+
+
+/* Module declarations from 'cqlshlib.copyutil' */
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct__recv_select = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_1_recv_polling = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_2_num_live_processes = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_3_genexpr = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_4_get_ranges = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_5_get_source = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_6_init_feeder_thread = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_7_num_requests = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_8_genexpr = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_9_get_session = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_10_attach_callbacks = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_11_prepare_export_query = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_12_genexpr = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_13__get_converter = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_14_get_convert_integer_fcn = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_15_get_convert_decimal_fcn = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_16_convert_tuple = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_17_genexpr = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_18_convert_list = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_19_genexpr = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_20_convert_set = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_21_genexpr = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_22_convert_map = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_23_genexpr = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_24_convert_user_type = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_25_genexpr = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_26_get_row_partition_key_values_fcn = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_27__initialize_ring = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_28_filter_replicas = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_29_make_query_plan = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_30_wrap_make_statement = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_31_convert_rows = 0;
+static PyTypeObject *__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_32_split_into_batches = 0;
+#define __Pyx_MODULE_NAME "cqlshlib.copyutil"
+int __pyx_module_is_main_cqlshlib__copyutil = 0;
+
+/* Implementation of 'cqlshlib.copyutil' */
+static PyObject *__pyx_builtin_object;
+static PyObject *__pyx_builtin_staticmethod;
+static PyObject *__pyx_builtin_property;
+static PyObject *__pyx_builtin_Exception;
+static PyObject *__pyx_builtin_xrange;
+static PyObject *__pyx_builtin_EOFError;
+static PyObject *__pyx_builtin_enumerate;
+static PyObject *__pyx_builtin_open;
+static PyObject *__pyx_builtin_ValueError;
+static PyObject *__pyx_builtin_NotImplementedError;
+static PyObject *__pyx_builtin_sum;
+static PyObject *__pyx_builtin_IOError;
+static PyObject *__pyx_builtin_filter;
+static PyObject *__pyx_builtin_StopIteration;
+static PyObject *__pyx_builtin_range;
+static PyObject *__pyx_builtin_BaseException;
+static PyObject *__pyx_builtin_sorted;
+static PyObject *__pyx_builtin_map;
+static PyObject *__pyx_builtin_zip;
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_safe_normpath(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fname); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13OneWayChannel___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13OneWayChannel_2send(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13OneWayChannel_4recv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13OneWayChannel_6close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_14OneWayChannels___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_channels); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_14OneWayChannels_2recv_select(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_timeout); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_14OneWayChannels_5recv_polling(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_timeout); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_14OneWayChannels_8close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v__, CYTHON_UNUSED PyObject *__pyx_v_eol); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_shell, PyObject *__pyx_v_ks, PyObject *__pyx_v_table, PyObject *__pyx_v_columns, PyObject *__pyx_v_fname, PyObject *__pyx_v_opts, PyObject *__pyx_v_protocol_version, PyObject *__pyx_v_config_file, PyObject *__pyx_v_direction); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_2_printmsg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_msg, PyObject *__pyx_v_eol); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_4maybe_read_config_file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_opts, PyObject *__pyx_v_direction); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_6clean_options(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_opts); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_8parse_options(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_opts, PyObject *__pyx_v_direction); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_10check_options(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_copy_options); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_12get_num_processes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cap); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_14get_num_cores(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_16describe_interval(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seconds); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_18get_columns(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_shell, PyObject *__pyx_v_ks, PyObject *__pyx_v_table, PyObject *__pyx_v_columns); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_20close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_18num_live_processes_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_22num_live_processes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_24get_pid(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_26trace_process(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pid); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_28start_processes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_30stop_processes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_32make_params(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_34validate_columns(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_36update_params(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_params, PyObject *__pyx_v_i); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_12ExportWriter___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fname, PyObject *__pyx_v_shell, PyObject *__pyx_v_columns, PyObject *__pyx_v_options); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_12ExportWriter_2open(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_12ExportWriter_4close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_12ExportWriter_6_next_dest(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_12ExportWriter_8_get_dest(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_source_name); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_12ExportWriter_10_close_current_dest(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_12ExportWriter_12_write_without_split(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v__); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_12ExportWriter_14_write_with_split(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_num); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ExportTask___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_shell, PyObject *__pyx_v_ks, PyObject *__pyx_v_table, PyObject *__pyx_v_columns, PyObject *__pyx_v_fname, PyObject *__pyx_v_opts, PyObject *__pyx_v_protocol_version, PyObject *__pyx_v_config_file); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ExportTask_2run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ExportTask_4close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ExportTask_10get_ranges_make_range(PyObject *__pyx_self, PyObject *__pyx_v_prev, PyObject *__pyx_v_curr); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ExportTask_10get_ranges_2make_range_data(PyObject *__pyx_self, PyObject *__pyx_v_replicas); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ExportTask_6get_ranges(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ExportTask_8get_min_token(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ExportTask_10send_work(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ranges, PyObject *__pyx_v_tokens_to_send); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ExportTask_12export_records(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ranges); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_11FilesReader___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fname, PyObject *__pyx_v_options); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_11FilesReader_2get_source(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_paths); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_11FilesReader_10get_source_make_source(PyObject *__pyx_self, PyObject *__pyx_v_fname); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_11FilesReader_5printmsg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_msg, PyObject *__pyx_v_eol); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_11FilesReader_7start(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_11FilesReader_9exhausted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_11FilesReader_11next_source(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_11FilesReader_13close_current_source(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_11FilesReader_15close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_11FilesReader_17read_rows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_max_rows); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10PipeReader___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inmsg, PyObject *__pyx_v_options); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10PipeReader_2start(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10PipeReader_4read_rows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_max_rows); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_19ImportProcessResult___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_imported); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_20FeedingProcessResult___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sent, PyObject *__pyx_v_reader); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_15ImportTaskError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_msg, PyObject *__pyx_v_rows, PyObject *__pyx_v_attempts, PyObject *__pyx_v_final); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_15ImportTaskError_2is_parse_error(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_18ImportErrorHandler___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_task); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_18ImportErrorHandler_2max_exceeded(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_18ImportErrorHandler_4add_failed_rows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_rows); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_18ImportErrorHandler_6handle_error(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_err); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ImportTask___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_shell, PyObject *__pyx_v_ks, PyObject *__pyx_v_table, PyObject *__pyx_v_columns, PyObject *__pyx_v_fname, PyObject *__pyx_v_opts, PyObject *__pyx_v_protocol_version, PyObject *__pyx_v_config_file); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ImportTask_2make_params(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ImportTask_4validate_columns(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ImportTask_6run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ImportTask_8send_stdin_rows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ImportTask_10import_records(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ImportTask_12all_processes_running(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ImportTask_14receive_results(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_14FeedingProcess___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inmsg, PyObject *__pyx_v_outmsg, PyObject *__pyx_v_worker_channels, PyObject *__pyx_v_fname, PyObject *__pyx_v_options); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_14FeedingProcess_2run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_14FeedingProcess_4inner_run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_14FeedingProcess_6send_chunk(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ch, PyObject *__pyx_v_rows); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_14FeedingProcess_8close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_12ChildProcess___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_params, PyObject *__pyx_v_target); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_12ChildProcess_2printdebugmsg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_text); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_12ChildProcess_4close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_21ExpBackoffRetryPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_parent_process); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_21ExpBackoffRetryPolicy_2on_read_timeout(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_query, PyObject *__pyx_v_consistency, CYTHON_UNUSED PyObject *__pyx_v_required_responses, CYTHON_UNUSED PyObject *__pyx_v_received_responses, CYTHON_UNUSED PyObject *__pyx_v_data_retrieved, PyObject *__pyx_v_retry_num); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_21ExpBackoffRetryPolicy_4on_write_timeout(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_query, PyObject *__pyx_v_consistency, CYTHON_UNUSED PyObject *__pyx_v_write_type, CYTHON_UNUSED PyObject *__pyx_v_required_responses, CYTHON_UNUSED PyObject *__pyx_v_received_responses, PyObject *__pyx_v_retry_num); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_21ExpBackoffRetryPolicy_6_handle_timeout(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_consistency, PyObject *__pyx_v_retry_num); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_21ExpBackoffRetryPolicy_8backoff(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_retry_num); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportSession___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cluster, PyObject *__pyx_v_export_process); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportSession_2add_request(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportSession_4complete_request(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportSession_6num_requests(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportSession_8execute_async(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportSession_10shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_params); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_2run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_4inner_run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_18init_feeder_thread_feed_errors(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_6init_feeder_thread(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_8get_error_message(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_err, PyObject *__pyx_v_print_traceback); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_10report_error(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_err, PyObject *__pyx_v_token_range); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_12send(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_response); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_14start_request(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_token_range, PyObject *__pyx_v_info); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_12num_requests_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_16num_requests(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_hh); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_18get_session(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_hosts, PyObject *__pyx_v_token_range); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_20connect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_16attach_callbacks_result_callback(PyObject *__pyx_self, PyObject *__pyx_v_rows); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_16attach_callbacks_2err_callback(PyObject *__pyx_self, PyObject *__pyx_v_err); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_22attach_callbacks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_token_range, PyObject *__pyx_v_future, PyObject *__pyx_v_session); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_24write_rows_to_csv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_token_range, PyObject *__pyx_v_rows); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_26format_value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_28close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_30prepare_query(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_partition_key, PyObject *__pyx_v_token_range, PyObject *__pyx_v_attempts); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_32maybe_inject_failures(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_partition_key, PyObject *__pyx_v_token_range, PyObject *__pyx_v_attempts); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_20prepare_export_query_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ExportProcess_34prepare_export_query(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_partition_key, PyObject *__pyx_v_token_range); /* proto */
+static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_parent, PyObject *__pyx_v_table_meta, PyObject *__pyx_v_statement); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_2_get_primary_key_statement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_parent, PyObject *__pyx_v_table_meta); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_unprotect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_2convert(PyObject *__pyx_self, PyObject *__pyx_v_t, PyObject *__pyx_v_v); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_4convert_blob(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v, CYTHON_UNUSED PyObject *__pyx_v__); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_6convert_text(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v, CYTHON_UNUSED PyObject *__pyx_v__); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_8convert_uuid(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v, CYTHON_UNUSED PyObject *__pyx_v__); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_10convert_bool(PyObject *__pyx_self, PyObject *__pyx_v_v, CYTHON_UNUSED PyObject *__pyx_v__); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_38__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_23get_convert_integer_fcn_2__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_lambda_funcdef_lambda4(PyObject *__pyx_self, PyObject *__pyx_v_v, CYTHON_UNUSED PyObject *__pyx_v_ct); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_23get_convert_integer_fcn_4__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_lambda_funcdef_lambda5(PyObject *__pyx_self, PyObject *__pyx_v_v, CYTHON_UNUSED PyObject *__pyx_v_ct); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_12get_convert_integer_fcn(PyObject *__pyx_self, PyObject *__pyx_v_adapter); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_40__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_23get_convert_decimal_fcn_4__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_lambda_funcdef_lambda6(PyObject *__pyx_self, PyObject *__pyx_v_v, CYTHON_UNUSED PyObject *__pyx_v_ct); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_23get_convert_decimal_fcn_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_lambda_funcdef_lambda7(PyObject *__pyx_self, PyObject *__pyx_v_v, CYTHON_UNUSED PyObject *__pyx_v_ct); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_23get_convert_decimal_fcn_8__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_lambda_funcdef_lambda8(PyObject *__pyx_self, PyObject *__pyx_v_v, CYTHON_UNUSED PyObject *__pyx_v_ct); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_23get_convert_decimal_fcn_10__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_lambda_funcdef_lambda9(PyObject *__pyx_self, PyObject *__pyx_v_v, CYTHON_UNUSED PyObject *__pyx_v_ct); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_14get_convert_decimal_fcn(PyObject *__pyx_self, PyObject *__pyx_v_adapter); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_16split(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_sep); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_18convert_datetime(PyObject *__pyx_self, PyObject *__pyx_v_val, CYTHON_UNUSED PyObject *__pyx_v__); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_20convert_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v, CYTHON_UNUSED PyObject *__pyx_v__); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_22convert_time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v, CYTHON_UNUSED PyObject *__pyx_v__); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_42__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_13convert_tuple_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_24convert_tuple(PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_ct); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_44__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_12convert_list_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_26convert_list(PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_ct); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_46__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_11convert_set_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_28convert_set(PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_ct); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_48__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_11convert_map_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_30convert_map(PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_ct); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_50__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_17convert_user_type_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_32convert_user_type(PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_ct); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_52__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_34convert_single_subtype(PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_ct); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_54__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_14_get_converter_36convert_unknown(PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_ct); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_4_get_converter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cql_type); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_6convert_row(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_row); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_8get_null_primary_key_message(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_32get_row_partition_key_values_fcn_serialize_value_prepared(PyObject *__pyx_self, PyObject *__pyx_v_n, PyObject *__pyx_v_v); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_32get_row_partition_key_values_fcn_2serialize_value_not_prepared(PyObject *__pyx_self, PyObject *__pyx_v_n, PyObject *__pyx_v_v); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_32get_row_partition_key_values_fcn_4serialize_row_single(PyObject *__pyx_self, PyObject *__pyx_v_row); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_32get_row_partition_key_values_fcn_6serialize_row_multiple(PyObject *__pyx_self, PyObject *__pyx_v_row); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_16ImportConversion_10get_row_partition_key_values_fcn(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8TokenMap___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ks, PyObject *__pyx_v_hostname, PyObject *__pyx_v_local_dc, PyObject *__pyx_v_session); /* proto */
+static PyObject *__pyx_lambda_funcdef_lambda10(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_pk); /* proto */
+static PyObject *__pyx_lambda_funcdef_lambda11(PyObject *__pyx_self, PyObject *__pyx_v_pk); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8TokenMap_2_initialize_ring(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8TokenMap_4get_ring_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ring, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_lambda_funcdef_lambda12(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_k); /* proto */
+static PyObject *__pyx_lambda_funcdef_lambda13(PyObject *__pyx_self, PyObject *__pyx_v_r); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8TokenMap_6filter_replicas(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_hosts); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_20FastTokenAwarePolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_local_dc, PyObject *__pyx_v_used_hosts_per_remote_dc); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_20FastTokenAwarePolicy_2make_query_plan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_working_keyspace, PyObject *__pyx_v_query); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_params); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_2session(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_4run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_6close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_8make_params(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_10inner_run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_conv, PyObject *__pyx_v_tm, PyObject *__pyx_v_make_statement); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_19wrap_make_statement_make_statement(PyObject *__pyx_self, PyObject *__pyx_v_query, PyObject *__pyx_v_conv, PyObject *__pyx_v_chunk, PyObject *__pyx_v_batch, PyObject *__pyx_v_replicas); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_19wrap_make_statement_2make_statement_with_failures(PyObject *__pyx_self, PyObject *__pyx_v_query, PyObject *__pyx_v_conv, PyObject *__pyx_v_chunk, PyObject *__pyx_v_batch, PyObject *__pyx_v_replicas); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_12wrap_make_statement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inner_make_statement); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_14make_counter_batch_statement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_conv, PyObject *__pyx_v_batch, PyObject *__pyx_v_replicas); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_16make_prepared_batch_statement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, CYTHON_UNUSED PyObject *__pyx_v__, PyObject *__pyx_v_batch, PyObject *__pyx_v_replicas); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_18make_non_prepared_batch_statement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, CYTHON_UNUSED PyObject *__pyx_v__, PyObject *__pyx_v_batch, PyObject *__pyx_v_replicas); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_12convert_rows_filter_row_values(PyObject *__pyx_self, PyObject *__pyx_v_row); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_12convert_rows_2convert_row(PyObject *__pyx_self, PyObject *__pyx_v_r); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_20convert_rows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_conv, PyObject *__pyx_v_chunk); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_22maybe_inject_failures(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_batch); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_24make_batch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_batch_id, PyObject *__pyx_v_rows, PyObject *__pyx_v_attempts); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_26split_into_batches(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_chunk, PyObject *__pyx_v_conv, PyObject *__pyx_v_tm); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_29result_callback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v__, PyObject *__pyx_v_batch, PyObject *__pyx_v_chunk); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_31err_callback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_response, PyObject *__pyx_v_batch, PyObject *__pyx_v_chunk, PyObject *__pyx_v_replicas); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_33report_error(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_err, PyObject *__pyx_v_chunk, PyObject *__pyx_v_rows, PyObject *__pyx_v_attempts, PyObject *__pyx_v_final); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13ImportProcess_35update_chunk(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_rows, PyObject *__pyx_v_chunk); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_9RateMeter___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_log_fcn, PyObject *__pyx_v_update_interval, PyObject *__pyx_v_log_file); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_9RateMeter_2increment(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_9RateMeter_4maybe_update(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sleep); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_9RateMeter_6update(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_checkpoint_time); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_9RateMeter_8get_new_rate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_rate); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_9RateMeter_10get_avg_rate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_9RateMeter_12log_message(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_9RateMeter_14get_total_records(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct__recv_select(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_1_recv_polling(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_2_num_live_processes(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_3_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_4_get_ranges(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_5_get_source(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_6_init_feeder_thread(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_7_num_requests(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_8_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_9_get_session(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_10_attach_callbacks(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_11_prepare_export_query(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_12_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_13__get_converter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_14_get_convert_integer_fcn(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_15_get_convert_decimal_fcn(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_16_convert_tuple(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_17_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_18_convert_list(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_19_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_20_convert_set(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_21_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_22_convert_map(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_23_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_24_convert_user_type(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_25_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_26_get_row_partition_key_values_fcn(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_27__initialize_ring(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_28_filter_replicas(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_29_make_query_plan(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_30_wrap_make_statement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_31_convert_rows(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_32_split_into_batches(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static char __pyx_k_0[] = "0";
+static char __pyx_k_1[] = "-1";
+static char __pyx_k_a[] = "a";
+static char __pyx_k_c[] = "c";
+static char __pyx_k_d[] = ".%d";
+static char __pyx_k_e[] = "e";
+static char __pyx_k_f[] = "f";
+static char __pyx_k_i[] = "i";
+static char __pyx_k_k[] = "k";
+static char __pyx_k_l[] = "l";
+static char __pyx_k_m[] = "m";
+static char __pyx_k_n[] = "n";
+static char __pyx_k_p[] = "p";
+static char __pyx_k_r[] = "r";
+static char __pyx_k_s[] = "s";
+static char __pyx_k_t[] = "t";
+static char __pyx_k_v[] = "v";
+static char __pyx_k__9[] = "_";
+static char __pyx_k_ch[] = "ch";
+static char __pyx_k_ct[] = "ct";
+static char __pyx_k_id[] = "id";
+static char __pyx_k_ks[] = "ks";
+static char __pyx_k_mp[] = "mp";
+static char __pyx_k_os[] = "os";
+static char __pyx_k_pk[] = "pk";
+static char __pyx_k_pr[] = "pr";
+static char __pyx_k_rb[] = "rb";
+static char __pyx_k_re[] = "re";
+static char __pyx_k_tm[] = "tm";
+static char __pyx_k_to[] = "to";
+static char __pyx_k_vv[] = "vv";
+static char __pyx_k_wb[] = "wb";
+static char __pyx_k_1_2[] = "1";
+static char __pyx_k_AND[] = " AND";
+static char __pyx_k__10[] = "\n";
+static char __pyx_k__12[] = "";
+static char __pyx_k__15[] = "\"";
+static char __pyx_k__17[] = "\\";
+static char __pyx_k__19[] = ",";
+static char __pyx_k__32[] = ".";
+static char __pyx_k__52[] = ", ";
+static char __pyx_k__99[] = "{";
+ static char __pyx_k_add[] = "add";
+ static char __pyx_k_and[] = ", and ";
+ static char __pyx_k_cap[] = "cap";
+ static char __pyx_k_col[] = "col";
+ static char __pyx_k_csv[] = "csv";
+ static char __pyx_k_d_s[] = "%d %s";
+ static char __pyx_k_day[] = "day";
+ static char __pyx_k_doc[] = "__doc__";
+ static char __pyx_k_end[] = "end";
+ static char __pyx_k_eol[] = "eol";
+ static char __pyx_k_err[] = "err";
+ static char __pyx_k_exc[] = "exc";
+ static char __pyx_k_get[] = "get";
+ static char __pyx_k_idx[] = "idx";
+ static char __pyx_k_int[] = "int";
+ static char __pyx_k_key[] = "key";
+ static char __pyx_k_map[] = "map";
+ static char __pyx_k_msg[] = "msg";
+ static char __pyx_k_now[] = "now";
+ static char __pyx_k_num[] = "num";
+ static char __pyx_k_obj[] = "obj";
+ static char __pyx_k_pid[] = "pid";
+ static char __pyx_k_pop[] = "pop";
+ static char __pyx_k_put[] = "put";
+ static char __pyx_k_ret[] = "ret";
+ static char __pyx_k_row[] = "row";
+ static char __pyx_k_run[] = "run";
+ static char __pyx_k_s_2[] = "%s = ?";
+ static char __pyx_k_s_3[] = "{%s}";
+ static char __pyx_k_s_s[] = "%s - %s";
+ static char __pyx_k_sep[] = "sep";
+ static char __pyx_k_set[] = "set";
+ static char __pyx_k_ssl[] = "ssl";
+ static char __pyx_k_sum[] = "sum";
+ static char __pyx_k_sys[] = "sys";
+ static char __pyx_k_tty[] = "tty";
+ static char __pyx_k_val[] = "val";
+ static char __pyx_k_zip[] = "zip";
+ static char __pyx_k_Date[] = "Date";
+ static char __pyx_k_Lock[] = "Lock";
+ static char __pyx_k_Pipe[] = "Pipe";
+ static char __pyx_k_Time[] = "Time";
+ static char __pyx_k_UUID[] = "UUID";
+ static char __pyx_k__100[] = "[";
+ static char __pyx_k__101[] = "(";
+static char __pyx_k__102[] = "}";
+static char __pyx_k__103[] = "]";
+static char __pyx_k__104[] = ")";
+static char __pyx_k__105[] = "'";
+static char __pyx_k__119[] = ":";
+static char __pyx_k__167[] = "?";
+static char __pyx_k__179[] = "\r";
+static char __pyx_k_args[] = "args";
+static char __pyx_k_bind[] = "bind";
+static char __pyx_k_blob[] = "blob";
+static char __pyx_k_conn[] = "conn";
+static char __pyx_k_conv[] = "conv";
+static char __pyx_k_copy[] = "copy";
+static char __pyx_k_curr[] = "curr";
+static char __pyx_k_data[] = "data";
+static char __pyx_k_date[] = "date";
+static char __pyx_k_desc[] = "desc";
+static char __pyx_k_exit[] = "__exit__";
+static char __pyx_k_file[] = "file";
+static char __pyx_k_from[] = "from";
+static char __pyx_k_glob[] = "glob";
+static char __pyx_k_host[] = "host";
+static char __pyx_k_hour[] = "hour";
+static char __pyx_k_inet[] = "inet";
+static char __pyx_k_info[] = "info";
+static char __pyx_k_init[] = "__init__";
+static char __pyx_k_iter[] = "__iter__";
+static char __pyx_k_join[] = "join";
+static char __pyx_k_json[] = "json";
+static char __pyx_k_keys[] = "keys";
+static char __pyx_k_last[] = "last";
+static char __pyx_k_list[] = "list";
+static char __pyx_k_lock[] = "lock";
+static char __pyx_k_main[] = "__main__";
+static char __pyx_k_name[] = "name";
+static char __pyx_k_next[] = "next";
+static char __pyx_k_null[] = "null";
+static char __pyx_k_open[] = "open";
+static char __pyx_k_opts[] = "opts";
+static char __pyx_k_pack[] = "pack";
+static char __pyx_k_path[] = "path";
+static char __pyx_k_poll[] = "poll";
+static char __pyx_k_port[] = "port";
+static char __pyx_k_prev[] = "prev";
+static char __pyx_k_recv[] = "recv";
+static char __pyx_k_ring[] = "ring";
+static char __pyx_k_rows[] = "rows";
+static char __pyx_k_self[] = "self";
+static char __pyx_k_send[] = "send";
+static char __pyx_k_sent[] = "sent";
+static char __pyx_k_sort[] = "sort";
+static char __pyx_k_task[] = "task";
+static char __pyx_k_test[] = "__test__";
+static char __pyx_k_text[] = "text";
+static char __pyx_k_time[] = "time";
+static char __pyx_k_true[] = "true";
+static char __pyx_k_tval[] = "tval";
+static char __pyx_k_type[] = "type";
+static char __pyx_k_unit[] = "unit";
+static char __pyx_k_utf8[] = "utf8";
+static char __pyx_k_util[] = "util";
+static char __pyx_k_uuid[] = "uuid";
+static char __pyx_k_vals[] = "vals";
+static char __pyx_k_AND_2[] = " AND ";
+static char __pyx_k_EMPTY[] = "EMPTY";
+static char __pyx_k_H_dsB[] = ">H%dsB";
+static char __pyx_k_Linux[] = "Linux";
+static char __pyx_k_Queue[] = "Queue";
+static char __pyx_k_RETRY[] = "RETRY";
+static char __pyx_k_WHERE[] = " WHERE";
+static char __pyx_k_and_2[] = " and ";
+static char __pyx_k_ascii[] = "ascii";
+static char __pyx_k_batch[] = "batch";
+static char __pyx_k_chunk[] = "chunk";
+static char __pyx_k_class[] = "__class__";
+static char __pyx_k_close[] = "close";
+static char __pyx_k_ctype[] = "ctype";
+static char __pyx_k_debug[] = "debug";
+static char __pyx_k_delay[] = "delay";
+static char __pyx_k_enter[] = "__enter__";
+static char __pyx_k_final[] = "final";
+static char __pyx_k_float[] = "float";
+static char __pyx_k_flush[] = "flush";
+static char __pyx_k_fname[] = "fname";
+static char __pyx_k_group[] = "group";
+static char __pyx_k_hosts[] = "hosts";
+static char __pyx_k_index[] = "index";
+static char __pyx_k_inmsg[] = "inmsg";
+static char __pyx_k_is_up[] = "is_up";
+static char __pyx_k_items[] = "items";
+static char __pyx_k_level[] = "level";
+static char __pyx_k_loads[] = "loads";
+static char __pyx_k_lower[] = "lower";
+static char __pyx_k_match[] = "match";
+static char __pyx_k_meter[] = "meter";
+static char __pyx_k_paths[] = "paths";
+static char __pyx_k_print[] = "print";
+static char __pyx_k_query[] = "query";
+static char __pyx_k_quote[] = "quote";
+static char __pyx_k_range[] = "range";
+static char __pyx_k_rlock[] = "rlock";
+static char __pyx_k_s_s_2[] = "%s=%s";
+static char __pyx_k_s_s_s[] = "%s=%s+%s";
+static char __pyx_k_shell[] = "shell";
+static char __pyx_k_sleep[] = "sleep";
+static char __pyx_k_split[] = "split";
+static char __pyx_k_start[] = "start";
+static char __pyx_k_strip[] = "strip";
+static char __pyx_k_table[] = "table";
+static char __pyx_k_throw[] = "throw";
+static char __pyx_k_token[] = "token";
+static char __pyx_k_tuple[] = "tuple";
+static char __pyx_k_until[] = "until";
+static char __pyx_k_value[] = "value";
+static char __pyx_k_wlock[] = "wlock";
+static char __pyx_k_words[] = "words";
+static char __pyx_k_write[] = "write";
+static char __pyx_k_Thread[] = "Thread";
+static char __pyx_k_append[] = "append";
+static char __pyx_k_bigint[] = "bigint";
+static char __pyx_k_bisect[] = "bisect";
+static char __pyx_k_copy_2[] = "[copy] ";
+static char __pyx_k_copy_s[] = "copy-%s";
+static char __pyx_k_decode[] = "decode";
+static char __pyx_k_double[] = "double";
+static char __pyx_k_duplex[] = "duplex";
+static char __pyx_k_errors[] = "errors";
+static char __pyx_k_escape[] = "escape";
+static char __pyx_k_exit_2[] = "exit";
+static char __pyx_k_extend[] = "extend";
+static char __pyx_k_failed[] = "failed";
+static char __pyx_k_feeder[] = "feeder";
+static char __pyx_k_filter[] = "filter";
+static char __pyx_k_format[] = "format";
+static char __pyx_k_frozen[] = "frozen";
+static char __pyx_k_future[] = "future";
+static char __pyx_k_getpid[] = "getpid";
+static char __pyx_k_header[] = "header";
+static char __pyx_k_import[] = "__import__";
+static char __pyx_k_isfile[] = "isfile";
+static char __pyx_k_length[] = "length";
+static char __pyx_k_minute[] = "minute";
+static char __pyx_k_module[] = "__module__";
+static char __pyx_k_name_2[] = "__name__";
+static char __pyx_k_object[] = "object";
+static char __pyx_k_offset[] = "offset";
+static char __pyx_k_outmsg[] = "outmsg";
+static char __pyx_k_output[] = "output";
+static char __pyx_k_params[] = "params";
+static char __pyx_k_parent[] = "parent";
+static char __pyx_k_prompt[] = "prompt";
+static char __pyx_k_random[] = "random";
+static char __pyx_k_ranges[] = "ranges";
+static char __pyx_k_reader[] = "reader";
+static char __pyx_k_readfp[] = "readfp";
+static char __pyx_k_rename[] = "rename";
+static char __pyx_k_result[] = "result";
+static char __pyx_k_rlocks[] = "_rlocks";
+static char __pyx_k_select[] = "select";
+static char __pyx_k_sorted[] = "sorted";
+static char __pyx_k_stdout[] = "stdout";
+static char __pyx_k_struct[] = "struct";
+static char __pyx_k_system[] = "system";
+static char __pyx_k_tables[] = "tables";
+static char __pyx_k_target[] = "target";
+static char __pyx_k_thread[] = "thread";
+static char __pyx_k_timegm[] = "timegm";
+static char __pyx_k_unlink[] = "unlink";
+static char __pyx_k_update[] = "update";
+static char __pyx_k_values[] = "values";
+static char __pyx_k_varint[] = "varint";
+static char __pyx_k_writer[] = "writer";
+static char __pyx_k_xrange[] = "xrange";
+static char __pyx_k_COUNTER[] = "COUNTER";
+static char __pyx_k_Cluster[] = "Cluster";
+static char __pyx_k_CsvDest[] = "CsvDest";
+static char __pyx_k_Decimal[] = "Decimal";
+static char __pyx_k_IOError[] = "IOError";
+static char __pyx_k_Process[] = "Process";
+static char __pyx_k_RETHROW[] = "RETHROW";
+static char __pyx_k_adapter[] = "adapter";
+static char __pyx_k_address[] = "address";
+static char __pyx_k_backoff[] = "backoff";
+static char __pyx_k_boolean[] = "boolean";
+static char __pyx_k_cluster[] = "cluster";
+static char __pyx_k_columns[] = "columns";
+static char __pyx_k_compile[] = "compile";
+static char __pyx_k_configs[] = "configs";
+static char __pyx_k_connect[] = "connect";
+static char __pyx_k_convert[] = "convert";
+static char __pyx_k_counter[] = "counter";
+static char __pyx_k_d_2_d_2[] = "(?:([+\\-])(\\d{2}):?(\\d{2}))?";
+static char __pyx_k_decimal[] = "decimal";
+static char __pyx_k_dialect[] = "dialect";
+static char __pyx_k_environ[] = "environ";
+static char __pyx_k_errback[] = "errback";
+static char __pyx_k_errfile[] = "errfile";
+static char __pyx_k_fromhex[] = "fromhex";
+static char __pyx_k_genexpr[] = "genexpr";
+static char __pyx_k_get_pid[] = "get_pid";
+static char __pyx_k_linesep[] = "linesep";
+static char __pyx_k_log_fcn[] = "log_fcn";
+static char __pyx_k_maxrows[] = "maxrows";
+static char __pyx_k_message[] = "message";
+static char __pyx_k_nullval[] = "nullval";
+static char __pyx_k_options[] = "options";
+static char __pyx_k_pk_cols[] = "pk_cols";
+static char __pyx_k_prepare[] = "prepare";
+static char __pyx_k_process[] = "process";
+static char __pyx_k_readers[] = "_readers";
+static char __pyx_k_replace[] = "replace";
+static char __pyx_k_seconds[] = "seconds";
+static char __pyx_k_section[] = "section";
+static char __pyx_k_session[] = "session";
+static char __pyx_k_sources[] = "sources";
+static char __pyx_k_timeout[] = "timeout";
+static char __pyx_k_tinyint[] = "tinyint";
+static char __pyx_k_varchar[] = "varchar";
+static char __pyx_k_CopyTask[] = "CopyTask";
+static char __pyx_k_EOFError[] = "EOFError";
+static char __pyx_k_IS_LINUX[] = "IS_LINUX";
+static char __pyx_k_StringIO[] = "StringIO";
+static char __pyx_k_TokenMap[] = "TokenMap";
+static char __pyx_k_UNLOGGED[] = "UNLOGGED";
+static char __pyx_k_UserType[] = "UserType";
+static char __pyx_k_attempts[] = "attempts";
+static char __pyx_k_batch_id[] = "batch_id";
+static char __pyx_k_calendar[] = "calendar";
+static char __pyx_k_callback[] = "callback";
+static char __pyx_k_channels[] = "channels";
+static char __pyx_k_chunk_id[] = "chunk_id";
+static char __pyx_k_colormap[] = "colormap";
+static char __pyx_k_coltypes[] = "coltypes";
+static char __pyx_k_copy_s_s[] = "copy:%s.%s";
+static char __pyx_k_cql_type[] = "cql_type";
+static char __pyx_k_cqltypes[] = "cqltypes";
+static char __pyx_k_datetime[] = "datetime";
+static char __pyx_k_encoding[] = "encoding";
+static char __pyx_k_endswith[] = "endswith";
+static char __pyx_k_endtoken[] = "endtoken";
+static char __pyx_k_err_file[] = "err_file";
+static char __pyx_k_exitcode[] = "exitcode";
+static char __pyx_k_failures[] = "failures";
+static char __pyx_k_from_key[] = "from_key";
+static char __pyx_k_get_dest[] = "_get_dest";
+static char __pyx_k_get_host[] = "get_host";
+static char __pyx_k_get_ring[] = "get_ring";
+static char __pyx_k_getvalue[] = "getvalue";
+static char __pyx_k_hostname[] = "hostname";
+static char __pyx_k_imported[] = "imported";
+static char __pyx_k_is_alive[] = "is_alive";
+static char __pyx_k_keyspace[] = "keyspace";
+static char __pyx_k_local_dc[] = "local_dc";
+static char __pyx_k_log_file[] = "log_file";
+static char __pyx_k_max_rows[] = "max_rows";
+static char __pyx_k_metadata[] = "metadata";
+static char __pyx_k_new_rate[] = "new_rate";
+static char __pyx_k_normpath[] = "normpath";
+static char __pyx_k_num_read[] = "num_read";
+static char __pyx_k_num_rows[] = "num_rows";
+static char __pyx_k_pagesize[] = "pagesize";
+static char __pyx_k_platform[] = "platform";
+static char __pyx_k_previous[] = "previous";
+static char __pyx_k_printerr[] = "printerr";
+static char __pyx_k_printmsg[] = "_printmsg";
+static char __pyx_k_property[] = "property";
+static char __pyx_k_qualname[] = "__qualname__";
+static char __pyx_k_query_id[] = "query_id";
+static char __pyx_k_ratefile[] = "ratefile";
+static char __pyx_k_readable[] = "readable";
+static char __pyx_k_replicas[] = "replicas";
+static char __pyx_k_requests[] = "requests";
+static char __pyx_k_response[] = "response";
+static char __pyx_k_ret_type[] = "ret_type";
+static char __pyx_k_ring_pos[] = "ring_pos";
+static char __pyx_k_shuffled[] = "shuffled";
+static char __pyx_k_shutdown[] = "shutdown";
+static char __pyx_k_skipcols[] = "skipcols";
+static char __pyx_k_skiprows[] = "skiprows";
+static char __pyx_k_smallint[] = "smallint";
+static char __pyx_k_strftime[] = "strftime";
+static char __pyx_k_strptime[] = "strptime";
+static char __pyx_k_subtypes[] = "subtypes";
+static char __pyx_k_timeuuid[] = "timeuuid";
+static char __pyx_k_timezone[] = "timezone";
+static char __pyx_k_typename[] = "typename";
+static char __pyx_k_writerow[] = "writerow";
+static char __pyx_k_BatchType[] = "BatchType";
+static char __pyx_k_Exception[] = "Exception";
+static char __pyx_k_RateMeter[] = "RateMeter";
+static char __pyx_k_ReadError[] = "ReadError";
+static char __pyx_k_STRACE_ON[] = "STRACE_ON";
+static char __pyx_k_TypeError[] = "TypeError";
+static char __pyx_k_boolstyle[] = "boolstyle";
+static char __pyx_k_chunksize[] = "chunksize";
+static char __pyx_k_cpu_count[] = "cpu_count";
+static char __pyx_k_delimiter[] = "delimiter";
+static char __pyx_k_direction[] = "direction";
+static char __pyx_k_dtformats[] = "dtformats";
+static char __pyx_k_end_token[] = "end_token";
+static char __pyx_k_enumerate[] = "enumerate";
+static char __pyx_k_exhausted[] = "exhausted";
+static char __pyx_k_file_name[] = "file_name";
+static char __pyx_k_formatter[] = "formatter";
+static char __pyx_k_increment[] = "increment";
+static char __pyx_k_inner_run[] = "inner_run";
+static char __pyx_k_iteritems[] = "iteritems";
+static char __pyx_k_keyspaces[] = "keyspaces";
+static char __pyx_k_metaclass[] = "__metaclass__";
+static char __pyx_k_min_token[] = "min_token";
+static char __pyx_k_next_dest[] = "_next_dest";
+static char __pyx_k_num_files[] = "num_files";
+static char __pyx_k_pk_values[] = "pk_values";
+static char __pyx_k_prepare_2[] = "__prepare__";
+static char __pyx_k_print_exc[] = "print_exc";
+static char __pyx_k_processes[] = "processes";
+static char __pyx_k_quotechar[] = "quotechar";
+static char __pyx_k_randrange[] = "randrange";
+static char __pyx_k_read_rows[] = "read_rows";
+static char __pyx_k_responses[] = "responses";
+static char __pyx_k_retry_num[] = "retry_num";
+static char __pyx_k_send_work[] = "send_work";
+static char __pyx_k_serialize[] = "serialize";
+static char __pyx_k_session_2[] = "_session";
+static char __pyx_k_setDaemon[] = "setDaemon";
+static char __pyx_k_skip_rows[] = "skip_rows";
+static char __pyx_k_statement[] = "statement";
+static char __pyx_k_succeeded[] = "succeeded";
+static char __pyx_k_terminate[] = "terminate";
+static char __pyx_k_threading[] = "threading";
+static char __pyx_k_timestamp[] = "timestamp";
+static char __pyx_k_token_map[] = "token_map";
+static char __pyx_k_token_s_s[] = " token(%s) > %s";
+static char __pyx_k_traceback[] = "traceback";
+static char __pyx_k_unprotect[] = "unprotect";
+static char __pyx_k_CqlRuleSet[] = "CqlRuleSet";
+static char __pyx_k_ExportTask[] = "ExportTask";
+static char __pyx_k_ImportTask[] = "ImportTask";
+static char __pyx_k_IndexError[] = "IndexError";
+static char __pyx_k_PROFILE_ON[] = "PROFILE_ON";
+static char __pyx_k_ParseError[] = "ParseError";
+static char __pyx_k_PipeReader[] = "PipeReader";
+static char __pyx_k_True_False[] = "True, False";
+static char __pyx_k_ValueError[] = "ValueError";
+static char __pyx_k_batch_type[] = "batch_type";
+static char __pyx_k_begintoken[] = "begintoken";
+static char __pyx_k_chunk_size[] = "chunk_size";
+static char __pyx_k_columnlist[] = "columnlist";
+static char __pyx_k_configfile[] = "configfile";
+static char __pyx_k_converters[] = "converters";
+static char __pyx_k_copy_s_s_s[] = "copy-%s:%s.%s";
+static char __pyx_k_datacenter[] = "datacenter";
+static char __pyx_k_decimalsep[] = "decimalsep";
+static char __pyx_k_displaying[] = "displaying";
+static char __pyx_k_escapechar[] = "escapechar";
+static char __pyx_k_exit_batch[] = "exit_batch";
+static char __pyx_k_exit_range[] = "exit_range";
+static char __pyx_k_expanduser[] = "expanduser";
+static char __pyx_k_formatters[] = "formatters";
+static char __pyx_k_formatting[] = "formatting";
+static char __pyx_k_get_ranges[] = "get_ranges";
+static char __pyx_k_get_source[] = "get_source";
+static char __pyx_k_ingestrate[] = "ingestrate";
+static char __pyx_k_is_counter[] = "is_counter";
+static char __pyx_k_make_batch[] = "make_batch";
+static char __pyx_k_make_range[] = "make_range";
+static char __pyx_k_namedtuple[] = "namedtuple";
+static char __pyx_k_printmsg_2[] = "printmsg";
+static char __pyx_k_profile_on[] = "profile_on";
+static char __pyx_k_protectors[] = "protectors";
+static char __pyx_k_send_chunk[] = "send_chunk";
+static char __pyx_k_send_meter[] = "send_meter";
+static char __pyx_k_set_clause[] = "set_clause";
+static char __pyx_k_start_time[] = "start_time";
+static char __pyx_k_startswith[] = "startswith";
+static char __pyx_k_table_meta[] = "table_meta";
+static char __pyx_k_time_start[] = "time_start";
+static char __pyx_k_write_type[] = "write_type";
+static char __pyx_k_03f_seconds[] = "%.03f seconds";
+static char __pyx_k_CopyOptions[] = "CopyOptions";
+static char __pyx_k_FilesReader[] = "FilesReader";
+static char __pyx_k_RetryPolicy[] = "RetryPolicy";
+static char __pyx_k_add_request[] = "add_request";
+static char __pyx_k_begin_token[] = "begin_token";
+static char __pyx_k_bool_styles[] = "bool_styles";
+static char __pyx_k_collections[] = "collections";
+static char __pyx_k_compression[] = "compression";
+static char __pyx_k_config_file[] = "config_file";
+static char __pyx_k_consistency[] = "consistency";
+static char __pyx_k_convert_map[] = "convert_map";
+static char __pyx_k_convert_row[] = "convert_row";
+static char __pyx_k_convert_set[] = "convert_set";
+static char __pyx_k_cql_version[] = "cql_version";
+static char __pyx_k_d_2_d_2_d_2[] = "(?:(\\d{2}):(\\d{2})(?::(\\d{2}))?)?";
+static char __pyx_k_decimal_sep[] = "decimal_sep";
+static char __pyx_k_defaultdict[] = "defaultdict";
+static char __pyx_k_doublequote[] = "doublequote";
+static char __pyx_k_feed_errors[] = "feed_errors";
+static char __pyx_k_get_columns[] = "get_columns";
+static char __pyx_k_get_session[] = "get_session";
+static char __pyx_k_has_section[] = "has_section";
+static char __pyx_k_ingest_rate[] = "ingest_rate";
+static char __pyx_k_last_switch[] = "last_switch";
+static char __pyx_k_log_message[] = "log_message";
+static char __pyx_k_make_params[] = "make_params";
+static char __pyx_k_make_source[] = "make_source";
+static char __pyx_k_maxattempts[] = "maxattempts";
+static char __pyx_k_maxrequests[] = "maxrequests";
+static char __pyx_k_new_cluster[] = "new_cluster";
+static char __pyx_k_next_source[] = "next_source";
+static char __pyx_k_num_sources[] = "num_sources";
+static char __pyx_k_num_written[] = "num_written";
+static char __pyx_k_pagetimeout[] = "pagetimeout";
+static char __pyx_k_partitioner[] = "partitioner";
+static char __pyx_k_primary_key[] = "primary_key";
+static char __pyx_k_profile_off[] = "profile_off";
+static char __pyx_k_recv_select[] = "recv_select";
+static char __pyx_k_row_factory[] = "row_factory";
+static char __pyx_k_source_name[] = "source_name";
+static char __pyx_k_ssl_options[] = "ssl_options";
+static char __pyx_k_sslhandling[] = "sslhandling";
+static char __pyx_k_start_token[] = "start_token";
+static char __pyx_k_struct_time[] = "struct_time";
+static char __pyx_k_token_class[] = "token_class";
+static char __pyx_k_token_range[] = "token_range";
+static char __pyx_k_token_s_s_2[] = " token(%s) <= %s";
+static char __pyx_k_ChildProcess[] = "ChildProcess";
+static char __pyx_k_ConfigParser[] = "ConfigParser";
+static char __pyx_k_ExportWriter[] = "ExportWriter";
+static char __pyx_k_NO_COLOR_MAP[] = "NO_COLOR_MAP";
+static char __pyx_k_ReversedType[] = "ReversedType";
+static char __pyx_k_Y_m_d__H_M_S[] = ".%Y%m%d_%H%M%S";
+static char __pyx_k_bisect_right[] = "bisect_right";
+static char __pyx_k_convert_blob[] = "convert_blob";
+static char __pyx_k_convert_bool[] = "convert_bool";
+static char __pyx_k_convert_date[] = "convert_date";
+static char __pyx_k_convert_list[] = "convert_list";
+static char __pyx_k_convert_rows[] = "convert_rows";
+static char __pyx_k_convert_text[] = "convert_text";
+static char __pyx_k_convert_time[] = "convert_time";
+static char __pyx_k_convert_uuid[] = "convert_uuid";
+static char __pyx_k_copy_options[] = "copy_options";
+static char __pyx_k_cql3handling[] = "cql3handling";
+static char __pyx_k_current_dest[] = "current_dest";
+static char __pyx_k_current_rate[] = "current_rate";
+static char __pyx_k_err_callback[] = "err_callback";
+static char __pyx_k_err_is_final[] = "err_is_final";
+static char __pyx_k_errback_args[] = "errback_args";
+static char __pyx_k_failed_batch[] = "failed_batch";
+static char __pyx_k_format_value[] = "format_value";
+static char __pyx_k_get_avg_rate[] = "get_avg_rate";
+static char __pyx_k_get_new_rate[] = "get_new_rate";
+static char __pyx_k_get_ring_pos[] = "get_ring_pos";
+static char __pyx_k_handle_error[] = "handle_error";
+static char __pyx_k_max_attempts[] = "max_attempts";
+static char __pyx_k_max_exceeded[] = "max_exceeded";
+static char __pyx_k_max_requests[] = "max_requests";
+static char __pyx_k_maxbatchsize[] = "maxbatchsize";
+static char __pyx_k_maybe_update[] = "maybe_update";
+static char __pyx_k_minbatchsize[] = "minbatchsize";
+static char __pyx_k_num_channels[] = "num_channels";
+static char __pyx_k_num_failures[] = "num_failures";
+static char __pyx_k_num_requests[] = "num_requests";
+static char __pyx_k_numprocesses[] = "numprocesses";
+static char __pyx_k_old_err_file[] = "old_err_file";
+static char __pyx_k_output_close[] = "output close";
+static char __pyx_k_parse_errors[] = "parse_errors";
+static char __pyx_k_protect_name[] = "protect_name";
+static char __pyx_k_recv_polling[] = "recv_polling";
+static char __pyx_k_report_error[] = "report_error";
+static char __pyx_k_select_query[] = "select_query";
+static char __pyx_k_skip_columns[] = "skip_columns";
+static char __pyx_k_ssl_settings[] = "ssl_settings";
+static char __pyx_k_staticmethod[] = "staticmethod";
+static char __pyx_k_thousandssep[] = "thousandssep";
+static char __pyx_k_unrecognized[] = "unrecognized";
+static char __pyx_k_update_chunk[] = "update_chunk";
+static char __pyx_k_where_clause[] = "where_clause";
+static char __pyx_k_BaseException[] = "BaseException";
+static char __pyx_k_ExportProcess[] = "ExportProcess";
+static char __pyx_k_ExportSession[] = "ExportSession";
+static char __pyx_k_ImmutableDict[] = "ImmutableDict";
+static char __pyx_k_ImportProcess[] = "ImportProcess";
+static char __pyx_k_OneWayChannel[] = "OneWayChannel";
+static char __pyx_k_StopIteration[] = "StopIteration";
+static char __pyx_k_add_callbacks[] = "add_callbacks";
+static char __pyx_k_auth_provider[] = "auth_provider";
+static char __pyx_k_callback_args[] = "callback_args";
+static char __pyx_k_check_options[] = "check_options";
+static char __pyx_k_clean_options[] = "clean_options";
+static char __pyx_k_convert_tuple[] = "convert_tuple";
+static char __pyx_k_current_range[] = "current_range";
+static char __pyx_k_dequote_value[] = "dequote_value";
+static char __pyx_k_error_handler[] = "error_handler";
+static char __pyx_k_execute_async[] = "execute_async";
+static char __pyx_k_failing_batch[] = "failing_batch";
+static char __pyx_k_failing_range[] = "failing_range";
+static char __pyx_k_get_converter[] = "_get_converter";
+static char __pyx_k_get_formatter[] = "get_formatter";
+static char __pyx_k_get_min_token[] = "get_min_token";
+static char __pyx_k_get_num_cores[] = "get_num_cores";
+static char __pyx_k_insert_errors[] = "insert_errors";
+static char __pyx_k_maxoutputsize[] = "maxoutputsize";
+static char __pyx_k_num_processes[] = "num_processes";
+static char __pyx_k_num_remaining[] = "num_remaining";
+static char __pyx_k_num_rows_sent[] = "num_rows_sent";
+static char __pyx_k_parse_options[] = "parse_options";
+static char __pyx_k_partition_key[] = "partition_key";
+static char __pyx_k_prepare_query[] = "prepare_query";
+static char __pyx_k_printdebugmsg[] = "printdebugmsg";
+static char __pyx_k_protect_names[] = "protect_names";
+static char __pyx_k_protect_value[] = "protect_value";
+static char __pyx_k_proto_version[] = "proto_version";
+static char __pyx_k_receive_meter[] = "receive_meter";
+static char __pyx_k_safe_normpath[] = "safe_normpath";
+static char __pyx_k_start_request[] = "start_request";
+static char __pyx_k_string_escape[] = "string_escape";
+static char __pyx_k_test_failures[] = "test_failures";
+static char __pyx_k_thousands_sep[] = "thousands_sep";
+static char __pyx_k_total_records[] = "total_records";
+static char __pyx_k_trace_process[] = "trace_process";
+static char __pyx_k_tuple_factory[] = "tuple_factory";
+static char __pyx_k_update_params[] = "update_params";
+static char __pyx_k_valid_columns[] = "valid_columns";
+static char __pyx_k_BatchStatement[] = "BatchStatement";
+static char __pyx_k_Closing_queues[] = "Closing queues...";
+static char __pyx_k_CopyTask_close[] = "CopyTask.close";
+static char __pyx_k_DateTimeFormat[] = "DateTimeFormat";
+static char __pyx_k_ExportTask_run[] = "ExportTask.run";
+static char __pyx_k_FeedingProcess[] = "FeedingProcess";
+static char __pyx_k_ImportTask_run[] = "ImportTask.run";
+static char __pyx_k_OneWayChannels[] = "OneWayChannels";
+static char __pyx_k_boolean_styles[] = "boolean_styles";
+static char __pyx_k_cassandra_util[] = "cassandra.util";
+static char __pyx_k_contact_points[] = "contact_points";
+static char __pyx_k_converted_rows[] = "converted_rows";
+static char __pyx_k_current_record[] = "current_record";
+static char __pyx_k_current_source[] = "current_source";
+static char __pyx_k_data_retrieved[] = "data_retrieved";
+static char __pyx_k_datetimeformat[] = "datetimeformat";
+static char __pyx_k_export_process[] = "export_process";
+static char __pyx_k_export_records[] = "export_records";
+static char __pyx_k_feeding_result[] = "feeding_result";
+static char __pyx_k_get_table_meta[] = "get_table_meta";
+static char __pyx_k_handle_timeout[] = "_handle_timeout";
+static char __pyx_k_has_more_pages[] = "has_more_pages";
+static char __pyx_k_import_records[] = "import_records";
+static char __pyx_k_is_parse_error[] = "is_parse_error";
+static char __pyx_k_make_statement[] = "make_statement";
+static char __pyx_k_max_batch_size[] = "max_batch_size";
+static char __pyx_k_maxparseerrors[] = "maxparseerrors";
+static char __pyx_k_min_batch_size[] = "min_batch_size";
+static char __pyx_k_parent_process[] = "parent_process";
+static char __pyx_k_remaining_time[] = "remaining_time";
+static char __pyx_k_stop_processes[] = "stop_processes";
+static char __pyx_k_tokens_to_send[] = "tokens_to_send";
+static char __pyx_k_total_requests[] = "total_requests";
+static char __pyx_k_CopyTask___init[] = "CopyTask.__init__";
+static char __pyx_k_ImportTaskError[] = "ImportTaskError";
+static char __pyx_k_RawConfigParser[] = "RawConfigParser";
+static char __pyx_k_SimpleStatement[] = "SimpleStatement";
+static char __pyx_k_TokenMap___init[] = "TokenMap.__init__";
+static char __pyx_k_Using_options_s[] = "Using options: '%s'";
+static char __pyx_k_add_failed_rows[] = "add_failed_rows";
+static char __pyx_k_build_if_absent[] = "build_if_absent";
+static char __pyx_k_cassandra_query[] = "cassandra.query";
+static char __pyx_k_column_metadata[] = "column_metadata";
+static char __pyx_k_config_sections[] = "config_sections";
+static char __pyx_k_connect_timeout[] = "connect_timeout";
+static char __pyx_k_convert_unknown[] = "convert_unknown";
+static char __pyx_k_d_4_d_2_d_2_s_T[] = "(\\d{4})\\-(\\d{2})\\-(\\d{2})\\s?(?:'T')?";
+static char __pyx_k_default_timeout[] = "default_timeout";
+static char __pyx_k_dialect_options[] = "dialect_options";
+static char __pyx_k_filter_replicas[] = "filter_replicas";
+static char __pyx_k_float_precision[] = "float_precision";
+static char __pyx_k_full_query_text[] = "full_query_text";
+static char __pyx_k_initialize_ring[] = "_initialize_ring";
+static char __pyx_k_make_query_plan[] = "make_query_plan";
+static char __pyx_k_make_range_data[] = "make_range_data";
+static char __pyx_k_max_output_size[] = "max_output_size";
+static char __pyx_k_maxinserterrors[] = "maxinserterrors";
+static char __pyx_k_multiprocessing[] = "multiprocessing";
+static char __pyx_k_num_rows_failed[] = "num_rows_failed";
+static char __pyx_k_on_read_timeout[] = "on_read_timeout";
+static char __pyx_k_print_traceback[] = "print_traceback";
+static char __pyx_k_receive_results[] = "receive_results";
+static char __pyx_k_reportfrequency[] = "reportfrequency";
+static char __pyx_k_result_callback[] = "result_callback";
+static char __pyx_k_rows_by_replica[] = "rows_by_replica";
+static char __pyx_k_send_stdin_rows[] = "send_stdin_rows";
+static char __pyx_k_start_processes[] = "start_processes";
+static char __pyx_k_time_difference[] = "time_difference";
+static char __pyx_k_tokens_to_hosts[] = "tokens_to_hosts";
+static char __pyx_k_update_interval[] = "update_interval";
+static char __pyx_k_worker_channels[] = "worker_channels";
+static char __pyx_k_CopyTask_get_pid[] = "CopyTask.get_pid";
+static char __pyx_k_ExportTask_close[] = "ExportTask.close";
+static char __pyx_k_ImportConversion[] = "ImportConversion";
+static char __pyx_k_PipeReader_start[] = "PipeReader.start";
+static char __pyx_k_RateMeter___init[] = "RateMeter.__init__";
+static char __pyx_k_RateMeter_update[] = "RateMeter.update";
+static char __pyx_k_aggregate_result[] = "aggregate_result";
+static char __pyx_k_attach_callbacks[] = "attach_callbacks";
+static char __pyx_k_complete_request[] = "complete_request";
+static char __pyx_k_consistencylevel[] = "consistencylevel";
+static char __pyx_k_convert_datetime[] = "convert_datetime";
+static char __pyx_k_date_time_format[] = "date_time_format";
+static char __pyx_k_first_range_data[] = "first_range_data";
+static char __pyx_k_get_column_names[] = "get_column_names";
+static char __pyx_k_import__s__s_err[] = "import_%s_%s.err";
+static char __pyx_k_max_parse_errors[] = "max_parse_errors";
+static char __pyx_k_on_write_timeout[] = "on_write_timeout";
+static char __pyx_k_protocol_version[] = "protocol_version";
+static char __pyx_k_rebuild_keyspace[] = "rebuild_keyspace";
+static char __pyx_k_rows_by_ring_pos[] = "rows_by_ring_pos";
+static char __pyx_k_timestamp_format[] = "timestamp_format";
+static char __pyx_k_use_stdin_reader[] = "use_stdin_reader";
+static char __pyx_k_validate_columns[] = "validate_columns";
+static char __pyx_k_working_keyspace[] = "working_keyspace";
+static char __pyx_k_write_with_split[] = "_write_with_split";
+static char __pyx_k_ExportProcess_run[] = "ExportProcess.run";
+static char __pyx_k_ExportTask___init[] = "ExportTask.__init__";
+static char __pyx_k_ExportWriter_open[] = "ExportWriter.open";
+static char __pyx_k_FilesReader_close[] = "FilesReader.close";
+static char __pyx_k_FilesReader_start[] = "FilesReader.start";
+static char __pyx_k_ImportProcess_run[] = "ImportProcess.run";
+static char __pyx_k_ImportTask___init[] = "ImportTask.__init__";
+static char __pyx_k_PipeReader___init[] = "PipeReader.__init__";
+static char __pyx_k_RandomPartitioner[] = "RandomPartitioner";
+static char __pyx_k_SELECT_s_FROM_s_s[] = "SELECT %s FROM %s.%s";
+static char __pyx_k_cassandra_cluster[] = "cassandra.cluster";
+static char __pyx_k_consistency_level[] = "consistency_level";
+static char __pyx_k_convert_user_type[] = "convert_user_type";
+static char __pyx_k_cqlshlib_copyutil[] = "cqlshlib.copyutil";
+static char __pyx_k_describe_interval[] = "describe_interval";
+static char __pyx_k_filter_row_values[] = "filter_row_values";
+static char __pyx_k_get_error_message[] = "get_error_message";
+static char __pyx_k_get_num_processes[] = "get_num_processes";
+static char __pyx_k_get_total_records[] = "get_total_records";
+static char __pyx_k_hosts_to_sessions[] = "hosts_to_sessions";
+static char __pyx_k_max_insert_errors[] = "max_insert_errors";
+static char __pyx_k_pk_to_token_value[] = "pk_to_token_value";
+static char __pyx_k_rlocks_by_readers[] = "_rlocks_by_readers";
+static char __pyx_k_write_rows_to_csv[] = "write_rows_to_csv";
+static char __pyx_k_ChildProcess_close[] = "ChildProcess.close";
+static char __pyx_k_CopyTask__printmsg[] = "CopyTask._printmsg";
+static char __pyx_k_ExportProcess_send[] = "ExportProcess.send";
+static char __pyx_k_ExportWriter_close[] = "ExportWriter.close";
+static char __pyx_k_FeedingProcess_run[] = "FeedingProcess.run";
+static char __pyx_k_FilesReader___init[] = "FilesReader.__init__";
+static char __pyx_k_ImportErrorHandler[] = "ImportErrorHandler";
+static char __pyx_k_Murmur3Partitioner[] = "Murmur3Partitioner";
+static char __pyx_k_OneWayChannel_recv[] = "OneWayChannel.recv";
+static char __pyx_k_OneWayChannel_send[] = "OneWayChannel.send";
+static char __pyx_k_cassandra_cqltypes[] = "cassandra.cqltypes";
+static char __pyx_k_cassandra_metadata[] = "cassandra.metadata";
+static char __pyx_k_cassandra_policies[] = "cassandra.policies";
+static char __pyx_k_close_current_dest[] = "_close_current_dest";
+static char __pyx_k_default_fetch_size[] = "default_fetch_size";
+static char __pyx_k_init_feeder_thread[] = "init_feeder_thread";
+static char __pyx_k_num_live_processes[] = "num_live_processes";
+static char __pyx_k_prepared_statement[] = "prepared_statement";
+static char __pyx_k_preparedstatements[] = "preparedstatements";
+static char __pyx_k_received_responses[] = "received_responses";
+static char __pyx_k_required_responses[] = "required_responses";
+static char __pyx_k_split_into_batches[] = "split_into_batches";
+static char __pyx_k_ChildProcess___init[] = "ChildProcess.__init__";
+static char __pyx_k_ExportProcess_close[] = "ExportProcess.close";
+static char __pyx_k_ExportWriter___init[] = "ExportWriter.__init__";
+static char __pyx_k_ImportProcessResult[] = "ImportProcessResult";
+static char __pyx_k_ImportProcess_close[] = "ImportProcess.close";
+static char __pyx_k_No_column_specified[] = "No column specified";
+static char __pyx_k_NotImplementedError[] = "NotImplementedError";
+static char __pyx_k_OneWayChannel_close[] = "OneWayChannel.close";
+static char __pyx_k_RateMeter_increment[] = "RateMeter.increment";
+static char __pyx_k_Unexpected_result_s[] = "Unexpected result: %s";
+static char __pyx_k_display_date_format[] = "display_date_format";
+static char __pyx_k_new_checkpoint_time[] = "new_checkpoint_time";
+static char __pyx_k_primary_key_indexes[] = "primary_key_indexes";
+static char __pyx_k_skip_column_indexes[] = "skip_column_indexes";
+static char __pyx_k_wrap_make_statement[] = "wrap_make_statement";
+static char __pyx_k_write_without_split[] = "_write_without_split";
+static char __pyx_k_CopyTask_get_columns[] = "CopyTask.get_columns";
+static char __pyx_k_CopyTask_make_params[] = "CopyTask.make_params";
+static char __pyx_k_ExportProcess___init[] = "ExportProcess.__init__";
+static char __pyx_k_ExportSession___init[] = "ExportSession.__init__";
+static char __pyx_k_ExportTask_send_work[] = "ExportTask.send_work";
+static char __pyx_k_FastTokenAwarePolicy[] = "FastTokenAwarePolicy";
+static char __pyx_k_FeedingProcessResult[] = "FeedingProcessResult";
+static char __pyx_k_FeedingProcess_close[] = "FeedingProcess.close";
+static char __pyx_k_FilesReader_printmsg[] = "FilesReader.printmsg";
+static char __pyx_k_ImportProcess___init[] = "ImportProcess.__init__";
+static char __pyx_k_OneWayChannel___init[] = "OneWayChannel.__init__";
+static char __pyx_k_OneWayChannels_close[] = "OneWayChannels.close";
+static char __pyx_k_PipeReader_read_rows[] = "PipeReader.read_rows";
+static char __pyx_k_close_current_source[] = "close_current_source";
+static char __pyx_k_default_retry_policy[] = "default_retry_policy";
+static char __pyx_k_format_value_default[] = "format_value_default";
+static char __pyx_k_inner_make_statement[] = "inner_make_statement";
+static char __pyx_k_last_checkpoint_time[] = "last_checkpoint_time";
+static char __pyx_k_num_worker_processes[] = "num_worker_processes";
+static char __pyx_k_prepare_export_query[] = "prepare_export_query";
+static char __pyx_k_serialize_row_single[] = "serialize_row_single";
+static char __pyx_k_ExpBackoffRetryPolicy[] = "ExpBackoffRetryPolicy";
+static char __pyx_k_ExportProcess_connect[] = "ExportProcess.connect";
+static char __pyx_k_ExportTask_get_ranges[] = "ExportTask.get_ranges";
+static char __pyx_k_FeedingProcess___init[] = "FeedingProcess.__init__";
+static char __pyx_k_FilesReader_exhausted[] = "FilesReader.exhausted";
+static char __pyx_k_FilesReader_read_rows[] = "FilesReader.read_rows";
+static char __pyx_k_ImportProcess_session[] = "ImportProcess.session";
+static char __pyx_k_Invalid_column_name_s[] = "Invalid column name %s";
+static char __pyx_k_OneWayChannels___init[] = "OneWayChannels.__init__";
+static char __pyx_k_RateMeter_log_message[] = "RateMeter.log_message";
+static char __pyx_k_SELECT_from_bad_table[] = "SELECT * from bad_table";
+static char __pyx_k_TokenMap_get_ring_pos[] = "TokenMap.get_ring_pos";
+static char __pyx_k_all_processes_running[] = "all_processes_running";
+static char __pyx_k_feeder_profile__d_txt[] = "feeder_profile_%d.txt";
+static char __pyx_k_load_balancing_policy[] = "load_balancing_policy";
+static char __pyx_k_maybe_inject_failures[] = "maybe_inject_failures";
+static char __pyx_k_num_cores_for_testing[] = "num_cores_for_testing";
+static char __pyx_k_parent_profile__d_txt[] = "parent_profile_%d.txt";
+static char __pyx_k_partition_key_indexes[] = "partition_key_indexes";
+static char __pyx_k_tokens_to_hosts_by_ks[] = "tokens_to_hosts_by_ks";
+static char __pyx_k_worker_profile__d_txt[] = "worker_profile_%d.txt";
+static char __pyx_k_CopyTask_check_options[] = "CopyTask.check_options";
+static char __pyx_k_CopyTask_clean_options[] = "CopyTask.clean_options";
+static char __pyx_k_CopyTask_get_num_cores[] = "CopyTask.get_num_cores";
+static char __pyx_k_CopyTask_parse_options[] = "CopyTask.parse_options";
+static char __pyx_k_CopyTask_trace_process[] = "CopyTask.trace_process";
+static char __pyx_k_CopyTask_update_params[] = "CopyTask.update_params";
+static char __pyx_k_ExportSession_shutdown[] = "ExportSession.shutdown";
+static char __pyx_k_ExportWriter__get_dest[] = "ExportWriter._get_dest";
+static char __pyx_k_FilesReader_get_source[] = "FilesReader.get_source";
+static char __pyx_k_ImportTaskError___init[] = "ImportTaskError.__init__";
+static char __pyx_k_ImportTask_make_params[] = "ImportTask.make_params";
+static char __pyx_k_RateMeter_get_avg_rate[] = "RateMeter.get_avg_rate";
+static char __pyx_k_RateMeter_get_new_rate[] = "RateMeter.get_new_rate";
+static char __pyx_k_RateMeter_maybe_update[] = "RateMeter.maybe_update";
+static char __pyx_k_convert_single_subtype[] = "convert_single_subtype";
+static char __pyx_k_maybe_read_config_file[] = "maybe_read_config_file";
+static char __pyx_k_serialize_row_multiple[] = "serialize_row_multiple";
+static char __pyx_k_CopyTask_stop_processes[] = "CopyTask.stop_processes";
+static char __pyx_k_DCAwareRoundRobinPolicy[] = "DCAwareRoundRobinPolicy";
+static char __pyx_k_ExportProcess_inner_run[] = "ExportProcess.inner_run";
+static char __pyx_k_ExportWriter__next_dest[] = "ExportWriter._next_dest";
+static char __pyx_k_FilesReader_next_source[] = "FilesReader.next_source";
+static char __pyx_k_ImportConversion___init[] = "ImportConversion.__init__";
+static char __pyx_k_ImportProcess_inner_run[] = "ImportProcess.inner_run";
+static char __pyx_k_SELECT_FROM_s_s_WHERE_s[] = "SELECT * FROM %s.%s WHERE %s";
+static char __pyx_k_Using_d_child_processes[] = "Using %d child processes";
+static char __pyx_k_display_float_precision[] = "display_float_precision";
+static char __pyx_k_display_nanotime_format[] = "display_nanotime_format";
+static char __pyx_k_get_convert_decimal_fcn[] = "get_convert_decimal_fcn";
+static char __pyx_k_get_convert_integer_fcn[] = "get_convert_integer_fcn";
+static char __pyx_k_idle_heartbeat_interval[] = "idle_heartbeat_interval";
+static char __pyx_k_use_prepared_statements[] = "use_prepared_statements";
+static char __pyx_k_CQLSH_COPY_TEST_FAILURES[] = "CQLSH_COPY_TEST_FAILURES";
+static char __pyx_k_CopyTask_start_processes[] = "CopyTask.start_processes";
+static char __pyx_k_ExportTask_get_min_token[] = "ExportTask.get_min_token";
+static char __pyx_k_FeedingProcess_inner_run[] = "FeedingProcess.inner_run";
+static char __pyx_k_ImportProcess_make_batch[] = "ImportProcess.make_batch";
+static char __pyx_k_Invalid_boolean_styles_s[] = "Invalid boolean styles %s";
+static char __pyx_k_Renaming_existing_s_to_s[] = "Renaming existing %s to %s\n";
+static char __pyx_k_TokenMap_filter_replicas[] = "TokenMap.filter_replicas";
+static char __pyx_k_UPDATE_s_s_SET_s_WHERE_s[] = "UPDATE %s.%s SET %%s WHERE %%s";
+static char __pyx_k_display_timestamp_format[] = "display_timestamp_format";
+static char __pyx_k_serialize_value_prepared[] = "serialize_value_prepared";
+static char __pyx_k_start_fetching_next_page[] = "start_fetching_next_page";
+static char __pyx_k_used_hosts_per_remote_dc[] = "used_hosts_per_remote_dc";
+static char __pyx_k_CQLSH_COPY_TEST_NUM_CORES[] = "CQLSH_COPY_TEST_NUM_CORES";
+static char __pyx_k_CopyTask_validate_columns[] = "CopyTask.validate_columns";
+static char __pyx_k_ExportProcess_get_session[] = "ExportProcess.get_session";
+static char __pyx_k_ExportSession_add_request[] = "ExportSession.add_request";
+static char __pyx_k_ExportTask_export_records[] = "ExportTask.export_records";
+static char __pyx_k_FeedingProcess_send_chunk[] = "FeedingProcess.send_chunk";
+static char __pyx_k_ImportErrorHandler___init[] = "ImportErrorHandler.__init__";
+static char __pyx_k_ImportProcess_make_params[] = "ImportProcess.make_params";
+static char __pyx_k_ImportTask_import_records[] = "ImportTask.import_records";
+static char __pyx_k_No_valid_column_specified[] = "No valid column specified";
+static char __pyx_k_TokenMap__initialize_ring[] = "TokenMap._initialize_ring";
+static char __pyx_k_WhiteListRoundRobinPolicy[] = "WhiteListRoundRobinPolicy";
+static char __pyx_k_copy_dialect_unrecognized[] = "copy dialect unrecognized";
+static char __pyx_k_get_primary_key_statement[] = "_get_primary_key_statement";
+static char __pyx_k_statements_and_parameters[] = "_statements_and_parameters";
+static char __pyx_k_Can_t_open_r_for_reading_s[] = "Can't open %r for reading: %s";
+static char __pyx_k_Can_t_open_r_for_writing_s[] = "Can't open %r for writing: %s";
+static char __pyx_k_ChildProcess_printdebugmsg[] = "ChildProcess.printdebugmsg";
+static char __pyx_k_CopyTask_describe_interval[] = "CopyTask.describe_interval";
+static char __pyx_k_CopyTask_get_num_processes[] = "CopyTask.get_num_processes";
+static char __pyx_k_ExportProcess_format_value[] = "ExportProcess.format_value";
+static char __pyx_k_ExportProcess_num_requests[] = "ExportProcess.num_requests";
+static char __pyx_k_ExportProcess_report_error[] = "ExportProcess.report_error";
+static char __pyx_k_ExportSession_num_requests[] = "ExportSession.num_requests";
+static char __pyx_k_INSERT_INTO_s_s_s_VALUES_s[] = "INSERT INTO %s.%s (%s) VALUES (%s)";
+static char __pyx_k_ImportProcessResult___init[] = "ImportProcessResult.__init__";
+static char __pyx_k_ImportProcess_convert_rows[] = "ImportProcess.convert_rows";
+static char __pyx_k_ImportProcess_err_callback[] = "ImportProcess.err_callback";
+static char __pyx_k_ImportProcess_report_error[] = "ImportProcess.report_error";
+static char __pyx_k_ImportProcess_update_chunk[] = "ImportProcess.update_chunk";
+static char __pyx_k_ImportTask_receive_results[] = "ImportTask.receive_results";
+static char __pyx_k_ImportTask_send_stdin_rows[] = "ImportTask.send_stdin_rows";
+static char __pyx_k_OneWayChannels_recv_select[] = "OneWayChannels.recv_select";
+static char __pyx_k_Reading_options_from_s_s_s[] = "Reading options from %s:[%s]: %s";
+static char __pyx_k_Unknown_type_s_s_for_val_s[] = "Unknown type %s (%s) for val %s";
+static char __pyx_k_control_connection_timeout[] = "control_connection_timeout";
+static char __pyx_k_A_group_of_one_way_channels[] = "\n A group of one way channels.\n ";
+static char __pyx_k_CopyTask_num_live_processes[] = "CopyTask.num_live_processes";
+static char __pyx_k_ExportProcess_prepare_query[] = "ExportProcess.prepare_query";
+static char __pyx_k_ExportProcess_start_request[] = "ExportProcess.start_request";
+static char __pyx_k_ExportSession_execute_async[] = "ExportSession.execute_async";
+static char __pyx_k_FastTokenAwarePolicy___init[] = "FastTokenAwarePolicy.__init__";
+static char __pyx_k_FeedingProcessResult___init[] = "FeedingProcessResult.__init__";
+static char __pyx_k_ImportTask_validate_columns[] = "ImportTask.validate_columns";
+static char __pyx_k_OneWayChannels_recv_polling[] = "OneWayChannels.recv_polling";
+static char __pyx_k_RateMeter_get_total_records[] = "RateMeter.get_total_records";
+static char __pyx_k_ExpBackoffRetryPolicy___init[] = "ExpBackoffRetryPolicy.__init__";
+static char __pyx_k_INSERT_INTO_s_s_s_VALUES_s_2[] = "INSERT INTO %s.%s (%s) VALUES (%%s)";
+static char __pyx_k_ImportConversion_convert_row[] = "ImportConversion.convert_row";
+static char __pyx_k_get_null_primary_key_message[] = "get_null_primary_key_message";
+static char __pyx_k_get_row_partition_key_values[] = "get_row_partition_key_values";
+static char __pyx_k_make_counter_batch_statement[] = "make_counter_batch_statement";
+static char __pyx_k_make_statement_with_failures[] = "make_statement_with_failures";
+static char __pyx_k_serialize_value_not_prepared[] = "serialize_value_not_prepared";
+static char __pyx_k_ExpBackoffRetryPolicy_backoff[] = "ExpBackoffRetryPolicy.backoff";
+static char __pyx_k_ImportProcess_result_callback[] = "ImportProcess.result_callback";
+static char __pyx_k_make_prepared_batch_statement[] = "make_prepared_batch_statement";
+static char __pyx_k_A_class_for_converting_strings[] = "\n A class for converting strings to values when importing from csv, used by ImportProcess,\n the parent.\n ";
+static char __pyx_k_ExportProcess_attach_callbacks[] = "ExportProcess.attach_callbacks";
+static char __pyx_k_ExportSession_complete_request[] = "ExportSession.complete_request";
+static char __pyx_k_ExportWriter__write_with_split[] = "ExportWriter._write_with_split";
+static char __pyx_k_Failed_to_make_batch_statement[] = "Failed to make batch statement: {}";
+static char __pyx_k_ImportTaskError_is_parse_error[] = "ImportTaskError.is_parse_error";
+static char __pyx_k_Unrecognized_COPY_TO_options_s[] = "Unrecognized COPY TO options: %s";
+static char __pyx_k_Use_on_a_line_by_itself_to_end[] = "[Use \\. on a line by itself to end input]";
+static char __pyx_k_A_base_class_for_ImportTask_and[] = "\n A base class for ImportTask and ExportTask\n ";
+static char __pyx_k_A_class_for_connecting_to_a_clu[] = "\n A class for connecting to a cluster and storing the number\n of requests that this connection is processing. It wraps the methods\n for executing a query asynchronously and for shutting down the\n connection to the cluster.\n ";
+static char __pyx_k_A_class_for_managing_import_err[] = "\n A class for managing import errors\n ";
+static char __pyx_k_A_class_for_reading_rows_receiv[] = "\n A class for reading rows received on a pipe, this is used for reading input from STDIN\n ";
+static char __pyx_k_A_class_that_exports_data_to_cs[] = "\n A class that exports data to .csv by instantiating one or more processes that work in parallel (ExportProcess).\n ";
+static char __pyx_k_A_class_that_writes_to_one_or_m[] = "\n A class that writes to one or more csv files, or STDOUT\n ";
+static char __pyx_k_A_class_to_import_data_from_csv[] = "\n A class to import data from .csv by instantiating one or more processes\n that work in parallel (ImportProcess).\n ";
+static char __pyx_k_A_one_way_pipe_protected_by_two[] = "\n A one way pipe protected by two process level locks, one for reading and one for writing.\n ";
+static char __pyx_k_A_process_that_reads_from_impor[] = "\n A process that reads from import sources and sends chunks to worker processes.\n ";
+static char __pyx_k_A_retry_policy_with_exponential[] = "\n A retry policy with exponential back-off for read timeouts and write timeouts\n ";
+static char __pyx_k_A_wrapper_around_a_csv_reader_t[] = "\n A wrapper around a csv reader to keep track of when we have\n exhausted reading input files. We are passed a comma separated\n list of paths, where each path is a valid glob expression.\n We generate a source generator and we read each source one\n by one.\n ";
+static char __pyx_k_A_wrapper_around_the_metadata_t[] = "\n A wrapper around the metadata token map to speed things up by caching ring token *values* and\n replicas. It is very important that we use the token values, which are primitive types, rather\n than the tokens classes when calling bisect_right() in split_batches(). If we use primitive values,\n the bisect is done in compiled code whilst with token classes each comparison requires a call\n into the interpreter to perform the cmp operation defined in Python. A simple test with 1 million bisect\n operations on an array of 2048 tokens was done in 0.37 seconds with primitives and 2.25 seconds with\n token classes. This is significant for large datasets because we need to do a bisect for each single row,\n and if VNODES are used, the size of the token map can get quite large too.\n ";
+static char __pyx_k_An_child_worker_process_for_the[] = "\n An child worker process for the export task, ExportTask.\n ";
+static char __pyx_k_An_child_worker_process_this_is[] = "\n An child worker process, this is for common functionality between ImportProcess and ExportProcess.\n ";
+static char __pyx_k_An_object_sent_from_FeedingProc[] = "\n An object sent from FeedingProcess instances to the parent import task in order to indicate progress.\n ";
+static char __pyx_k_An_object_sent_from_ImportProce[] = "\n An object sent from ImportProcess instances to the parent import task in order to indicate progress.\n ";
+static char __pyx_k_An_object_sent_from_child_proce[] = "\n An object sent from child processes (feeder or workers) to the parent import task to indicate an error.\n ";
+static char __pyx_k_Begin_token_d_must_be_bigger_or[] = "Begin token %d must be bigger or equal to min token %d";
+static char __pyx_k_CopyTask___init___locals_lambda[] = "CopyTask.__init__.<locals>.<lambda>";
+static char __pyx_k_CopyTask_maybe_read_config_file[] = "CopyTask.maybe_read_config_file";
+static char __pyx_k_Error_for_s_s_permanently_given[] = "Error for %s: %s (permanently given up after %d rows and %d attempts)";
+static char __pyx_k_ExportProcess_get_error_message[] = "ExportProcess.get_error_message";
+static char __pyx_k_ExportProcess_write_rows_to_csv[] = "ExportProcess.write_rows_to_csv";
+static char __pyx_k_Failed_to_process_d_rows_failed[] = "Failed to process %d rows; failed rows written to %s";
+static char __pyx_k_FastTokenAwarePolicy_make_query[] = "FastTokenAwarePolicy.make_query_plan";
+static char __pyx_k_INSERT_INTO_badtable_a_b_VALUES[] = "INSERT INTO badtable (a, b) VALUES (1, 2)";
+static char __pyx_k_If_you_want_to_insert_empty_str[] = " If you want to insert empty strings, consider using the WITH NULL=<marker> option for COPY.";
+static char __pyx_k_ImportConversion__get_converter[] = "ImportConversion._get_converter.<locals>.get_convert_integer_fcn.<locals>.<lambda>";
+static char __pyx_k_ImportErrorHandler_handle_error[] = "ImportErrorHandler.handle_error";
+static char __pyx_k_ImportErrorHandler_max_exceeded[] = "ImportErrorHandler.max_exceeded";
+static char __pyx_k_ImportProcess_make_non_prepared[] = "ImportProcess.make_non_prepared_batch_statement";
+static char __pyx_k_Primary_key_column_s_missing_or[] = "Primary key column '%s' missing or skipped";
+static char __pyx_k_Processed_d_rows_Rate_7_0f_rows[] = "Processed: %d rows; Rate: %7.0f rows/s; Avg. rate: %7.0f rows/s\r";
+static char __pyx_k_Send_to_any_replicas_attached_t[] = "\n Send to any replicas attached to the query, or else fall back to DCAwareRoundRobinPolicy\n ";
+static char __pyx_k_Starting_copy_of_s_s_with_colum[] = "\nStarting copy of %s.%s with columns %s.";
+static char __pyx_k_Timeout_received_retrying_after[] = "Timeout received, retrying after %d seconds";
+static char __pyx_k_TokenMap_filter_replicas_locals[] = "TokenMap.filter_replicas.<locals>.<lambda>";
+static char __pyx_k_We_failed_to_parse_an_import_re[] = " We failed to parse an import record ";
+static char __pyx_k_child_process_es_died_unexpecte[] = "{} child process(es) died unexpectedly, aborting";
+static char __pyx_k_d_rows_exported_to_d_files_in_s[] = "\n%d rows exported to %d files in %s.";
+static char __pyx_k_d_rows_imported_from_d_files_in[] = "\n%d rows imported from %d files in %s (%d skipped).";
+static char __pyx_k_home_eevans_dev_src_git_cassand[] = "/home/eevans/dev/src/git/cassandra/cassandra/pylib/cqlshlib/copyutil.py";
+static char __pyx_k_Begin_token_d_must_be_smaller_th[] = "Begin token %d must be smaller than end token %d";
+static char __pyx_k_Cannot_insert_null_value_for_pri[] = "Cannot insert null value for primary key column '%s'.";
+static char __pyx_k_Child_process_d_died_with_exit_c[] = "Child process %d died with exit code %d";
+static char __pyx_k_CopyTask_num_live_processes_loca[] = "CopyTask.num_live_processes.<locals>.genexpr";
+static char __pyx_k_Created_connection_to_s_with_pag[] = "Created connection to %s with page size %d and timeout %d seconds per page";
+static char __pyx_k_Error_for_s_s_will_try_again_lat[] = "Error for %s: %s (will try again later attempt %d of %d)";
+static char __pyx_k_Exceeded_maximum_number_of_inser[] = "Exceeded maximum number of insert errors %d";
+static char __pyx_k_Exceeded_maximum_number_of_parse[] = "Exceeded maximum number of parse errors %d";
+static char __pyx_k_ExpBackoffRetryPolicy__handle_ti[] = "ExpBackoffRetryPolicy._handle_timeout";
+static char __pyx_k_ExpBackoffRetryPolicy_on_read_ti[] = "ExpBackoffRetryPolicy.on_read_timeout";
+static char __pyx_k_ExpBackoffRetryPolicy_on_write_t[] = "ExpBackoffRetryPolicy.on_write_timeout";
+static char __pyx_k_ExportProcess_attach_callbacks_l[] = "ExportProcess.attach_callbacks.<locals>.result_callback";
+static char __pyx_k_ExportProcess_get_session_locals[] = "ExportProcess.get_session.<locals>.<lambda>";
+static char __pyx_k_ExportProcess_init_feeder_thread[] = "ExportProcess.init_feeder_thread.<locals>.feed_errors";
+static char __pyx_k_ExportProcess_maybe_inject_failu[] = "ExportProcess.maybe_inject_failures";
+static char __pyx_k_ExportProcess_num_requests_local[] = "ExportProcess.num_requests.<locals>.genexpr";
+static char __pyx_k_ExportProcess_prepare_export_que[] = "ExportProcess.prepare_export_query.<locals>.genexpr";
+static char __pyx_k_ExportTask_get_ranges_locals_mak[] = "ExportTask.get_ranges.<locals>.make_range";
+static char __pyx_k_ExportWriter__close_current_dest[] = "ExportWriter._close_current_dest";
+static char __pyx_k_ExportWriter__write_without_spli[] = "ExportWriter._write_without_split";
+static char __pyx_k_Exported_d_ranges_out_of_d_total[] = "Exported %d ranges out of %d total ranges, some records might be missing";
+static char __pyx_k_Failed_to_connect_to_all_replica[] = "Failed to connect to all replicas %s for %s, errors: %s";
+static char __pyx_k_Failed_to_import_d_rows_s_s_give[] = "Failed to import %d rows: %s - %s, given up without retries";
+static char __pyx_k_Failed_to_import_d_rows_s_s_will[] = "Failed to import %d rows: %s - %s, will retry later, attempt %d of %d";
+static char __pyx_k_FilesReader_close_current_source[] = "FilesReader.close_current_source";
+static char __pyx_k_FilesReader_get_source_locals_ma[] = "FilesReader.get_source.<locals>.make_source";
+static char __pyx_k_Found_no_ranges_to_query_check_b[] = "Found no ranges to query, check begin and end tokens: %s - %s";
+static char __pyx_k_ImportConversion___init___locals[] = "ImportConversion.__init__.<locals>.<lambda>";
+static char __pyx_k_ImportConversion__get_primary_ke[] = "ImportConversion._get_primary_key_statement";
+static char __pyx_k_ImportConversion_get_null_primar[] = "ImportConversion.get_null_primary_key_message";
+static char __pyx_k_ImportConversion_get_row_partiti[] = "ImportConversion.get_row_partition_key_values_fcn.<locals>.serialize_value_prepared";
+static char __pyx_k_ImportErrorHandler_add_failed_ro[] = "ImportErrorHandler.add_failed_rows";
+static char __pyx_k_ImportProcess_convert_rows_local[] = "ImportProcess.convert_rows.<locals>.filter_row_values";
+static char __pyx_k_ImportProcess_make_counter_batch[] = "ImportProcess.make_counter_batch_statement";
+static char __pyx_k_ImportProcess_make_prepared_batc[] = "ImportProcess.make_prepared_batch_statement";
+static char __pyx_k_ImportProcess_maybe_inject_failu[] = "ImportProcess.maybe_inject_failures";
+static char __pyx_k_ImportProcess_split_into_batches[] = "ImportProcess.split_into_batches";
+static char __pyx_k_ImportProcess_wrap_make_statemen[] = "ImportProcess.wrap_make_statement.<locals>.make_statement";
+static char __pyx_k_ImportTask_all_processes_running[] = "ImportTask.all_processes_running";
+static char __pyx_k_Invalid_row_length_d_should_be_d[] = "Invalid row length %d should be %d";
+static char __pyx_k_Reading_options_from_the_command[] = "Reading options from the command line: %s";
+static char __pyx_k_Timeout_received_giving_up_after[] = "Timeout received, giving up after %d attempts";
+static char __pyx_k_Timeout_received_retrying_immedi[] = "Timeout received, retrying immediately";
+static char __pyx_k_TokenMap__initialize_ring_locals[] = "TokenMap._initialize_ring.<locals>.<lambda>";
+static char __pyx_k_Unrecognized_COPY_FROM_options_s[] = "Unrecognized COPY FROM options: %s";
+static char __pyx_k_WARNING_maxoutputsize_ignored_wh[] = "WARNING: maxoutputsize {} ignored when writing to STDOUT";
+static char __pyx_k_Warning_failed_to_connect_to_som[] = "Warning: failed to connect to some replicas: %s";
+static char __pyx_k_can_t_interpret_r_as_a_date_with[] = "can't interpret %r as a date with this format: %s";
+static char __pyx_k_get_row_partition_key_values_fcn[] = "get_row_partition_key_values_fcn";
+static char __pyx_k_make_non_prepared_batch_statemen[] = "make_non_prepared_batch_statement";
+static char __pyx_k_strace_vvvv_c_o_strace_pid_out_e[] = "strace -vvvv -c -o strace.{pid}.out -e trace=all -p {pid}&";
+static char __pyx_k_ImportConversion__get_converter_2[] = "ImportConversion._get_converter.<locals>.get_convert_decimal_fcn.<locals>.<lambda>";
+static char __pyx_k_ImportConversion__get_converter_3[] = "ImportConversion._get_converter.<locals>.convert_tuple.<locals>.genexpr";
+static char __pyx_k_ImportConversion__get_converter_4[] = "ImportConversion._get_converter.<locals>.convert_list.<locals>.genexpr";
+static char __pyx_k_ImportConversion__get_converter_5[] = "ImportConversion._get_converter.<locals>.convert_set.<locals>.genexpr";
+static char __pyx_k_ImportConversion__get_converter_6[] = "ImportConversion._get_converter.<locals>.convert_map.<locals>.genexpr";
+static char __pyx_k_ImportConversion__get_converter_7[] = "ImportConversion._get_converter.<locals>.convert_map.<locals>.ImmutableDict";
+static char __pyx_k_ImportConversion__get_converter_8[] = "ImportConversion._get_converter.<locals>.convert_user_type.<locals>.genexpr";
+static char __pyx_k_ImportConversion__get_converter_9[] = "ImportConversion._get_converter.<locals>.unprotect";
+static char __pyx_k_ExportProcess_attach_callbacks_l_2[] = "ExportProcess.attach_callbacks.<locals>.err_callback";
+static char __pyx_k_ExportProcess_init_feeder_thread_2[] = "ExportProcess.init_feeder_thread";
+static char __pyx_k_ExportProcess_prepare_export_que_2[] = "ExportProcess.prepare_export_query";
+static char __pyx_k_ExportTask_get_ranges_locals_mak_2[] = "ExportTask.get_ranges.<locals>.make_range_data";
+static char __pyx_k_Failed_to_import_d_rows_s_s_give_2[] = "Failed to import %d rows: %s - %s, given up after %d attempts";
+static char __pyx_k_ImportConversion__get_converter_10[] = "ImportConversion._get_converter.<locals>.convert";
+static char __pyx_k_ImportConversion__get_converter_11[] = "ImportConversion._get_converter.<locals>.convert_blob";
+static char __pyx_k_ImportConversion__get_converter_12[] = "ImportConversion._get_converter.<locals>.convert_text";
+static char __pyx_k_ImportConversion__get_converter_13[] = "ImportConversion._get_converter.<locals>.convert_uuid";
+static char __pyx_k_ImportConversion__get_converter_14[] = "ImportConversion._get_converter.<locals>.convert_bool";
+static char __pyx_k_ImportConversion__get_converter_15[] = "ImportConversion._get_converter.<locals>.get_convert_integer_fcn";
+static char __pyx_k_ImportConversion__get_converter_16[] = "ImportConversion._get_converter.<locals>.get_convert_decimal_fcn";
+static char __pyx_k_ImportConversion__get_converter_17[] = "ImportConversion._get_converter.<locals>.split";
+static char __pyx_k_ImportConversion__get_converter_18[] = "ImportConversion._get_converter.<locals>.convert_datetime";
+static char __pyx_k_ImportConversion__get_converter_19[] = "ImportConversion._get_converter.<locals>.convert_date";
+static char __pyx_k_ImportConversion__get_converter_20[] = "ImportConversion._get_converter.<locals>.convert_time";
+static char __pyx_k_ImportConversion__get_converter_21[] = "ImportConversion._get_converter.<locals>.convert_tuple";
+static char __pyx_k_ImportConversion__get_converter_22[] = "ImportConversion._get_converter.<locals>.convert_list";
+static char __pyx_k_ImportConversion__get_converter_23[] = "ImportConversion._get_converter.<locals>.convert_set";
+static char __pyx_k_ImportConversion__get_converter_24[] = "ImportConversion._get_converter.<locals>.convert_map";
+static char __pyx_k_ImportConversion__get_converter_25[] = "ImportConversion._get_converter.<locals>.convert_user_type";
+static char __pyx_k_ImportConversion__get_converter_26[] = "ImportConversion._get_converter.<locals>.convert_single_subtype";
+static char __pyx_k_ImportConversion__get_converter_27[] = "ImportConversion._get_converter.<locals>.convert_unknown";
+static char __pyx_k_ImportConversion__get_converter_28[] = "ImportConversion._get_converter";
+static char __pyx_k_ImportConversion_get_row_partiti_2[] = "ImportConversion.get_row_partition_key_values_fcn.<locals>.serialize_value_not_prepared";
+static char __pyx_k_ImportConversion_get_row_partiti_3[] = "ImportConversion.get_row_partition_key_values_fcn.<locals>.serialize_row_single";
+static char __pyx_k_ImportConversion_get_row_partiti_4[] = "ImportConversion.get_row_partition_key_values_fcn.<locals>.serialize_row_multiple";
+static char __pyx_k_ImportConversion_get_row_partiti_5[] = "ImportConversion.get_row_partition_key_values_fcn";
+static char __pyx_k_ImportProcess_convert_rows_local_2[] = "ImportProcess.convert_rows.<locals>.convert_row";
+static char __pyx_k_ImportProcess_wrap_make_statemen_2[] = "ImportProcess.wrap_make_statement.<locals>.make_statement_with_failures";
+static char __pyx_k_ImportProcess_wrap_make_statemen_3[] = "ImportProcess.wrap_make_statement";
+static PyObject *__pyx_kp_s_0;
+static PyObject *__pyx_kp_s_03f_seconds;
+static PyObject *__pyx_kp_s_1;
+static PyObject *__pyx_kp_s_1_2;
+static PyObject *__pyx_kp_s_AND;
+static PyObject *__pyx_kp_s_AND_2;
+static PyObject *__pyx_kp_s_A_base_class_for_ImportTask_and;
+static PyObject *__pyx_kp_s_A_class_for_connecting_to_a_clu;
+static PyObject *__pyx_kp_s_A_class_for_converting_strings;
+static PyObject *__pyx_kp_s_A_class_for_managing_import_err;
+static PyObject *__pyx_kp_s_A_class_for_reading_rows_receiv;
+static PyObject *__pyx_kp_s_A_class_that_exports_data_to_cs;
+static PyObject *__pyx_kp_s_A_class_that_writes_to_one_or_m;
+static PyObject *__pyx_kp_s_A_class_to_import_data_from_csv;
+static PyObject *__pyx_kp_s_A_group_of_one_way_channels;
+static PyObject *__pyx_kp_s_A_one_way_pipe_protected_by_two;
+static PyObject *__pyx_kp_s_A_process_that_reads_from_impor;
+static PyObject *__pyx_kp_s_A_retry_policy_with_exponential;
+static PyObject *__pyx_kp_s_A_wrapper_around_a_csv_reader_t;
+static PyObject *__pyx_kp_s_A_wrapper_around_the_metadata_t;
+static PyObject *__pyx_kp_s_An_child_worker_process_for_the;
+static PyObject *__pyx_kp_s_An_child_worker_process_this_is;
+static PyObject *__pyx_kp_s_An_object_sent_from_FeedingProc;
+static PyObject *__pyx_kp_s_An_object_sent_from_ImportProce;
+static PyObject *__pyx_kp_s_An_object_sent_from_child_proce;
+static PyObject *__pyx_n_s_BaseException;
+static PyObject *__pyx_n_s_BatchStatement;
+static PyObject *__pyx_n_s_BatchType;
+static PyObject *__pyx_kp_s_Begin_token_d_must_be_bigger_or;
+static PyObject *__pyx_kp_s_Begin_token_d_must_be_smaller_th;
+static PyObject *__pyx_n_s_COUNTER;
+static PyObject *__pyx_n_s_CQLSH_COPY_TEST_FAILURES;
+static PyObject *__pyx_n_s_CQLSH_COPY_TEST_NUM_CORES;
+static PyObject *__pyx_kp_s_Can_t_open_r_for_reading_s;
+static PyObject *__pyx_kp_s_Can_t_open_r_for_writing_s;
+static PyObject *__pyx_kp_s_Cannot_insert_null_value_for_pri;
+static PyObject *__pyx_n_s_ChildProcess;
+static PyObject *__pyx_n_s_ChildProcess___init;
+static PyObject *__pyx_n_s_ChildProcess_close;
+static PyObject *__pyx_n_s_ChildProcess_printdebugmsg;
+static PyObject *__pyx_kp_s_Child_process_d_died_with_exit_c;
+static PyObject *__pyx_kp_s_Closing_queues;
+static PyObject *__pyx_n_s_Cluster;
+static PyObject *__pyx_n_s_ConfigParser;
+static PyObject *__pyx_n_s_CopyOptions;
+static PyObject *__pyx_n_s_CopyTask;
+static PyObject *__pyx_n_s_CopyTask___init;
+static PyObject *__pyx_n_s_CopyTask___init___locals_lambda;
+static PyObject *__pyx_n_s_CopyTask__printmsg;
+static PyObject *__pyx_n_s_CopyTask_check_options;
+static PyObject *__pyx_n_s_CopyTask_clean_options;
+static PyObject *__pyx_n_s_CopyTask_close;
+static PyObject *__pyx_n_s_CopyTask_describe_interval;
+static PyObject *__pyx_n_s_CopyTask_get_columns;
+static PyObject *__pyx_n_s_CopyTask_get_num_cores;
+static PyObject *__pyx_n_s_CopyTask_get_num_processes;
+static PyObject *__pyx_n_s_CopyTask_get_pid;
+static PyObject *__pyx_n_s_CopyTask_make_params;
+static PyObject *__pyx_n_s_CopyTask_maybe_read_config_file;
+static PyObject *__pyx_n_s_CopyTask_num_live_processes;
+static PyObject *__pyx_n_s_CopyTask_num_live_processes_loca;
+static PyObject *__pyx_n_s_CopyTask_parse_options;
+static PyObject *__pyx_n_s_CopyTask_start_processes;
+static PyObject *__pyx_n_s_CopyTask_stop_processes;
+static PyObject *__pyx_n_s_CopyTask_trace_process;
+static PyObject *__pyx_n_s_CopyTask_update_params;
+static PyObject *__pyx_n_s_CopyTask_validate_columns;
+static PyObject *__pyx_n_s_CqlRuleSet;
+static PyObject *__pyx_kp_s_Created_connection_to_s_with_pag;
+static PyObject *__pyx_n_s_CsvDest;
+static PyObject *__pyx_n_s_DCAwareRoundRobinPolicy;
+static PyObject *__pyx_n_s_Date;
+static PyObject *__pyx_n_s_DateTimeFormat;
+static PyObject *__pyx_n_s_Decimal;
+static PyObject *__pyx_n_s_EMPTY;
+static PyObject *__pyx_n_s_EOFError;
+static PyObject *__pyx_kp_s_Error_for_s_s_permanently_given;
+static PyObject *__pyx_kp_s_Error_for_s_s_will_try_again_lat;
+static PyObject *__pyx_kp_s_Exceeded_maximum_number_of_inser;
+static PyObject *__pyx_kp_s_Exceeded_maximum_number_of_parse;
+static PyObject *__pyx_n_s_Exception;
+static PyObject *__pyx_n_s_ExpBackoffRetryPolicy;
+static PyObject *__pyx_n_s_ExpBackoffRetryPolicy___init;
+static PyObject *__pyx_n_s_ExpBackoffRetryPolicy__handle_ti;
+static PyObject *__pyx_n_s_ExpBackoffRetryPolicy_backoff;
+static PyObject *__pyx_n_s_ExpBackoffRetryPolicy_on_read_ti;
+static PyObject *__pyx_n_s_ExpBackoffRetryPolicy_on_write_t;
+static PyObject *__pyx_n_s_ExportProcess;
+static PyObject *__pyx_n_s_ExportProcess___init;
+static PyObject *__pyx_n_s_ExportProcess_attach_callbacks;
+static PyObject *__pyx_n_s_ExportProcess_attach_callbacks_l;
+static PyObject *__pyx_n_s_ExportProcess_attach_callbacks_l_2;
+static PyObject *__pyx_n_s_ExportProcess_close;
+static PyObject *__pyx_n_s_ExportProcess_connect;
+static PyObject *__pyx_n_s_ExportProcess_format_value;
+static PyObject *__pyx_n_s_ExportProcess_get_error_message;
+static PyObject *__pyx_n_s_ExportProcess_get_session;
+static PyObject *__pyx_n_s_ExportProcess_get_session_locals;
+static PyObject *__pyx_n_s_ExportProcess_init_feeder_thread;
+static PyObject *__pyx_n_s_ExportProcess_init_feeder_thread_2;
+static PyObject *__pyx_n_s_ExportProcess_inner_run;
+static PyObject *__pyx_n_s_ExportProcess_maybe_inject_failu;
+static PyObject *__pyx_n_s_ExportProcess_num_requests;
+static PyObject *__pyx_n_s_ExportProcess_num_requests_local;
+static PyObject *__pyx_n_s_ExportProcess_prepare_export_que;
+static PyObject *__pyx_n_s_ExportProcess_prepare_export_que_2;
+static PyObject *__pyx_n_s_ExportProcess_prepare_query;
+static PyObject *__pyx_n_s_ExportProcess_report_error;
+static PyObject *__pyx_n_s_ExportProcess_run;
+static PyObject *__pyx_n_s_ExportProcess_send;
+static PyObject *__pyx_n_s_ExportProcess_start_request;
+static PyObject *__pyx_n_s_ExportProcess_write_rows_to_csv;
+static PyObject *__pyx_n_s_ExportSession;
+static PyObject *__pyx_n_s_ExportSession___init;
+static PyObject *__pyx_n_s_ExportSession_add_request;
+static PyObject *__pyx_n_s_ExportSession_complete_request;
+static PyObject *__pyx_n_s_ExportSession_execute_async;
+static PyObject *__pyx_n_s_ExportSession_num_requests;
+static PyObject *__pyx_n_s_ExportSession_shutdown;
+static PyObject *__pyx_n_s_ExportTask;
+static PyObject *__pyx_n_s_ExportTask___init;
+static PyObject *__pyx_n_s_ExportTask_close;
+static PyObject *__pyx_n_s_ExportTask_export_records;
+static PyObject *__pyx_n_s_ExportTask_get_min_token;
+static PyObject *__pyx_n_s_ExportTask_get_ranges;
+static PyObject *__pyx_n_s_ExportTask_get_ranges_locals_mak;
+static PyObject *__pyx_n_s_ExportTask_get_ranges_locals_mak_2;
+static PyObject *__pyx_n_s_ExportTask_run;
+static PyObject *__pyx_n_s_ExportTask_send_work;
+static PyObject *__pyx_n_s_ExportWriter;
+static PyObject *__pyx_n_s_ExportWriter___init;
+static PyObject *__pyx_n_s_ExportWriter__close_current_dest;
+static PyObject *__pyx_n_s_ExportWriter__get_dest;
+static PyObject *__pyx_n_s_ExportWriter__next_dest;
+static PyObject *__pyx_n_s_ExportWriter__write_with_split;
+static PyObject *__pyx_n_s_ExportWriter__write_without_spli;
+static PyObject *__pyx_n_s_ExportWriter_close;
+static PyObject *__pyx_n_s_ExportWriter_open;
+static PyObject *__pyx_kp_s_Exported_d_ranges_out_of_d_total;
+static PyObject *__pyx_kp_s_Failed_to_connect_to_all_replica;
+static PyObject *__pyx_kp_s_Failed_to_import_d_rows_s_s_give;
+static PyObject *__pyx_kp_s_Failed_to_import_d_rows_s_s_give_2;
+static PyObject *__pyx_kp_s_Failed_to_import_d_rows_s_s_will;
+static PyObject *__pyx_kp_s_Failed_to_make_batch_statement;
+static PyObject *__pyx_kp_s_Failed_to_process_d_rows_failed;
+static PyObject *__pyx_n_s_FastTokenAwarePolicy;
+static PyObject *__pyx_n_s_FastTokenAwarePolicy___init;
+static PyObject *__pyx_n_s_FastTokenAwarePolicy_make_query;
+static PyObject *__pyx_n_s_FeedingProcess;
+static PyObject *__pyx_n_s_FeedingProcessResult;
+static PyObject *__pyx_n_s_FeedingProcessResult___init;
+static PyObject *__pyx_n_s_FeedingProcess___init;
+static PyObject *__pyx_n_s_FeedingProcess_close;
+static PyObject *__pyx_n_s_FeedingProcess_inner_run;
+static PyObject *__pyx_n_s_FeedingProcess_run;
+static PyObject *__pyx_n_s_FeedingProcess_send_chunk;
+static PyObject *__pyx_n_s_FilesReader;
+static PyObject *__pyx_n_s_FilesReader___init;
+static PyObject *__pyx_n_s_FilesReader_close;
+static PyObject *__pyx_n_s_FilesReader_close_current_source;
+static PyObject *__pyx_n_s_FilesReader_exhausted;
+static PyObject *__pyx_n_s_FilesReader_get_source;
+static PyObject *__pyx_n_s_FilesReader_get_source_locals_ma;
+static PyObject *__pyx_n_s_FilesReader_next_source;
+static PyObject *__pyx_n_s_FilesReader_printmsg;
+static PyObject *__pyx_n_s_FilesReader_read_rows;
+static PyObject *__pyx_n_s_FilesReader_start;
+static PyObject *__pyx_kp_s_Found_no_ranges_to_query_check_b;
+static PyObject *__pyx_kp_s_H_dsB;
+static PyObject *__pyx_kp_s_INSERT_INTO_badtable_a_b_VALUES;
+static PyObject *__pyx_kp_s_INSERT_INTO_s_s_s_VALUES_s;
+static PyObject *__pyx_kp_s_INSERT_INTO_s_s_s_VALUES_s_2;
+static PyObject *__pyx_n_s_IOError;
+static PyObject *__pyx_n_s_IS_LINUX;
+static PyObject *__pyx_kp_s_If_you_want_to_insert_empty_str;
+static PyObject *__pyx_n_s_ImmutableDict;
+static PyObject *__pyx_n_s_ImportConversion;
+static PyObject *__pyx_n_s_ImportConversion___init;
+static PyObject *__pyx_n_s_ImportConversion___init___locals;
+static PyObject *__pyx_n_s_ImportConversion__get_converter;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_10;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_11;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_12;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_13;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_14;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_15;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_16;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_17;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_18;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_19;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_2;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_20;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_21;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_22;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_23;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_24;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_25;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_26;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_27;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_28;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_3;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_4;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_5;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_6;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_7;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_8;
+static PyObject *__pyx_n_s_ImportConversion__get_converter_9;
+static PyObject *__pyx_n_s_ImportConversion__get_primary_ke;
+static PyObject *__pyx_n_s_ImportConversion_convert_row;
+static PyObject *__pyx_n_s_ImportConversion_get_null_primar;
+static PyObject *__pyx_n_s_ImportConversion_get_row_partiti;
+static PyObject *__pyx_n_s_ImportConversion_get_row_partiti_2;
+static PyObject *__pyx_n_s_ImportConversion_get_row_partiti_3;
+static PyObject *__pyx_n_s_ImportConversion_get_row_partiti_4;
+static PyObject *__pyx_n_s_ImportConversion_get_row_partiti_5;
+static PyObject *__pyx_n_s_ImportErrorHandler;
+static PyObject *__pyx_n_s_ImportErrorHandler___init;
+static PyObject *__pyx_n_s_ImportErrorHandler_add_failed_ro;
+static PyObject *__pyx_n_s_ImportErrorHandler_handle_error;
+static PyObject *__pyx_n_s_ImportErrorHandler_max_exceeded;
+static PyObject *__pyx_n_s_ImportProcess;
+static PyObject *__pyx_n_s_ImportProcessResult;
+static PyObject *__pyx_n_s_ImportProcessResult___init;
+static PyObject *__pyx_n_s_ImportProcess___init;
+static PyObject *__pyx_n_s_ImportProcess_close;
+static PyObject *__pyx_n_s_ImportProcess_convert_rows;
+static PyObject *__pyx_n_s_ImportProcess_convert_rows_local;
+static PyObject *__pyx_n_s_ImportProcess_convert_rows_local_2;
+static PyObject *__pyx_n_s_ImportProcess_err_callback;
+static PyObject *__pyx_n_s_ImportProcess_inner_run;
+static PyObject *__pyx_n_s_ImportProcess_make_batch;
+static PyObject *__pyx_n_s_ImportProcess_make_counter_batch;
+static PyObject *__pyx_n_s_ImportProcess_make_non_prepared;
+static PyObject *__pyx_n_s_ImportProcess_make_params;
+static PyObject *__pyx_n_s_ImportProcess_make_prepared_batc;
+static PyObject *__pyx_n_s_ImportProcess_maybe_inject_failu;
+static PyObject *__pyx_n_s_ImportProcess_report_error;
+static PyObject *__pyx_n_s_ImportProcess_result_callback;
+static PyObject *__pyx_n_s_ImportProcess_run;
+static PyObject *__pyx_n_s_ImportProcess_session;
+static PyObject *__pyx_n_s_ImportProcess_split_into_batches;
+static PyObject *__pyx_n_s_ImportProcess_update_chunk;
+static PyObject *__pyx_n_s_ImportProcess_wrap_make_statemen;
+static PyObject *__pyx_n_s_ImportProcess_wrap_make_statemen_2;
+static PyObject *__pyx_n_s_ImportProcess_wrap_make_statemen_3;
+static PyObject *__pyx_n_s_ImportTask;
+static PyObject *__pyx_n_s_ImportTaskError;
+static PyObject *__pyx_n_s_ImportTaskError___init;
+static PyObject *__pyx_n_s_ImportTaskError_is_parse_error;
+static PyObject *__pyx_n_s_ImportTask___init;
+static PyObject *__pyx_n_s_ImportTask_all_processes_running;
+static PyObject *__pyx_n_s_ImportTask_import_records;
+static PyObject *__pyx_n_s_ImportTask_make_params;
+static PyObject *__pyx_n_s_ImportTask_receive_results;
+static PyObject *__pyx_n_s_ImportTask_run;
+static PyObject *__pyx_n_s_ImportTask_send_stdin_rows;
+static PyObject *__pyx_n_s_ImportTask_validate_columns;
+static PyObject *__pyx_n_s_IndexError;
+static PyObject *__pyx_kp_s_Invalid_boolean_styles_s;
+static PyObject *__pyx_kp_s_Invalid_column_name_s;
+static PyObject *__pyx_kp_s_Invalid_row_length_d_should_be_d;
+static PyObject *__pyx_n_s_Linux;
+static PyObject *__pyx_n_s_Lock;
+static PyObject *__pyx_n_s_Murmur3Partitioner;
+static PyObject *__pyx_n_s_NO_COLOR_MAP;
+static PyObject *__pyx_kp_s_No_column_specified;
+static PyObject *__pyx_kp_s_No_valid_column_specified;
+static PyObject *__pyx_n_s_NotImplementedError;
+static PyObject *__pyx_n_s_OneWayChannel;
+static PyObject *__pyx_n_s_OneWayChannel___init;
+static PyObject *__pyx_n_s_OneWayChannel_close;
+static PyObject *__pyx_n_s_OneWayChannel_recv;
+static PyObject *__pyx_n_s_OneWayChannel_send;
+static PyObject *__pyx_n_s_OneWayChannels;
+static PyObject *__pyx_n_s_OneWayChannels___init;
+static PyObject *__pyx_n_s_OneWayChannels_close;
+static PyObject *__pyx_n_s_OneWayChannels_recv_polling;
+static PyObject *__pyx_n_s_OneWayChannels_recv_select;
+static PyObject *__pyx_n_s_PROFILE_ON;
+static PyObject *__pyx_n_s_ParseError;
+static PyObject *__pyx_n_s_Pipe;
+static PyObject *__pyx_n_s_PipeReader;
+static PyObject *__pyx_n_s_PipeReader___init;
+static PyObject *__pyx_n_s_PipeReader_read_rows;
+static PyObject *__pyx_n_s_PipeReader_start;
+static PyObject *__pyx_kp_s_Primary_key_column_s_missing_or;
+static PyObject *__pyx_n_s_Process;
+static PyObject *__pyx_kp_s_Processed_d_rows_Rate_7_0f_rows;
+static PyObject *__pyx_n_s_Queue;
+static PyObject *__pyx_n_s_RETHROW;
+static PyObject *__pyx_n_s_RETRY;
+static PyObject *__pyx_n_s_RandomPartitioner;
+static PyObject *__pyx_n_s_RateMeter;
+static PyObject *__pyx_n_s_RateMeter___init;
+static PyObject *__pyx_n_s_RateMeter_get_avg_rate;
+static PyObject *__pyx_n_s_RateMeter_get_new_rate;
+static PyObject *__pyx_n_s_RateMeter_get_total_records;
+static PyObject *__pyx_n_s_RateMeter_increment;
+static PyObject *__pyx_n_s_RateMeter_log_message;
+static PyObject *__pyx_n_s_RateMeter_maybe_update;
+static PyObject *__pyx_n_s_RateMeter_update;
+static PyObject *__pyx_n_s_RawConfigParser;
+static PyObject *__pyx_n_s_ReadError;
+static PyObject *__pyx_kp_s_Reading_options_from_s_s_s;
+static PyObject *__pyx_kp_s_Reading_options_from_the_command;
+static PyObject *__pyx_kp_s_Renaming_existing_s_to_s;
+static PyObject *__pyx_n_s_RetryPolicy;
+static PyObject *__pyx_n_s_ReversedType;
+static PyObject *__pyx_kp_s_SELECT_FROM_s_s_WHERE_s;
+static PyObject *__pyx_kp_s_SELECT_from_bad_table;
+static PyObject *__pyx_kp_s_SELECT_s_FROM_s_s;
+static PyObject *__pyx_n_s_STRACE_ON;
+static PyObject *__pyx_kp_s_Send_to_any_replicas_attached_t;
+static PyObject *__pyx_n_s_SimpleStatement;
+static PyObject *__pyx_kp_s_Starting_copy_of_s_s_with_colum;
+static PyObject *__pyx_n_s_StopIteration;
+static PyObject *__pyx_n_s_StringIO;
+static PyObject *__pyx_n_s_Thread;
+static PyObject *__pyx_n_s_Time;
+static PyObject *__pyx_kp_s_Timeout_received_giving_up_after;
+static PyObject *__pyx_kp_s_Timeout_received_retrying_after;
+static PyObject *__pyx_kp_s_Timeout_received_retrying_immedi;
+static PyObject *__pyx_n_s_TokenMap;
+static PyObject *__pyx_n_s_TokenMap___init;
+static PyObject *__pyx_n_s_TokenMap__initialize_ring;
+static PyObject *__pyx_n_s_TokenMap__initialize_ring_locals;
+static PyObject *__pyx_n_s_TokenMap_filter_replicas;
+static PyObject *__pyx_n_s_TokenMap_filter_replicas_locals;
+static PyObject *__pyx_n_s_TokenMap_get_ring_pos;
+static PyObject *__pyx_kp_s_True_False;
+static PyObject *__pyx_n_s_TypeError;
+static PyObject *__pyx_n_s_UNLOGGED;
+static PyObject *__pyx_kp_s_UPDATE_s_s_SET_s_WHERE_s;
+static PyObject *__pyx_n_s_UUID;
+static PyObject *__pyx_kp_s_Unexpected_result_s;
+static PyObject *__pyx_kp_s_Unknown_type_s_s_for_val_s;
+static PyObject *__pyx_kp_s_Unrecognized_COPY_FROM_options_s;
+static PyObject *__pyx_kp_s_Unrecognized_COPY_TO_options_s;
+static PyObject *__pyx_kp_s_Use_on_a_line_by_itself_to_end;
+static PyObject *__pyx_n_s_UserType;
+static PyObject *__pyx_kp_s_Using_d_child_processes;
+static PyObject *__pyx_kp_s_Using_options_s;
+static PyObject *__pyx_n_s_ValueError;
+static PyObject *__pyx_kp_s_WARNING_maxoutputsize_ignored_wh;
+static PyObject *__pyx_kp_s_WHERE;
+static PyObject *__pyx_kp_s_Warning_failed_to_connect_to_som;
+static PyObject *__pyx_kp_s_We_failed_to_parse_an_import_re;
+static PyObject *__pyx_n_s_WhiteListRoundRobinPolicy;
+static PyObject *__pyx_kp_s_Y_m_d__H_M_S;
+static PyObject *__pyx_kp_s__10;
+static PyObject *__pyx_kp_s__100;
+static PyObject *__pyx_kp_s__101;
+static PyObject *__pyx_kp_s__102;
+static PyObject *__pyx_kp_s__103;
+static PyObject *__pyx_kp_s__104;
+static PyObject *__pyx_kp_s__105;
+static PyObject *__pyx_kp_s__119;
+static PyObject *__pyx_kp_b__12;
+static PyObject *__pyx_kp_s__12;
+static PyObject *__pyx_kp_s__15;
+static PyObject *__pyx_kp_s__167;
+static PyObject *__pyx_kp_s__17;
+static PyObject *__pyx_kp_s__179;
+static PyObject *__pyx_kp_s__19;
+static PyObject *__pyx_kp_s__32;
+static PyObject *__pyx_kp_s__52;
+static PyObject *__pyx_n_s__9;
+static PyObject *__pyx_kp_s__99;
+static PyObject *__pyx_n_s_a;
+static PyObject *__pyx_n_s_adapter;
+static PyObject *__pyx_n_s_add;
+static PyObject *__pyx_n_s_add_callbacks;
+static PyObject *__pyx_n_s_add_failed_rows;
+static PyObject *__pyx_n_s_add_request;
+static PyObject *__pyx_n_s_address;
+static PyObject *__pyx_n_s_aggregate_result;
+static PyObject *__pyx_n_s_all_processes_running;
+static PyObject *__pyx_kp_s_and;
+static PyObject *__pyx_kp_s_and_2;
+static PyObject *__pyx_n_s_append;
+static PyObject *__pyx_n_s_args;
+static PyObject *__pyx_n_s_ascii;
+static PyObject *__pyx_n_s_attach_callbacks;
+static PyObject *__pyx_n_s_attempts;
+static PyObject *__pyx_n_s_auth_provider;
+static PyObject *__pyx_n_s_backoff;
+static PyObject *__pyx_n_s_batch;
+static PyObject *__pyx_n_s_batch_id;
+static PyObject *__pyx_n_s_batch_type;
+static PyObject *__pyx_n_s_begin_token;
+static PyObject *__pyx_n_s_begintoken;
+static PyObject *__pyx_n_s_bigint;
+static PyObject *__pyx_n_s_bind;
+static PyObject *__pyx_n_s_bisect;
+static PyObject *__pyx_n_s_bisect_right;
+static PyObject *__pyx_n_s_blob;
+static PyObject *__pyx_n_s_bool_styles;
+static PyObject *__pyx_n_s_boolean;
+static PyObject *__pyx_n_s_boolean_styles;
+static PyObject *__pyx_n_s_boolstyle;
+static PyObject *__pyx_n_s_build_if_absent;
+static PyObject *__pyx_n_s_c;
+static PyObject *__pyx_n_s_calendar;
+static PyObject *__pyx_n_s_callback;
+static PyObject *__pyx_n_s_callback_args;
+static PyObject *__pyx_kp_s_can_t_interpret_r_as_a_date_with;
+static PyObject *__pyx_n_s_cap;
+static PyObject *__pyx_n_s_cassandra_cluster;
+static PyObject *__pyx_n_s_cassandra_cqltypes;
+static PyObject *__pyx_n_s_cassandra_metadata;
+static PyObject *__pyx_n_s_cassandra_policies;
+static PyObject *__pyx_n_s_cassandra_query;
+static PyObject *__pyx_n_s_cassandra_util;
+static PyObject *__pyx_n_s_ch;
+static PyObject *__pyx_n_s_channels;
+static PyObject *__pyx_n_s_check_options;
+static PyObject *__pyx_kp_s_child_process_es_died_unexpecte;
+static PyObject *__pyx_n_s_chunk;
+static PyObject *__pyx_n_s_chunk_id;
+static PyObject *__pyx_n_s_chunk_size;
+static PyObject *__pyx_n_s_chunksize;
+static PyObject *__pyx_n_s_class;
+static PyObject *__pyx_n_s_clean_options;
+static PyObject *__pyx_n_s_close;
+static PyObject *__pyx_n_s_close_current_dest;
+static PyObject *__pyx_n_s_close_current_source;
+static PyObject *__pyx_n_s_cluster;
+static PyObject *__pyx_n_s_col;
+static PyObject *__pyx_n_s_collections;
+static PyObject *__pyx_n_s_colormap;
+static PyObject *__pyx_n_s_coltypes;
+static PyObject *__pyx_n_s_column_metadata;
+static PyObject *__pyx_n_s_columnlist;
+static PyObject *__pyx_n_s_columns;
+static PyObject *__pyx_n_s_compile;
+static PyObject *__pyx_n_s_complete_request;
+static PyObject *__pyx_n_s_compression;
+static PyObject *__pyx_n_s_config_file;
+static PyObject *__pyx_n_s_config_sections;
+static PyObject *__pyx_n_s_configfile;
+static PyObject *__pyx_n_s_configs;
+static PyObject *__pyx_n_s_conn;
+static PyObject *__pyx_n_s_connect;
+static PyObject *__pyx_n_s_connect_timeout;
+static PyObject *__pyx_n_s_consistency;
+static PyObject *__pyx_n_s_consistency_level;
+static PyObject *__pyx_n_s_consistencylevel;
+static PyObject *__pyx_n_s_contact_points;
+static PyObject *__pyx_n_s_control_connection_timeout;
+static PyObject *__pyx_n_s_conv;
+static PyObject *__pyx_n_s_convert;
+static PyObject *__pyx_n_s_convert_blob;
+static PyObject *__pyx_n_s_convert_bool;
+static PyObject *__pyx_n_s_convert_date;
+static PyObject *__pyx_n_s_convert_datetime;
+static PyObject *__pyx_n_s_convert_list;
+static PyObject *__pyx_n_s_convert_map;
+static PyObject *__pyx_n_s_convert_row;
+static PyObject *__pyx_n_s_convert_rows;
+static PyObject *__pyx_n_s_convert_set;
+static PyObject *__pyx_n_s_convert_single_subtype;
+static PyObject *__pyx_n_s_convert_text;
+static PyObject *__pyx_n_s_convert_time;
+static PyObject *__pyx_n_s_convert_tuple;
+static PyObject *__pyx_n_s_convert_unknown;
+static PyObject *__pyx_n_s_convert_user_type;
+static PyObject *__pyx_n_s_convert_uuid;
+static PyObject *__pyx_n_s_converted_rows;
+static PyObject *__pyx_n_s_converters;
+static PyObject *__pyx_n_s_copy;
+static PyObject *__pyx_kp_s_copy_2;
+static PyObject *__pyx_kp_s_copy_dialect_unrecognized;
+static PyObject *__pyx_n_s_copy_options;
+static PyObject *__pyx_kp_s_copy_s;
+static PyObject *__pyx_kp_s_copy_s_s;
+static PyObject *__pyx_kp_s_copy_s_s_s;
+static PyObject *__pyx_n_s_counter;
+static PyObject *__pyx_n_s_cpu_count;
+static PyObject *__pyx_n_s_cql3handling;
+static PyObject *__pyx_n_s_cql_type;
+static PyObject *__pyx_n_s_cql_version;
+static PyObject *__pyx_n_s_cqlshlib_copyutil;
+static PyObject *__pyx_n_s_cqltypes;
+static PyObject *__pyx_n_s_csv;
+static PyObject *__pyx_n_s_ct;
+static PyObject *__pyx_n_s_ctype;
+static PyObject *__pyx_n_s_curr;
+static PyObject *__pyx_n_s_current_dest;
+static PyObject *__pyx_n_s_current_range;
+static PyObject *__pyx_n_s_current_rate;
+static PyObject *__pyx_n_s_current_record;
+static PyObject *__pyx_n_s_current_source;
+static PyObject *__pyx_kp_s_d;
+static PyObject *__pyx_kp_s_d_2_d_2;
+static PyObject *__pyx_kp_s_d_2_d_2_d_2;
+static PyObject *__pyx_kp_s_d_4_d_2_d_2_s_T;
+static PyObject *__pyx_kp_s_d_rows_exported_to_d_files_in_s;
+static PyObject *__pyx_kp_s_d_rows_imported_from_d_files_in;
+static PyObject *__pyx_kp_s_d_s;
+static PyObject *__pyx_n_s_data;
+static PyObject *__pyx_n_s_data_retrieved;
+static PyObject *__pyx_n_s_datacenter;
+static PyObject *__pyx_n_s_date;
+static PyObject *__pyx_n_s_date_time_format;
+static PyObject *__pyx_n_s_datetime;
+static PyObject *__pyx_n_s_datetimeformat;
+static PyObject *__pyx_n_s_day;
+static PyObject *__pyx_n_s_debug;
+static PyObject *__pyx_n_s_decimal;
+static PyObject *__pyx_n_s_decimal_sep;
+static PyObject *__pyx_n_s_decimalsep;
+static PyObject *__pyx_n_s_decode;
+static PyObject *__pyx_n_s_default_fetch_size;
+static PyObject *__pyx_n_s_default_retry_policy;
+static PyObject *__pyx_n_s_default_timeout;
+static PyObject *__pyx_n_s_defaultdict;
+static PyObject *__pyx_n_s_delay;
+static PyObject *__pyx_n_s_delimiter;
+static PyObject *__pyx_n_s_dequote_value;
+static PyObject *__pyx_n_s_desc;
+static PyObject *__pyx_n_s_describe_interval;
+static PyObject *__pyx_n_s_dialect;
+static PyObject *__pyx_n_s_dialect_options;
+static PyObject *__pyx_n_s_direction;
+static PyObject *__pyx_n_s_display_date_format;
+static PyObject *__pyx_n_s_display_float_precision;
+static PyObject *__pyx_n_s_display_nanotime_format;
+static PyObject *__pyx_n_s_display_timestamp_format;
+static PyObject *__pyx_n_s_displaying;
+static PyObject *__pyx_n_s_doc;
+static PyObject *__pyx_n_s_double;
+static PyObject *__pyx_n_s_doublequote;
+static PyObject *__pyx_n_s_dtformats;
+static PyObject *__pyx_n_s_duplex;
+static PyObject *__pyx_n_s_e;
+static PyObject *__pyx_n_s_encoding;
+static PyObject *__pyx_n_s_end;
+static PyObject *__pyx_n_s_end_token;
+static PyObject *__pyx_n_s_endswith;
+static PyObject *__pyx_n_s_endtoken;
+static PyObject *__pyx_n_s_enter;
+static PyObject *__pyx_n_s_enumerate;
+static PyObject *__pyx_n_s_environ;
+static PyObject *__pyx_n_s_eol;
+static PyObject *__pyx_n_s_err;
+static PyObject *__pyx_n_s_err_callback;
+static PyObject *__pyx_n_s_err_file;
+static PyObject *__pyx_n_s_err_is_final;
+static PyObject *__pyx_n_s_errback;
+static PyObject *__pyx_n_s_errback_args;
+static PyObject *__pyx_n_s_errfile;
+static PyObject *__pyx_n_s_error_handler;
+static PyObject *__pyx_n_s_errors;
+static PyObject *__pyx_n_s_escape;
+static PyObject *__pyx_n_s_escapechar;
+static PyObject *__pyx_n_s_exc;
+static PyObject *__pyx_n_s_execute_async;
+static PyObject *__pyx_n_s_exhausted;
+static PyObject *__pyx_n_s_exit;
+static PyObject *__pyx_n_s_exit_2;
+static PyObject *__pyx_n_s_exit_batch;
+static PyObject *__pyx_n_s_exit_range;
+static PyObject *__pyx_n_s_exitcode;
+static PyObject *__pyx_n_s_expanduser;
+static PyObject *__pyx_n_s_export_process;
+static PyObject *__pyx_n_s_export_records;
+static PyObject *__pyx_n_s_extend;
+static PyObject *__pyx_n_s_f;
+static PyObject *__pyx_n_s_failed;
+static PyObject *__pyx_n_s_failed_batch;
+static PyObject *__pyx_n_s_failing_batch;
+static PyObject *__pyx_n_s_failing_range;
+static PyObject *__pyx_n_s_failures;
+static PyObject *__pyx_n_s_feed_errors;
+static PyObject *__pyx_n_s_feeder;
+static PyObject *__pyx_kp_s_feeder_profile__d_txt;
+static PyObject *__pyx_n_s_feeding_result;
+static PyObject *__pyx_n_s_file;
+static PyObject *__pyx_n_s_file_name;
+static PyObject *__pyx_n_s_filter;
+static PyObject *__pyx_n_s_filter_replicas;
+static PyObject *__pyx_n_s_filter_row_values;
+static PyObject *__pyx_n_s_final;
+static PyObject *__pyx_n_s_first_range_data;
+static PyObject *__pyx_n_s_float;
+static PyObject *__pyx_n_s_float_precision;
+static PyObject *__pyx_n_s_flush;
+static PyObject *__pyx_n_s_fname;
+static PyObject *__pyx_n_s_format;
+static PyObject *__pyx_n_s_format_value;
+static PyObject *__pyx_n_s_format_value_default;
+static PyObject *__pyx_n_s_formatter;
+static PyObject *__pyx_n_s_formatters;
+static PyObject *__pyx_n_s_formatting;
+static PyObject *__pyx_n_s_from;
+static PyObject *__pyx_n_s_from_key;
+static PyObject *__pyx_n_s_fromhex;
+static PyObject *__pyx_n_s_frozen;
+static PyObject *__pyx_n_s_full_query_text;
+static PyObject *__pyx_n_s_future;
+static PyObject *__pyx_n_s_genexpr;
+static PyObject *__pyx_n_s_get;
+static PyObject *__pyx_n_s_get_avg_rate;
+static PyObject *__pyx_n_s_get_column_names;
+static PyObject *__pyx_n_s_get_columns;
+static PyObject *__pyx_n_s_get_convert_decimal_fcn;
+static PyObject *__pyx_n_s_get_convert_integer_fcn;
+static PyObject *__pyx_n_s_get_converter;
+static PyObject *__pyx_n_s_get_dest;
+static PyObject *__pyx_n_s_get_error_message;
+static PyObject *__pyx_n_s_get_formatter;
+static PyObject *__pyx_n_s_get_host;
+static PyObject *__pyx_n_s_get_min_token;
+static PyObject *__pyx_n_s_get_new_rate;
+static PyObject *__pyx_n_s_get_null_primary_key_message;
+static PyObject *__pyx_n_s_get_num_cores;
+static PyObject *__pyx_n_s_get_num_processes;
+static PyObject *__pyx_n_s_get_pid;
+static PyObject *__pyx_n_s_get_primary_key_statement;
+static PyObject *__pyx_n_s_get_ranges;
+static PyObject *__pyx_n_s_get_ring;
+static PyObject *__pyx_n_s_get_ring_pos;
+static PyObject *__pyx_n_s_get_row_partition_key_values;
+static PyObject *__pyx_n_s_get_row_partition_key_values_fcn;
+static PyObject *__pyx_n_s_get_session;
+static PyObject *__pyx_n_s_get_source;
+static PyObject *__pyx_n_s_get_table_meta;
+static PyObject *__pyx_n_s_get_total_records;
+static PyObject *__pyx_n_s_getpid;
+static PyObject *__pyx_n_s_getvalue;
+static PyObject *__pyx_n_s_glob;
+static PyObject *__pyx_n_s_group;
+static PyObject *__pyx_n_s_handle_error;
+static PyObject *__pyx_n_s_handle_timeout;
+static PyObject *__pyx_n_s_has_more_pages;
+static PyObject *__pyx_n_s_has_section;
+static PyObject *__pyx_n_s_header;
+static PyObject *__pyx_kp_s_home_eevans_dev_src_git_cassand;
+static PyObject *__pyx_n_s_host;
+static PyObject *__pyx_n_s_hostname;
+static PyObject *__pyx_n_s_hosts;
+static PyObject *__pyx_n_s_hosts_to_sessions;
+static PyObject *__pyx_n_s_hour;
+static PyObject *__pyx_n_s_i;
+static PyObject *__pyx_n_s_id;
+static PyObject *__pyx_n_s_idle_heartbeat_interval;
+static PyObject *__pyx_n_s_idx;
+static PyObject *__pyx_n_s_import;
+static PyObject *__pyx_kp_s_import__s__s_err;
+static PyObject *__pyx_n_s_import_records;
+static PyObject *__pyx_n_s_imported;
+static PyObject *__pyx_n_s_increment;
+static PyObject *__pyx_n_s_index;
+static PyObject *__pyx_n_s_inet;
+static PyObject *__pyx_n_s_info;
+static PyObject *__pyx_n_s_ingest_rate;
+static PyObject *__pyx_n_s_ingestrate;
+static PyObject *__pyx_n_s_init;
+static PyObject *__pyx_n_s_init_feeder_thread;
+static PyObject *__pyx_n_s_initialize_ring;
+static PyObject *__pyx_n_s_inmsg;
+static PyObject *__pyx_n_s_inner_make_statement;
+static PyObject *__pyx_n_s_inner_run;
+static PyObject *__pyx_n_s_insert_errors;
+static PyObject *__pyx_n_s_int;
+static PyObject *__pyx_n_s_is_alive;
+static PyObject *__pyx_n_s_is_counter;
+static PyObject *__pyx_n_s_is_parse_error;
+static PyObject *__pyx_n_s_is_up;
+static PyObject *__pyx_n_s_isfile;
+static PyObject *__pyx_n_s_items;
+static PyObject *__pyx_n_s_iter;
+static PyObject *__pyx_n_s_iteritems;
+static PyObject *__pyx_n_s_join;
+static PyObject *__pyx_n_s_json;
+static PyObject *__pyx_n_s_k;
+static PyObject *__pyx_n_s_key;
+static PyObject *__pyx_n_s_keys;
+static PyObject *__pyx_n_s_keyspace;
+static PyObject *__pyx_n_s_keyspaces;
+static PyObject *__pyx_n_s_ks;
+static PyObject *__pyx_n_s_l;
+static PyObject *__pyx_n_s_last;
+static PyObject *__pyx_n_s_last_checkpoint_time;
+static PyObject *__pyx_n_s_last_switch;
+static PyObject *__pyx_n_s_length;
+static PyObject *__pyx_n_s_level;
+static PyObject *__pyx_n_s_linesep;
+static PyObject *__pyx_n_s_list;
+static PyObject *__pyx_n_s_load_balancing_policy;
+static PyObject *__pyx_n_s_loads;
+static PyObject *__pyx_n_s_local_dc;
+static PyObject *__pyx_n_s_lock;
+static PyObject *__pyx_n_s_log_fcn;
+static PyObject *__pyx_n_s_log_file;
+static PyObject *__pyx_n_s_log_message;
+static PyObject *__pyx_n_s_lower;
+static PyObject *__pyx_n_s_m;
+static PyObject *__pyx_n_s_main;
+static PyObject *__pyx_n_s_make_batch;
+static PyObject *__pyx_n_s_make_counter_batch_statement;
+static PyObject *__pyx_n_s_make_non_prepared_batch_statemen;
+static PyObject *__pyx_n_s_make_params;
+static PyObject *__pyx_n_s_make_prepared_batch_statement;
+static PyObject *__pyx_n_s_make_query_plan;
+static PyObject *__pyx_n_s_make_range;
+static PyObject *__pyx_n_s_make_range_data;
+static PyObject *__pyx_n_s_make_source;
+static PyObject *__pyx_n_s_make_statement;
+static PyObject *__pyx_n_s_make_statement_with_failures;
+static PyObject *__pyx_n_s_map;
+static PyObject *__pyx_n_s_match;
+static PyObject *__pyx_n_s_max_attempts;
+static PyObject *__pyx_n_s_max_batch_size;
+static PyObject *__pyx_n_s_max_exceeded;
+static PyObject *__pyx_n_s_max_insert_errors;
+static PyObject *__pyx_n_s_max_output_size;
+static PyObject *__pyx_n_s_max_parse_errors;
+static PyObject *__pyx_n_s_max_requests;
+static PyObject *__pyx_n_s_max_rows;
+static PyObject *__pyx_n_s_maxattempts;
+static PyObject *__pyx_n_s_maxbatchsize;
+static PyObject *__pyx_n_s_maxinserterrors;
+static PyObject *__pyx_n_s_maxoutputsize;
+static PyObject *__pyx_n_s_maxparseerrors;
+static PyObject *__pyx_n_s_maxrequests;
+static PyObject *__pyx_n_s_maxrows;
+static PyObject *__pyx_n_s_maybe_inject_failures;
+static PyObject *__pyx_n_s_maybe_read_config_file;
+static PyObject *__pyx_n_s_maybe_update;
+static PyObject *__pyx_n_s_message;
+static PyObject *__pyx_n_s_metaclass;
+static PyObject *__pyx_n_s_metadata;
+static PyObject *__pyx_n_s_meter;
+static PyObject *__pyx_n_s_min_batch_size;
+static PyObject *__pyx_n_s_min_token;
+static PyObject *__pyx_n_s_minbatchsize;
+static PyObject *__pyx_n_s_minute;
+static PyObject *__pyx_n_s_module;
+static PyObject *__pyx_n_s_mp;
+static PyObject *__pyx_n_s_msg;
+static PyObject *__pyx_n_s_multiprocessing;
+static PyObject *__pyx_n_s_n;
+static PyObject *__pyx_n_s_name;
+static PyObject *__pyx_n_s_name_2;
+static PyObject *__pyx_n_s_namedtuple;
+static PyObject *__pyx_n_s_new_checkpoint_time;
+static PyObject *__pyx_n_s_new_cluster;
+static PyObject *__pyx_n_s_new_rate;
+static PyObject *__pyx_n_s_next;
+static PyObject *__pyx_n_s_next_dest;
+static PyObject *__pyx_n_s_next_source;
+static PyObject *__pyx_n_s_normpath;
+static PyObject *__pyx_n_s_now;
+static PyObject *__pyx_n_s_null;
+static PyObject *__pyx_n_s_nullval;
+static PyObject *__pyx_n_s_num;
+static PyObject *__pyx_n_s_num_channels;
+static PyObject *__pyx_n_s_num_cores_for_testing;
+static PyObject *__pyx_n_s_num_failures;
+static PyObject *__pyx_n_s_num_files;
+static PyObject *__pyx_n_s_num_live_processes;
+static PyObject *__pyx_n_s_num_processes;
+static PyObject *__pyx_n_s_num_read;
+static PyObject *__pyx_n_s_num_remaining;
+static PyObject *__pyx_n_s_num_requests;
+static PyObject *__pyx_n_s_num_rows;
+static PyObject *__pyx_n_s_num_rows_failed;
+static PyObject *__pyx_n_s_num_rows_sent;
+static PyObject *__pyx_n_s_num_sources;
+static PyObject *__pyx_n_s_num_worker_processes;
+static PyObject *__pyx_n_s_num_written;
+static PyObject *__pyx_n_s_numprocesses;
+static PyObject *__pyx_n_s_obj;
+static PyObject *__pyx_n_s_object;
+static PyObject *__pyx_n_s_offset;
+static PyObject *__pyx_n_s_old_err_file;
+static PyObject *__pyx_n_s_on_read_timeout;
+static PyObject *__pyx_n_s_on_write_timeout;
+static PyObject *__pyx_n_s_open;
+static PyObject *__pyx_n_s_options;
+static PyObject *__pyx_n_s_opts;
+static PyObject *__pyx_n_s_os;
+static PyObject *__pyx_n_s_outmsg;
+static PyObject *__pyx_n_s_output;
+static PyObject *__pyx_kp_s_output_close;
+static PyObject *__pyx_n_s_p;
+static PyObject *__pyx_n_s_pack;
+static PyObject *__pyx_n_s_pagesize;
+static PyObject *__pyx_n_s_pagetimeout;
+static PyObject *__pyx_n_s_params;
+static PyObject *__pyx_n_s_parent;
+static PyObject *__pyx_n_s_parent_process;
+static PyObject *__pyx_kp_s_parent_profile__d_txt;
+static PyObject *__pyx_n_s_parse_errors;
+static PyObject *__pyx_n_s_parse_options;
+static PyObject *__pyx_n_s_partition_key;
+static PyObject *__pyx_n_s_partition_key_indexes;
+static PyObject *__pyx_n_s_partitioner;
+static PyObject *__pyx_n_s_path;
+static PyObject *__pyx_n_s_paths;
+static PyObject *__pyx_n_s_pid;
+static PyObject *__pyx_n_s_pk;
+static PyObject *__pyx_n_s_pk_cols;
+static PyObject *__pyx_n_s_pk_to_token_value;
+static PyObject *__pyx_n_s_pk_values;
+static PyObject *__pyx_n_s_platform;
+static PyObject *__pyx_n_s_poll;
+static PyObject *__pyx_n_s_pop;
+static PyObject *__pyx_n_s_port;
+static PyObject *__pyx_n_s_pr;
+static PyObject *__pyx_n_s_prepare;
+static PyObject *__pyx_n_s_prepare_2;
+static PyObject *__pyx_n_s_prepare_export_query;
+static PyObject *__pyx_n_s_prepare_query;
+static PyObject *__pyx_n_s_prepared_statement;
+static PyObject *__pyx_n_s_preparedstatements;
+static PyObject *__pyx_n_s_prev;
+static PyObject *__pyx_n_s_previous;
+static PyObject *__pyx_n_s_primary_key;
+static PyObject *__pyx_n_s_primary_key_indexes;
+static PyObject *__pyx_n_s_print;
+static PyObject *__pyx_n_s_print_exc;
+static PyObject *__pyx_n_s_print_traceback;
+static PyObject *__pyx_n_s_printdebugmsg;
+static PyObject *__pyx_n_s_printerr;
+static PyObject *__pyx_n_s_printmsg;
+static PyObject *__pyx_n_s_printmsg_2;
+static PyObject *__pyx_n_s_process;
+static PyObject *__pyx_n_s_processes;
+static PyObject *__pyx_n_s_profile_off;
+static PyObject *__pyx_n_s_profile_on;
+static PyObject *__pyx_n_s_prompt;
+static PyObject *__pyx_n_s_property;
+static PyObject *__pyx_n_s_protect_name;
+static PyObject *__pyx_n_s_protect_names;
+static PyObject *__pyx_n_s_protect_value;
+static PyObject *__pyx_n_s_protectors;
+static PyObject *__pyx_n_s_proto_version;
+static PyObject *__pyx_n_s_protocol_version;
+static PyObject *__pyx_n_s_put;
+static PyObject *__pyx_n_s_qualname;
+static PyObject *__pyx_n_s_query;
+static PyObject *__pyx_n_s_query_id;
+static PyObject *__pyx_n_s_quote;
+static PyObject *__pyx_n_s_quotechar;
+static PyObject *__pyx_n_s_r;
+static PyObject *__pyx_n_s_random;
+static PyObject *__pyx_n_s_randrange;
+static PyObject *__pyx_n_s_range;
+static PyObject *__pyx_n_s_ranges;
+static PyObject *__pyx_n_s_ratefile;
+static PyObject *__pyx_n_s_rb;
+static PyObject *__pyx_n_s_re;
+static PyObject *__pyx_n_s_read_rows;
+static PyObject *__pyx_n_s_readable;
+static PyObject *__pyx_n_s_reader;
+static PyObject *__pyx_n_s_readers;
+static PyObject *__pyx_n_s_readfp;
+static PyObject *__pyx_n_s_rebuild_keyspace;
+static PyObject *__pyx_n_s_receive_meter;
+static PyObject *__pyx_n_s_receive_results;
+static PyObject *__pyx_n_s_received_responses;
+static PyObject *__pyx_n_s_recv;
+static PyObject *__pyx_n_s_recv_polling;
+static PyObject *__pyx_n_s_recv_select;
+static PyObject *__pyx_n_s_remaining_time;
+static PyObject *__pyx_n_s_rename;
+static PyObject *__pyx_n_s_replace;
+static PyObject *__pyx_n_s_replicas;
+static PyObject *__pyx_n_s_report_error;
+static PyObject *__pyx_n_s_reportfrequency;
+static PyObject *__pyx_n_s_requests;
+static PyObject *__pyx_n_s_required_responses;
+static PyObject *__pyx_n_s_response;
+static PyObject *__pyx_n_s_responses;
+static PyObject *__pyx_n_s_result;
+static PyObject *__pyx_n_s_result_callback;
+static PyObject *__pyx_n_s_ret;
+static PyObject *__pyx_n_s_ret_type;
+static PyObject *__pyx_n_s_retry_num;
+static PyObject *__pyx_n_s_ring;
+static PyObject *__pyx_n_s_ring_pos;
+static PyObject *__pyx_n_s_rlock;
+static PyObject *__pyx_n_s_rlocks;
+static PyObject *__pyx_n_s_rlocks_by_readers;
+static PyObject *__pyx_n_s_row;
+static PyObject *__pyx_n_s_row_factory;
+static PyObject *__pyx_n_s_rows;
+static PyObject *__pyx_n_s_rows_by_replica;
+static PyObject *__pyx_n_s_rows_by_ring_pos;
+static PyObject *__pyx_n_s_run;
+static PyObject *__pyx_n_s_s;
+static PyObject *__pyx_kp_s_s_2;
+static PyObject *__pyx_kp_s_s_3;
+static PyObject *__pyx_kp_s_s_s;
+static PyObject *__pyx_kp_s_s_s_2;
+static PyObject *__pyx_kp_s_s_s_s;
+static PyObject *__pyx_n_s_safe_normpath;
+static PyObject *__pyx_n_s_seconds;
+static PyObject *__pyx_n_s_section;
+static PyObject *__pyx_n_s_select;
+static PyObject *__pyx_n_s_select_query;
+static PyObject *__pyx_n_s_self;
+static PyObject *__pyx_n_s_send;
+static PyObject *__pyx_n_s_send_chunk;
+static PyObject *__pyx_n_s_send_meter;
+static PyObject *__pyx_n_s_send_stdin_rows;
+static PyObject *__pyx_n_s_send_work;
+static PyObject *__pyx_n_s_sent;
+static PyObject *__pyx_n_s_sep;
+static PyObject *__pyx_n_s_serialize;
+static PyObject *__pyx_n_s_serialize_row_multiple;
+static PyObject *__pyx_n_s_serialize_row_single;
+static PyObject *__pyx_n_s_serialize_value_not_prepared;
+static PyObject *__pyx_n_s_serialize_value_prepared;
+static PyObject *__pyx_n_s_session;
+static PyObject *__pyx_n_s_session_2;
+static PyObject *__pyx_n_s_set;
+static PyObject *__pyx_n_s_setDaemon;
+static PyObject *__pyx_n_s_set_clause;
+static PyObject *__pyx_n_s_shell;
+static PyObject *__pyx_n_s_shuffled;
+static PyObject *__pyx_n_s_shutdown;
+static PyObject *__pyx_n_s_skip_column_indexes;
+static PyObject *__pyx_n_s_skip_columns;
+static PyObject *__pyx_n_s_skip_rows;
+static PyObject *__pyx_n_s_skipcols;
+static PyObject *__pyx_n_s_skiprows;
+static PyObject *__pyx_n_s_sleep;
+static PyObject *__pyx_n_s_smallint;
+static PyObject *__pyx_n_s_sort;
+static PyObject *__pyx_n_s_sorted;
+static PyObject *__pyx_n_s_source_name;
+static PyObject *__pyx_n_s_sources;
+static PyObject *__pyx_n_s_split;
+static PyObject *__pyx_n_s_split_into_batches;
+static PyObject *__pyx_n_s_ssl;
+static PyObject *__pyx_n_s_ssl_options;
+static PyObject *__pyx_n_s_ssl_settings;
+static PyObject *__pyx_n_s_sslhandling;
+static PyObject *__pyx_n_s_start;
+static PyObject *__pyx_n_s_start_fetching_next_page;
+static PyObject *__pyx_n_s_start_processes;
+static PyObject *__pyx_n_s_start_request;
+static PyObject *__pyx_n_s_start_time;
+static PyObject *__pyx_n_s_start_token;
+static PyObject *__pyx_n_s_startswith;
+static PyObject *__pyx_n_s_statement;
+static PyObject *__pyx_n_s_statements_and_parameters;
+static PyObject *__pyx_n_s_staticmethod;
+static PyObject *__pyx_n_s_stdout;
+static PyObject *__pyx_n_s_stop_processes;
+static PyObject *__pyx_kp_s_strace_vvvv_c_o_strace_pid_out_e;
+static PyObject *__pyx_n_s_strftime;
+static PyObject *__pyx_n_s_string_escape;
+static PyObject *__pyx_n_s_strip;
+static PyObject *__pyx_n_s_strptime;
+static PyObject *__pyx_n_s_struct;
+static PyObject *__pyx_n_s_struct_time;
+static PyObject *__pyx_n_s_subtypes;
+static PyObject *__pyx_n_s_succeeded;
+static PyObject *__pyx_n_s_sum;
+static PyObject *__pyx_n_s_sys;
+static PyObject *__pyx_n_s_system;
+static PyObject *__pyx_n_s_t;
+static PyObject *__pyx_n_s_table;
+static PyObject *__pyx_n_s_table_meta;
+static PyObject *__pyx_n_s_tables;
+static PyObject *__pyx_n_s_target;
+static PyObject *__pyx_n_s_task;
+static PyObject *__pyx_n_s_terminate;
+static PyObject *__pyx_n_s_test;
+static PyObject *__pyx_n_s_test_failures;
+static PyObject *__pyx_n_s_text;
+static PyObject *__pyx_n_s_thousands_sep;
+static PyObject *__pyx_n_s_thousandssep;
+static PyObject *__pyx_n_s_thread;
+static PyObject *__pyx_n_s_threading;
+static PyObject *__pyx_n_s_throw;
+static PyObject *__pyx_n_s_time;
+static PyObject *__pyx_n_s_time_difference;
+static PyObject *__pyx_n_s_time_start;
+static PyObject *__pyx_n_s_timegm;
+static PyObject *__pyx_n_s_timeout;
+static PyObject *__pyx_n_s_timestamp;
+static PyObject *__pyx_n_s_timestamp_format;
+static PyObject *__pyx_n_s_timeuuid;
+static PyObject *__pyx_n_s_timezone;
+static PyObject *__pyx_n_s_tinyint;
+static PyObject *__pyx_n_s_tm;
+static PyObject *__pyx_n_s_to;
+static PyObject *__pyx_n_s_token;
+static PyObject *__pyx_n_s_token_class;
+static PyObject *__pyx_n_s_token_map;
+static PyObject *__pyx_n_s_token_range;
+static PyObject *__pyx_kp_s_token_s_s;
+static PyObject *__pyx_kp_s_token_s_s_2;
+static PyObject *__pyx_n_s_tokens_to_hosts;
+static PyObject *__pyx_n_s_tokens_to_hosts_by_ks;
+static PyObject *__pyx_n_s_tokens_to_send;
+static PyObject *__pyx_n_s_total_records;
+static PyObject *__pyx_n_s_total_requests;
+static PyObject *__pyx_n_s_trace_process;
+static PyObject *__pyx_n_s_traceback;
+static PyObject *__pyx_n_s_true;
+static PyObject *__pyx_n_s_tty;
+static PyObject *__pyx_n_s_tuple;
+static PyObject *__pyx_n_s_tuple_factory;
+static PyObject *__pyx_n_s_tval;
+static PyObject *__pyx_n_s_type;
+static PyObject *__pyx_n_s_typename;
+static PyObject *__pyx_n_s_unit;
+static PyObject *__pyx_n_s_unlink;
+static PyObject *__pyx_n_s_unprotect;
+static PyObject *__pyx_n_s_unrecognized;
+static PyObject *__pyx_n_s_until;
+static PyObject *__pyx_n_s_update;
+static PyObject *__pyx_n_s_update_chunk;
+static PyObject *__pyx_n_s_update_interval;
+static PyObject *__pyx_n_s_update_params;
+static PyObject *__pyx_n_s_use_prepared_statements;
+static PyObject *__pyx_n_s_use_stdin_reader;
+static PyObject *__pyx_n_s_used_hosts_per_remote_dc;
+static PyObject *__pyx_n_s_utf8;
+static PyObject *__pyx_n_s_util;
+static PyObject *__pyx_n_s_uuid;
+static PyObject *__pyx_n_s_v;
+static PyObject *__pyx_n_s_val;
+static PyObject *__pyx_n_s_valid_columns;
+static PyObject *__pyx_n_s_validate_columns;
+static PyObject *__pyx_n_s_vals;
+static PyObject *__pyx_n_s_value;
+static PyObject *__pyx_n_s_values;
+static PyObject *__pyx_n_s_varchar;
+static PyObject *__pyx_n_s_varint;
+static PyObject *__pyx_n_s_vv;
+static PyObject *__pyx_n_s_wb;
+static PyObject *__pyx_n_s_where_clause;
+static PyObject *__pyx_n_s_wlock;
+static PyObject *__pyx_n_s_words;
+static PyObject *__pyx_n_s_worker_channels;
+static PyObject *__pyx_kp_s_worker_profile__d_txt;
+static PyObject *__pyx_n_s_working_keyspace;
+static PyObject *__pyx_n_s_wrap_make_statement;
+static PyObject *__pyx_n_s_write;
+static PyObject *__pyx_n_s_write_rows_to_csv;
+static PyObject *__pyx_n_s_write_type;
+static PyObject *__pyx_n_s_write_with_split;
+static PyObject *__pyx_n_s_write_without_split;
+static PyObject *__pyx_n_s_writer;
+static PyObject *__pyx_n_s_writerow;
+static PyObject *__pyx_n_s_xrange;
+static PyObject *__pyx_n_s_zip;
+static PyObject *__pyx_float_0_0;
+static PyObject *__pyx_float_0_1;
+static PyObject *__pyx_float_1e3;
+static PyObject *__pyx_float_2_0;
+static PyObject *__pyx_float_0_25;
+static PyObject *__pyx_float_0_001;
+static PyObject *__pyx_float_1eneg_09;
+static PyObject *__pyx_float_0_000001;
+static PyObject *__pyx_float_0_000000001;
+static PyObject *__pyx_int_0;
+static PyObject *__pyx_int_1;
+static PyObject *__pyx_int_2;
+static PyObject *__pyx_int_3;
+static PyObject *__pyx_int_4;
+static PyObject *__pyx_int_5;
+static PyObject *__pyx_int_6;
+static PyObject *__pyx_int_7;
+static PyObject *__pyx_int_8;
+static PyObject *__pyx_int_9;
+static PyObject *__pyx_int_10;
+static PyObject *__pyx_int_16;
+static PyObject *__pyx_int_20;
+static PyObject *__pyx_int_60;
+static PyObject *__pyx_int_1000;
+static PyObject *__pyx_int_3600;
+static PyObject *__pyx_int_5000;
+static PyObject *__pyx_int_86400;
+static PyObject *__pyx_int_100000;
+static PyObject *__pyx_int_neg_1;
+static PyObject *__pyx_int_neg_9223372036854775808;
+static PyObject *__pyx_tuple_;
+static PyObject *__pyx_tuple__2;
+static PyObject *__pyx_tuple__3;
+static PyObject *__pyx_tuple__4;
+static PyObject *__pyx_tuple__5;
+static PyObject *__pyx_tuple__6;
+static PyObject *__pyx_tuple__7;
+static PyObject *__pyx_tuple__8;
+static PyObject *__pyx_slice__74;
+static PyObject *__pyx_slice__98;
+static PyObject *__pyx_tuple__11;
+static PyObject *__pyx_tuple__13;
+static PyObject *__pyx_tuple__14;
+static PyObject *__pyx_tuple__16;
+static PyObject *__pyx_tuple__18;
+static PyObject *__pyx_tuple__20;
+static PyObject *__pyx_tuple__21;
+static PyObject *__pyx_tuple__22;
+static PyObject *__pyx_tuple__23;
+static PyObject *__pyx_tuple__24;
+static PyObject *__pyx_tuple__25;
+static PyObject *__pyx_tuple__26;
+static PyObject *__pyx_tuple__27;
+static PyObject *__pyx_tuple__28;
+static PyObject *__pyx_tuple__29;
+static PyObject *__pyx_tuple__30;
+static PyObject *__pyx_tuple__31;
+static PyObject *__pyx_tuple__33;
+static PyObject *__pyx_tuple__34;
+static PyObject *__pyx_tuple__35;
+static PyObject *__pyx_tuple__36;
+static PyObject *__pyx_tuple__37;
+static PyObject *__pyx_tuple__38;
+static PyObject *__pyx_tuple__39;
+static PyObject *__pyx_tuple__40;
+static PyObject *__pyx_tuple__41;
+static PyObject *__pyx_tuple__42;
+static PyObject *__pyx_tuple__43;
+static PyObject *__pyx_tuple__44;
+static PyObject *__pyx_tuple__45;
+static PyObject *__pyx_tuple__46;
+static PyObject *__pyx_tuple__47;
+static PyObject *__pyx_tuple__48;
+static PyObject *__pyx_tuple__49;
+static PyObject *__pyx_tuple__50;
+static PyObject *__pyx_tuple__51;
+static PyObject *__pyx_tuple__53;
+static PyObject *__pyx_tuple__54;
+static PyObject *__pyx_tuple__55;
+static PyObject *__pyx_tuple__57;
+static PyObject *__pyx_tuple__59;
+static PyObject *__pyx_tuple__60;
+static PyObject *__pyx_tuple__61;
+static PyObject *__pyx_tuple__62;
+static PyObject *__pyx_tuple__64;
+static PyObject *__pyx_tuple__65;
+static PyObject *__pyx_tuple__66;
+static PyObject *__pyx_tuple__67;
+static PyObject *__pyx_tuple__68;
+static PyObject *__pyx_tuple__69;
+static PyObject *__pyx_tuple__70;
+static PyObject *__pyx_tuple__71;
+static PyObject *__pyx_tuple__72;
+static PyObject *__pyx_tuple__73;
+static PyObject *__pyx_tuple__75;
+static PyObject *__pyx_tuple__76;
+static PyObject *__pyx_tuple__77;
+static PyObject *__pyx_tuple__78;
+static PyObject *__pyx_tuple__79;
+static PyObject *__pyx_tuple__80;
+static PyObject *__pyx_tuple__81;
+static PyObject *__pyx_tuple__82;
+static PyObject *__pyx_tuple__83;
+static PyObject *__pyx_tuple__84;
+static PyObject *__pyx_tuple__85;
+static PyObject *__pyx_tuple__86;
+static PyObject *__pyx_tuple__87;
+static PyObject *__pyx_tuple__88;
+static PyObject *__pyx_tuple__90;
+static PyObject *__pyx_tuple__91;
+static PyObject *__pyx_tuple__92;
+static PyObject *__pyx_tuple__93;
+static PyObject *__pyx_tuple__95;
+static PyObject *__pyx_tuple__97;
+static PyObject *__pyx_slice__178;
+static PyObject *__pyx_tuple__106;
+static PyObject *__pyx_tuple__107;
+static PyObject *__pyx_tuple__108;
+static PyObject *__pyx_tuple__109;
+static PyObject *__pyx_tuple__110;
+static PyObject *__pyx_tuple__111;
+static PyObject *__pyx_tuple__112;
+static PyObject *__pyx_tuple__113;
+static PyObject *__pyx_tuple__114;
+static PyObject *__pyx_tuple__115;
+static PyObject *__pyx_tuple__116;
+static PyObject *__pyx_tuple__117;
+static PyObject *__pyx_tuple__118;
+static PyObject *__pyx_tuple__120;
+static PyObject *__pyx_tuple__122;
+static PyObject *__pyx_tuple__124;
+static PyObject *__pyx_tuple__126;
+static PyObject *__pyx_tuple__128;
+static PyObject *__pyx_tuple__130;
+static PyObject *__pyx_tuple__132;
+static PyObject *__pyx_tuple__134;
+static PyObject *__pyx_tuple__136;
+static PyObject *__pyx_tuple__138;
+static PyObject *__pyx_tuple__139;
+static PyObject *__pyx_tuple__141;
+static PyObject *__pyx_tuple__143;
+static PyObject *__pyx_tuple__145;
+static PyObject *__pyx_tuple__147;
+static PyObject *__pyx_tuple__149;
+static PyObject *__pyx_tuple__151;
+static PyObject *__pyx_tuple__153;
+static PyObject *__pyx_tuple__155;
+static PyObject *__pyx_tuple__157;
+static PyObject *__pyx_tuple__159;
+static PyObject *__pyx_tuple__161;
+static PyObject *__pyx_tuple__163;
+static PyObject *__pyx_tuple__165;
+static PyObject *__pyx_tuple__168;
+static PyObject *__pyx_tuple__170;
+static PyObject *__pyx_tuple__172;
+static PyObject *__pyx_tuple__174;
+static PyObject *__pyx_tuple__176;
+static PyObject *__pyx_tuple__177;
+static PyObject *__pyx_tuple__180;
+static PyObject *__pyx_tuple__181;
+static PyObject *__pyx_tuple__182;
+static PyObject *__pyx_tuple__184;
+static PyObject *__pyx_tuple__186;
+static PyObject *__pyx_tuple__188;
+static PyObject *__pyx_tuple__190;
+static PyObject *__pyx_tuple__192;
+static PyObject *__pyx_tuple__194;
+static PyObject *__pyx_tuple__196;
+static PyObject *__pyx_tuple__198;
+static PyObject *__pyx_tuple__200;
+static PyObject *__pyx_tuple__202;
+static PyObject *__pyx_tuple__204;
+static PyObject *__pyx_tuple__205;
+static PyObject *__pyx_tuple__207;
+static PyObject *__pyx_tuple__209;
+static PyObject *__pyx_tuple__211;
+static PyObject *__pyx_tuple__213;
+static PyObject *__pyx_tuple__215;
+static PyObject *__pyx_tuple__217;
+static PyObject *__pyx_tuple__219;
+static PyObject *__pyx_tuple__221;
+static PyObject *__pyx_tuple__223;
+static PyObject *__pyx_tuple__226;
+static PyObject *__pyx_tuple__228;
+static PyObject *__pyx_tuple__230;
+static PyObject *__pyx_tuple__232;
+static PyObject *__pyx_tuple__234;
+static PyObject *__pyx_tuple__236;
+static PyObject *__pyx_tuple__238;
+static PyObject *__pyx_tuple__240;
+static PyObject *__pyx_tuple__242;
+static PyObject *__pyx_tuple__244;
+static PyObject *__pyx_tuple__246;
+static PyObject *__pyx_tuple__248;
+static PyObject *__pyx_tuple__250;
+static PyObject *__pyx_tuple__252;
+static PyObject *__pyx_tuple__254;
+static PyObject *__pyx_tuple__256;
+static PyObject *__pyx_tuple__258;
+static PyObject *__pyx_tuple__260;
+static PyObject *__pyx_tuple__262;
+static PyObject *__pyx_tuple__264;
+static PyObject *__pyx_tuple__266;
+static PyObject *__pyx_tuple__268;
+static PyObject *__pyx_tuple__270;
+static PyObject *__pyx_tuple__272;
+static PyObject *__pyx_tuple__274;
+static PyObject *__pyx_tuple__275;
+static PyObject *__pyx_tuple__277;
+static PyObject *__pyx_tuple__279;
+static PyObject *__pyx_tuple__281;
+static PyObject *__pyx_tuple__283;
+static PyObject *__pyx_tuple__285;
+static PyObject *__pyx_tuple__287;
+static PyObject *__pyx_tuple__289;
+static PyObject *__pyx_tuple__291;
+static PyObject *__pyx_tuple__293;
+static PyObject *__pyx_tuple__295;
+static PyObject *__pyx_tuple__296;
+static PyObject *__pyx_tuple__298;
+static PyObject *__pyx_tuple__300;
+static PyObject *__pyx_tuple__301;
+static PyObject *__pyx_tuple__303;
+static PyObject *__pyx_tuple__305;
+static PyObject *__pyx_tuple__307;
+static PyObject *__pyx_tuple__309;
+static PyObject *__pyx_tuple__311;
+static PyObject *__pyx_tuple__313;
+static PyObject *__pyx_tuple__315;
+static PyObject *__pyx_tuple__317;
+static PyObject *__pyx_tuple__319;
+static PyObject *__pyx_tuple__321;
+static PyObject *__pyx_tuple__323;
+static PyObject *__pyx_tuple__325;
+static PyObject *__pyx_tuple__327;
+static PyObject *__pyx_tuple__329;
+static PyObject *__pyx_tuple__331;
+static PyObject *__pyx_tuple__333;
+static PyObject *__pyx_tuple__335;
+static PyObject *__pyx_tuple__337;
+static PyObject *__pyx_tuple__339;
+static PyObject *__pyx_tuple__341;
+static PyObject *__pyx_tuple__343;
+static PyObject *__pyx_tuple__345;
+static PyObject *__pyx_tuple__347;
+static PyObject *__pyx_tuple__349;
+static PyObject *__pyx_tuple__351;
+static PyObject *__pyx_tuple__353;
+static PyObject *__pyx_tuple__355;
+static PyObject *__pyx_tuple__357;
+static PyObject *__pyx_tuple__359;
+static PyObject *__pyx_tuple__361;
+static PyObject *__pyx_tuple__363;
+static PyObject *__pyx_tuple__365;
+static PyObject *__pyx_tuple__367;
+static PyObject *__pyx_tuple__369;
+static PyObject *__pyx_tuple__371;
+static PyObject *__pyx_tuple__373;
+static PyObject *__pyx_tuple__375;
+static PyObject *__pyx_tuple__376;
+static PyObject *__pyx_tuple__378;
+static PyObject *__pyx_tuple__380;
+static PyObject *__pyx_tuple__382;
+static PyObject *__pyx_tuple__384;
+static PyObject *__pyx_tuple__386;
+static PyObject *__pyx_tuple__388;
+static PyObject *__pyx_tuple__390;
+static PyObject *__pyx_tuple__392;
+static PyObject *__pyx_tuple__394;
+static PyObject *__pyx_tuple__396;
+static PyObject *__pyx_tuple__398;
+static PyObject *__pyx_tuple__400;
+static PyObject *__pyx_tuple__402;
+static PyObject *__pyx_tuple__404;
+static PyObject *__pyx_tuple__405;
+static PyObject *__pyx_tuple__407;
+static PyObject *__pyx_tuple__409;
+static PyObject *__pyx_tuple__411;
+static PyObject *__pyx_tuple__413;
+static PyObject *__pyx_tuple__415;
+static PyObject *__pyx_tuple__417;
+static PyObject *__pyx_tuple__419;
+static PyObject *__pyx_tuple__421;
+static PyObject *__pyx_tuple__423;
+static PyObject *__pyx_tuple__425;
+static PyObject *__pyx_tuple__426;
+static PyObject *__pyx_tuple__428;
+static PyObject *__pyx_tuple__429;
+static PyObject *__pyx_tuple__431;
+static PyObject *__pyx_tuple__433;
+static PyObject *__pyx_tuple__435;
+static PyObject *__pyx_tuple__437;
+static PyObject *__pyx_tuple__439;
+static PyObject *__pyx_tuple__441;
+static PyObject *__pyx_tuple__443;
+static PyObject *__pyx_tuple__445;
+static PyObject *__pyx_tuple__447;
+static PyObject *__pyx_tuple__449;
+static PyObject *__pyx_tuple__451;
+static PyObject *__pyx_tuple__453;
+static PyObject *__pyx_tuple__455;
+static PyObject *__pyx_tuple__456;
+static PyObject *__pyx_tuple__458;
+static PyObject *__pyx_tuple__460;
+static PyObject *__pyx_tuple__462;
+static PyObject *__pyx_tuple__464;
+static PyObject *__pyx_tuple__465;
+static PyObject *__pyx_tuple__467;
+static PyObject *__pyx_tuple__469;
+static PyObject *__pyx_tuple__470;
+static PyObject *__pyx_tuple__472;
+static PyObject *__pyx_tuple__473;
+static PyObject *__pyx_tuple__475;
+static PyObject *__pyx_tuple__476;
+static PyObject *__pyx_tuple__478;
+static PyObject *__pyx_tuple__480;
+static PyObject *__pyx_tuple__482;
+static PyObject *__pyx_tuple__484;
+static PyObject *__pyx_codeobj__56;
+static PyObject *__pyx_codeobj__58;
+static PyObject *__pyx_codeobj__63;
+static PyObject *__pyx_codeobj__89;
+static PyObject *__pyx_codeobj__94;
+static PyObject *__pyx_codeobj__96;
+static PyObject *__pyx_codeobj__121;
+static PyObject *__pyx_codeobj__123;
+static PyObject *__pyx_codeobj__125;
+static PyObject *__pyx_codeobj__127;
+static PyObject *__pyx_codeobj__129;
+static PyObject *__pyx_codeobj__131;
+static PyObject *__pyx_codeobj__133;
+static PyObject *__pyx_codeobj__135;
+static PyObject *__pyx_codeobj__137;
+static PyObject *__pyx_codeobj__140;
+static PyObject *__pyx_codeobj__142;
+static PyObject *__pyx_codeobj__144;
+static PyObject *__pyx_codeobj__146;
+static PyObject *__pyx_codeobj__148;
+static PyObject *__pyx_codeobj__150;
+static PyObject *__pyx_codeobj__152;
+static PyObject *__pyx_codeobj__154;
+static PyObject *__pyx_codeobj__156;
+static PyObject *__pyx_codeobj__158;
+static PyObject *__pyx_codeobj__160;
+static PyObject *__pyx_codeobj__162;
+static PyObject *__pyx_codeobj__164;
+static PyObject *__pyx_codeobj__166;
+static PyObject *__pyx_codeobj__169;
+static PyObject *__pyx_codeobj__171;
+static PyObject *__pyx_codeobj__173;
+static PyObject *__pyx_codeobj__175;
+static PyObject *__pyx_codeobj__183;
+static PyObject *__pyx_codeobj__185;
+static PyObject *__pyx_codeobj__187;
+static PyObject *__pyx_codeobj__189;
+static PyObject *__pyx_codeobj__191;
+static PyObject *__pyx_codeobj__193;
+static PyObject *__pyx_codeobj__195;
+static PyObject *__pyx_codeobj__197;
+static PyObject *__pyx_codeobj__199;
+static PyObject *__pyx_codeobj__201;
+static PyObject *__pyx_codeobj__203;
+static PyObject *__pyx_codeobj__206;
+static PyObject *__pyx_codeobj__208;
+static PyObject *__pyx_codeobj__210;
+static PyObject *__pyx_codeobj__212;
+static PyObject *__pyx_codeobj__214;
+static PyObject *__pyx_codeobj__216;
+static PyObject *__pyx_codeobj__218;
+static PyObject *__pyx_codeobj__220;
+static PyObject *__pyx_codeobj__222;
+static PyObject *__pyx_codeobj__224;
+static PyObject *__pyx_codeobj__225;
+static PyObject *__pyx_codeobj__227;
+static PyObject *__pyx_codeobj__229;
+static PyObject *__pyx_codeobj__231;
+static PyObject *__pyx_codeobj__233;
+static PyObject *__pyx_codeobj__235;
+static PyObject *__pyx_codeobj__237;
+static PyObject *__pyx_codeobj__239;
+static PyObject *__pyx_codeobj__241;
+static PyObject *__pyx_codeobj__243;
+static PyObject *__pyx_codeobj__245;
+static PyObject *__pyx_codeobj__247;
+static PyObject *__pyx_codeobj__249;
+static PyObject *__pyx_codeobj__251;
+static PyObject *__pyx_codeobj__253;
+static PyObject *__pyx_codeobj__255;
+static PyObject *__pyx_codeobj__257;
+static PyObject *__pyx_codeobj__259;
+static PyObject *__pyx_codeobj__261;
+static PyObject *__pyx_codeobj__263;
+static PyObject *__pyx_codeobj__265;
+static PyObject *__pyx_codeobj__267;
+static PyObject *__pyx_codeobj__269;
+static PyObject *__pyx_codeobj__271;
+static PyObject *__pyx_codeobj__273;
+static PyObject *__pyx_codeobj__276;
+static PyObject *__pyx_codeobj__278;
+static PyObject *__pyx_codeobj__280;
+static PyObject *__pyx_codeobj__282;
+static PyObject *__pyx_codeobj__284;
+static PyObject *__pyx_codeobj__286;
+static PyObject *__pyx_codeobj__288;
+static PyObject *__pyx_codeobj__290;
+static PyObject *__pyx_codeobj__292;
+static PyObject *__pyx_codeobj__294;
+static PyObject *__pyx_codeobj__297;
+static PyObject *__pyx_codeobj__299;
+static PyObject *__pyx_codeobj__302;
+static PyObject *__pyx_codeobj__304;
+static PyObject *__pyx_codeobj__306;
+static PyObject *__pyx_codeobj__308;
+static PyObject *__pyx_codeobj__310;
+static PyObject *__pyx_codeobj__312;
+static PyObject *__pyx_codeobj__314;
+static PyObject *__pyx_codeobj__316;
+static PyObject *__pyx_codeobj__318;
+static PyObject *__pyx_codeobj__320;
+static PyObject *__pyx_codeobj__322;
+static PyObject *__pyx_codeobj__324;
+static PyObject *__pyx_codeobj__326;
+static PyObject *__pyx_codeobj__328;
+static PyObject *__pyx_codeobj__330;
+static PyObject *__pyx_codeobj__332;
+static PyObject *__pyx_codeobj__334;
+static PyObject *__pyx_codeobj__336;
+static PyObject *__pyx_codeobj__338;
+static PyObject *__pyx_codeobj__340;
+static PyObject *__pyx_codeobj__342;
+static PyObject *__pyx_codeobj__344;
+static PyObject *__pyx_codeobj__346;
+static PyObject *__pyx_codeobj__348;
+static PyObject *__pyx_codeobj__350;
+static PyObject *__pyx_codeobj__352;
+static PyObject *__pyx_codeobj__354;
+static PyObject *__pyx_codeobj__356;
+static PyObject *__pyx_codeobj__358;
+static PyObject *__pyx_codeobj__360;
+static PyObject *__pyx_codeobj__362;
+static PyObject *__pyx_codeobj__364;
+static PyObject *__pyx_codeobj__366;
+static PyObject *__pyx_codeobj__368;
+static PyObject *__pyx_codeobj__370;
+static PyObject *__pyx_codeobj__372;
+static PyObject *__pyx_codeobj__374;
+static PyObject *__pyx_codeobj__377;
+static PyObject *__pyx_codeobj__379;
+static PyObject *__pyx_codeobj__381;
+static PyObject *__pyx_codeobj__383;
+static PyObject *__pyx_codeobj__385;
+static PyObject *__pyx_codeobj__387;
+static PyObject *__pyx_codeobj__389;
+static PyObject *__pyx_codeobj__391;
+static PyObject *__pyx_codeobj__393;
+static PyObject *__pyx_codeobj__395;
+static PyObject *__pyx_codeobj__397;
+static PyObject *__pyx_codeobj__399;
+static PyObject *__pyx_codeobj__401;
+static PyObject *__pyx_codeobj__403;
+static PyObject *__pyx_codeobj__406;
+static PyObject *__pyx_codeobj__408;
+static PyObject *__pyx_codeobj__410;
+static PyObject *__pyx_codeobj__412;
+static PyObject *__pyx_codeobj__414;
+static PyObject *__pyx_codeobj__416;
+static PyObject *__pyx_codeobj__418;
+static PyObject *__pyx_codeobj__420;
+static PyObject *__pyx_codeobj__422;
+static PyObject *__pyx_codeobj__424;
+static PyObject *__pyx_codeobj__427;
+static PyObject *__pyx_codeobj__430;
+static PyObject *__pyx_codeobj__432;
+static PyObject *__pyx_codeobj__434;
+static PyObject *__pyx_codeobj__436;
+static PyObject *__pyx_codeobj__438;
+static PyObject *__pyx_codeobj__440;
+static PyObject *__pyx_codeobj__442;
+static PyObject *__pyx_codeobj__444;
+static PyObject *__pyx_codeobj__446;
+static PyObject *__pyx_codeobj__448;
+static PyObject *__pyx_codeobj__450;
+static PyObject *__pyx_codeobj__452;
+static PyObject *__pyx_codeobj__454;
+static PyObject *__pyx_codeobj__457;
+static PyObject *__pyx_codeobj__459;
+static PyObject *__pyx_codeobj__461;
+static PyObject *__pyx_codeobj__463;
+static PyObject *__pyx_codeobj__466;
+static PyObject *__pyx_codeobj__468;
+static PyObject *__pyx_codeobj__471;
+static PyObject *__pyx_codeobj__474;
+static PyObject *__pyx_codeobj__477;
+static PyObject *__pyx_codeobj__479;
+static PyObject *__pyx_codeobj__481;
+static PyObject *__pyx_codeobj__483;
+static PyObject *__pyx_codeobj__485;
+
+/* "cqlshlib/copyutil.py":65
+ *
+ *
+ * def safe_normpath(fname): # <<<<<<<<<<<<<<
+ * """
+ * :return the normalized path but only if there is a filename, we don't want to convert
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_1safe_normpath(PyObject *__pyx_self, PyObject *__pyx_v_fname); /*proto*/
+static char __pyx_doc_8cqlshlib_8copyutil_safe_normpath[] = "\n :return the normalized path but only if there is a filename, we don't want to convert\n an empty string (which means no file name) to a dot. Also expand any user variables such as ~ to the full path\n ";
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_1safe_normpath = {"safe_normpath", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_1safe_normpath, METH_O, __pyx_doc_8cqlshlib_8copyutil_safe_normpath};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_1safe_normpath(PyObject *__pyx_self, PyObject *__pyx_v_fname) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("safe_normpath (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_safe_normpath(__pyx_self, ((PyObject *)__pyx_v_fname));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_safe_normpath(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fname) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("safe_normpath", 0);
+ __Pyx_TraceCall("safe_normpath", __pyx_f[0], 65);
+
+ /* "cqlshlib/copyutil.py":70
+ * an empty string (which means no file name) to a dot. Also expand any user variables such as ~ to the full path
+ * """
+ * return os.path.normpath(os.path.expanduser(fname)) if fname else fname # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_fname); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__pyx_t_2) {
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_normpath); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_path); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_expanduser); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_fname); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ } else {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_INCREF(__pyx_v_fname);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_fname);
+ __Pyx_GIVEREF(__pyx_v_fname);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_1 = __pyx_t_3;
+ __pyx_t_3 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_v_fname);
+ __pyx_t_1 = __pyx_v_fname;
+ }
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "cqlshlib/copyutil.py":65
+ *
+ *
+ * def safe_normpath(fname): # <<<<<<<<<<<<<<
+ * """
+ * :return the normalized path but only if there is a filename, we don't want to convert
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("cqlshlib.copyutil.safe_normpath", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":77
+ * A one way pipe protected by two process level locks, one for reading and one for writing.
+ * """
+ * def __init__(self): # <<<<<<<<<<<<<<
+ * self.reader, self.writer = mp.Pipe(duplex=False)
+ * self.rlock = mp.Lock()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_13OneWayChannel_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_13OneWayChannel_1__init__ = {"__init__", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_13OneWayChannel_1__init__, METH_O, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_13OneWayChannel_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_13OneWayChannel___init__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13OneWayChannel___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__init__", 0);
+ __Pyx_TraceCall("__init__", __pyx_f[0], 77);
+
+ /* "cqlshlib/copyutil.py":78
+ * """
+ * def __init__(self):
+ * self.reader, self.writer = mp.Pipe(duplex=False) # <<<<<<<<<<<<<<
+ * self.rlock = mp.Lock()
+ * self.wlock = mp.Lock()
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_mp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Pipe); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_duplex, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
+ PyObject* sequence = __pyx_t_3;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ #if CYTHON_COMPILING_IN_CPYTHON
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ #else
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
+ index = 0; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = NULL;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L4_unpacking_done;
+ __pyx_L3_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_L4_unpacking_done:;
+ }
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_reader, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_writer, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":79
+ * def __init__(self):
+ * self.reader, self.writer = mp.Pipe(duplex=False)
+ * self.rlock = mp.Lock() # <<<<<<<<<<<<<<
+ * self.wlock = mp.Lock()
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_mp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Lock); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rlock, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "cqlshlib/copyutil.py":80
+ * self.reader, self.writer = mp.Pipe(duplex=False)
+ * self.rlock = mp.Lock()
+ * self.wlock = mp.Lock() # <<<<<<<<<<<<<<
+ *
+ * def send(self, obj):
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_mp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Lock); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_1) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wlock, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "cqlshlib/copyutil.py":77
+ * A one way pipe protected by two process level locks, one for reading and one for writing.
+ * """
+ * def __init__(self): # <<<<<<<<<<<<<<
+ * self.reader, self.writer = mp.Pipe(duplex=False)
+ * self.rlock = mp.Lock()
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("cqlshlib.copyutil.OneWayChannel.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":82
+ * self.wlock = mp.Lock()
+ *
+ * def send(self, obj): # <<<<<<<<<<<<<<
+ * with self.wlock:
+ * self.writer.send(obj)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_13OneWayChannel_3send(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_13OneWayChannel_3send = {"send", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_13OneWayChannel_3send, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_13OneWayChannel_3send(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_obj = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("send (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_obj,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("send", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "send") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_obj = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("send", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("cqlshlib.copyutil.OneWayChannel.send", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_13OneWayChannel_2send(__pyx_self, __pyx_v_self, __pyx_v_obj);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13OneWayChannel_2send(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_obj) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_t_10;
+ int __pyx_t_11;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("send", 0);
+ __Pyx_TraceCall("send", __pyx_f[0], 82);
+
+ /* "cqlshlib/copyutil.py":83
+ *
+ * def send(self, obj):
+ * with self.wlock: # <<<<<<<<<<<<<<
+ * self.writer.send(obj)
+ *
+ */
+ /*with:*/ {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wlock); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ /*try:*/ {
+ {
+ __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_8);
+ /*try:*/ {
+
+ /* "cqlshlib/copyutil.py":84
+ * def send(self, obj):
+ * with self.wlock:
+ * self.writer.send(obj) # <<<<<<<<<<<<<<
+ *
+ * def recv(self):
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_writer); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_send); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_obj); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_obj);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_obj);
+ __Pyx_GIVEREF(__pyx_v_obj);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ goto __pyx_L14_try_end;
+ __pyx_L7_error:;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":83
+ *
+ * def send(self, obj):
+ * with self.wlock: # <<<<<<<<<<<<<<
+ * self.writer.send(obj)
+ *
+ */
+ /*except:*/ {
+ __Pyx_AddTraceback("cqlshlib.copyutil.OneWayChannel.send", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_3 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ if (__pyx_t_10 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
+ __pyx_t_11 = ((!(__pyx_t_10 != 0)) != 0);
+ if (__pyx_t_11) {
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_ErrRestore(__pyx_t_1, __pyx_t_4, __pyx_t_5);
+ __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0;
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ goto __pyx_L8_exception_handled;
+ }
+ __pyx_L9_except_error:;
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
+ goto __pyx_L1_error;
+ __pyx_L8_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
+ __pyx_L14_try_end:;
+ }
+ }
+ /*finally:*/ {
+ /*normal exit:*/{
+ if (__pyx_t_2) {
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple_, NULL);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+ }
+ goto __pyx_L18;
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L1_error;
+ __pyx_L18:;
+ }
+
+ /* "cqlshlib/copyutil.py":82
+ * self.wlock = mp.Lock()
+ *
+ * def send(self, obj): # <<<<<<<<<<<<<<
+ * with self.wlock:
+ * self.writer.send(obj)
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("cqlshlib.copyutil.OneWayChannel.send", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":86
+ * self.writer.send(obj)
+ *
+ * def recv(self): # <<<<<<<<<<<<<<
+ * with self.rlock:
+ * return self.reader.recv()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_13OneWayChannel_5recv(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_13OneWayChannel_5recv = {"recv", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_13OneWayChannel_5recv, METH_O, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_13OneWayChannel_5recv(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("recv (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_13OneWayChannel_4recv(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13OneWayChannel_4recv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_t_10;
+ int __pyx_t_11;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("recv", 0);
+ __Pyx_TraceCall("recv", __pyx_f[0], 86);
+
+ /* "cqlshlib/copyutil.py":87
+ *
+ * def recv(self):
+ * with self.rlock: # <<<<<<<<<<<<<<
+ * return self.reader.recv()
+ *
+ */
+ /*with:*/ {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rlock); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ /*try:*/ {
+ {
+ __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_8);
+ /*try:*/ {
+
+ /* "cqlshlib/copyutil.py":88
+ * def recv(self):
+ * with self.rlock:
+ * return self.reader.recv() # <<<<<<<<<<<<<<
+ *
+ * def close(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_recv); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L11_try_return;
+ }
+ __pyx_L7_error:;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":87
+ *
+ * def recv(self):
+ * with self.rlock: # <<<<<<<<<<<<<<
+ * return self.reader.recv()
+ *
+ */
+ /*except:*/ {
+ __Pyx_AddTraceback("cqlshlib.copyutil.OneWayChannel.recv", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ if (__pyx_t_10 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
+ __pyx_t_11 = ((!(__pyx_t_10 != 0)) != 0);
+ if (__pyx_t_11) {
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ErrRestore(__pyx_t_1, __pyx_t_4, __pyx_t_3);
+ __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0;
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L8_exception_handled;
+ }
+ __pyx_L9_except_error:;
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
+ goto __pyx_L1_error;
+ __pyx_L11_try_return:;
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
+ goto __pyx_L4_return;
+ __pyx_L8_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
+ }
+ }
+ /*finally:*/ {
+ /*normal exit:*/{
+ if (__pyx_t_2) {
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__2, NULL);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ goto __pyx_L6;
+ }
+ __pyx_L4_return: {
+ __pyx_t_8 = __pyx_r;
+ __pyx_r = 0;
+ if (__pyx_t_2) {
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__3, NULL);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __pyx_r = __pyx_t_8;
+ __pyx_t_8 = 0;
+ goto __pyx_L0;
+ }
+ __pyx_L6:;
+ }
+ goto __pyx_L18;
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L1_error;
+ __pyx_L18:;
+ }
+
+ /* "cqlshlib/copyutil.py":86
+ * self.writer.send(obj)
+ *
+ * def recv(self): # <<<<<<<<<<<<<<
+ * with self.rlock:
+ * return self.reader.recv()
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("cqlshlib.copyutil.OneWayChannel.recv", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":90
+ * return self.reader.recv()
+ *
+ * def close(self): # <<<<<<<<<<<<<<
+ * self.reader.close()
+ * self.writer.close()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_13OneWayChannel_7close(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_13OneWayChannel_7close = {"close", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_13OneWayChannel_7close, METH_O, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_13OneWayChannel_7close(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("close (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_13OneWayChannel_6close(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_13OneWayChannel_6close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("close", 0);
+ __Pyx_TraceCall("close", __pyx_f[0], 90);
+
+ /* "cqlshlib/copyutil.py":91
+ *
+ * def close(self):
+ * self.reader.close() # <<<<<<<<<<<<<<
+ * self.writer.close()
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":92
+ * def close(self):
+ * self.reader.close()
+ * self.writer.close() # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_writer); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":90
+ * return self.reader.recv()
+ *
+ * def close(self): # <<<<<<<<<<<<<<
+ * self.reader.close()
+ * self.writer.close()
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("cqlshlib.copyutil.OneWayChannel.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":99
+ * A group of one way channels.
+ * """
+ * def __init__(self, num_channels): # <<<<<<<<<<<<<<
+ * self.channels = [OneWayChannel() for _ in xrange(num_channels)]
+ * self._readers = [ch.reader for ch in self.channels]
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_14OneWayChannels_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_14OneWayChannels_1__init__ = {"__init__", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_14OneWayChannels_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_14OneWayChannels_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_num_channels = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_num_channels,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_num_channels)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_num_channels = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("cqlshlib.copyutil.OneWayChannels.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_14OneWayChannels___init__(__pyx_self, __pyx_v_self, __pyx_v_num_channels);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_14OneWayChannels___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_channels) {
+ CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
+ PyObject *__pyx_v_ch = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__init__", 0);
+ __Pyx_TraceCall("__init__", __pyx_f[0], 99);
+
+ /* "cqlshlib/copyutil.py":100
+ * """
+ * def __init__(self, num_channels):
+ * self.channels = [OneWayChannel() for _ in xrange(num_channels)] # <<<<<<<<<<<<<<
+ * self._readers = [ch.reader for ch in self.channels]
+ * self._rlocks = [ch.rlock for ch in self.channels]
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_num_channels);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_num_channels);
+ __Pyx_GIVEREF(__pyx_v_num_channels);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_xrange, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_5(__pyx_t_2);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_OneWayChannel); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_7) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_channels, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":101
+ * def __init__(self, num_channels):
+ * self.channels = [OneWayChannel() for _ in xrange(num_channels)]
+ * self._readers = [ch.reader for ch in self.channels] # <<<<<<<<<<<<<<
+ * self._rlocks = [ch.rlock for ch in self.channels]
+ * self._rlocks_by_readers = dict([(ch.reader, ch.rlock) for ch in self.channels])
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_channels); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ }
+ } else {
+ __pyx_t_2 = __pyx_t_5(__pyx_t_3);
+ if (unlikely(!__pyx_t_2)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_ch, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ch, __pyx_n_s_reader); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_readers, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":102
+ * self.channels = [OneWayChannel() for _ in xrange(num_channels)]
+ * self._readers = [ch.reader for ch in self.channels]
+ * self._rlocks = [ch.rlock for ch in self.channels] # <<<<<<<<<<<<<<
+ * self._rlocks_by_readers = dict([(ch.reader, ch.rlock) for ch in self.channels])
+ * self.num_channels = num_channels
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_channels); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_5(__pyx_t_2);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_ch, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ch, __pyx_n_s_rlock); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rlocks, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":103
+ * self._readers = [ch.reader for ch in self.channels]
+ * self._rlocks = [ch.rlock for ch in self.channels]
+ * self._rlocks_by_readers = dict([(ch.reader, ch.rlock) for ch in self.channels]) # <<<<<<<<<<<<<<
+ * self.num_channels = num_channels
+ *
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_channels); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ }
+ } else {
+ __pyx_t_2 = __pyx_t_5(__pyx_t_3);
+ if (unlikely(!__pyx_t_2)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_ch, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ch, __pyx_n_s_reader); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ch, __pyx_n_s_rlock); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_6);
+ __pyx_t_2 = 0;
+ __pyx_t_6 = 0;
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rlocks_by_readers, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":104
+ * self._rlocks = [ch.rlock for ch in self.channels]
+ * self._rlocks_by_readers = dict([(ch.reader, ch.rlock) for ch in self.channels])
+ * self.num_channels = num_channels # <<<<<<<<<<<<<<
+ *
+ * self.recv = self.recv_select if IS_LINUX else self.recv_polling
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_num_channels, __pyx_v_num_channels) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "cqlshlib/copyutil.py":106
+ * self.num_channels = num_channels
+ *
+ * self.recv = self.recv_select if IS_LINUX else self.recv_polling # <<<<<<<<<<<<<<
+ *
+ * def recv_select(self, timeout):
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_IS_LINUX); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_8) {
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recv_select); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __pyx_t_3;
+ __pyx_t_3 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recv_polling); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __pyx_t_3;
+ __pyx_t_3 = 0;
+ }
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_recv, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":99
+ * A group of one way channels.
+ * """
+ * def __init__(self, num_channels): # <<<<<<<<<<<<<<
+ * self.channels = [OneWayChannel() for _ in xrange(num_channels)]
+ * self._readers = [ch.reader for ch in self.channels]
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("cqlshlib.copyutil.OneWayChannels.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v__);
+ __Pyx_XDECREF(__pyx_v_ch);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_8cqlshlib_8copyutil_14OneWayChannels_4generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+
+/* "cqlshlib/copyutil.py":108
+ * self.recv = self.recv_select if IS_LINUX else self.recv_polling
+ *
+ * def recv_select(self, timeout): # <<<<<<<<<<<<<<
+ * """
+ * Implementation of the recv method for Linux, where select is available. Receive an object from
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_14OneWayChannels_3recv_select(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_8cqlshlib_8copyutil_14OneWayChannels_2recv_select[] = "\n Implementation of the recv method for Linux, where select is available. Receive an object from\n all pipes that are ready for reading without blocking.\n ";
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_14OneWayChannels_3recv_select = {"recv_select", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_14OneWayChannels_3recv_select, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8cqlshlib_8copyutil_14OneWayChannels_2recv_select};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_14OneWayChannels_3recv_select(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_timeout = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("recv_select (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_timeout,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("recv_select", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "recv_select") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_timeout = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("recv_select", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("cqlshlib.copyutil.OneWayChannels.recv_select", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_14OneWayChannels_2recv_select(__pyx_self, __pyx_v_self, __pyx_v_timeout);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_14OneWayChannels_2recv_select(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_timeout) {
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct__recv_select *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("recv_select", 0);
+ __pyx_cur_scope = (struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct__recv_select *)__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct__recv_select(__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct__recv_select, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_cur_scope);
+ __Pyx_TraceCall("recv_select", __pyx_f[0], 108);
+ __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
+ __pyx_cur_scope->__pyx_v_timeout = __pyx_v_timeout;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_timeout);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_timeout);
+ {
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_8cqlshlib_8copyutil_14OneWayChannels_4generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_recv_select, __pyx_n_s_OneWayChannels_recv_select); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("cqlshlib.copyutil.OneWayChannels.recv_select", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_8cqlshlib_8copyutil_14OneWayChannels_4generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct__recv_select *__pyx_cur_scope = ((struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct__recv_select *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ Py_ssize_t __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *(*__pyx_t_9)(PyObject *);
+ PyObject *(*__pyx_t_10)(PyObject *);
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
+ PyObject *__pyx_t_17 = NULL;
+ int __pyx_t_18;
+ int __pyx_t_19;
+ int __pyx_t_20;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("None", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L30_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "cqlshlib/copyutil.py":113
+ * all pipes that are ready for reading without blocking.
+ * """
+ * readable, _, _ = select(self._readers, [], [], timeout) # <<<<<<<<<<<<<<
+ * for r in readable:
+ * with self._rlocks_by_readers[r]:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_select); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_readers); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ __pyx_t_8 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_6) {
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+ }
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_timeout);
+ PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_cur_scope->__pyx_v_timeout);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_timeout);
+ __pyx_t_3 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+ PyObject* sequence = __pyx_t_1;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 3)) {
+ if (size > 3) __Pyx_RaiseTooManyValuesError(3);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ #if CYTHON_COMPILING_IN_CPYTHON
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2);
+ } else {
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_8 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 2);
+ }
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_5);
+ #else
+ __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext;
+ index = 0; __pyx_t_2 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ index = 1; __pyx_t_8 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_8)) goto __pyx_L4_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_8);
+ index = 2; __pyx_t_5 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = NULL;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L5_unpacking_done;
+ __pyx_L4_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_9 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_L5_unpacking_done:;
+ }
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_cur_scope->__pyx_v_readable = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_8);
+ __pyx_cur_scope->__pyx_v__ = __pyx_t_8;
+ __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_cur_scope->__pyx_v__);
+ __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v__, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_5 = 0;
+
+ /* "cqlshlib/copyutil.py":114
+ * """
+ * readable, _, _ = select(self._readers, [], [], timeout)
+ * for r in readable: # <<<<<<<<<<<<<<
+ * with self._rlocks_by_readers[r]:
+ * try:
+ */
+ if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_readable)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_readable)) {
+ __pyx_t_1 = __pyx_cur_scope->__pyx_v_readable; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
+ __pyx_t_10 = NULL;
+ } else {
+ __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_readable); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ for (;;) {
+ if (likely(!__pyx_t_10)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ } else {
+ if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ }
+ } else {
+ __pyx_t_5 = __pyx_t_10(__pyx_t_1);
+ if (unlikely(!__pyx_t_5)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_r);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_r, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_5 = 0;
+
+ /* "cqlshlib/copyutil.py":115
+ * readable, _, _ = select(self._readers, [], [], timeout)
+ * for r in readable:
+ * with self._rlocks_by_readers[r]: # <<<<<<<<<<<<<<
+ * try:
+ * yield r.recv()
+ */
+ /*with:*/ {
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_rlocks_by_readers); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_8 = PyObject_GetItem(__pyx_t_5, __pyx_cur_scope->__pyx_v_r); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_11 = __Pyx_PyObject_LookupSpecial(__pyx_t_8, __pyx_n_s_exit); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_8, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ /*try:*/ {
+ {
+ __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
+ __Pyx_XGOTREF(__pyx_t_12);
+ __Pyx_XGOTREF(__pyx_t_13);
+ __Pyx_XGOTREF(__pyx_t_14);
+ /*try:*/ {
+
+ /* "cqlshlib/copyutil.py":116
+ * for r in readable:
+ * with self._rlocks_by_readers[r]:
+ * try: # <<<<<<<<<<<<<<
+ * yield r.recv()
+ * except EOFError:
+ */
+ {
+ __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
+ __Pyx_XGOTREF(__pyx_t_15);
+ __Pyx_XGOTREF(__pyx_t_16);
+ __Pyx_XGOTREF(__pyx_t_17);
+ /*try:*/ {
+
+ /* "cqlshlib/copyutil.py":117
+ * with self._rlocks_by_readers[r]:
+ * try:
+ * yield r.recv() # <<<<<<<<<<<<<<
+ * except EOFError:
+ * continue
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_r, __pyx_n_s_recv); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_r = __pyx_t_8;
+ __pyx_t_8 = 0;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_7;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_10;
+ __Pyx_XGIVEREF(__pyx_t_11);
+ __pyx_cur_scope->__pyx_t_3 = __pyx_t_11;
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __pyx_cur_scope->__pyx_t_4 = __pyx_t_12;
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __pyx_cur_scope->__pyx_t_5 = __pyx_t_13;
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __pyx_cur_scope->__pyx_t_6 = __pyx_t_14;
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __pyx_cur_scope->__pyx_t_7 = __pyx_t_15;
+ __Pyx_XGIVEREF(__pyx_t_16);
+ __pyx_cur_scope->__pyx_t_8 = __pyx_t_16;
+ __Pyx_XGIVEREF(__pyx_t_17);
+ __pyx_cur_scope->__pyx_t_9 = __pyx_t_17;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L30_resume_from_yield:;
+ __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_1);
+ __pyx_t_7 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_10 = __pyx_cur_scope->__pyx_t_2;
+ __pyx_t_11 = __pyx_cur_scope->__pyx_t_3;
+ __pyx_cur_scope->__pyx_t_3 = 0;
+ __Pyx_XGOTREF(__pyx_t_11);
+ __pyx_t_12 = __pyx_cur_scope->__pyx_t_4;
+ __pyx_cur_scope->__pyx_t_4 = 0;
+ __Pyx_XGOTREF(__pyx_t_12);
+ __pyx_t_13 = __pyx_cur_scope->__pyx_t_5;
+ __pyx_cur_scope->__pyx_t_5 = 0;
+ __Pyx_XGOTREF(__pyx_t_13);
+ __pyx_t_14 = __pyx_cur_scope->__pyx_t_6;
+ __pyx_cur_scope->__pyx_t_6 = 0;
+ __Pyx_XGOTREF(__pyx_t_14);
+ __pyx_t_15 = __pyx_cur_scope->__pyx_t_7;
+ __pyx_cur_scope->__pyx_t_7 = 0;
+ __Pyx_XGOTREF(__pyx_t_15);
+ __pyx_t_16 = __pyx_cur_scope->__pyx_t_8;
+ __pyx_cur_scope->__pyx_t_8 = 0;
+ __Pyx_XGOTREF(__pyx_t_16);
+ __pyx_t_17 = __pyx_cur_scope->__pyx_t_9;
+ __pyx_cur_scope->__pyx_t_9 = 0;
+ __Pyx_XGOTREF(__pyx_t_17);
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
+ }
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+ goto __pyx_L29_try_end;
+ __pyx_L22_error:;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+ /* "cqlshlib/copyutil.py":118
+ * try:
+ * yield r.recv()
+ * except EOFError: # <<<<<<<<<<<<<<
+ * continue
+ *
+ */
+ __pyx_t_18 = PyErr_ExceptionMatches(__pyx_builtin_EOFError);
+ if (__pyx_t_18) {
+ __Pyx_AddTraceback("cqlshlib.copyutil.OneWayChannels.recv_select", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_5, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_2);
+
+ /* "cqlshlib/copyutil.py":119
+ * yield r.recv()
+ * except EOFError:
+ * continue # <<<<<<<<<<<<<<
+ *
+ * def recv_polling(self, timeout):
+ */
+ goto __pyx_L32_except_continue;
+ __pyx_L32_except_continue:;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L28_try_continue;
+ }
+ goto __pyx_L24_except_error;
+ __pyx_L24_except_error:;
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __Pyx_XGIVEREF(__pyx_t_16);
+ __Pyx_XGIVEREF(__pyx_t_17);
+ __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
+ goto __pyx_L14_error;
+ __pyx_L28_try_continue:;
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __Pyx_XGIVEREF(__pyx_t_16);
+ __Pyx_XGIVEREF(__pyx_t_17);
+ __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
+ goto __pyx_L20_try_continue;
+ __pyx_L29_try_end:;
+ }
+ }
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ goto __pyx_L21_try_end;
+ __pyx_L14_error:;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":115
+ * readable, _, _ = select(self._readers, [], [], timeout)
+ * for r in readable:
+ * with self._rlocks_by_readers[r]: # <<<<<<<<<<<<<<
+ * try:
+ * yield r.recv()
+ */
+ /*except:*/ {
+ __Pyx_AddTraceback("cqlshlib.copyutil.OneWayChannels.recv_select", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_4 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_4, NULL);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_17);
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ if (__pyx_t_19 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
+ __pyx_t_20 = ((!(__pyx_t_19 != 0)) != 0);
+ if (__pyx_t_20) {
+ __Pyx_GIVEREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_ErrRestore(__pyx_t_2, __pyx_t_5, __pyx_t_8);
+ __pyx_t_2 = 0; __pyx_t_5 = 0; __pyx_t_8 = 0;
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ goto __pyx_L15_exception_handled;
+ }
+ __pyx_L16_except_error:;
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
+ goto __pyx_L1_error;
+ __pyx_L20_try_continue:;
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
+ goto __pyx_L9_continue;
+ __pyx_L15_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
+ __pyx_L21_try_end:;
+ }
+ }
+ /*finally:*/ {
+ /*normal exit:*/{
+ if (__pyx_t_11) {
+ __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__4, NULL);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ }
+ goto __pyx_L13;
+ }
+ __pyx_L9_continue: {
+ if (__pyx_t_11) {
+ __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__5, NULL);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ }
+ goto __pyx_L6_continue;
+ }
+ __pyx_L13:;
+ }
+ goto __pyx_L36;
+ __pyx_L8_error:;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ goto __pyx_L1_error;
+ __pyx_L36:;
+ }
+
+ /* "cqlshlib/copyutil.py":114
+ * """
+ * readable, _, _ = select(self._readers, [], [], timeout)
+ * for r in readable: # <<<<<<<<<<<<<<
+ * with self._rlocks_by_readers[r]:
+ * try:
+ */
+ __pyx_L6_continue:;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":108
+ * self.recv = self.recv_select if IS_LINUX else self.recv_polling
+ *
+ * def recv_select(self, timeout): # <<<<<<<<<<<<<<
+ * """
+ * Implementation of the recv method for Linux, where select is available. Receive an object from
+ */
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("recv_select", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Generator_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+}
+static PyObject *__pyx_gb_8cqlshlib_8copyutil_14OneWayChannels_7generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+
+/* "cqlshlib/copyutil.py":121
+ * continue
+ *
+ * def recv_polling(self, timeout): # <<<<<<<<<<<<<<
+ * """
+ * Implementation of the recv method for platforms where select() is not available for pipes.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_14OneWayChannels_6recv_polling(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_8cqlshlib_8copyutil_14OneWayChannels_5recv_polling[] = "\n Implementation of the recv method for platforms where select() is not available for pipes.\n We poll on all of the readers with a very small timeout. We stop when the timeout specified\n has been received but we may exceed it since we check all processes during each sweep.\n ";
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_14OneWayChannels_6recv_polling = {"recv_polling", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_14OneWayChannels_6recv_polling, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8cqlshlib_8copyutil_14OneWayChannels_5recv_polling};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_14OneWayChannels_6recv_polling(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_timeout = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("recv_polling (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_timeout,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("recv_polling", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "recv_polling") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_timeout = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("recv_polling", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("cqlshlib.copyutil.OneWayChannels.recv_polling", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_14OneWayChannels_5recv_polling(__pyx_self, __pyx_v_self, __pyx_v_timeout);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_14OneWayChannels_5recv_polling(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_timeout) {
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_1_recv_polling *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("recv_polling", 0);
+ __pyx_cur_scope = (struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_1_recv_polling *)__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_1_recv_polling(__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_1_recv_polling, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_cur_scope);
+ __Pyx_TraceCall("recv_polling", __pyx_f[0], 121);
+ __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
+ __pyx_cur_scope->__pyx_v_timeout = __pyx_v_timeout;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_timeout);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_timeout);
+ {
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_8cqlshlib_8copyutil_14OneWayChannels_7generator1, (PyObject *) __pyx_cur_scope, __pyx_n_s_recv_polling, __pyx_n_s_OneWayChannels_recv_polling); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("cqlshlib.copyutil.OneWayChannels.recv_polling", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_8cqlshlib_8copyutil_14OneWayChannels_7generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_1_recv_polling *__pyx_cur_scope = ((struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_1_recv_polling *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ int __pyx_t_13;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
+ int __pyx_t_17;
+ int __pyx_t_18;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("None", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L31_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "cqlshlib/copyutil.py":127
+ * has been received but we may exceed it since we check all processes during each sweep.
+ * """
+ * start = time.time() # <<<<<<<<<<<<<<
+ * while True:
+ * for i, r in enumerate(self._readers):
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_v_start = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":128
+ * """
+ * start = time.time()
+ * while True: # <<<<<<<<<<<<<<
+ * for i, r in enumerate(self._readers):
+ * with self._rlocks[i]:
+ */
+ while (1) {
+
+ /* "cqlshlib/copyutil.py":129
+ * start = time.time()
+ * while True:
+ * for i, r in enumerate(self._readers): # <<<<<<<<<<<<<<
+ * with self._rlocks[i]:
+ * if r.poll(0.000000001):
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_t_1 = __pyx_int_0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_readers); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_5(__pyx_t_2);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_r);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_r, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_3 = 0;
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1);
+ __pyx_t_1 = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "cqlshlib/copyutil.py":130
+ * while True:
+ * for i, r in enumerate(self._readers):
+ * with self._rlocks[i]: # <<<<<<<<<<<<<<
+ * if r.poll(0.000000001):
+ * try:
+ */
+ /*with:*/ {
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_rlocks); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_i); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_t_6, __pyx_n_s_exit); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyObject_LookupSpecial(__pyx_t_6, __pyx_n_s_enter); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (__pyx_t_9) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ /*try:*/ {
+ {
+ __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
+ __Pyx_XGOTREF(__pyx_t_10);
+ __Pyx_XGOTREF(__pyx_t_11);
+ __Pyx_XGOTREF(__pyx_t_12);
+ /*try:*/ {
+
+ /* "cqlshlib/copyutil.py":131
+ * for i, r in enumerate(self._readers):
+ * with self._rlocks[i]:
+ * if r.poll(0.000000001): # <<<<<<<<<<<<<<
+ * try:
+ * yield r.recv()
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_r, __pyx_n_s_poll); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_13) {
+
+ /* "cqlshlib/copyutil.py":132
+ * with self._rlocks[i]:
+ * if r.poll(0.000000001):
+ * try: # <<<<<<<<<<<<<<
+ * yield r.recv()
+ * except EOFError:
+ */
+ {
+ __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
+ __Pyx_XGOTREF(__pyx_t_14);
+ __Pyx_XGOTREF(__pyx_t_15);
+ __Pyx_XGOTREF(__pyx_t_16);
+ /*try:*/ {
+
+ /* "cqlshlib/copyutil.py":133
+ * if r.poll(0.000000001):
+ * try:
+ * yield r.recv() # <<<<<<<<<<<<<<
+ * except EOFError:
+ * continue
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_r, __pyx_n_s_recv); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L23_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L23_error;}
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L23_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
+ __pyx_cur_scope->__pyx_t_3 = __pyx_t_5;
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __pyx_cur_scope->__pyx_t_4 = __pyx_t_7;
+ __Pyx_XGIVEREF(__pyx_t_10);
+ __pyx_cur_scope->__pyx_t_5 = __pyx_t_10;
+ __Pyx_XGIVEREF(__pyx_t_11);
+ __pyx_cur_scope->__pyx_t_6 = __pyx_t_11;
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __pyx_cur_scope->__pyx_t_7 = __pyx_t_12;
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __pyx_cur_scope->__pyx_t_8 = __pyx_t_14;
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __pyx_cur_scope->__pyx_t_9 = __pyx_t_15;
+ __Pyx_XGIVEREF(__pyx_t_16);
+ __pyx_cur_scope->__pyx_t_10 = __pyx_t_16;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L31_resume_from_yield:;
+ __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_1);
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_cur_scope->__pyx_t_1 = 0;
+ __Pyx_XGOTREF(__pyx_t_2);
+ __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
+ __pyx_t_5 = __pyx_cur_scope->__pyx_t_3;
+ __pyx_t_7 = __pyx_cur_scope->__pyx_t_4;
+ __pyx_cur_scope->__pyx_t_4 = 0;
+ __Pyx_XGOTREF(__pyx_t_7);
+ __pyx_t_10 = __pyx_cur_scope->__pyx_t_5;
+ __pyx_cur_scope->__pyx_t_5 = 0;
+ __Pyx_XGOTREF(__pyx_t_10);
+ __pyx_t_11 = __pyx_cur_scope->__pyx_t_6;
+ __pyx_cur_scope->__pyx_t_6 = 0;
+ __Pyx_XGOTREF(__pyx_t_11);
+ __pyx_t_12 = __pyx_cur_scope->__pyx_t_7;
+ __pyx_cur_scope->__pyx_t_7 = 0;
+ __Pyx_XGOTREF(__pyx_t_12);
+ __pyx_t_14 = __pyx_cur_scope->__pyx_t_8;
+ __pyx_cur_scope->__pyx_t_8 = 0;
+ __Pyx_XGOTREF(__pyx_t_14);
+ __pyx_t_15 = __pyx_cur_scope->__pyx_t_9;
+ __pyx_cur_scope->__pyx_t_9 = 0;
+ __Pyx_XGOTREF(__pyx_t_15);
+ __pyx_t_16 = __pyx_cur_scope->__pyx_t_10;
+ __pyx_cur_scope->__pyx_t_10 = 0;
+ __Pyx_XGOTREF(__pyx_t_16);
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L23_error;}
+ }
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+ goto __pyx_L30_try_end;
+ __pyx_L23_error:;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "cqlshlib/copyutil.py":134
+ * try:
+ * yield r.recv()
+ * except EOFError: # <<<<<<<<<<<<<<
+ * continue
+ *
+ */
+ __pyx_t_17 = PyErr_ExceptionMatches(__pyx_builtin_EOFError);
+ if (__pyx_t_17) {
+ __Pyx_AddTraceback("cqlshlib.copyutil.OneWayChannels.recv_polling", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_6, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L25_except_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_8);
+
+ /* "cqlshlib/copyutil.py":135
+ * yield r.recv()
+ * except EOFError:
+ * continue # <<<<<<<<<<<<<<
+ *
+ * if time.time() - start > timeout:
+ */
+ goto __pyx_L33_except_continue;
+ __pyx_L33_except_continue:;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ goto __pyx_L29_try_continue;
+ }
+ goto __pyx_L25_except_error;
+ __pyx_L25_except_error:;
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __Pyx_XGIVEREF(__pyx_t_16);
+ __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
+ goto __pyx_L14_error;
+ __pyx_L29_try_continue:;
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __Pyx_XGIVEREF(__pyx_t_16);
+ __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
+ goto __pyx_L20_try_continue;
+ __pyx_L30_try_end:;
+ }
+ goto __pyx_L22;
+ }
+ __pyx_L22:;
+ }
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ goto __pyx_L21_try_end;
+ __pyx_L14_error:;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+ /* "cqlshlib/copyutil.py":130
+ * while True:
+ * for i, r in enumerate(self._readers):
+ * with self._rlocks[i]: # <<<<<<<<<<<<<<
+ * if r.poll(0.000000001):
+ * try:
+ */
+ /*except:*/ {
+ __Pyx_AddTraceback("cqlshlib.copyutil.OneWayChannels.recv_polling", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_6, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_9 = PyTuple_Pack(3, __pyx_t_8, __pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_16);
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ if (__pyx_t_13 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
+ __pyx_t_18 = ((!(__pyx_t_13 != 0)) != 0);
+ if (__pyx_t_18) {
+ __Pyx_GIVEREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ErrRestore(__pyx_t_8, __pyx_t_6, __pyx_t_3);
+ __pyx_t_8 = 0; __pyx_t_6 = 0; __pyx_t_3 = 0;
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L15_exception_handled;
+ }
+ __pyx_L16_except_error:;
+ __Pyx_XGIVEREF(__pyx_t_10);
+ __Pyx_XGIVEREF(__pyx_t_11);
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
+ goto __pyx_L1_error;
+ __pyx_L20_try_continue:;
+ __Pyx_XGIVEREF(__pyx_t_10);
+ __Pyx_XGIVEREF(__pyx_t_11);
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
+ goto __pyx_L9_continue;
+ __pyx_L15_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_10);
+ __Pyx_XGIVEREF(__pyx_t_11);
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
+ __pyx_L21_try_end:;
+ }
+ }
+ /*finally:*/ {
+ /*normal exit:*/{
+ if (__pyx_t_7) {
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__7, NULL);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ goto __pyx_L13;
+ }
+ __pyx_L9_continue: {
+ if (__pyx_t_7) {
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__8, NULL);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ goto __pyx_L6_continue;
+ }
+ __pyx_L13:;
+ }
+ goto __pyx_L37;
+ __pyx_L8_error:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L1_error;
+ __pyx_L37:;
+ }
+
+ /* "cqlshlib/copyutil.py":129
+ * start = time.time()
+ * while True:
+ * for i, r in enumerate(self._readers): # <<<<<<<<<<<<<<
+ * with self._rlocks[i]:
+ * if r.poll(0.000000001):
+ */
+ __pyx_L6_continue:;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":137
+ * continue
+ *
+ * if time.time() - start > timeout: # <<<<<<<<<<<<<<
+ * break
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_cur_scope->__pyx_v_start); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_cur_scope->__pyx_v_timeout, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_18 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_18) {
+
+ /* "cqlshlib/copyutil.py":138
+ *
+ * if time.time() - start > timeout:
+ * break # <<<<<<<<<<<<<<
+ *
+ * def close(self):
+ */
+ goto __pyx_L5_break;
+ }
+ }
+ __pyx_L5_break:;
+
+ /* "cqlshlib/copyutil.py":121
+ * continue
+ *
+ * def recv_polling(self, timeout): # <<<<<<<<<<<<<<
+ * """
+ * Implementation of the recv method for platforms where select() is not available for pipes.
+ */
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("recv_polling", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Generator_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+}
+
+/* "cqlshlib/copyutil.py":140
+ * break
+ *
+ * def close(self): # <<<<<<<<<<<<<<
+ * for ch in self.channels:
+ * try:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_14OneWayChannels_9close(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_14OneWayChannels_9close = {"close", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_14OneWayChannels_9close, METH_O, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_14OneWayChannels_9close(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("close (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_14OneWayChannels_8close(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_14OneWayChannels_8close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_ch = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ Py_ssize_t __pyx_t_3;
+ PyObject *(*__pyx_t_4)(PyObject *);
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("close", 0);
+ __Pyx_TraceCall("close", __pyx_f[0], 140);
+
+ /* "cqlshlib/copyutil.py":141
+ *
+ * def close(self):
+ * for ch in self.channels: # <<<<<<<<<<<<<<
+ * try:
+ * ch.close()
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_channels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
+ __pyx_t_4 = NULL;
+ } else {
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_4)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ } else {
+ if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_4(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_ch, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":142
+ * def close(self):
+ * for ch in self.channels:
+ * try: # <<<<<<<<<<<<<<
+ * ch.close()
+ * except:
+ */
+ {
+ __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_7);
+ /*try:*/ {
+
+ /* "cqlshlib/copyutil.py":143
+ * for ch in self.channels:
+ * try:
+ * ch.close() # <<<<<<<<<<<<<<
+ * except:
+ * pass
+ */
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_ch, __pyx_n_s_close); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (__pyx_t_9) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L12_try_end;
+ __pyx_L5_error:;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":144
+ * try:
+ * ch.close()
+ * except: # <<<<<<<<<<<<<<
+ * pass
+ *
+ */
+ /*except:*/ {
+ PyErr_Restore(0,0,0);
+ goto __pyx_L6_exception_handled;
+ }
+ __pyx_L6_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ __pyx_L12_try_end:;
+ }
+
+ /* "cqlshlib/copyutil.py":141
+ *
+ * def close(self):
+ * for ch in self.channels: # <<<<<<<<<<<<<<
+ * try:
+ * ch.close()
+ */
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":140
+ * break
+ *
+ * def close(self): # <<<<<<<<<<<<<<
+ * for ch in self.channels:
+ * try:
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("cqlshlib.copyutil.OneWayChannels.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_ch);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":152
+ * A base class for ImportTask and ExportTask
+ * """
+ * def __init__(self, shell, ks, table, columns, fname, opts, protocol_version, config_file, direction): # <<<<<<<<<<<<<<
+ * self.shell = shell
+ * self.ks = ks
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_1__init__ = {"__init__", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_shell = 0;
+ PyObject *__pyx_v_ks = 0;
+ PyObject *__pyx_v_table = 0;
+ PyObject *__pyx_v_columns = 0;
+ PyObject *__pyx_v_fname = 0;
+ PyObject *__pyx_v_opts = 0;
+ PyObject *__pyx_v_protocol_version = 0;
+ PyObject *__pyx_v_config_file = 0;
+ PyObject *__pyx_v_direction = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_shell,&__pyx_n_s_ks,&__pyx_n_s_table,&__pyx_n_s_columns,&__pyx_n_s_fname,&__pyx_n_s_opts,&__pyx_n_s_protocol_version,&__pyx_n_s_config_file,&__pyx_n_s_direction,0};
+ PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
+ case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shell)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ks)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_table)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_columns)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 5:
+ if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fname)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 6:
+ if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_opts)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 7:
+ if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_protocol_version)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 8:
+ if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_config_file)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, 8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 9:
+ if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_direction)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, 9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 10) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_shell = values[1];
+ __pyx_v_ks = values[2];
+ __pyx_v_table = values[3];
+ __pyx_v_columns = values[4];
+ __pyx_v_fname = values[5];
+ __pyx_v_opts = values[6];
+ __pyx_v_protocol_version = values[7];
+ __pyx_v_config_file = values[8];
+ __pyx_v_direction = values[9];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_8CopyTask___init__(__pyx_self, __pyx_v_self, __pyx_v_shell, __pyx_v_ks, __pyx_v_table, __pyx_v_columns, __pyx_v_fname, __pyx_v_opts, __pyx_v_protocol_version, __pyx_v_config_file, __pyx_v_direction);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":162
+ * self.config_file = config_file
+ * # do not display messages when exporting to STDOUT
+ * self.printmsg = self._printmsg if self.fname is not None or direction == 'from' else lambda _, eol='\n': None # <<<<<<<<<<<<<<
+ * self.options = self.parse_options(opts, direction)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_8__init___lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_8__init___lambda1 = {"lambda1", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_8__init___lambda1, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_8__init___lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v__ = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_eol = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__9,&__pyx_n_s_eol,0};
+ PyObject* values[2] = {0,0};
+ values[1] = ((PyObject *)((PyObject*)__pyx_kp_s__10));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__9)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_eol);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda1") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v__ = values[0];
+ __pyx_v_eol = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("lambda1", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.__init__.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, __pyx_v__, __pyx_v_eol);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v__, CYTHON_UNUSED PyObject *__pyx_v_eol) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("lambda1", 0);
+ __Pyx_TraceCall("lambda1", __pyx_f[0], 162);
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":152
+ * A base class for ImportTask and ExportTask
+ * """
+ * def __init__(self, shell, ks, table, columns, fname, opts, protocol_version, config_file, direction): # <<<<<<<<<<<<<<
+ * self.shell = shell
+ * self.ks = ks
+ */
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_shell, PyObject *__pyx_v_ks, PyObject *__pyx_v_table, PyObject *__pyx_v_columns, PyObject *__pyx_v_fname, PyObject *__pyx_v_opts, PyObject *__pyx_v_protocol_version, PyObject *__pyx_v_config_file, PyObject *__pyx_v_direction) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ Py_ssize_t __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ int __pyx_t_9;
+ int __pyx_t_10;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__init__", 0);
+ __Pyx_TraceCall("__init__", __pyx_f[0], 152);
+
+ /* "cqlshlib/copyutil.py":153
+ * """
+ * def __init__(self, shell, ks, table, columns, fname, opts, protocol_version, config_file, direction):
+ * self.shell = shell # <<<<<<<<<<<<<<
+ * self.ks = ks
+ * self.table = table
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_shell, __pyx_v_shell) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "cqlshlib/copyutil.py":154
+ * def __init__(self, shell, ks, table, columns, fname, opts, protocol_version, config_file, direction):
+ * self.shell = shell
+ * self.ks = ks # <<<<<<<<<<<<<<
+ * self.table = table
+ * self.table_meta = self.shell.get_table_meta(self.ks, self.table)
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ks, __pyx_v_ks) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "cqlshlib/copyutil.py":155
+ * self.shell = shell
+ * self.ks = ks
+ * self.table = table # <<<<<<<<<<<<<<
+ * self.table_meta = self.shell.get_table_meta(self.ks, self.table)
+ * self.local_dc = shell.conn.metadata.get_host(shell.hostname).datacenter
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_table, __pyx_v_table) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "cqlshlib/copyutil.py":156
+ * self.ks = ks
+ * self.table = table
+ * self.table_meta = self.shell.get_table_meta(self.ks, self.table) # <<<<<<<<<<<<<<
+ * self.local_dc = shell.conn.metadata.get_host(shell.hostname).datacenter
+ * self.fname = safe_normpath(fname)
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shell); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_table_meta); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ks); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_table); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_5) {
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+ }
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_t_2 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_table_meta, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":157
+ * self.table = table
+ * self.table_meta = self.shell.get_table_meta(self.ks, self.table)
+ * self.local_dc = shell.conn.metadata.get_host(shell.hostname).datacenter # <<<<<<<<<<<<<<
+ * self.fname = safe_normpath(fname)
+ * self.protocol_version = protocol_version
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_shell, __pyx_n_s_conn); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_metadata); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_get_host); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_shell, __pyx_n_s_hostname); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_4 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_datacenter); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_local_dc, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "cqlshlib/copyutil.py":158
+ * self.table_meta = self.shell.get_table_meta(self.ks, self.table)
+ * self.local_dc = shell.conn.metadata.get_host(shell.hostname).datacenter
+ * self.fname = safe_normpath(fname) # <<<<<<<<<<<<<<
+ * self.protocol_version = protocol_version
+ * self.config_file = config_file
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_safe_normpath); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_fname); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_INCREF(__pyx_v_fname);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_fname);
+ __Pyx_GIVEREF(__pyx_v_fname);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fname, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "cqlshlib/copyutil.py":159
+ * self.local_dc = shell.conn.metadata.get_host(shell.hostname).datacenter
+ * self.fname = safe_normpath(fname)
+ * self.protocol_version = protocol_version # <<<<<<<<<<<<<<
+ * self.config_file = config_file
+ * # do not display messages when exporting to STDOUT
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_protocol_version, __pyx_v_protocol_version) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "cqlshlib/copyutil.py":160
+ * self.fname = safe_normpath(fname)
+ * self.protocol_version = protocol_version
+ * self.config_file = config_file # <<<<<<<<<<<<<<
+ * # do not display messages when exporting to STDOUT
+ * self.printmsg = self._printmsg if self.fname is not None or direction == 'from' else lambda _, eol='\n': None
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_config_file, __pyx_v_config_file) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "cqlshlib/copyutil.py":162
+ * self.config_file = config_file
+ * # do not display messages when exporting to STDOUT
+ * self.printmsg = self._printmsg if self.fname is not None or direction == 'from' else lambda _, eol='\n': None # <<<<<<<<<<<<<<
+ * self.options = self.parse_options(opts, direction)
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fname); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = (__pyx_t_1 != Py_None);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_10 = (__pyx_t_9 != 0);
+ if (!__pyx_t_10) {
+ } else {
+ __pyx_t_8 = __pyx_t_10;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_direction, __pyx_n_s_from, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __pyx_t_10;
+ __pyx_L3_bool_binop_done:;
+ if (__pyx_t_8) {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_printmsg); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __pyx_t_1;
+ __pyx_t_1 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8cqlshlib_8copyutil_8CopyTask_8__init___lambda1, 0, __pyx_n_s_CopyTask___init___locals_lambda, NULL, __pyx_n_s_cqlshlib_copyutil, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__11);
+ __pyx_t_3 = __pyx_t_1;
+ __pyx_t_1 = 0;
+ }
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_printmsg_2, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "cqlshlib/copyutil.py":163
+ * # do not display messages when exporting to STDOUT
+ * self.printmsg = self._printmsg if self.fname is not None or direction == 'from' else lambda _, eol='\n': None
+ * self.options = self.parse_options(opts, direction) # <<<<<<<<<<<<<<
+ *
+ * self.num_processes = self.options.copy['numprocesses']
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_options); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__pyx_t_7) {
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_opts);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_v_opts);
+ __Pyx_GIVEREF(__pyx_v_opts);
+ __Pyx_INCREF(__pyx_v_direction);
+ PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_v_direction);
+ __Pyx_GIVEREF(__pyx_v_direction);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_options, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "cqlshlib/copyutil.py":165
+ * self.options = self.parse_options(opts, direction)
+ *
+ * self.num_processes = self.options.copy['numprocesses'] # <<<<<<<<<<<<<<
+ * self.printmsg('Using %d child processes' % (self.num_processes,))
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_options); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_numprocesses); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_num_processes, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "cqlshlib/copyutil.py":166
+ *
+ * self.num_processes = self.options.copy['numprocesses']
+ * self.printmsg('Using %d child processes' % (self.num_processes,)) # <<<<<<<<<<<<<<
+ *
+ * if direction == 'from':
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_printmsg_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_num_processes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Using_d_child_processes, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "cqlshlib/copyutil.py":168
+ * self.printmsg('Using %d child processes' % (self.num_processes,))
+ *
+ * if direction == 'from': # <<<<<<<<<<<<<<
+ * self.num_processes += 1 # add the feeder process
+ *
+ */
+ __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_direction, __pyx_n_s_from, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__pyx_t_8) {
+
+ /* "cqlshlib/copyutil.py":169
+ *
+ * if direction == 'from':
+ * self.num_processes += 1 # add the feeder process # <<<<<<<<<<<<<<
+ *
+ * self.processes = []
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_num_processes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_num_processes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L5;
+ }
+ __pyx_L5:;
+
+ /* "cqlshlib/copyutil.py":171
+ * self.num_processes += 1 # add the feeder process
+ *
+ * self.processes = [] # <<<<<<<<<<<<<<
+ * self.inmsg = OneWayChannels(self.num_processes)
+ * self.outmsg = OneWayChannels(self.num_processes)
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_processes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":172
+ *
+ * self.processes = []
+ * self.inmsg = OneWayChannels(self.num_processes) # <<<<<<<<<<<<<<
+ * self.outmsg = OneWayChannels(self.num_processes)
+ *
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_OneWayChannels); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_num_processes); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inmsg, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":173
+ * self.processes = []
+ * self.inmsg = OneWayChannels(self.num_processes)
+ * self.outmsg = OneWayChannels(self.num_processes) # <<<<<<<<<<<<<<
+ *
+ * self.columns = CopyTask.get_columns(shell, ks, table, columns)
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_OneWayChannels); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_num_processes); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_4 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_outmsg, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":175
+ * self.outmsg = OneWayChannels(self.num_processes)
+ *
+ * self.columns = CopyTask.get_columns(shell, ks, table, columns) # <<<<<<<<<<<<<<
+ * self.time_start = time.time()
+ *
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_CopyTask); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get_columns); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_3) {
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_shell);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_shell);
+ __Pyx_GIVEREF(__pyx_v_shell);
+ __Pyx_INCREF(__pyx_v_ks);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_ks);
+ __Pyx_GIVEREF(__pyx_v_ks);
+ __Pyx_INCREF(__pyx_v_table);
+ PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_table);
+ __Pyx_GIVEREF(__pyx_v_table);
+ __Pyx_INCREF(__pyx_v_columns);
+ PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_v_columns);
+ __Pyx_GIVEREF(__pyx_v_columns);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_columns, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":176
+ *
+ * self.columns = CopyTask.get_columns(shell, ks, table, columns)
+ * self.time_start = time.time() # <<<<<<<<<<<<<<
+ *
+ * @staticmethod
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_time_start, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":152
+ * A base class for ImportTask and ExportTask
+ * """
+ * def __init__(self, shell, ks, table, columns, fname, opts, protocol_version, config_file, direction): # <<<<<<<<<<<<<<
+ * self.shell = shell
+ * self.ks = ks
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":179
+ *
+ * @staticmethod
+ * def _printmsg(msg, eol='\n'): # <<<<<<<<<<<<<<
+ * sys.stdout.write(msg + eol)
+ * sys.stdout.flush()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_3_printmsg(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_3_printmsg = {"_printmsg", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_3_printmsg, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_3_printmsg(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_msg = 0;
+ PyObject *__pyx_v_eol = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_printmsg (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_msg,&__pyx_n_s_eol,0};
+ PyObject* values[2] = {0,0};
+ values[1] = ((PyObject *)((PyObject*)__pyx_kp_s__10));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_msg)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_eol);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_printmsg") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_msg = values[0];
+ __pyx_v_eol = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_printmsg", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask._printmsg", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_8CopyTask_2_printmsg(__pyx_self, __pyx_v_msg, __pyx_v_eol);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_2_printmsg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_msg, PyObject *__pyx_v_eol) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("_printmsg", 0);
+ __Pyx_TraceCall("_printmsg", __pyx_f[0], 179);
+
+ /* "cqlshlib/copyutil.py":180
+ * @staticmethod
+ * def _printmsg(msg, eol='\n'):
+ * sys.stdout.write(msg + eol) # <<<<<<<<<<<<<<
+ * sys.stdout.flush()
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Add(__pyx_v_msg, __pyx_v_eol); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":181
+ * def _printmsg(msg, eol='\n'):
+ * sys.stdout.write(msg + eol)
+ * sys.stdout.flush() # <<<<<<<<<<<<<<
+ *
+ * def maybe_read_config_file(self, opts, direction):
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_flush); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":179
+ *
+ * @staticmethod
+ * def _printmsg(msg, eol='\n'): # <<<<<<<<<<<<<<
+ * sys.stdout.write(msg + eol)
+ * sys.stdout.flush()
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask._printmsg", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":183
+ * sys.stdout.flush()
+ *
+ * def maybe_read_config_file(self, opts, direction): # <<<<<<<<<<<<<<
+ * """
+ * Read optional sections from a configuration file that was specified in the command options or from the default
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_5maybe_read_config_file(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_8cqlshlib_8copyutil_8CopyTask_4maybe_read_config_file[] = "\n Read optional sections from a configuration file that was specified in the command options or from the default\n cqlshrc configuration file if none was specified.\n ";
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_5maybe_read_config_file = {"maybe_read_config_file", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_5maybe_read_config_file, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8cqlshlib_8copyutil_8CopyTask_4maybe_read_config_file};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_5maybe_read_config_file(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_opts = 0;
+ PyObject *__pyx_v_direction = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("maybe_read_config_file (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_opts,&__pyx_n_s_direction,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_opts)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("maybe_read_config_file", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_direction)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("maybe_read_config_file", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maybe_read_config_file") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_opts = values[1];
+ __pyx_v_direction = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("maybe_read_config_file", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.maybe_read_config_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_8CopyTask_4maybe_read_config_file(__pyx_self, __pyx_v_self, __pyx_v_opts, __pyx_v_direction);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_4maybe_read_config_file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_opts, PyObject *__pyx_v_direction) {
+ PyObject *__pyx_v_config_file = NULL;
+ PyObject *__pyx_v_configs = NULL;
+ PyObject *__pyx_v_ret = NULL;
+ PyObject *__pyx_v_config_sections = NULL;
+ PyObject *__pyx_v_section = NULL;
+ PyObject *__pyx_v_options = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ Py_ssize_t __pyx_t_8;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("maybe_read_config_file", 0);
+ __Pyx_TraceCall("maybe_read_config_file", __pyx_f[0], 183);
+
+ /* "cqlshlib/copyutil.py":188
+ * cqlshrc configuration file if none was specified.
+ * """
+ * config_file = opts.pop('configfile', '') # <<<<<<<<<<<<<<
+ * if not config_file:
+ * config_file = self.config_file
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_config_file = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":189
+ * """
+ * config_file = opts.pop('configfile', '')
+ * if not config_file: # <<<<<<<<<<<<<<
+ * config_file = self.config_file
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_config_file); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_4) {
+
+ /* "cqlshlib/copyutil.py":190
+ * config_file = opts.pop('configfile', '')
+ * if not config_file:
+ * config_file = self.config_file # <<<<<<<<<<<<<<
+ *
+ * if not os.path.isfile(config_file):
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_config_file); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF_SET(__pyx_v_config_file, __pyx_t_2);
+ __pyx_t_2 = 0;
+ goto __pyx_L3;
+ }
+ __pyx_L3:;
+
+ /* "cqlshlib/copyutil.py":192
+ * config_file = self.config_file
+ *
+ * if not os.path.isfile(config_file): # <<<<<<<<<<<<<<
+ * return opts
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isfile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_config_file); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_v_config_file);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_config_file);
+ __Pyx_GIVEREF(__pyx_v_config_file);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = ((!__pyx_t_4) != 0);
+ if (__pyx_t_3) {
+
+ /* "cqlshlib/copyutil.py":193
+ *
+ * if not os.path.isfile(config_file):
+ * return opts # <<<<<<<<<<<<<<
+ *
+ * configs = ConfigParser.RawConfigParser()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_opts);
+ __pyx_r = __pyx_v_opts;
+ goto __pyx_L0;
+ }
+
+ /* "cqlshlib/copyutil.py":195
+ * return opts
+ *
+ * configs = ConfigParser.RawConfigParser() # <<<<<<<<<<<<<<
+ * configs.readfp(open(config_file))
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ConfigParser); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_RawConfigParser); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_configs = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":196
+ *
+ * configs = ConfigParser.RawConfigParser()
+ * configs.readfp(open(config_file)) # <<<<<<<<<<<<<<
+ *
+ * ret = dict()
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_configs, __pyx_n_s_readfp); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_config_file);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_config_file);
+ __Pyx_GIVEREF(__pyx_v_config_file);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":198
+ * configs.readfp(open(config_file))
+ *
+ * ret = dict() # <<<<<<<<<<<<<<
+ * config_sections = list(['copy', 'copy-%s' % (direction,),
+ * 'copy:%s.%s' % (self.ks, self.table),
+ */
+ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_v_ret = ((PyObject*)__pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":199
+ *
+ * ret = dict()
+ * config_sections = list(['copy', 'copy-%s' % (direction,), # <<<<<<<<<<<<<<
+ * 'copy:%s.%s' % (self.ks, self.table),
+ * 'copy-%s:%s.%s' % (direction, self.ks, self.table)])
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_direction);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_direction);
+ __Pyx_GIVEREF(__pyx_v_direction);
+ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_copy_s, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":200
+ * ret = dict()
+ * config_sections = list(['copy', 'copy-%s' % (direction,),
+ * 'copy:%s.%s' % (self.ks, self.table), # <<<<<<<<<<<<<<
+ * 'copy-%s:%s.%s' % (direction, self.ks, self.table)])
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ks); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_table); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_7);
+ __pyx_t_2 = 0;
+ __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_copy_s_s, __pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "cqlshlib/copyutil.py":201
+ * config_sections = list(['copy', 'copy-%s' % (direction,),
+ * 'copy:%s.%s' % (self.ks, self.table),
+ * 'copy-%s:%s.%s' % (direction, self.ks, self.table)]) # <<<<<<<<<<<<<<
+ *
+ * for section in config_sections:
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ks); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_table); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_direction);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_direction);
+ __Pyx_GIVEREF(__pyx_v_direction);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_5 = 0;
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_copy_s_s_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":199
+ *
+ * ret = dict()
+ * config_sections = list(['copy', 'copy-%s' % (direction,), # <<<<<<<<<<<<<<
+ * 'copy:%s.%s' % (self.ks, self.table),
+ * 'copy-%s:%s.%s' % (direction, self.ks, self.table)])
+ */
+ __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_copy);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_copy);
+ __Pyx_GIVEREF(__pyx_n_s_copy);
+ PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyList_SET_ITEM(__pyx_t_1, 3, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_6 = 0;
+ __pyx_t_7 = 0;
+ __pyx_t_2 = 0;
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_config_sections = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":203
+ * 'copy-%s:%s.%s' % (direction, self.ks, self.table)])
+ *
+ * for section in config_sections: # <<<<<<<<<<<<<<
+ * if configs.has_section(section):
+ * options = dict(configs.items(section))
+ */
+ __pyx_t_1 = __pyx_v_config_sections; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
+ for (;;) {
+ if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ __Pyx_XDECREF_SET(__pyx_v_section, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":204
+ *
+ * for section in config_sections:
+ * if configs.has_section(section): # <<<<<<<<<<<<<<
+ * options = dict(configs.items(section))
+ * self.printmsg("Reading options from %s:[%s]: %s" % (config_file, section, options))
+ */
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_configs, __pyx_n_s_has_section); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_6 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_section); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_INCREF(__pyx_v_section);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_section);
+ __Pyx_GIVEREF(__pyx_v_section);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "cqlshlib/copyutil.py":205
+ * for section in config_sections:
+ * if configs.has_section(section):
+ * options = dict(configs.items(section)) # <<<<<<<<<<<<<<
+ * self.printmsg("Reading options from %s:[%s]: %s" % (config_file, section, options))
+ * ret.update(options)
+ */
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_configs, __pyx_n_s_items); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_5 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_section); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_v_section);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_section);
+ __Pyx_GIVEREF(__pyx_v_section);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_options, ((PyObject*)__pyx_t_2));
+ __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":206
+ * if configs.has_section(section):
+ * options = dict(configs.items(section))
+ * self.printmsg("Reading options from %s:[%s]: %s" % (config_file, section, options)) # <<<<<<<<<<<<<<
+ * ret.update(options)
+ *
+ */
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_printmsg_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_v_config_file);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_config_file);
+ __Pyx_GIVEREF(__pyx_v_config_file);
+ __Pyx_INCREF(__pyx_v_section);
+ PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_section);
+ __Pyx_GIVEREF(__pyx_v_section);
+ __Pyx_INCREF(__pyx_v_options);
+ PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_options);
+ __Pyx_GIVEREF(__pyx_v_options);
+ __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Reading_options_from_s_s_s, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":207
+ * options = dict(configs.items(section))
+ * self.printmsg("Reading options from %s:[%s]: %s" % (config_file, section, options))
+ * ret.update(options) # <<<<<<<<<<<<<<
+ *
+ * # Update this last so the command line options take precedence over the configuration file options
+ */
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_ret, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_9 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_options); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = NULL;
+ __Pyx_INCREF(__pyx_v_options);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_options);
+ __Pyx_GIVEREF(__pyx_v_options);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L7;
+ }
+ __pyx_L7:;
+
+ /* "cqlshlib/copyutil.py":203
+ * 'copy-%s:%s.%s' % (direction, self.ks, self.table)])
+ *
+ * for section in config_sections: # <<<<<<<<<<<<<<
+ * if configs.has_section(section):
+ * options = dict(configs.items(section))
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":210
+ *
+ * # Update this last so the command line options take precedence over the configuration file options
+ * if opts: # <<<<<<<<<<<<<<
+ * self.printmsg("Reading options from the command line: %s" % (opts,))
+ * ret.update(opts)
+ */
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_opts); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__pyx_t_3) {
+
+ /* "cqlshlib/copyutil.py":211
+ * # Update this last so the command line options take precedence over the configuration file options
+ * if opts:
+ * self.printmsg("Reading options from the command line: %s" % (opts,)) # <<<<<<<<<<<<<<
+ * ret.update(opts)
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_printmsg_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_INCREF(__pyx_v_opts);
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_opts);
+ __Pyx_GIVEREF(__pyx_v_opts);
+ __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Reading_options_from_the_command, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":212
+ * if opts:
+ * self.printmsg("Reading options from the command line: %s" % (opts,))
+ * ret.update(opts) # <<<<<<<<<<<<<<
+ *
+ * if self.shell.debug: # this is important for testing, do not remove
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ret, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_opts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = NULL;
+ __Pyx_INCREF(__pyx_v_opts);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_opts);
+ __Pyx_GIVEREF(__pyx_v_opts);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L8;
+ }
+ __pyx_L8:;
+
+ /* "cqlshlib/copyutil.py":214
+ * ret.update(opts)
+ *
+ * if self.shell.debug: # this is important for testing, do not remove # <<<<<<<<<<<<<<
+ * self.printmsg("Using options: '%s'" % (ret,))
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shell); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_debug); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "cqlshlib/copyutil.py":215
+ *
+ * if self.shell.debug: # this is important for testing, do not remove
+ * self.printmsg("Using options: '%s'" % (ret,)) # <<<<<<<<<<<<<<
+ *
+ * return ret
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_printmsg_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_v_ret);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ret);
+ __Pyx_GIVEREF(__pyx_v_ret);
+ __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_Using_options_s, __pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L9;
+ }
+ __pyx_L9:;
+
+ /* "cqlshlib/copyutil.py":217
+ * self.printmsg("Using options: '%s'" % (ret,))
+ *
+ * return ret # <<<<<<<<<<<<<<
+ *
+ * @staticmethod
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_ret);
+ __pyx_r = __pyx_v_ret;
+ goto __pyx_L0;
+
+ /* "cqlshlib/copyutil.py":183
+ * sys.stdout.flush()
+ *
+ * def maybe_read_config_file(self, opts, direction): # <<<<<<<<<<<<<<
+ * """
+ * Read optional sections from a configuration file that was specified in the command options or from the default
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.maybe_read_config_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_config_file);
+ __Pyx_XDECREF(__pyx_v_configs);
+ __Pyx_XDECREF(__pyx_v_ret);
+ __Pyx_XDECREF(__pyx_v_config_sections);
+ __Pyx_XDECREF(__pyx_v_section);
+ __Pyx_XDECREF(__pyx_v_options);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":220
+ *
+ * @staticmethod
+ * def clean_options(opts): # <<<<<<<<<<<<<<
+ * """
+ * Convert all option values to valid string literals unless they are path names
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_7clean_options(PyObject *__pyx_self, PyObject *__pyx_v_opts); /*proto*/
+static char __pyx_doc_8cqlshlib_8copyutil_8CopyTask_6clean_options[] = "\n Convert all option values to valid string literals unless they are path names\n ";
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_7clean_options = {"clean_options", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_7clean_options, METH_O, __pyx_doc_8cqlshlib_8copyutil_8CopyTask_6clean_options};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_7clean_options(PyObject *__pyx_self, PyObject *__pyx_v_opts) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("clean_options (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_8CopyTask_6clean_options(__pyx_self, ((PyObject *)__pyx_v_opts));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_6clean_options(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_opts) {
+ PyObject *__pyx_v_k = NULL;
+ PyObject *__pyx_v_v = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ int __pyx_t_9;
+ int __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("clean_options", 0);
+ __Pyx_TraceCall("clean_options", __pyx_f[0], 220);
+
+ /* "cqlshlib/copyutil.py":224
+ * Convert all option values to valid string literals unless they are path names
+ * """
+ * return dict([(k, v.decode('string_escape') if k not in ['errfile', 'ratefile'] else v) # <<<<<<<<<<<<<<
+ * for k, v, in opts.iteritems()])
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+
+ /* "cqlshlib/copyutil.py":225
+ * """
+ * return dict([(k, v.decode('string_escape') if k not in ['errfile', 'ratefile'] else v)
+ * for k, v, in opts.iteritems()]) # <<<<<<<<<<<<<<
+ *
+ * def parse_options(self, opts, direction):
+ */
+ __pyx_t_3 = 0;
+ if (unlikely(__pyx_v_opts == Py_None)) {
+ PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_opts, 0, __pyx_n_s_iteritems, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_2);
+ __pyx_t_2 = __pyx_t_6;
+ __pyx_t_6 = 0;
+ while (1) {
+ __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_4, &__pyx_t_3, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_5);
+ if (unlikely(__pyx_t_8 == 0)) break;
+ if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7);
+ __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":224
+ * Convert all option values to valid string literals unless they are path names
+ * """
+ * return dict([(k, v.decode('string_escape') if k not in ['errfile', 'ratefile'] else v) # <<<<<<<<<<<<<<
+ * for k, v, in opts.iteritems()])
+ *
+ */
+ __Pyx_INCREF(__pyx_v_k);
+ __pyx_t_6 = __pyx_v_k;
+ __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_errfile, Py_NE)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__pyx_t_10) {
+ } else {
+ __pyx_t_9 = __pyx_t_10;
+ goto __pyx_L5_bool_binop_done;
+ }
+ __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_ratefile, Py_NE)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __pyx_t_10;
+ __pyx_L5_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if ((__pyx_t_9 != 0)) {
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_7 = __pyx_t_11;
+ __pyx_t_11 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_v_v);
+ __pyx_t_7 = __pyx_v_v;
+ }
+ __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_INCREF(__pyx_v_k);
+ PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_k);
+ __Pyx_GIVEREF(__pyx_v_k);
+ PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_7);
+ __pyx_t_7 = 0;
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_11))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "cqlshlib/copyutil.py":220
+ *
+ * @staticmethod
+ * def clean_options(opts): # <<<<<<<<<<<<<<
+ * """
+ * Convert all option values to valid string literals unless they are path names
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.clean_options", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_k);
+ __Pyx_XDECREF(__pyx_v_v);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":227
+ * for k, v, in opts.iteritems()])
+ *
+ * def parse_options(self, opts, direction): # <<<<<<<<<<<<<<
+ * """
+ * Parse options for import (COPY FROM) and export (COPY TO) operations.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_9parse_options(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_8cqlshlib_8copyutil_8CopyTask_8parse_options[] = "\n Parse options for import (COPY FROM) and export (COPY TO) operations.\n Extract from opts csv and dialect options.\n\n :return: 3 dictionaries: the csv options, the dialect options, any unrecognized options.\n ";
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_9parse_options = {"parse_options", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_9parse_options, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8cqlshlib_8copyutil_8CopyTask_8parse_options};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_9parse_options(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_opts = 0;
+ PyObject *__pyx_v_direction = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("parse_options (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_opts,&__pyx_n_s_direction,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_opts)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("parse_options", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_direction)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("parse_options", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_options") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_opts = values[1];
+ __pyx_v_direction = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("parse_options", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.parse_options", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_8CopyTask_8parse_options(__pyx_self, __pyx_v_self, __pyx_v_opts, __pyx_v_direction);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_8parse_options(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_opts, PyObject *__pyx_v_direction) {
+ PyObject *__pyx_v_shell = NULL;
+ PyObject *__pyx_v_dialect_options = NULL;
+ PyObject *__pyx_v_copy_options = NULL;
+ PyObject *__pyx_v_s = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ Py_ssize_t __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ long __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
+ double __pyx_t_11;
+ PyObject *(*__pyx_t_12)(PyObject *);
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("parse_options", 0);
+ __Pyx_TraceCall("parse_options", __pyx_f[0], 227);
+ __Pyx_INCREF(__pyx_v_opts);
+
+ /* "cqlshlib/copyutil.py":234
+ * :return: 3 dictionaries: the csv options, the dialect options, any unrecognized options.
+ * """
+ * shell = self.shell # <<<<<<<<<<<<<<
+ * opts = self.clean_options(self.maybe_read_config_file(opts, direction))
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shell); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_shell = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":235
+ * """
+ * shell = self.shell
+ * opts = self.clean_options(self.maybe_read_config_file(opts, direction)) # <<<<<<<<<<<<<<
+ *
+ * dialect_options = dict()
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_clean_options); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_maybe_read_config_file); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_5) {
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_opts);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_opts);
+ __Pyx_GIVEREF(__pyx_v_opts);
+ __Pyx_INCREF(__pyx_v_direction);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_direction);
+ __Pyx_GIVEREF(__pyx_v_direction);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_opts, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":237
+ * opts = self.clean_options(self.maybe_read_config_file(opts, direction))
+ *
+ * dialect_options = dict() # <<<<<<<<<<<<<<
+ * dialect_options['quotechar'] = opts.pop('quote', '"')
+ * dialect_options['escapechar'] = opts.pop('escape', '\\')
+ */
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_dialect_options = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":238
+ *
+ * dialect_options = dict()
+ * dialect_options['quotechar'] = opts.pop('quote', '"') # <<<<<<<<<<<<<<
+ * dialect_options['escapechar'] = opts.pop('escape', '\\')
+ * dialect_options['delimiter'] = opts.pop('delimiter', ',')
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_dialect_options, __pyx_n_s_quotechar, __pyx_t_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":239
+ * dialect_options = dict()
+ * dialect_options['quotechar'] = opts.pop('quote', '"')
+ * dialect_options['escapechar'] = opts.pop('escape', '\\') # <<<<<<<<<<<<<<
+ * dialect_options['delimiter'] = opts.pop('delimiter', ',')
+ * if dialect_options['quotechar'] == dialect_options['escapechar']:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_dialect_options, __pyx_n_s_escapechar, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":240
+ * dialect_options['quotechar'] = opts.pop('quote', '"')
+ * dialect_options['escapechar'] = opts.pop('escape', '\\')
+ * dialect_options['delimiter'] = opts.pop('delimiter', ',') # <<<<<<<<<<<<<<
+ * if dialect_options['quotechar'] == dialect_options['escapechar']:
+ * dialect_options['doublequote'] = True
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_dialect_options, __pyx_n_s_delimiter, __pyx_t_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":241
+ * dialect_options['escapechar'] = opts.pop('escape', '\\')
+ * dialect_options['delimiter'] = opts.pop('delimiter', ',')
+ * if dialect_options['quotechar'] == dialect_options['escapechar']: # <<<<<<<<<<<<<<
+ * dialect_options['doublequote'] = True
+ * del dialect_options['escapechar']
+ */
+ __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_dialect_options, __pyx_n_s_quotechar); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_dialect_options, __pyx_n_s_escapechar); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (__pyx_t_8) {
+
+ /* "cqlshlib/copyutil.py":242
+ * dialect_options['delimiter'] = opts.pop('delimiter', ',')
+ * if dialect_options['quotechar'] == dialect_options['escapechar']:
+ * dialect_options['doublequote'] = True # <<<<<<<<<<<<<<
+ * del dialect_options['escapechar']
+ * else:
+ */
+ if (unlikely(PyDict_SetItem(__pyx_v_dialect_options, __pyx_n_s_doublequote, Py_True) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "cqlshlib/copyutil.py":243
+ * if dialect_options['quotechar'] == dialect_options['escapechar']:
+ * dialect_options['doublequote'] = True
+ * del dialect_options['escapechar'] # <<<<<<<<<<<<<<
+ * else:
+ * dialect_options['doublequote'] = False
+ */
+ if (PyDict_DelItem(__pyx_v_dialect_options, __pyx_n_s_escapechar) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L3;
+ }
+ /*else*/ {
+
+ /* "cqlshlib/copyutil.py":245
+ * del dialect_options['escapechar']
+ * else:
+ * dialect_options['doublequote'] = False # <<<<<<<<<<<<<<
+ *
+ * copy_options = dict()
+ */
+ if (unlikely(PyDict_SetItem(__pyx_v_dialect_options, __pyx_n_s_doublequote, Py_False) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_L3:;
+
+ /* "cqlshlib/copyutil.py":247
+ * dialect_options['doublequote'] = False
+ *
+ * copy_options = dict() # <<<<<<<<<<<<<<
+ * copy_options['nullval'] = opts.pop('null', '')
+ * copy_options['header'] = bool(opts.pop('header', '').lower() == 'true')
+ */
+ __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_v_copy_options = ((PyObject*)__pyx_t_7);
+ __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":248
+ *
+ * copy_options = dict()
+ * copy_options['nullval'] = opts.pop('null', '') # <<<<<<<<<<<<<<
+ * copy_options['header'] = bool(opts.pop('header', '').lower() == 'true')
+ * copy_options['encoding'] = opts.pop('encoding', 'utf8')
+ */
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_nullval, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":249
+ * copy_options = dict()
+ * copy_options['nullval'] = opts.pop('null', '')
+ * copy_options['header'] = bool(opts.pop('header', '').lower() == 'true') # <<<<<<<<<<<<<<
+ * copy_options['encoding'] = opts.pop('encoding', 'utf8')
+ * copy_options['maxrequests'] = int(opts.pop('maxrequests', 6))
+ */
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lower); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_true, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_8))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_header, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":250
+ * copy_options['nullval'] = opts.pop('null', '')
+ * copy_options['header'] = bool(opts.pop('header', '').lower() == 'true')
+ * copy_options['encoding'] = opts.pop('encoding', 'utf8') # <<<<<<<<<<<<<<
+ * copy_options['maxrequests'] = int(opts.pop('maxrequests', 6))
+ * copy_options['pagesize'] = int(opts.pop('pagesize', 1000))
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_encoding, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":251
+ * copy_options['header'] = bool(opts.pop('header', '').lower() == 'true')
+ * copy_options['encoding'] = opts.pop('encoding', 'utf8')
+ * copy_options['maxrequests'] = int(opts.pop('maxrequests', 6)) # <<<<<<<<<<<<<<
+ * copy_options['pagesize'] = int(opts.pop('pagesize', 1000))
+ * # by default the page timeout is 10 seconds per 1000 entries
+ */
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_maxrequests, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":252
+ * copy_options['encoding'] = opts.pop('encoding', 'utf8')
+ * copy_options['maxrequests'] = int(opts.pop('maxrequests', 6))
+ * copy_options['pagesize'] = int(opts.pop('pagesize', 1000)) # <<<<<<<<<<<<<<
+ * # by default the page timeout is 10 seconds per 1000 entries
+ * # in the page size or 10 seconds if pagesize is smaller
+ */
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_pagesize, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":255
+ * # by default the page timeout is 10 seconds per 1000 entries
+ * # in the page size or 10 seconds if pagesize is smaller
+ * copy_options['pagetimeout'] = int(opts.pop('pagetimeout', max(10, 10 * (copy_options['pagesize'] / 1000)))) # <<<<<<<<<<<<<<
+ * copy_options['maxattempts'] = int(opts.pop('maxattempts', 5))
+ * copy_options['dtformats'] = DateTimeFormat(opts.pop('datetimeformat', shell.display_timestamp_format),
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_copy_options, __pyx_n_s_pagesize); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_int_1000); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Multiply(__pyx_int_10, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_9 = 10;
+ __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__pyx_t_8) {
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_3 = __pyx_t_2;
+ } else {
+ __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_t_9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_3 = __pyx_t_5;
+ __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_2) {
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+ }
+ __Pyx_INCREF(__pyx_n_s_pagetimeout);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_n_s_pagetimeout);
+ __Pyx_GIVEREF(__pyx_n_s_pagetimeout);
+ __Pyx_INCREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Int(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_pagetimeout, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":256
+ * # in the page size or 10 seconds if pagesize is smaller
+ * copy_options['pagetimeout'] = int(opts.pop('pagetimeout', max(10, 10 * (copy_options['pagesize'] / 1000))))
+ * copy_options['maxattempts'] = int(opts.pop('maxattempts', 5)) # <<<<<<<<<<<<<<
+ * copy_options['dtformats'] = DateTimeFormat(opts.pop('datetimeformat', shell.display_timestamp_format),
+ * shell.display_date_format, shell.display_nanotime_format)
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Int(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_maxattempts, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":257
+ * copy_options['pagetimeout'] = int(opts.pop('pagetimeout', max(10, 10 * (copy_options['pagesize'] / 1000))))
+ * copy_options['maxattempts'] = int(opts.pop('maxattempts', 5))
+ * copy_options['dtformats'] = DateTimeFormat(opts.pop('datetimeformat', shell.display_timestamp_format), # <<<<<<<<<<<<<<
+ * shell.display_date_format, shell.display_nanotime_format)
+ * copy_options['float_precision'] = shell.display_float_precision
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_DateTimeFormat); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_shell, __pyx_n_s_display_timestamp_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ __pyx_t_10 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ if (__pyx_t_4) {
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_INCREF(__pyx_n_s_datetimeformat);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_6, __pyx_n_s_datetimeformat);
+ __Pyx_GIVEREF(__pyx_n_s_datetimeformat);
+ PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_6, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "cqlshlib/copyutil.py":258
+ * copy_options['maxattempts'] = int(opts.pop('maxattempts', 5))
+ * copy_options['dtformats'] = DateTimeFormat(opts.pop('datetimeformat', shell.display_timestamp_format),
+ * shell.display_date_format, shell.display_nanotime_format) # <<<<<<<<<<<<<<
+ * copy_options['float_precision'] = shell.display_float_precision
+ * copy_options['chunksize'] = int(opts.pop('chunksize', 5000))
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_shell, __pyx_n_s_display_date_format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_shell, __pyx_n_s_display_nanotime_format); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_2 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ __pyx_t_4 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__pyx_t_2) {
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+ }
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_6, __pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_10);
+ __pyx_t_5 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_10 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":257
+ * copy_options['pagetimeout'] = int(opts.pop('pagetimeout', max(10, 10 * (copy_options['pagesize'] / 1000))))
+ * copy_options['maxattempts'] = int(opts.pop('maxattempts', 5))
+ * copy_options['dtformats'] = DateTimeFormat(opts.pop('datetimeformat', shell.display_timestamp_format), # <<<<<<<<<<<<<<
+ * shell.display_date_format, shell.display_nanotime_format)
+ * copy_options['float_precision'] = shell.display_float_precision
+ */
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_dtformats, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":259
+ * copy_options['dtformats'] = DateTimeFormat(opts.pop('datetimeformat', shell.display_timestamp_format),
+ * shell.display_date_format, shell.display_nanotime_format)
+ * copy_options['float_precision'] = shell.display_float_precision # <<<<<<<<<<<<<<
+ * copy_options['chunksize'] = int(opts.pop('chunksize', 5000))
+ * copy_options['ingestrate'] = int(opts.pop('ingestrate', 100000))
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_shell, __pyx_n_s_display_float_precision); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_float_precision, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":260
+ * shell.display_date_format, shell.display_nanotime_format)
+ * copy_options['float_precision'] = shell.display_float_precision
+ * copy_options['chunksize'] = int(opts.pop('chunksize', 5000)) # <<<<<<<<<<<<<<
+ * copy_options['ingestrate'] = int(opts.pop('ingestrate', 100000))
+ * copy_options['maxbatchsize'] = int(opts.pop('maxbatchsize', 20))
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Int(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_chunksize, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":261
+ * copy_options['float_precision'] = shell.display_float_precision
+ * copy_options['chunksize'] = int(opts.pop('chunksize', 5000))
+ * copy_options['ingestrate'] = int(opts.pop('ingestrate', 100000)) # <<<<<<<<<<<<<<
+ * copy_options['maxbatchsize'] = int(opts.pop('maxbatchsize', 20))
+ * copy_options['minbatchsize'] = int(opts.pop('minbatchsize', 10))
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Int(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_ingestrate, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":262
+ * copy_options['chunksize'] = int(opts.pop('chunksize', 5000))
+ * copy_options['ingestrate'] = int(opts.pop('ingestrate', 100000))
+ * copy_options['maxbatchsize'] = int(opts.pop('maxbatchsize', 20)) # <<<<<<<<<<<<<<
+ * copy_options['minbatchsize'] = int(opts.pop('minbatchsize', 10))
+ * copy_options['reportfrequency'] = float(opts.pop('reportfrequency', 0.25))
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Int(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_maxbatchsize, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":263
+ * copy_options['ingestrate'] = int(opts.pop('ingestrate', 100000))
+ * copy_options['maxbatchsize'] = int(opts.pop('maxbatchsize', 20))
+ * copy_options['minbatchsize'] = int(opts.pop('minbatchsize', 10)) # <<<<<<<<<<<<<<
+ * copy_options['reportfrequency'] = float(opts.pop('reportfrequency', 0.25))
+ * copy_options['consistencylevel'] = shell.consistency_level
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Int(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_minbatchsize, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":264
+ * copy_options['maxbatchsize'] = int(opts.pop('maxbatchsize', 20))
+ * copy_options['minbatchsize'] = int(opts.pop('minbatchsize', 10))
+ * copy_options['reportfrequency'] = float(opts.pop('reportfrequency', 0.25)) # <<<<<<<<<<<<<<
+ * copy_options['consistencylevel'] = shell.consistency_level
+ * copy_options['decimalsep'] = opts.pop('decimalsep', '.')
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_11 = __Pyx_PyObject_AsDouble(__pyx_t_7); if (unlikely(__pyx_t_11 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = PyFloat_FromDouble(__pyx_t_11); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_reportfrequency, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":265
+ * copy_options['minbatchsize'] = int(opts.pop('minbatchsize', 10))
+ * copy_options['reportfrequency'] = float(opts.pop('reportfrequency', 0.25))
+ * copy_options['consistencylevel'] = shell.consistency_level # <<<<<<<<<<<<<<
+ * copy_options['decimalsep'] = opts.pop('decimalsep', '.')
+ * copy_options['thousandssep'] = opts.pop('thousandssep', '')
+ */
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_shell, __pyx_n_s_consistency_level); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_consistencylevel, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":266
+ * copy_options['reportfrequency'] = float(opts.pop('reportfrequency', 0.25))
+ * copy_options['consistencylevel'] = shell.consistency_level
+ * copy_options['decimalsep'] = opts.pop('decimalsep', '.') # <<<<<<<<<<<<<<
+ * copy_options['thousandssep'] = opts.pop('thousandssep', '')
+ * copy_options['boolstyle'] = [s.strip() for s in opts.pop('boolstyle', 'True, False').split(',')]
+ */
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_decimalsep, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":267
+ * copy_options['consistencylevel'] = shell.consistency_level
+ * copy_options['decimalsep'] = opts.pop('decimalsep', '.')
+ * copy_options['thousandssep'] = opts.pop('thousandssep', '') # <<<<<<<<<<<<<<
+ * copy_options['boolstyle'] = [s.strip() for s in opts.pop('boolstyle', 'True, False').split(',')]
+ * copy_options['numprocesses'] = int(opts.pop('numprocesses', self.get_num_processes(cap=16)))
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_thousandssep, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":268
+ * copy_options['decimalsep'] = opts.pop('decimalsep', '.')
+ * copy_options['thousandssep'] = opts.pop('thousandssep', '')
+ * copy_options['boolstyle'] = [s.strip() for s in opts.pop('boolstyle', 'True, False').split(',')] # <<<<<<<<<<<<<<
+ * copy_options['numprocesses'] = int(opts.pop('numprocesses', self.get_num_processes(cap=16)))
+ * copy_options['begintoken'] = opts.pop('begintoken', '')
+ */
+ __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
+ __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
+ __pyx_t_12 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_12)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ }
+ } else {
+ __pyx_t_4 = __pyx_t_12(__pyx_t_1);
+ if (unlikely(!__pyx_t_4)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_strip); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_3 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_boolstyle, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":269
+ * copy_options['thousandssep'] = opts.pop('thousandssep', '')
+ * copy_options['boolstyle'] = [s.strip() for s in opts.pop('boolstyle', 'True, False').split(',')]
+ * copy_options['numprocesses'] = int(opts.pop('numprocesses', self.get_num_processes(cap=16))) # <<<<<<<<<<<<<<
+ * copy_options['begintoken'] = opts.pop('begintoken', '')
+ * copy_options['endtoken'] = opts.pop('endtoken', '')
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_num_processes); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_cap, __pyx_int_16) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__pyx_t_10) {
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = NULL;
+ }
+ __Pyx_INCREF(__pyx_n_s_numprocesses);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_n_s_numprocesses);
+ __Pyx_GIVEREF(__pyx_n_s_numprocesses);
+ PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Int(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_numprocesses, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":270
+ * copy_options['boolstyle'] = [s.strip() for s in opts.pop('boolstyle', 'True, False').split(',')]
+ * copy_options['numprocesses'] = int(opts.pop('numprocesses', self.get_num_processes(cap=16)))
+ * copy_options['begintoken'] = opts.pop('begintoken', '') # <<<<<<<<<<<<<<
+ * copy_options['endtoken'] = opts.pop('endtoken', '')
+ * copy_options['maxrows'] = int(opts.pop('maxrows', '-1'))
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_begintoken, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":271
+ * copy_options['numprocesses'] = int(opts.pop('numprocesses', self.get_num_processes(cap=16)))
+ * copy_options['begintoken'] = opts.pop('begintoken', '')
+ * copy_options['endtoken'] = opts.pop('endtoken', '') # <<<<<<<<<<<<<<
+ * copy_options['maxrows'] = int(opts.pop('maxrows', '-1'))
+ * copy_options['skiprows'] = int(opts.pop('skiprows', '0'))
+ */
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_endtoken, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":272
+ * copy_options['begintoken'] = opts.pop('begintoken', '')
+ * copy_options['endtoken'] = opts.pop('endtoken', '')
+ * copy_options['maxrows'] = int(opts.pop('maxrows', '-1')) # <<<<<<<<<<<<<<
+ * copy_options['skiprows'] = int(opts.pop('skiprows', '0'))
+ * copy_options['skipcols'] = opts.pop('skipcols', '')
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Int(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_maxrows, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":273
+ * copy_options['endtoken'] = opts.pop('endtoken', '')
+ * copy_options['maxrows'] = int(opts.pop('maxrows', '-1'))
+ * copy_options['skiprows'] = int(opts.pop('skiprows', '0')) # <<<<<<<<<<<<<<
+ * copy_options['skipcols'] = opts.pop('skipcols', '')
+ * copy_options['maxparseerrors'] = int(opts.pop('maxparseerrors', '-1'))
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Int(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_skiprows, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":274
+ * copy_options['maxrows'] = int(opts.pop('maxrows', '-1'))
+ * copy_options['skiprows'] = int(opts.pop('skiprows', '0'))
+ * copy_options['skipcols'] = opts.pop('skipcols', '') # <<<<<<<<<<<<<<
+ * copy_options['maxparseerrors'] = int(opts.pop('maxparseerrors', '-1'))
+ * copy_options['maxinserterrors'] = int(opts.pop('maxinserterrors', '-1'))
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_skipcols, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":275
+ * copy_options['skiprows'] = int(opts.pop('skiprows', '0'))
+ * copy_options['skipcols'] = opts.pop('skipcols', '')
+ * copy_options['maxparseerrors'] = int(opts.pop('maxparseerrors', '-1')) # <<<<<<<<<<<<<<
+ * copy_options['maxinserterrors'] = int(opts.pop('maxinserterrors', '-1'))
+ * copy_options['errfile'] = safe_normpath(opts.pop('errfile', 'import_%s_%s.err' % (self.ks, self.table,)))
+ */
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_maxparseerrors, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":276
+ * copy_options['skipcols'] = opts.pop('skipcols', '')
+ * copy_options['maxparseerrors'] = int(opts.pop('maxparseerrors', '-1'))
+ * copy_options['maxinserterrors'] = int(opts.pop('maxinserterrors', '-1')) # <<<<<<<<<<<<<<
+ * copy_options['errfile'] = safe_normpath(opts.pop('errfile', 'import_%s_%s.err' % (self.ks, self.table,)))
+ * copy_options['ratefile'] = safe_normpath(opts.pop('ratefile', ''))
+ */
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_maxinserterrors, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":277
+ * copy_options['maxparseerrors'] = int(opts.pop('maxparseerrors', '-1'))
+ * copy_options['maxinserterrors'] = int(opts.pop('maxinserterrors', '-1'))
+ * copy_options['errfile'] = safe_normpath(opts.pop('errfile', 'import_%s_%s.err' % (self.ks, self.table,))) # <<<<<<<<<<<<<<
+ * copy_options['ratefile'] = safe_normpath(opts.pop('ratefile', ''))
+ * copy_options['maxoutputsize'] = int(opts.pop('maxoutputsize', '-1'))
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_safe_normpath); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ks); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_table); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_10 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_import__s__s_err, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ __pyx_t_10 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ if (__pyx_t_2) {
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+ }
+ __Pyx_INCREF(__pyx_n_s_errfile);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_6, __pyx_n_s_errfile);
+ __Pyx_GIVEREF(__pyx_n_s_errfile);
+ PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_6, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_errfile, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":278
+ * copy_options['maxinserterrors'] = int(opts.pop('maxinserterrors', '-1'))
+ * copy_options['errfile'] = safe_normpath(opts.pop('errfile', 'import_%s_%s.err' % (self.ks, self.table,)))
+ * copy_options['ratefile'] = safe_normpath(opts.pop('ratefile', '')) # <<<<<<<<<<<<<<
+ * copy_options['maxoutputsize'] = int(opts.pop('maxoutputsize', '-1'))
+ * copy_options['preparedstatements'] = bool(opts.pop('preparedstatements', 'true').lower() == 'true')
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_safe_normpath); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_ratefile, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":279
+ * copy_options['errfile'] = safe_normpath(opts.pop('errfile', 'import_%s_%s.err' % (self.ks, self.table,)))
+ * copy_options['ratefile'] = safe_normpath(opts.pop('ratefile', ''))
+ * copy_options['maxoutputsize'] = int(opts.pop('maxoutputsize', '-1')) # <<<<<<<<<<<<<<
+ * copy_options['preparedstatements'] = bool(opts.pop('preparedstatements', 'true').lower() == 'true')
+ *
+ */
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_maxoutputsize, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":280
+ * copy_options['ratefile'] = safe_normpath(opts.pop('ratefile', ''))
+ * copy_options['maxoutputsize'] = int(opts.pop('maxoutputsize', '-1'))
+ * copy_options['preparedstatements'] = bool(opts.pop('preparedstatements', 'true').lower() == 'true') # <<<<<<<<<<<<<<
+ *
+ * self.check_options(copy_options)
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opts, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_lower); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_true, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_PyBool_FromLong((!(!__pyx_t_8))); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ if (unlikely(PyDict_SetItem(__pyx_v_copy_options, __pyx_n_s_preparedstatements, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":282
+ * copy_options['preparedstatements'] = bool(opts.pop('preparedstatements', 'true').lower() == 'true')
+ *
+ * self.check_options(copy_options) # <<<<<<<<<<<<<<
+ * return CopyOptions(copy=copy_options, dialect=dialect_options, unrecognized=opts)
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_check_options); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_copy_options); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ } else {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_copy_options);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_copy_options);
+ __Pyx_GIVEREF(__pyx_v_copy_options);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":283
+ *
+ * self.check_options(copy_options)
+ * return CopyOptions(copy=copy_options, dialect=dialect_options, unrecognized=opts) # <<<<<<<<<<<<<<
+ *
+ * @staticmethod
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_CopyOptions); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, __pyx_v_copy_options) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dialect, __pyx_v_dialect_options) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_unrecognized, __pyx_v_opts) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "cqlshlib/copyutil.py":227
+ * for k, v, in opts.iteritems()])
+ *
+ * def parse_options(self, opts, direction): # <<<<<<<<<<<<<<
+ * """
+ * Parse options for import (COPY FROM) and export (COPY TO) operations.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.parse_options", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_shell);
+ __Pyx_XDECREF(__pyx_v_dialect_options);
+ __Pyx_XDECREF(__pyx_v_copy_options);
+ __Pyx_XDECREF(__pyx_v_s);
+ __Pyx_XDECREF(__pyx_v_opts);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":286
+ *
+ * @staticmethod
+ * def check_options(copy_options): # <<<<<<<<<<<<<<
+ * """
+ * Check any options that require a sanity check beyond a simple type conversion and if required
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_11check_options(PyObject *__pyx_self, PyObject *__pyx_v_copy_options); /*proto*/
+static char __pyx_doc_8cqlshlib_8copyutil_8CopyTask_10check_options[] = "\n Check any options that require a sanity check beyond a simple type conversion and if required\n raise a value error:\n\n - boolean styles must be exactly 2, they must be different and they cannot be empty\n ";
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_11check_options = {"check_options", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_11check_options, METH_O, __pyx_doc_8cqlshlib_8copyutil_8CopyTask_10check_options};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_11check_options(PyObject *__pyx_self, PyObject *__pyx_v_copy_options) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("check_options (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_8CopyTask_10check_options(__pyx_self, ((PyObject *)__pyx_v_copy_options));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_10check_options(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_copy_options) {
+ PyObject *__pyx_v_bool_styles = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("check_options", 0);
+ __Pyx_TraceCall("check_options", __pyx_f[0], 286);
+
+ /* "cqlshlib/copyutil.py":293
+ * - boolean styles must be exactly 2, they must be different and they cannot be empty
+ * """
+ * bool_styles = copy_options['boolstyle'] # <<<<<<<<<<<<<<
+ * if len(bool_styles) != 2 or bool_styles[0] == bool_styles[1] or not bool_styles[0] or not bool_styles[1]:
+ * raise ValueError("Invalid boolean styles %s" % copy_options['boolstyle'])
+ */
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_copy_options, __pyx_n_s_boolstyle); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_bool_styles = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":294
+ * """
+ * bool_styles = copy_options['boolstyle']
+ * if len(bool_styles) != 2 or bool_styles[0] == bool_styles[1] or not bool_styles[0] or not bool_styles[1]: # <<<<<<<<<<<<<<
+ * raise ValueError("Invalid boolean styles %s" % copy_options['boolstyle'])
+ *
+ */
+ __pyx_t_3 = PyObject_Length(__pyx_v_bool_styles); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((__pyx_t_3 != 2) != 0);
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_2 = __pyx_t_4;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_bool_styles, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_bool_styles, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_2 = __pyx_t_4;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_bool_styles, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_7 = ((!__pyx_t_4) != 0);
+ if (!__pyx_t_7) {
+ } else {
+ __pyx_t_2 = __pyx_t_7;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_bool_styles, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_4 = ((!__pyx_t_7) != 0);
+ __pyx_t_2 = __pyx_t_4;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_2) {
+
+ /* "cqlshlib/copyutil.py":295
+ * bool_styles = copy_options['boolstyle']
+ * if len(bool_styles) != 2 or bool_styles[0] == bool_styles[1] or not bool_styles[0] or not bool_styles[1]:
+ * raise ValueError("Invalid boolean styles %s" % copy_options['boolstyle']) # <<<<<<<<<<<<<<
+ *
+ * @staticmethod
+ */
+ __pyx_t_6 = PyObject_GetItem(__pyx_v_copy_options, __pyx_n_s_boolstyle); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_boolean_styles_s, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+
+ /* "cqlshlib/copyutil.py":286
+ *
+ * @staticmethod
+ * def check_options(copy_options): # <<<<<<<<<<<<<<
+ * """
+ * Check any options that require a sanity check beyond a simple type conversion and if required
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.check_options", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_bool_styles);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":298
+ *
+ * @staticmethod
+ * def get_num_processes(cap): # <<<<<<<<<<<<<<
+ * """
+ * Pick a reasonable number of child processes. We need to leave at
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_13get_num_processes(PyObject *__pyx_self, PyObject *__pyx_v_cap); /*proto*/
+static char __pyx_doc_8cqlshlib_8copyutil_8CopyTask_12get_num_processes[] = "\n Pick a reasonable number of child processes. We need to leave at\n least one core for the parent or feeder process.\n ";
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_13get_num_processes = {"get_num_processes", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_13get_num_processes, METH_O, __pyx_doc_8cqlshlib_8copyutil_8CopyTask_12get_num_processes};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_13get_num_processes(PyObject *__pyx_self, PyObject *__pyx_v_cap) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("get_num_processes (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_8CopyTask_12get_num_processes(__pyx_self, ((PyObject *)__pyx_v_cap));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_12get_num_processes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cap) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ long __pyx_t_6;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("get_num_processes", 0);
+ __Pyx_TraceCall("get_num_processes", __pyx_f[0], 298);
+
+ /* "cqlshlib/copyutil.py":303
+ * least one core for the parent or feeder process.
+ * """
+ * return max(1, min(cap, CopyTask.get_num_cores() - 1)) # <<<<<<<<<<<<<<
+ *
+ * @staticmethod
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CopyTask); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_num_cores); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_INCREF(__pyx_v_cap);
+ __pyx_t_1 = __pyx_v_cap;
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_5) {
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_2 = __pyx_t_3;
+ } else {
+ __Pyx_INCREF(__pyx_t_1);
+ __pyx_t_2 = __pyx_t_1;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_3 = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_6 = 1;
+ __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_5) {
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_2 = __pyx_t_3;
+ } else {
+ __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = __pyx_t_4;
+ __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "cqlshlib/copyutil.py":298
+ *
+ * @staticmethod
+ * def get_num_processes(cap): # <<<<<<<<<<<<<<
+ * """
+ * Pick a reasonable number of child processes. We need to leave at
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.get_num_processes", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":306
+ *
+ * @staticmethod
+ * def get_num_cores(): # <<<<<<<<<<<<<<
+ * """
+ * Return the number of cores if available. If the test environment variable
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_15get_num_cores(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_8cqlshlib_8copyutil_8CopyTask_14get_num_cores[] = "\n Return the number of cores if available. If the test environment variable\n is set, then return the number carried by this variable. This is to test single-core\n machine more easily.\n ";
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_15get_num_cores = {"get_num_cores", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_15get_num_cores, METH_NOARGS, __pyx_doc_8cqlshlib_8copyutil_8CopyTask_14get_num_cores};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_15get_num_cores(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("get_num_cores (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_8CopyTask_14get_num_cores(__pyx_self);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_14get_num_cores(CYTHON_UNUSED PyObject *__pyx_self) {
+ PyObject *__pyx_v_num_cores_for_testing = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("get_num_cores", 0);
+ __Pyx_TraceCall("get_num_cores", __pyx_f[0], 306);
+
+ /* "cqlshlib/copyutil.py":312
+ * machine more easily.
+ * """
+ * 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()
+ */
+ {
+ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+ __Pyx_XGOTREF(__pyx_t_1);
+ __Pyx_XGOTREF(__pyx_t_2);
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+ /* "cqlshlib/copyutil.py":313
+ * """
+ * 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()
+ * except NotImplementedError:
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_environ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_num_cores_for_testing = __pyx_t_5;
+ __pyx_t_5 = 0;
+
+ /* "cqlshlib/copyutil.py":314
+ * 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() # <<<<<<<<<<<<<<
+ * except NotImplementedError:
+ * return 1
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_num_cores_for_testing); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (__pyx_t_6) {
+ __pyx_t_4 = PyNumber_Int(__pyx_v_num_cores_for_testing); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __pyx_t_4;
+ __pyx_t_4 = 0;
+ } else {
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_mp); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_cpu_count); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (__pyx_t_7) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_5 = __pyx_t_4;
+ __pyx_t_4 = 0;
+ }
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ goto __pyx_L7_try_return;
+ }
+ __pyx_L3_error:;
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "cqlshlib/copyutil.py":315
+ * 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()
+ * except NotImplementedError: # <<<<<<<<<<<<<<
+ * return 1
+ *
+ */
+ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_NotImplementedError);
+ if (__pyx_t_9) {
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.get_num_cores", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_8);
+
+ /* "cqlshlib/copyutil.py":316
+ * return int(num_cores_for_testing) if num_cores_for_testing else mp.cpu_count()
+ * except NotImplementedError:
+ * return 1 # <<<<<<<<<<<<<<
+ *
+ * @staticmethod
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_1);
+ __pyx_r = __pyx_int_1;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ goto __pyx_L6_except_return;
+ }
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L1_error;
+ __pyx_L7_try_return:;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L0;
+ __pyx_L6_except_return:;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L0;
+ }
+
+ /* "cqlshlib/copyutil.py":306
+ *
+ * @staticmethod
+ * def get_num_cores(): # <<<<<<<<<<<<<<
+ * """
+ * Return the number of cores if available. If the test environment variable
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.get_num_cores", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_num_cores_for_testing);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":319
+ *
+ * @staticmethod
+ * def describe_interval(seconds): # <<<<<<<<<<<<<<
+ * desc = []
+ * for length, unit in ((86400, 'day'), (3600, 'hour'), (60, 'minute')):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_17describe_interval(PyObject *__pyx_self, PyObject *__pyx_v_seconds); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_17describe_interval = {"describe_interval", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_17describe_interval, METH_O, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_17describe_interval(PyObject *__pyx_self, PyObject *__pyx_v_seconds) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("describe_interval (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_8CopyTask_16describe_interval(__pyx_self, ((PyObject *)__pyx_v_seconds));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_16describe_interval(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seconds) {
+ PyObject *__pyx_v_desc = NULL;
+ PyObject *__pyx_v_length = NULL;
+ PyObject *__pyx_v_unit = NULL;
+ PyObject *__pyx_v_num = NULL;
+ PyObject *__pyx_v_words = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ int __pyx_t_7;
+ Py_ssize_t __pyx_t_8;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("describe_interval", 0);
+ __Pyx_TraceCall("describe_interval", __pyx_f[0], 319);
+ __Pyx_INCREF(__pyx_v_seconds);
+
+ /* "cqlshlib/copyutil.py":320
+ * @staticmethod
+ * def describe_interval(seconds):
+ * desc = [] # <<<<<<<<<<<<<<
+ * for length, unit in ((86400, 'day'), (3600, 'hour'), (60, 'minute')):
+ * num = int(seconds) / length
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_desc = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":321
+ * def describe_interval(seconds):
+ * desc = []
+ * for length, unit in ((86400, 'day'), (3600, 'hour'), (60, 'minute')): # <<<<<<<<<<<<<<
+ * num = int(seconds) / length
+ * if num > 0:
+ */
+ __pyx_t_1 = __pyx_tuple__51; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ for (;;) {
+ if (__pyx_t_2 >= 3) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ if (likely(__pyx_t_3 != Py_None)) {
+ PyObject* sequence = __pyx_t_3;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ #else
+ __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_unit, __pyx_t_5);
+ __pyx_t_5 = 0;
+
+ /* "cqlshlib/copyutil.py":322
+ * desc = []
+ * for length, unit in ((86400, 'day'), (3600, 'hour'), (60, 'minute')):
+ * num = int(seconds) / length # <<<<<<<<<<<<<<
+ * if num > 0:
+ * desc.append('%d %s' % (num, unit))
+ */
+ __pyx_t_3 = PyNumber_Int(__pyx_v_seconds); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_v_length); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_num, __pyx_t_5);
+ __pyx_t_5 = 0;
+
+ /* "cqlshlib/copyutil.py":323
+ * for length, unit in ((86400, 'day'), (3600, 'hour'), (60, 'minute')):
+ * num = int(seconds) / length
+ * if num > 0: # <<<<<<<<<<<<<<
+ * desc.append('%d %s' % (num, unit))
+ * if num > 1:
+ */
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_num, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__pyx_t_6) {
+
+ /* "cqlshlib/copyutil.py":324
+ * num = int(seconds) / length
+ * if num > 0:
+ * desc.append('%d %s' % (num, unit)) # <<<<<<<<<<<<<<
+ * if num > 1:
+ * desc[-1] += 's'
+ */
+ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_v_num);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_num);
+ __Pyx_GIVEREF(__pyx_v_num);
+ __Pyx_INCREF(__pyx_v_unit);
+ PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_unit);
+ __Pyx_GIVEREF(__pyx_v_unit);
+ __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_d_s, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_desc, __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "cqlshlib/copyutil.py":325
+ * if num > 0:
+ * desc.append('%d %s' % (num, unit))
+ * if num > 1: # <<<<<<<<<<<<<<
+ * desc[-1] += 's'
+ * seconds %= length
+ */
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_num, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+
+ /* "cqlshlib/copyutil.py":326
+ * desc.append('%d %s' % (num, unit))
+ * if num > 1:
+ * desc[-1] += 's' # <<<<<<<<<<<<<<
+ * seconds %= length
+ * words = '%.03f seconds' % seconds
+ */
+ __pyx_t_8 = -1;
+ __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_desc, __pyx_t_8, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_n_s_s); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_desc, __pyx_t_8, __pyx_t_5, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+ goto __pyx_L5;
+ }
+ __pyx_L5:;
+
+ /* "cqlshlib/copyutil.py":327
+ * if num > 1:
+ * desc[-1] += 's'
+ * seconds %= length # <<<<<<<<<<<<<<
+ * words = '%.03f seconds' % seconds
+ * if len(desc) > 1:
+ */
+ __pyx_t_5 = PyNumber_InPlaceRemainder(__pyx_v_seconds, __pyx_v_length); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF_SET(__pyx_v_seconds, __pyx_t_5);
+ __pyx_t_5 = 0;
+
+ /* "cqlshlib/copyutil.py":321
+ * def describe_interval(seconds):
+ * desc = []
+ * for length, unit in ((86400, 'day'), (3600, 'hour'), (60, 'minute')): # <<<<<<<<<<<<<<
+ * num = int(seconds) / length
+ * if num > 0:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":328
+ * desc[-1] += 's'
+ * seconds %= length
+ * words = '%.03f seconds' % seconds # <<<<<<<<<<<<<<
+ * if len(desc) > 1:
+ * words = ', '.join(desc) + ', and ' + words
+ */
+ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_03f_seconds, __pyx_v_seconds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_words = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":329
+ * seconds %= length
+ * words = '%.03f seconds' % seconds
+ * if len(desc) > 1: # <<<<<<<<<<<<<<
+ * words = ', '.join(desc) + ', and ' + words
+ * elif len(desc) == 1:
+ */
+ __pyx_t_2 = PyList_GET_SIZE(__pyx_v_desc); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = ((__pyx_t_2 > 1) != 0);
+ if (__pyx_t_6) {
+
+ /* "cqlshlib/copyutil.py":330
+ * words = '%.03f seconds' % seconds
+ * if len(desc) > 1:
+ * words = ', '.join(desc) + ', and ' + words # <<<<<<<<<<<<<<
+ * elif len(desc) == 1:
+ * words = desc[0] + ' and ' + words
+ */
+ __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__52, __pyx_v_desc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_kp_s_and); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_v_words); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF_SET(__pyx_v_words, __pyx_t_1);
+ __pyx_t_1 = 0;
+ goto __pyx_L7;
+ }
+
+ /* "cqlshlib/copyutil.py":331
+ * if len(desc) > 1:
+ * words = ', '.join(desc) + ', and ' + words
+ * elif len(desc) == 1: # <<<<<<<<<<<<<<
+ * words = desc[0] + ' and ' + words
+ * return words
+ */
+ __pyx_t_2 = PyList_GET_SIZE(__pyx_v_desc); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = ((__pyx_t_2 == 1) != 0);
+ if (__pyx_t_6) {
+
+ /* "cqlshlib/copyutil.py":332
+ * words = ', '.join(desc) + ', and ' + words
+ * elif len(desc) == 1:
+ * words = desc[0] + ' and ' + words # <<<<<<<<<<<<<<
+ * return words
+ *
+ */
+ __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_desc, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_kp_s_and_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_v_words); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF_SET(__pyx_v_words, __pyx_t_1);
+ __pyx_t_1 = 0;
+ goto __pyx_L7;
+ }
+ __pyx_L7:;
+
+ /* "cqlshlib/copyutil.py":333
+ * elif len(desc) == 1:
+ * words = desc[0] + ' and ' + words
+ * return words # <<<<<<<<<<<<<<
+ *
+ * @staticmethod
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_words);
+ __pyx_r = __pyx_v_words;
+ goto __pyx_L0;
+
+ /* "cqlshlib/copyutil.py":319
+ *
+ * @staticmethod
+ * def describe_interval(seconds): # <<<<<<<<<<<<<<
+ * desc = []
+ * for length, unit in ((86400, 'day'), (3600, 'hour'), (60, 'minute')):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.describe_interval", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_desc);
+ __Pyx_XDECREF(__pyx_v_length);
+ __Pyx_XDECREF(__pyx_v_unit);
+ __Pyx_XDECREF(__pyx_v_num);
+ __Pyx_XDECREF(__pyx_v_words);
+ __Pyx_XDECREF(__pyx_v_seconds);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":336
+ *
+ * @staticmethod
+ * def get_columns(shell, ks, table, columns): # <<<<<<<<<<<<<<
+ * """
+ * Return all columns if none were specified or only the columns specified.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_19get_columns(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_8cqlshlib_8copyutil_8CopyTask_18get_columns[] = "\n Return all columns if none were specified or only the columns specified.\n Possible enhancement: introduce a regex like syntax (^) to allow users\n to specify all columns except a few.\n ";
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_19get_columns = {"get_columns", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_19get_columns, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8cqlshlib_8copyutil_8CopyTask_18get_columns};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_19get_columns(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_shell = 0;
+ PyObject *__pyx_v_ks = 0;
+ PyObject *__pyx_v_table = 0;
+ PyObject *__pyx_v_columns = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("get_columns (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shell,&__pyx_n_s_ks,&__pyx_n_s_table,&__pyx_n_s_columns,0};
+ PyObject* values[4] = {0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shell)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ks)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("get_columns", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_table)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("get_columns", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_columns)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("get_columns", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_columns") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ }
+ __pyx_v_shell = values[0];
+ __pyx_v_ks = values[1];
+ __pyx_v_table = values[2];
+ __pyx_v_columns = values[3];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("get_columns", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.get_columns", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_8CopyTask_18get_columns(__pyx_self, __pyx_v_shell, __pyx_v_ks, __pyx_v_table, __pyx_v_columns);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_18get_columns(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_shell, PyObject *__pyx_v_ks, PyObject *__pyx_v_table, PyObject *__pyx_v_columns) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ Py_ssize_t __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("get_columns", 0);
+ __Pyx_TraceCall("get_columns", __pyx_f[0], 336);
+
+ /* "cqlshlib/copyutil.py":342
+ * to specify all columns except a few.
+ * """
+ * return shell.get_column_names(ks, table) if not columns else columns # <<<<<<<<<<<<<<
+ *
+ * def close(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_columns); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (((!__pyx_t_2) != 0)) {
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_shell, __pyx_n_s_get_column_names); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_5) {
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_ks);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_ks);
+ __Pyx_GIVEREF(__pyx_v_ks);
+ __Pyx_INCREF(__pyx_v_table);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_table);
+ __Pyx_GIVEREF(__pyx_v_table);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_1 = __pyx_t_3;
+ __pyx_t_3 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_v_columns);
+ __pyx_t_1 = __pyx_v_columns;
+ }
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "cqlshlib/copyutil.py":336
+ *
+ * @staticmethod
+ * def get_columns(shell, ks, table, columns): # <<<<<<<<<<<<<<
+ * """
+ * Return all columns if none were specified or only the columns specified.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.get_columns", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":344
+ * return shell.get_column_names(ks, table) if not columns else columns
+ *
+ * def close(self): # <<<<<<<<<<<<<<
+ * self.stop_processes()
+ * self.inmsg.close()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_21close(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_21close = {"close", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_21close, METH_O, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_21close(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("close (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_8CopyTask_20close(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_20close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("close", 0);
+ __Pyx_TraceCall("close", __pyx_f[0], 344);
+
+ /* "cqlshlib/copyutil.py":345
+ *
+ * def close(self):
+ * self.stop_processes() # <<<<<<<<<<<<<<
+ * self.inmsg.close()
+ * self.outmsg.close()
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stop_processes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":346
+ * def close(self):
+ * self.stop_processes()
+ * self.inmsg.close() # <<<<<<<<<<<<<<
+ * self.outmsg.close()
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inmsg); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":347
+ * self.stop_processes()
+ * self.inmsg.close()
+ * self.outmsg.close() # <<<<<<<<<<<<<<
+ *
+ * def num_live_processes(self):
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outmsg); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":344
+ * return shell.get_column_names(ks, table) if not columns else columns
+ *
+ * def close(self): # <<<<<<<<<<<<<<
+ * self.stop_processes()
+ * self.inmsg.close()
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":349
+ * self.outmsg.close()
+ *
+ * def num_live_processes(self): # <<<<<<<<<<<<<<
+ * return sum(1 for p in self.processes if p.is_alive())
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_23num_live_processes(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_23num_live_processes = {"num_live_processes", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_23num_live_processes, METH_O, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_23num_live_processes(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("num_live_processes (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_8CopyTask_22num_live_processes(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_8cqlshlib_8copyutil_8CopyTask_18num_live_processes_2generator5(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+
+/* "cqlshlib/copyutil.py":350
+ *
+ * def num_live_processes(self):
+ * return sum(1 for p in self.processes if p.is_alive()) # <<<<<<<<<<<<<<
+ *
+ * @staticmethod
+ */
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_18num_live_processes_genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_3_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_3_genexpr *)__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_3_genexpr(__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_3_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_cur_scope);
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_2_num_live_processes *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ __Pyx_TraceCall("genexpr", __pyx_f[0], 350);
+ {
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_8cqlshlib_8copyutil_8CopyTask_18num_live_processes_2generator5, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_CopyTask_num_live_processes_loca); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.num_live_processes.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_8cqlshlib_8copyutil_8CopyTask_18num_live_processes_2generator5(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_3_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ Py_ssize_t __pyx_t_3;
+ PyObject *(*__pyx_t_4)(PyObject *);
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("None", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L7_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_n_s_processes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
+ __pyx_t_4 = NULL;
+ } else {
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_4)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ } else {
+ if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_4(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_p);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_p, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_p, __pyx_n_s_is_alive); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_7) {
+ __Pyx_INCREF(__pyx_int_1);
+ __pyx_r = __pyx_int_1;
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L7_resume_from_yield:;
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_2);
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Generator_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+}
+
+/* "cqlshlib/copyutil.py":349
+ * self.outmsg.close()
+ *
+ * def num_live_processes(self): # <<<<<<<<<<<<<<
+ * return sum(1 for p in self.processes if p.is_alive())
+ *
+ */
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_22num_live_processes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_2_num_live_processes *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("num_live_processes", 0);
+ __pyx_cur_scope = (struct __pyx_obj_8cqlshlib_8copyutil___pyx_scope_struct_2_num_live_processes *)__pyx_tp_new_8cqlshlib_8copyutil___pyx_scope_struct_2_num_live_processes(__pyx_ptype_8cqlshlib_8copyutil___pyx_scope_struct_2_num_live_processes, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_cur_scope);
+ __Pyx_TraceCall("num_live_processes", __pyx_f[0], 349);
+ __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
+
+ /* "cqlshlib/copyutil.py":350
+ *
+ * def num_live_processes(self):
+ * return sum(1 for p in self.processes if p.is_alive()) # <<<<<<<<<<<<<<
+ *
+ * @staticmethod
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __pyx_pf_8cqlshlib_8copyutil_8CopyTask_18num_live_processes_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "cqlshlib/copyutil.py":349
+ * self.outmsg.close()
+ *
+ * def num_live_processes(self): # <<<<<<<<<<<<<<
+ * return sum(1 for p in self.processes if p.is_alive())
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.num_live_processes", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":353
+ *
+ * @staticmethod
+ * def get_pid(): # <<<<<<<<<<<<<<
+ * return os.getpid() if hasattr(os, 'getpid') else None
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_25get_pid(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_25get_pid = {"get_pid", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_25get_pid, METH_NOARGS, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_25get_pid(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("get_pid (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_8CopyTask_24get_pid(__pyx_self);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_24get_pid(CYTHON_UNUSED PyObject *__pyx_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("get_pid", 0);
+ __Pyx_TraceCall("get_pid", __pyx_f[0], 353);
+
+ /* "cqlshlib/copyutil.py":354
+ * @staticmethod
+ * def get_pid():
+ * return os.getpid() if hasattr(os, 'getpid') else None # <<<<<<<<<<<<<<
+ *
+ * @staticmethod
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyObject_HasAttr(__pyx_t_2, __pyx_n_s_getpid); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if ((__pyx_t_3 != 0)) {
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getpid); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_1 = Py_None;
+ }
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "cqlshlib/copyutil.py":353
+ *
+ * @staticmethod
+ * def get_pid(): # <<<<<<<<<<<<<<
+ * return os.getpid() if hasattr(os, 'getpid') else None
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.get_pid", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":357
+ *
+ * @staticmethod
+ * def trace_process(pid): # <<<<<<<<<<<<<<
+ * if pid and STRACE_ON:
+ * os.system("strace -vvvv -c -o strace.{pid}.out -e trace=all -p {pid}&".format(pid=pid))
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_27trace_process(PyObject *__pyx_self, PyObject *__pyx_v_pid); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_27trace_process = {"trace_process", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_27trace_process, METH_O, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_27trace_process(PyObject *__pyx_self, PyObject *__pyx_v_pid) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("trace_process (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_8CopyTask_26trace_process(__pyx_self, ((PyObject *)__pyx_v_pid));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_26trace_process(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pid) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("trace_process", 0);
+ __Pyx_TraceCall("trace_process", __pyx_f[0], 357);
+
+ /* "cqlshlib/copyutil.py":358
+ * @staticmethod
+ * def trace_process(pid):
+ * if pid and STRACE_ON: # <<<<<<<<<<<<<<
+ * os.system("strace -vvvv -c -o strace.{pid}.out -e trace=all -p {pid}&".format(pid=pid))
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_pid); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_1 = __pyx_t_2;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_STRACE_ON); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "cqlshlib/copyutil.py":359
+ * def trace_process(pid):
+ * if pid and STRACE_ON:
+ * os.system("strace -vvvv -c -o strace.{pid}.out -e trace=all -p {pid}&".format(pid=pid)) # <<<<<<<<<<<<<<
+ *
+ * def start_processes(self):
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_system); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_strace_vvvv_c_o_strace_pid_out_e, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pid, __pyx_v_pid) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L3;
+ }
+ __pyx_L3:;
+
+ /* "cqlshlib/copyutil.py":357
+ *
+ * @staticmethod
+ * def trace_process(pid): # <<<<<<<<<<<<<<
+ * if pid and STRACE_ON:
+ * os.system("strace -vvvv -c -o strace.{pid}.out -e trace=all -p {pid}&".format(pid=pid))
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.trace_process", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":361
+ * os.system("strace -vvvv -c -o strace.{pid}.out -e trace=all -p {pid}&".format(pid=pid))
+ *
+ * def start_processes(self): # <<<<<<<<<<<<<<
+ * for i, process in enumerate(self.processes):
+ * process.start()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_29start_processes(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_29start_processes = {"start_processes", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_29start_processes, METH_O, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_29start_processes(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("start_processes (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_8CopyTask_28start_processes(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_28start_processes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ CYTHON_UNUSED PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_v_process = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("start_processes", 0);
+ __Pyx_TraceCall("start_processes", __pyx_f[0], 361);
+
+ /* "cqlshlib/copyutil.py":362
+ *
+ * def start_processes(self):
+ * for i, process in enumerate(self.processes): # <<<<<<<<<<<<<<
+ * process.start()
+ * self.trace_process(process.pid)
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_t_1 = __pyx_int_0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_processes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ }
+ } else {
+ __pyx_t_2 = __pyx_t_5(__pyx_t_3);
+ if (unlikely(!__pyx_t_2)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_process, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
+ __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":363
+ * def start_processes(self):
+ * for i, process in enumerate(self.processes):
+ * process.start() # <<<<<<<<<<<<<<
+ * self.trace_process(process.pid)
+ *
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_process, __pyx_n_s_start); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":364
+ * for i, process in enumerate(self.processes):
+ * process.start()
+ * self.trace_process(process.pid) # <<<<<<<<<<<<<<
+ *
+ * self.trace_process(self.get_pid())
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_process); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_process, __pyx_n_s_pid); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":362
+ *
+ * def start_processes(self):
+ * for i, process in enumerate(self.processes): # <<<<<<<<<<<<<<
+ * process.start()
+ * self.trace_process(process.pid)
+ */
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":366
+ * self.trace_process(process.pid)
+ *
+ * self.trace_process(self.get_pid()) # <<<<<<<<<<<<<<
+ *
+ * def stop_processes(self):
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_process); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_pid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_9) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":361
+ * os.system("strace -vvvv -c -o strace.{pid}.out -e trace=all -p {pid}&".format(pid=pid))
+ *
+ * def start_processes(self): # <<<<<<<<<<<<<<
+ * for i, process in enumerate(self.processes):
+ * process.start()
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.start_processes", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XDECREF(__pyx_v_process);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":368
+ * self.trace_process(self.get_pid())
+ *
+ * def stop_processes(self): # <<<<<<<<<<<<<<
+ * for process in self.processes:
+ * process.terminate()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_31stop_processes(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_31stop_processes = {"stop_processes", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_31stop_processes, METH_O, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_31stop_processes(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("stop_processes (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_8CopyTask_30stop_processes(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_30stop_processes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_process = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ Py_ssize_t __pyx_t_3;
+ PyObject *(*__pyx_t_4)(PyObject *);
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("stop_processes", 0);
+ __Pyx_TraceCall("stop_processes", __pyx_f[0], 368);
+
+ /* "cqlshlib/copyutil.py":369
+ *
+ * def stop_processes(self):
+ * for process in self.processes: # <<<<<<<<<<<<<<
+ * process.terminate()
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_processes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
+ __pyx_t_4 = NULL;
+ } else {
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_4)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ } else {
+ if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_4(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_process, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":370
+ * def stop_processes(self):
+ * for process in self.processes:
+ * process.terminate() # <<<<<<<<<<<<<<
+ *
+ * def make_params(self):
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_process, __pyx_n_s_terminate); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":369
+ *
+ * def stop_processes(self):
+ * for process in self.processes: # <<<<<<<<<<<<<<
+ * process.terminate()
+ *
+ */
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":368
+ * self.trace_process(self.get_pid())
+ *
+ * def stop_processes(self): # <<<<<<<<<<<<<<
+ * for process in self.processes:
+ * process.terminate()
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.stop_processes", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_process);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":372
+ * process.terminate()
+ *
+ * def make_params(self): # <<<<<<<<<<<<<<
+ * """
+ * Return a dictionary of parameters to be used by the worker processes.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_33make_params(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_8cqlshlib_8copyutil_8CopyTask_32make_params[] = "\n Return a dictionary of parameters to be used by the worker processes.\n On Windows this dictionary must be pickle-able.\n ";
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_33make_params = {"make_params", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_33make_params, METH_O, __pyx_doc_8cqlshlib_8copyutil_8CopyTask_32make_params};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_33make_params(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("make_params (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_8CopyTask_32make_params(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_32make_params(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_shell = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("make_params", 0);
+ __Pyx_TraceCall("make_params", __pyx_f[0], 372);
+
+ /* "cqlshlib/copyutil.py":377
+ * On Windows this dictionary must be pickle-able.
+ * """
+ * shell = self.shell # <<<<<<<<<<<<<<
+ * return dict(ks=self.ks,
+ * table=self.table,
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shell); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_shell = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":378
+ * """
+ * shell = self.shell
+ * return dict(ks=self.ks, # <<<<<<<<<<<<<<
+ * table=self.table,
+ * local_dc=self.local_dc,
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ks); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ks, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":379
+ * shell = self.shell
+ * return dict(ks=self.ks,
+ * table=self.table, # <<<<<<<<<<<<<<
+ * local_dc=self.local_dc,
+ * columns=self.columns,
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_table); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_table, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":380
+ * return dict(ks=self.ks,
+ * table=self.table,
+ * local_dc=self.local_dc, # <<<<<<<<<<<<<<
+ * columns=self.columns,
+ * options=self.options,
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_local_dc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_local_dc, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":381
+ * table=self.table,
+ * local_dc=self.local_dc,
+ * columns=self.columns, # <<<<<<<<<<<<<<
+ * options=self.options,
+ * connect_timeout=shell.conn.connect_timeout,
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_columns); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_columns, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":382
+ * local_dc=self.local_dc,
+ * columns=self.columns,
+ * options=self.options, # <<<<<<<<<<<<<<
+ * connect_timeout=shell.conn.connect_timeout,
+ * hostname=shell.hostname,
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_options); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_options, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":383
+ * columns=self.columns,
+ * options=self.options,
+ * connect_timeout=shell.conn.connect_timeout, # <<<<<<<<<<<<<<
+ * hostname=shell.hostname,
+ * port=shell.port,
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_shell, __pyx_n_s_conn); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_connect_timeout); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_connect_timeout, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "cqlshlib/copyutil.py":384
+ * options=self.options,
+ * connect_timeout=shell.conn.connect_timeout,
+ * hostname=shell.hostname, # <<<<<<<<<<<<<<
+ * port=shell.port,
+ * ssl=shell.ssl,
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_shell, __pyx_n_s_hostname); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_hostname, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "cqlshlib/copyutil.py":385
+ * connect_timeout=shell.conn.connect_timeout,
+ * hostname=shell.hostname,
+ * port=shell.port, # <<<<<<<<<<<<<<
+ * ssl=shell.ssl,
+ * auth_provider=shell.auth_provider,
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_shell, __pyx_n_s_port); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_port, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "cqlshlib/copyutil.py":386
+ * hostname=shell.hostname,
+ * port=shell.port,
+ * ssl=shell.ssl, # <<<<<<<<<<<<<<
+ * auth_provider=shell.auth_provider,
+ * cql_version=shell.conn.cql_version,
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_shell, __pyx_n_s_ssl); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ssl, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "cqlshlib/copyutil.py":387
+ * port=shell.port,
+ * ssl=shell.ssl,
+ * auth_provider=shell.auth_provider, # <<<<<<<<<<<<<<
+ * cql_version=shell.conn.cql_version,
+ * config_file=self.config_file,
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_shell, __pyx_n_s_auth_provider); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_auth_provider, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "cqlshlib/copyutil.py":388
+ * ssl=shell.ssl,
+ * auth_provider=shell.auth_provider,
+ * cql_version=shell.conn.cql_version, # <<<<<<<<<<<<<<
+ * config_file=self.config_file,
+ * protocol_version=self.protocol_version,
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_shell, __pyx_n_s_conn); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_cql_version); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_cql_version, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":389
+ * auth_provider=shell.auth_provider,
+ * cql_version=shell.conn.cql_version,
+ * config_file=self.config_file, # <<<<<<<<<<<<<<
+ * protocol_version=self.protocol_version,
+ * debug=shell.debug
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_config_file); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_config_file, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":390
+ * cql_version=shell.conn.cql_version,
+ * config_file=self.config_file,
+ * protocol_version=self.protocol_version, # <<<<<<<<<<<<<<
+ * debug=shell.debug
+ * )
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_protocol_version); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_protocol_version, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":391
+ * config_file=self.config_file,
+ * protocol_version=self.protocol_version,
+ * debug=shell.debug # <<<<<<<<<<<<<<
+ * )
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_shell, __pyx_n_s_debug); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_debug, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "cqlshlib/copyutil.py":372
+ * process.terminate()
+ *
+ * def make_params(self): # <<<<<<<<<<<<<<
+ * """
+ * Return a dictionary of parameters to be used by the worker processes.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.make_params", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_shell);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":394
+ * )
+ *
+ * def validate_columns(self): # <<<<<<<<<<<<<<
+ * shell = self.shell
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_35validate_columns(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_35validate_columns = {"validate_columns", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_35validate_columns, METH_O, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_35validate_columns(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("validate_columns (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_8CopyTask_34validate_columns(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_34validate_columns(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_shell = NULL;
+ PyObject *__pyx_v_c = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ Py_ssize_t __pyx_t_5;
+ PyObject *(*__pyx_t_6)(PyObject *);
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("validate_columns", 0);
+ __Pyx_TraceCall("validate_columns", __pyx_f[0], 394);
+
+ /* "cqlshlib/copyutil.py":395
+ *
+ * def validate_columns(self):
+ * shell = self.shell # <<<<<<<<<<<<<<
+ *
+ * if not self.columns:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shell); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_shell = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":397
+ * shell = self.shell
+ *
+ * if not self.columns: # <<<<<<<<<<<<<<
+ * shell.printerr("No column specified")
+ * return False
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_columns); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = ((!__pyx_t_2) != 0);
+ if (__pyx_t_3) {
+
+ /* "cqlshlib/copyutil.py":398
+ *
+ * if not self.columns:
+ * shell.printerr("No column specified") # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_shell, __pyx_n_s_printerr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "cqlshlib/copyutil.py":399
+ * if not self.columns:
+ * shell.printerr("No column specified")
+ * return False # <<<<<<<<<<<<<<
+ *
+ * for c in self.columns:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+ }
+
+ /* "cqlshlib/copyutil.py":401
+ * return False
+ *
+ * for c in self.columns: # <<<<<<<<<<<<<<
+ * if c not in self.table_meta.columns:
+ * shell.printerr('Invalid column name %s' % (c,))
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_columns); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
+ __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
+ __pyx_t_6 = NULL;
+ } else {
+ __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_6)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ } else {
+ if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ }
+ } else {
+ __pyx_t_4 = __pyx_t_6(__pyx_t_1);
+ if (unlikely(!__pyx_t_4)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "cqlshlib/copyutil.py":402
+ *
+ * for c in self.columns:
+ * if c not in self.table_meta.columns: # <<<<<<<<<<<<<<
+ * shell.printerr('Invalid column name %s' % (c,))
+ * return False
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_table_meta); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_columns); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_c, __pyx_t_7, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ if (__pyx_t_2) {
+
+ /* "cqlshlib/copyutil.py":403
+ * for c in self.columns:
+ * if c not in self.table_meta.columns:
+ * shell.printerr('Invalid column name %s' % (c,)) # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_shell, __pyx_n_s_printerr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_INCREF(__pyx_v_c);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_c);
+ __Pyx_GIVEREF(__pyx_v_c);
+ __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_column_name_s, __pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":404
+ * if c not in self.table_meta.columns:
+ * shell.printerr('Invalid column name %s' % (c,))
+ * return False # <<<<<<<<<<<<<<
+ *
+ * return True
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "cqlshlib/copyutil.py":401
+ * return False
+ *
+ * for c in self.columns: # <<<<<<<<<<<<<<
+ * if c not in self.table_meta.columns:
+ * shell.printerr('Invalid column name %s' % (c,))
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":406
+ * return False
+ *
+ * return True # <<<<<<<<<<<<<<
+ *
+ * def update_params(self, params, i):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "cqlshlib/copyutil.py":394
+ * )
+ *
+ * def validate_columns(self): # <<<<<<<<<<<<<<
+ * shell = self.shell
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.validate_columns", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_shell);
+ __Pyx_XDECREF(__pyx_v_c);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":408
+ * return True
+ *
+ * def update_params(self, params, i): # <<<<<<<<<<<<<<
+ * """
+ * Add the communication channels to the parameters to be passed to the worker process:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_37update_params(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_8cqlshlib_8copyutil_8CopyTask_36update_params[] = "\n Add the communication channels to the parameters to be passed to the worker process:\n inmsg is the message queue flowing from parent to child process, so outmsg from the parent point\n of view and, vice-versa, outmsg is the message queue flowing from child to parent, so inmsg\n from the parent point of view, hence the two are swapped below.\n ";
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_8CopyTask_37update_params = {"update_params", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_8CopyTask_37update_params, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8cqlshlib_8copyutil_8CopyTask_36update_params};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_8CopyTask_37update_params(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_params = 0;
+ PyObject *__pyx_v_i = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("update_params (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_params,&__pyx_n_s_i,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_params)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("update_params", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("update_params", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "update_params") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_params = values[1];
+ __pyx_v_i = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("update_params", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.update_params", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_8CopyTask_36update_params(__pyx_self, __pyx_v_self, __pyx_v_params, __pyx_v_i);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_8CopyTask_36update_params(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_params, PyObject *__pyx_v_i) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("update_params", 0);
+ __Pyx_TraceCall("update_params", __pyx_f[0], 408);
+
+ /* "cqlshlib/copyutil.py":415
+ * from the parent point of view, hence the two are swapped below.
+ * """
+ * params['inmsg'] = self.outmsg.channels[i] # <<<<<<<<<<<<<<
+ * params['outmsg'] = self.inmsg.channels[i]
+ * return params
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outmsg); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_channels); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_v_i); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(PyObject_SetItem(__pyx_v_params, __pyx_n_s_inmsg, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":416
+ * """
+ * params['inmsg'] = self.outmsg.channels[i]
+ * params['outmsg'] = self.inmsg.channels[i] # <<<<<<<<<<<<<<
+ * return params
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inmsg); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_channels); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_v_i); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(PyObject_SetItem(__pyx_v_params, __pyx_n_s_outmsg, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":417
+ * params['inmsg'] = self.outmsg.channels[i]
+ * params['outmsg'] = self.inmsg.channels[i]
+ * return params # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_params);
+ __pyx_r = __pyx_v_params;
+ goto __pyx_L0;
+
+ /* "cqlshlib/copyutil.py":408
+ * return True
+ *
+ * def update_params(self, params, i): # <<<<<<<<<<<<<<
+ * """
+ * Add the communication channels to the parameters to be passed to the worker process:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("cqlshlib.copyutil.CopyTask.update_params", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":425
+ * """
+ *
+ * def __init__(self, fname, shell, columns, options): # <<<<<<<<<<<<<<
+ * self.fname = fname
+ * self.shell = shell
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_12ExportWriter_1__init__ = {"__init__", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_fname = 0;
+ PyObject *__pyx_v_shell = 0;
+ PyObject *__pyx_v_columns = 0;
+ PyObject *__pyx_v_options = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_fname,&__pyx_n_s_shell,&__pyx_n_s_columns,&__pyx_n_s_options,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fname)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shell)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_columns)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_options)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_fname = values[1];
+ __pyx_v_shell = values[2];
+ __pyx_v_columns = values[3];
+ __pyx_v_options = values[4];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("cqlshlib.copyutil.ExportWriter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_12ExportWriter___init__(__pyx_self, __pyx_v_self, __pyx_v_fname, __pyx_v_shell, __pyx_v_columns, __pyx_v_options);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_12ExportWriter___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fname, PyObject *__pyx_v_shell, PyObject *__pyx_v_columns, PyObject *__pyx_v_options) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__init__", 0);
+ __Pyx_TraceCall("__init__", __pyx_f[0], 425);
+
+ /* "cqlshlib/copyutil.py":426
+ *
+ * def __init__(self, fname, shell, columns, options):
+ * self.fname = fname # <<<<<<<<<<<<<<
+ * self.shell = shell
+ * self.columns = columns
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fname, __pyx_v_fname) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "cqlshlib/copyutil.py":427
+ * def __init__(self, fname, shell, columns, options):
+ * self.fname = fname
+ * self.shell = shell # <<<<<<<<<<<<<<
+ * self.columns = columns
+ * self.options = options
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_shell, __pyx_v_shell) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "cqlshlib/copyutil.py":428
+ * self.fname = fname
+ * self.shell = shell
+ * self.columns = columns # <<<<<<<<<<<<<<
+ * self.options = options
+ * self.header = options.copy['header']
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_columns, __pyx_v_columns) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "cqlshlib/copyutil.py":429
+ * self.shell = shell
+ * self.columns = columns
+ * self.options = options # <<<<<<<<<<<<<<
+ * self.header = options.copy['header']
+ * self.max_output_size = long(options.copy['maxoutputsize'])
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_options, __pyx_v_options) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "cqlshlib/copyutil.py":430
+ * self.columns = columns
+ * self.options = options
+ * self.header = options.copy['header'] # <<<<<<<<<<<<<<
+ * self.max_output_size = long(options.copy['maxoutputsize'])
+ * self.current_dest = None
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_header); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_header, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":431
+ * self.options = options
+ * self.header = options.copy['header']
+ * self.max_output_size = long(options.copy['maxoutputsize']) # <<<<<<<<<<<<<<
+ * self.current_dest = None
+ * self.num_files = 0
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_maxoutputsize); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyLong_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_max_output_size, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":432
+ * self.header = options.copy['header']
+ * self.max_output_size = long(options.copy['maxoutputsize'])
+ * self.current_dest = None # <<<<<<<<<<<<<<
+ * self.num_files = 0
+ *
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_current_dest, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "cqlshlib/copyutil.py":433
+ * self.max_output_size = long(options.copy['maxoutputsize'])
+ * self.current_dest = None
+ * self.num_files = 0 # <<<<<<<<<<<<<<
+ *
+ * if self.max_output_size > 0:
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_num_files, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "cqlshlib/copyutil.py":435
+ * self.num_files = 0
+ *
+ * if self.max_output_size > 0: # <<<<<<<<<<<<<<
+ * if fname is not None:
+ * self.write = self._write_with_split
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_output_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "cqlshlib/copyutil.py":436
+ *
+ * if self.max_output_size > 0:
+ * if fname is not None: # <<<<<<<<<<<<<<
+ * self.write = self._write_with_split
+ * self.num_written = 0
+ */
+ __pyx_t_3 = (__pyx_v_fname != Py_None);
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "cqlshlib/copyutil.py":437
+ * if self.max_output_size > 0:
+ * if fname is not None:
+ * self.write = self._write_with_split # <<<<<<<<<<<<<<
+ * self.num_written = 0
+ * else:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_write_with_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_write, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":438
+ * if fname is not None:
+ * self.write = self._write_with_split
+ * self.num_written = 0 # <<<<<<<<<<<<<<
+ * else:
+ * shell.printerr("WARNING: maxoutputsize {} ignored when writing to STDOUT".format(self.max_output_size))
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_num_written, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L4;
+ }
+ /*else*/ {
+
+ /* "cqlshlib/copyutil.py":440
+ * self.num_written = 0
+ * else:
+ * shell.printerr("WARNING: maxoutputsize {} ignored when writing to STDOUT".format(self.max_output_size)) # <<<<<<<<<<<<<<
+ * self.write = self._write_without_split
+ * else:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_shell, __pyx_n_s_printerr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_WARNING_maxoutputsize_ignored_wh, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_output_size); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":441
+ * else:
+ * shell.printerr("WARNING: maxoutputsize {} ignored when writing to STDOUT".format(self.max_output_size))
+ * self.write = self._write_without_split # <<<<<<<<<<<<<<
+ * else:
+ * self.write = self._write_without_split
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_write_without_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_write, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ __pyx_L4:;
+ goto __pyx_L3;
+ }
+ /*else*/ {
+
+ /* "cqlshlib/copyutil.py":443
+ * self.write = self._write_without_split
+ * else:
+ * self.write = self._write_without_split # <<<<<<<<<<<<<<
+ *
+ * def open(self):
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_write_without_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_write, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ __pyx_L3:;
+
+ /* "cqlshlib/copyutil.py":425
+ * """
+ *
+ * def __init__(self, fname, shell, columns, options): # <<<<<<<<<<<<<<
+ * self.fname = fname
+ * self.shell = shell
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("cqlshlib.copyutil.ExportWriter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":445
+ * self.write = self._write_without_split
+ *
+ * def open(self): # <<<<<<<<<<<<<<
+ * self.current_dest = self._get_dest(self.fname)
+ * if self.current_dest is None:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_3open(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_12ExportWriter_3open = {"open", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_3open, METH_O, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_3open(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("open (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_12ExportWriter_2open(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_12ExportWriter_2open(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_writer = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ int __pyx_t_7;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("open", 0);
+ __Pyx_TraceCall("open", __pyx_f[0], 445);
+
+ /* "cqlshlib/copyutil.py":446
+ *
+ * def open(self):
+ * self.current_dest = self._get_dest(self.fname) # <<<<<<<<<<<<<<
+ * if self.current_dest is None:
+ * return False
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_dest); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fname); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_current_dest, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":447
+ * def open(self):
+ * self.current_dest = self._get_dest(self.fname)
+ * if self.current_dest is None: # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_current_dest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = (__pyx_t_1 == Py_None);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_7 = (__pyx_t_6 != 0);
+ if (__pyx_t_7) {
+
+ /* "cqlshlib/copyutil.py":448
+ * self.current_dest = self._get_dest(self.fname)
+ * if self.current_dest is None:
+ * return False # <<<<<<<<<<<<<<
+ *
+ * if self.header:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+ }
+
+ /* "cqlshlib/copyutil.py":450
+ * return False
+ *
+ * if self.header: # <<<<<<<<<<<<<<
+ * writer = csv.writer(self.current_dest.output, **self.options.dialect)
+ * writer.writerow(self.columns)
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_7) {
+
+ /* "cqlshlib/copyutil.py":451
+ *
+ * if self.header:
+ * writer = csv.writer(self.current_dest.output, **self.options.dialect) # <<<<<<<<<<<<<<
+ * writer.writerow(self.columns)
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_csv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_writer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_current_dest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_output); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_options); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dialect); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (unlikely(__pyx_t_4 == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ if (likely(PyDict_Check(__pyx_t_4))) {
+ __pyx_t_5 = __pyx_t_4;
+ __Pyx_INCREF(__pyx_t_5);
+ } else {
+ __pyx_t_5 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_v_writer = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "cqlshlib/copyutil.py":452
+ * if self.header:
+ * writer = csv.writer(self.current_dest.output, **self.options.dialect)
+ * writer.writerow(self.columns) # <<<<<<<<<<<<<<
+ *
+ * return True
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_writer, __pyx_n_s_writerow); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_columns); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L4;
+ }
+ __pyx_L4:;
+
+ /* "cqlshlib/copyutil.py":454
+ * writer.writerow(self.columns)
+ *
+ * return True # <<<<<<<<<<<<<<
+ *
+ * def close(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "cqlshlib/copyutil.py":445
+ * self.write = self._write_without_split
+ *
+ * def open(self): # <<<<<<<<<<<<<<
+ * self.current_dest = self._get_dest(self.fname)
+ * if self.current_dest is None:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("cqlshlib.copyutil.ExportWriter.open", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_writer);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":456
+ * return True
+ *
+ * def close(self): # <<<<<<<<<<<<<<
+ * self._close_current_dest()
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_5close(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_12ExportWriter_5close = {"close", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_5close, METH_O, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_5close(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("close (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_12ExportWriter_4close(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_12ExportWriter_4close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("close", 0);
+ __Pyx_TraceCall("close", __pyx_f[0], 456);
+
+ /* "cqlshlib/copyutil.py":457
+ *
+ * def close(self):
+ * self._close_current_dest() # <<<<<<<<<<<<<<
+ *
+ * def _next_dest(self):
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_close_current_dest); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":456
+ * return True
+ *
+ * def close(self): # <<<<<<<<<<<<<<
+ * self._close_current_dest()
+ *
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("cqlshlib.copyutil.ExportWriter.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":459
+ * self._close_current_dest()
+ *
+ * def _next_dest(self): # <<<<<<<<<<<<<<
+ * self._close_current_dest()
+ * self.current_dest = self._get_dest(self.fname + '.%d' % (self.num_files,))
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_7_next_dest(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_12ExportWriter_7_next_dest = {"_next_dest", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_7_next_dest, METH_O, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_7_next_dest(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_next_dest (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_12ExportWriter_6_next_dest(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_12ExportWriter_6_next_dest(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("_next_dest", 0);
+ __Pyx_TraceCall("_next_dest", __pyx_f[0], 459);
+
+ /* "cqlshlib/copyutil.py":460
+ *
+ * def _next_dest(self):
+ * self._close_current_dest() # <<<<<<<<<<<<<<
+ * self.current_dest = self._get_dest(self.fname + '.%d' % (self.num_files,))
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_close_current_dest); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":461
+ * def _next_dest(self):
+ * self._close_current_dest()
+ * self.current_dest = self._get_dest(self.fname + '.%d' % (self.num_files,)) # <<<<<<<<<<<<<<
+ *
+ * def _get_dest(self, source_name):
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_dest); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fname); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_num_files); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_d, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_current_dest, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":459
+ * self._close_current_dest()
+ *
+ * def _next_dest(self): # <<<<<<<<<<<<<<
+ * self._close_current_dest()
+ * self.current_dest = self._get_dest(self.fname + '.%d' % (self.num_files,))
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("cqlshlib.copyutil.ExportWriter._next_dest", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":463
+ * self.current_dest = self._get_dest(self.fname + '.%d' % (self.num_files,))
+ *
+ * def _get_dest(self, source_name): # <<<<<<<<<<<<<<
+ * """
+ * Open the output file if any or else use stdout. Return a namedtuple
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_9_get_dest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_8cqlshlib_8copyutil_12ExportWriter_8_get_dest[] = "\n Open the output file if any or else use stdout. Return a namedtuple\n containing the out and a boolean indicating if the output should be closed.\n ";
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_12ExportWriter_9_get_dest = {"_get_dest", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_9_get_dest, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8cqlshlib_8copyutil_12ExportWriter_8_get_dest};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_9_get_dest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_source_name = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_get_dest (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_source_name,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_source_name)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_get_dest", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get_dest") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_source_name = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_get_dest", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("cqlshlib.copyutil.ExportWriter._get_dest", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_12ExportWriter_8_get_dest(__pyx_self, __pyx_v_self, __pyx_v_source_name);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_12ExportWriter_8_get_dest(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_source_name) {
+ PyObject *__pyx_v_CsvDest = NULL;
+ PyObject *__pyx_v_ret = NULL;
+ PyObject *__pyx_v_e = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("_get_dest", 0);
+ __Pyx_TraceCall("_get_dest", __pyx_f[0], 463);
+
+ /* "cqlshlib/copyutil.py":468
+ * containing the out and a boolean indicating if the output should be closed.
+ * """
+ * CsvDest = namedtuple('CsvDest', 'output close') # <<<<<<<<<<<<<<
+ *
+ * if self.fname is None:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_namedtuple); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_CsvDest = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":470
+ * CsvDest = namedtuple('CsvDest', 'output close')
+ *
+ * if self.fname is None: # <<<<<<<<<<<<<<
+ * return CsvDest(output=sys.stdout, close=False)
+ * else:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fname); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__pyx_t_2 == Py_None);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "cqlshlib/copyutil.py":471
+ *
+ * if self.fname is None:
+ * return CsvDest(output=sys.stdout, close=False) # <<<<<<<<<<<<<<
+ * else:
+ * try:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stdout); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_output, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_close, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_CsvDest, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ goto __pyx_L0;
+ }
+ /*else*/ {
+
+ /* "cqlshlib/copyutil.py":473
+ * return CsvDest(output=sys.stdout, close=False)
+ * else:
+ * try: # <<<<<<<<<<<<<<
+ * ret = CsvDest(output=open(source_name, 'wb'), close=True)
+ * self.num_files += 1
+ */
+ {
+ __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_8);
+ /*try:*/ {
+
+ /* "cqlshlib/copyutil.py":474
+ * else:
+ * try:
+ * ret = CsvDest(output=open(source_name, 'wb'), close=True) # <<<<<<<<<<<<<<
+ * self.num_files += 1
+ * return ret
+ */
+ __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_source_name);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_source_name);
+ __Pyx_GIVEREF(__pyx_v_source_name);
+ __Pyx_INCREF(__pyx_n_s_wb);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_wb);
+ __Pyx_GIVEREF(__pyx_n_s_wb);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_output, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_close, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_CsvDest, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_v_ret = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":475
+ * try:
+ * ret = CsvDest(output=open(source_name, 'wb'), close=True)
+ * self.num_files += 1 # <<<<<<<<<<<<<<
+ * return ret
+ * except IOError, e:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_num_files); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_num_files, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "cqlshlib/copyutil.py":476
+ * ret = CsvDest(output=open(source_name, 'wb'), close=True)
+ * self.num_files += 1
+ * return ret # <<<<<<<<<<<<<<
+ * except IOError, e:
+ * self.shell.printerr("Can't open %r for writing: %s" % (source_name, e))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_ret);
+ __pyx_r = __pyx_v_ret;
+ goto __pyx_L8_try_return;
+ }
+ __pyx_L4_error:;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "cqlshlib/copyutil.py":477
+ * self.num_files += 1
+ * return ret
+ * except IOError, e: # <<<<<<<<<<<<<<
+ * self.shell.printerr("Can't open %r for writing: %s" % (source_name, e))
+ * return None
+ */
+ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_IOError);
+ if (__pyx_t_9) {
+ __Pyx_AddTraceback("cqlshlib.copyutil.ExportWriter._get_dest", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_1);
+ __pyx_v_e = __pyx_t_1;
+
+ /* "cqlshlib/copyutil.py":478
+ * return ret
+ * except IOError, e:
+ * self.shell.printerr("Can't open %r for writing: %s" % (source_name, e)) # <<<<<<<<<<<<<<
+ * return None
+ *
+ */
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shell); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_printerr); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_INCREF(__pyx_v_source_name);
+ PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_source_name);
+ __Pyx_GIVEREF(__pyx_v_source_name);
+ __Pyx_INCREF(__pyx_v_e);
+ PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_e);
+ __Pyx_GIVEREF(__pyx_v_e);
+ __pyx_t_13 = __Pyx_PyString_Format(__pyx_kp_s_Can_t_open_r_for_writing_s, __pyx_t_11); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_12))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_12, function);
+ }
+ }
+ if (!__pyx_t_11) {
+ __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ } else {
+ __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+ __Pyx_GOTREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_13);
+ __pyx_t_13 = 0;
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_14, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+
+ /* "cqlshlib/copyutil.py":479
+ * except IOError, e:
+ * self.shell.printerr("Can't open %r for writing: %s" % (source_name, e))
+ * return None # <<<<<<<<<<<<<<
+ *
+ * def _close_current_dest(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ goto __pyx_L7_except_return;
+ }
+ goto __pyx_L6_except_error;
+ __pyx_L6_except_error:;
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
+ goto __pyx_L1_error;
+ __pyx_L8_try_return:;
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
+ goto __pyx_L0;
+ __pyx_L7_except_return:;
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
+ goto __pyx_L0;
+ }
+ }
+
+ /* "cqlshlib/copyutil.py":463
+ * self.current_dest = self._get_dest(self.fname + '.%d' % (self.num_files,))
+ *
+ * def _get_dest(self, source_name): # <<<<<<<<<<<<<<
+ * """
+ * Open the output file if any or else use stdout. Return a namedtuple
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_AddTraceback("cqlshlib.copyutil.ExportWriter._get_dest", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_CsvDest);
+ __Pyx_XDECREF(__pyx_v_ret);
+ __Pyx_XDECREF(__pyx_v_e);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":481
+ * return None
+ *
+ * def _close_current_dest(self): # <<<<<<<<<<<<<<
+ * if self.current_dest and self.current_dest.close:
+ * self.current_dest.output.close()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_11_close_current_dest(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_12ExportWriter_11_close_current_dest = {"_close_current_dest", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_11_close_current_dest, METH_O, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_11_close_current_dest(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_close_current_dest (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_12ExportWriter_10_close_current_dest(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_12ExportWriter_10_close_current_dest(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("_close_current_dest", 0);
+ __Pyx_TraceCall("_close_current_dest", __pyx_f[0], 481);
+
+ /* "cqlshlib/copyutil.py":482
+ *
+ * def _close_current_dest(self):
+ * if self.current_dest and self.current_dest.close: # <<<<<<<<<<<<<<
+ * self.current_dest.output.close()
+ * self.current_dest = None
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_current_dest); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_1 = __pyx_t_3;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_current_dest); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_close); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_1 = __pyx_t_3;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "cqlshlib/copyutil.py":483
+ * def _close_current_dest(self):
+ * if self.current_dest and self.current_dest.close:
+ * self.current_dest.output.close() # <<<<<<<<<<<<<<
+ * self.current_dest = None
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_current_dest); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_output); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "cqlshlib/copyutil.py":484
+ * if self.current_dest and self.current_dest.close:
+ * self.current_dest.output.close()
+ * self.current_dest = None # <<<<<<<<<<<<<<
+ *
+ * def _write_without_split(self, data, _):
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_current_dest, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L3;
+ }
+ __pyx_L3:;
+
+ /* "cqlshlib/copyutil.py":481
+ * return None
+ *
+ * def _close_current_dest(self): # <<<<<<<<<<<<<<
+ * if self.current_dest and self.current_dest.close:
+ * self.current_dest.output.close()
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("cqlshlib.copyutil.ExportWriter._close_current_dest", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":486
+ * self.current_dest = None
+ *
+ * def _write_without_split(self, data, _): # <<<<<<<<<<<<<<
+ * """
+ * Write the data to the current destination output.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_13_write_without_split(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_8cqlshlib_8copyutil_12ExportWriter_12_write_without_split[] = "\n Write the data to the current destination output.\n ";
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_12ExportWriter_13_write_without_split = {"_write_without_split", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_13_write_without_split, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8cqlshlib_8copyutil_12ExportWriter_12_write_without_split};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_13_write_without_split(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_data = 0;
+ CYTHON_UNUSED PyObject *__pyx_v__ = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_write_without_split (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,&__pyx_n_s__9,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_write_without_split", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__9)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_write_without_split", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_write_without_split") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_data = values[1];
+ __pyx_v__ = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_write_without_split", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("cqlshlib.copyutil.ExportWriter._write_without_split", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_12ExportWriter_12_write_without_split(__pyx_self, __pyx_v_self, __pyx_v_data, __pyx_v__);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_12ExportWriter_12_write_without_split(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v__) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("_write_without_split", 0);
+ __Pyx_TraceCall("_write_without_split", __pyx_f[0], 486);
+
+ /* "cqlshlib/copyutil.py":490
+ * Write the data to the current destination output.
+ * """
+ * self.current_dest.output.write(data) # <<<<<<<<<<<<<<
+ *
+ * def _write_with_split(self, data, num):
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_current_dest); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_output); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_data);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_data);
+ __Pyx_GIVEREF(__pyx_v_data);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":486
+ * self.current_dest = None
+ *
+ * def _write_without_split(self, data, _): # <<<<<<<<<<<<<<
+ * """
+ * Write the data to the current destination output.
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("cqlshlib.copyutil.ExportWriter._write_without_split", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":492
+ * self.current_dest.output.write(data)
+ *
+ * def _write_with_split(self, data, num): # <<<<<<<<<<<<<<
+ * """
+ * Write the data to the current destination output if we still
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_15_write_with_split(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_8cqlshlib_8copyutil_12ExportWriter_14_write_with_split[] = "\n Write the data to the current destination output if we still\n haven't reached the maximum number of rows. Otherwise split\n the rows between the current destination and the next.\n ";
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_12ExportWriter_15_write_with_split = {"_write_with_split", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_15_write_with_split, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8cqlshlib_8copyutil_12ExportWriter_14_write_with_split};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_12ExportWriter_15_write_with_split(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_data = 0;
+ PyObject *__pyx_v_num = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_write_with_split (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,&__pyx_n_s_num,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_write_with_split", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_num)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_write_with_split", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_write_with_split") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_data = values[1];
+ __pyx_v_num = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_write_with_split", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("cqlshlib.copyutil.ExportWriter._write_with_split", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_12ExportWriter_14_write_with_split(__pyx_self, __pyx_v_self, __pyx_v_data, __pyx_v_num);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_12ExportWriter_14_write_with_split(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_num) {
+ PyObject *__pyx_v_num_remaining = NULL;
+ PyObject *__pyx_v_last_switch = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_v_row = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ Py_ssize_t __pyx_t_8;
+ PyObject *(*__pyx_t_9)(PyObject *);
+ PyObject *__pyx_t_10 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("_write_with_split", 0);
+ __Pyx_TraceCall("_write_with_split", __pyx_f[0], 492);
+
+ /* "cqlshlib/copyutil.py":498
+ * the rows between the current destination and the next.
+ * """
+ * if (self.num_written + num) > self.max_output_size: # <<<<<<<<<<<<<<
+ * num_remaining = self.max_output_size - self.num_written
+ * last_switch = 0
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_num_written); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_num); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_output_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_4) {
+
+ /* "cqlshlib/copyutil.py":499
+ * """
+ * if (self.num_written + num) > self.max_output_size:
+ * num_remaining = self.max_output_size - self.num_written # <<<<<<<<<<<<<<
+ * last_switch = 0
+ * for i, row in enumerate(filter(None, data.split(os.linesep))):
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_output_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_num_written); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_num_remaining = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":500
+ * if (self.num_written + num) > self.max_output_size:
+ * num_remaining = self.max_output_size - self.num_written
+ * last_switch = 0 # <<<<<<<<<<<<<<
+ * for i, row in enumerate(filter(None, data.split(os.linesep))):
+ * if i == num_remaining:
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_v_last_switch = __pyx_int_0;
+
+ /* "cqlshlib/copyutil.py":501
+ * num_remaining = self.max_output_size - self.num_written
+ * last_switch = 0
+ * for i, row in enumerate(filter(None, data.split(os.linesep))): # <<<<<<<<<<<<<<
+ * if i == num_remaining:
+ * self._next_dest()
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_t_2 = __pyx_int_0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_linesep); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0;
+ __pyx_t_9 = NULL;
+ } else {
+ __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_9)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ } else {
+ if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_9(__pyx_t_3);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
+ __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2);
+ __pyx_t_2 = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":502
+ * last_switch = 0
+ * for i, row in enumerate(filter(None, data.split(os.linesep))):
+ * if i == num_remaining: # <<<<<<<<<<<<<<
+ * self._next_dest()
+ * last_switch = i
+ */
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_i, __pyx_v_num_remaining, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_4) {
+
+ /* "cqlshlib/copyutil.py":503
+ * for i, row in enumerate(filter(None, data.split(os.linesep))):
+ * if i == num_remaining:
+ * self._next_dest() # <<<<<<<<<<<<<<
+ * last_switch = i
+ * num_remaining += self.max_output_size
+ */
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_next_dest); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_6 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":504
+ * if i == num_remaining:
+ * self._next_dest()
+ * last_switch = i # <<<<<<<<<<<<<<
+ * num_remaining += self.max_output_size
+ * self.current_dest.output.write(row + '\n')
+ */
+ __Pyx_INCREF(__pyx_v_i);
+ __Pyx_DECREF_SET(__pyx_v_last_switch, __pyx_v_i);
+
+ /* "cqlshlib/copyutil.py":505
+ * self._next_dest()
+ * last_switch = i
+ * num_remaining += self.max_output_size # <<<<<<<<<<<<<<
+ * self.current_dest.output.write(row + '\n')
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_output_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_num_remaining, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v_num_remaining, __pyx_t_7);
+ __pyx_t_7 = 0;
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+
+ /* "cqlshlib/copyutil.py":506
+ * last_switch = i
+ * num_remaining += self.max_output_size
+ * self.current_dest.output.write(row + '\n') # <<<<<<<<<<<<<<
+ *
+ * self.num_written = num - last_switch
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_current_dest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_output); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_Add(__pyx_v_row, __pyx_kp_s__10); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "cqlshlib/copyutil.py":501
+ * num_remaining = self.max_output_size - self.num_written
+ * last_switch = 0
+ * for i, row in enumerate(filter(None, data.split(os.linesep))): # <<<<<<<<<<<<<<
+ * if i == num_remaining:
+ * self._next_dest()
+ */
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":508
+ * self.current_dest.output.write(row + '\n')
+ *
+ * self.num_written = num - last_switch # <<<<<<<<<<<<<<
+ * else:
+ * self.num_written += num
+ */
+ __pyx_t_2 = PyNumber_Subtract(__pyx_v_num, __pyx_v_last_switch); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_num_written, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L3;
+ }
+ /*else*/ {
+
+ /* "cqlshlib/copyutil.py":510
+ * self.num_written = num - last_switch
+ * else:
+ * self.num_written += num # <<<<<<<<<<<<<<
+ * self.current_dest.output.write(data)
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_num_written); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_v_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_num_written, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "cqlshlib/copyutil.py":511
+ * else:
+ * self.num_written += num
+ * self.current_dest.output.write(data) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_current_dest); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_output); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_INCREF(__pyx_v_data);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_data);
+ __Pyx_GIVEREF(__pyx_v_data);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __pyx_L3:;
+
+ /* "cqlshlib/copyutil.py":492
+ * self.current_dest.output.write(data)
+ *
+ * def _write_with_split(self, data, num): # <<<<<<<<<<<<<<
+ * """
+ * Write the data to the current destination output if we still
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_AddTraceback("cqlshlib.copyutil.ExportWriter._write_with_split", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_num_remaining);
+ __Pyx_XDECREF(__pyx_v_last_switch);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XDECREF(__pyx_v_row);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":518
+ * A class that exports data to .csv by instantiating one or more processes that work in parallel (ExportProcess).
+ * """
+ * def __init__(self, shell, ks, table, columns, fname, opts, protocol_version, config_file): # <<<<<<<<<<<<<<
+ * CopyTask.__init__(self, shell, ks, table, columns, fname, opts, protocol_version, config_file, 'to')
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_10ExportTask_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_10ExportTask_1__init__ = {"__init__", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_10ExportTask_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_10ExportTask_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_shell = 0;
+ PyObject *__pyx_v_ks = 0;
+ PyObject *__pyx_v_table = 0;
+ PyObject *__pyx_v_columns = 0;
+ PyObject *__pyx_v_fname = 0;
+ PyObject *__pyx_v_opts = 0;
+ PyObject *__pyx_v_protocol_version = 0;
+ PyObject *__pyx_v_config_file = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_shell,&__pyx_n_s_ks,&__pyx_n_s_table,&__pyx_n_s_columns,&__pyx_n_s_fname,&__pyx_n_s_opts,&__pyx_n_s_protocol_version,&__pyx_n_s_config_file,0};
+ PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shell)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ks)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_table)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_columns)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 5:
+ if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fname)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 6:
+ if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_opts)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 7:
+ if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_protocol_version)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 8:
+ if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_config_file)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_shell = values[1];
+ __pyx_v_ks = values[2];
+ __pyx_v_table = values[3];
+ __pyx_v_columns = values[4];
+ __pyx_v_fname = values[5];
+ __pyx_v_opts = values[6];
+ __pyx_v_protocol_version = values[7];
+ __pyx_v_config_file = values[8];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("cqlshlib.copyutil.ExportTask.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_10ExportTask___init__(__pyx_self, __pyx_v_self, __pyx_v_shell, __pyx_v_ks, __pyx_v_table, __pyx_v_columns, __pyx_v_fname, __pyx_v_opts, __pyx_v_protocol_version, __pyx_v_config_file);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ExportTask___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_shell, PyObject *__pyx_v_ks, PyObject *__pyx_v_table, PyObject *__pyx_v_columns, PyObject *__pyx_v_fname, PyObject *__pyx_v_opts, PyObject *__pyx_v_protocol_version, PyObject *__pyx_v_config_file) {
+ PyObject *__pyx_v_options = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__init__", 0);
+ __Pyx_TraceCall("__init__", __pyx_f[0], 518);
+
+ /* "cqlshlib/copyutil.py":519
+ * """
+ * def __init__(self, shell, ks, table, columns, fname, opts, protocol_version, config_file):
+ * CopyTask.__init__(self, shell, ks, table, columns, fname, opts, protocol_version, config_file, 'to') # <<<<<<<<<<<<<<
+ *
+ * options = self.options
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CopyTask); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ __pyx_t_4 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_4 = 1;
+ }
+ }
+ __pyx_t_5 = PyTuple_New(10+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_2) {
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ __Pyx_INCREF(__pyx_v_shell);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_shell);
+ __Pyx_GIVEREF(__pyx_v_shell);
+ __Pyx_INCREF(__pyx_v_ks);
+ PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_ks);
+ __Pyx_GIVEREF(__pyx_v_ks);
+ __Pyx_INCREF(__pyx_v_table);
+ PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_table);
+ __Pyx_GIVEREF(__pyx_v_table);
+ __Pyx_INCREF(__pyx_v_columns);
+ PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_columns);
+ __Pyx_GIVEREF(__pyx_v_columns);
+ __Pyx_INCREF(__pyx_v_fname);
+ PyTuple_SET_ITEM(__pyx_t_5, 5+__pyx_t_4, __pyx_v_fname);
+ __Pyx_GIVEREF(__pyx_v_fname);
+ __Pyx_INCREF(__pyx_v_opts);
+ PyTuple_SET_ITEM(__pyx_t_5, 6+__pyx_t_4, __pyx_v_opts);
+ __Pyx_GIVEREF(__pyx_v_opts);
+ __Pyx_INCREF(__pyx_v_protocol_version);
+ PyTuple_SET_ITEM(__pyx_t_5, 7+__pyx_t_4, __pyx_v_protocol_version);
+ __Pyx_GIVEREF(__pyx_v_protocol_version);
+ __Pyx_INCREF(__pyx_v_config_file);
+ PyTuple_SET_ITEM(__pyx_t_5, 8+__pyx_t_4, __pyx_v_config_file);
+ __Pyx_GIVEREF(__pyx_v_config_file);
+ __Pyx_INCREF(__pyx_n_s_to);
+ PyTuple_SET_ITEM(__pyx_t_5, 9+__pyx_t_4, __pyx_n_s_to);
+ __Pyx_GIVEREF(__pyx_n_s_to);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":521
+ * CopyTask.__init__(self, shell, ks, table, columns, fname, opts, protocol_version, config_file, 'to')
+ *
+ * options = self.options # <<<<<<<<<<<<<<
+ * self.begin_token = long(options.copy['begintoken']) if options.copy['begintoken'] else None
+ * self.end_token = long(options.copy['endtoken']) if options.copy['endtoken'] else None
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_options); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_options = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":522
+ *
+ * options = self.options
+ * self.begin_token = long(options.copy['begintoken']) if options.copy['begintoken'] else None # <<<<<<<<<<<<<<
+ * self.end_token = long(options.copy['endtoken']) if options.copy['endtoken'] else None
+ * self.writer = ExportWriter(fname, shell, columns, options)
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_begintoken); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__pyx_t_6) {
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_3 = PyObject_GetItem(__pyx_t_5, __pyx_n_s_begintoken); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyLong_Type))), __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_1 = __pyx_t_3;
+ __pyx_t_3 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_1 = Py_None;
+ }
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_begin_token, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":523
+ * options = self.options
+ * self.begin_token = long(options.copy['begintoken']) if options.copy['begintoken'] else None
+ * self.end_token = long(options.copy['endtoken']) if options.copy['endtoken'] else None # <<<<<<<<<<<<<<
+ * self.writer = ExportWriter(fname, shell, columns, options)
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_endtoken); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__pyx_t_6) {
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_3 = PyObject_GetItem(__pyx_t_5, __pyx_n_s_endtoken); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyLong_Type))), __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_1 = __pyx_t_3;
+ __pyx_t_3 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_1 = Py_None;
+ }
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_end_token, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":524
+ * self.begin_token = long(options.copy['begintoken']) if options.copy['begintoken'] else None
+ * self.end_token = long(options.copy['endtoken']) if options.copy['endtoken'] else None
+ * self.writer = ExportWriter(fname, shell, columns, options) # <<<<<<<<<<<<<<
+ *
+ * def run(self):
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExportWriter); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ __pyx_t_4 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_4 = 1;
+ }
+ }
+ __pyx_t_2 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__pyx_t_5) {
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_fname);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_4, __pyx_v_fname);
+ __Pyx_GIVEREF(__pyx_v_fname);
+ __Pyx_INCREF(__pyx_v_shell);
+ PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_4, __pyx_v_shell);
+ __Pyx_GIVEREF(__pyx_v_shell);
+ __Pyx_INCREF(__pyx_v_columns);
+ PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_4, __pyx_v_columns);
+ __Pyx_GIVEREF(__pyx_v_columns);
+ __Pyx_INCREF(__pyx_v_options);
+ PyTuple_SET_ITEM(__pyx_t_2, 3+__pyx_t_4, __pyx_v_options);
+ __Pyx_GIVEREF(__pyx_v_options);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_writer, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":518
+ * A class that exports data to .csv by instantiating one or more processes that work in parallel (ExportProcess).
+ * """
+ * def __init__(self, shell, ks, table, columns, fname, opts, protocol_version, config_file): # <<<<<<<<<<<<<<
+ * CopyTask.__init__(self, shell, ks, table, columns, fname, opts, protocol_version, config_file, 'to')
+ *
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("cqlshlib.copyutil.ExportTask.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_options);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":526
+ * self.writer = ExportWriter(fname, shell, columns, options)
+ *
+ * def run(self): # <<<<<<<<<<<<<<
+ * """
+ * Initiates the export by starting the worker processes.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_10ExportTask_3run(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_8cqlshlib_8copyutil_10ExportTask_2run[] = "\n Initiates the export by starting the worker processes.\n Then hand over control to export_records.\n ";
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_10ExportTask_3run = {"run", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_10ExportTask_3run, METH_O, __pyx_doc_8cqlshlib_8copyutil_10ExportTask_2run};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_10ExportTask_3run(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("run (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_10ExportTask_2run(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ExportTask_2run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_shell = NULL;
+ PyObject *__pyx_v_ranges = NULL;
+ PyObject *__pyx_v_params = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ Py_ssize_t __pyx_t_9;
+ PyObject *(*__pyx_t_10)(PyObject *);
+ PyObject *__pyx_t_11 = NULL;
+ Py_ssize_t __pyx_t_12;
+ PyObject *__pyx_t_13 = NULL;
+ int __pyx_t_14;
+ int __pyx_t_15;
+ int __pyx_t_16;
+ char const *__pyx_t_17;
+ PyObject *__pyx_t_18 = NULL;
+ PyObject *__pyx_t_19 = NULL;
+ PyObject *__pyx_t_20 = NULL;
+ PyObject *__pyx_t_21 = NULL;
+ PyObject *__pyx_t_22 = NULL;
+ PyObject *__pyx_t_23 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("run", 0);
+ __Pyx_TraceCall("run", __pyx_f[0], 526);
+
+ /* "cqlshlib/copyutil.py":531
+ * Then hand over control to export_records.
+ * """
+ * shell = self.shell # <<<<<<<<<<<<<<
+ *
+ * if self.options.unrecognized:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shell); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_shell = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":533
+ * shell = self.shell
+ *
+ * if self.options.unrecognized: # <<<<<<<<<<<<<<
+ * shell.printerr('Unrecognized COPY TO options: %s' % ', '.join(self.options.unrecognized.keys()))
+ * return
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_options); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_unrecognized); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "cqlshlib/copyutil.py":534
+ *
+ * if self.options.unrecognized:
+ * shell.printerr('Unrecognized COPY TO options: %s' % ', '.join(self.options.unrecognized.keys())) # <<<<<<<<<<<<<<
+ * return
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_shell, __pyx_n_s_printerr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_options); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_unrecognized); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_keys); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__52, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Unrecognized_COPY_TO_options_s, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":535
+ * if self.options.unrecognized:
+ * shell.printerr('Unrecognized COPY TO options: %s' % ', '.join(self.options.unrecognized.keys()))
+ * return # <<<<<<<<<<<<<<
+ *
+ * if not self.validate_columns():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ }
+
+ /* "cqlshlib/copyutil.py":537
+ * return
+ *
+ * if not self.validate_columns(): # <<<<<<<<<<<<<<
+ * return 0
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_validate_columns); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_7 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_7) {
+
+ /* "cqlshlib/copyutil.py":538
+ *
+ * if not self.validate_columns():
+ * return 0 # <<<<<<<<<<<<<<
+ *
+ * ranges = self.get_ranges()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_r = __pyx_int_0;
+ goto __pyx_L0;
+ }
+
+ /* "cqlshlib/copyutil.py":540
+ * return 0
+ *
+ * ranges = self.get_ranges() # <<<<<<<<<<<<<<
+ * if not ranges:
+ * return 0
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_ranges); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_ranges = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":541
+ *
+ * ranges = self.get_ranges()
+ * if not ranges: # <<<<<<<<<<<<<<
+ * return 0
+ *
+ */
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_ranges); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((!__pyx_t_7) != 0);
+ if (__pyx_t_3) {
+
+ /* "cqlshlib/copyutil.py":542
+ * ranges = self.get_ranges()
+ * if not ranges:
+ * return 0 # <<<<<<<<<<<<<<
+ *
+ * if not self.writer.open():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_r = __pyx_int_0;
+ goto __pyx_L0;
+ }
+
+ /* "cqlshlib/copyutil.py":544
+ * return 0
+ *
+ * if not self.writer.open(): # <<<<<<<<<<<<<<
+ * return 0
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_writer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_open); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_7 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_7) {
+
+ /* "cqlshlib/copyutil.py":545
+ *
+ * if not self.writer.open():
+ * return 0 # <<<<<<<<<<<<<<
+ *
+ * self.printmsg("\nStarting copy of %s.%s with columns %s." % (self.ks, self.table, self.columns))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_r = __pyx_int_0;
+ goto __pyx_L0;
+ }
+
+ /* "cqlshlib/copyutil.py":547
+ * return 0
+ *
+ * self.printmsg("\nStarting copy of %s.%s with columns %s." % (self.ks, self.table, self.columns)) # <<<<<<<<<<<<<<
+ *
+ * params = self.make_params()
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_printmsg_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ks); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_table); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_columns); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_1 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Starting_copy_of_s_s_with_colum, __pyx_t_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":549
+ * self.printmsg("\nStarting copy of %s.%s with columns %s." % (self.ks, self.table, self.columns))
+ *
+ * params = self.make_params() # <<<<<<<<<<<<<<
+ * for i in xrange(self.num_processes):
+ * self.processes.append(ExportProcess(self.update_params(params, i)))
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_make_params); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_params = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":550
+ *
+ * params = self.make_params()
+ * for i in xrange(self.num_processes): # <<<<<<<<<<<<<<
+ * self.processes.append(ExportProcess(self.update_params(params, i)))
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_num_processes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_xrange, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
+ __pyx_t_10 = NULL;
+ } else {
+ __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_10)) {
+ if (likely(PyList_CheckExact(__pyx_t_6))) {
+ if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ } else {
+ if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ }
+ } else {
+ __pyx_t_2 = __pyx_t_10(__pyx_t_6);
+ if (unlikely(!__pyx_t_2)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "cqlshlib/copyutil.py":551
+ * params = self.make_params()
+ * for i in xrange(self.num_processes):
+ * self.processes.append(ExportProcess(self.update_params(params, i))) # <<<<<<<<<<<<<<
+ *
+ * self.start_processes()
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_processes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExportProcess); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_11 = NULL;
+ __pyx_t_12 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_12 = 1;
+ }
+ }
+ __pyx_t_13 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_13);
+ if (__pyx_t_11) {
+ PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_params);
+ PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_v_params);
+ __Pyx_GIVEREF(__pyx_v_params);
+ __Pyx_INCREF(__pyx_v_i);
+ PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_v_i);
+ __Pyx_GIVEREF(__pyx_v_i);
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
+ PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_14 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_t_4); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "cqlshlib/copyutil.py":550
+ *
+ * params = self.make_params()
+ * for i in xrange(self.num_processes): # <<<<<<<<<<<<<<
+ * self.processes.append(ExportProcess(self.update_params(params, i)))
+ *
+ */
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "cqlshlib/copyutil.py":553
+ * self.processes.append(ExportProcess(self.update_params(params, i)))
+ *
+ * self.start_processes() # <<<<<<<<<<<<<<
+ *
+ * try:
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_start_processes); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "cqlshlib/copyutil.py":555
+ * self.start_processes()
+ *
+ * try: # <<<<<<<<<<<<<<
+ * self.export_records(ranges)
+ * finally:
+ */
+ /*try:*/ {
+
+ /* "cqlshlib/copyutil.py":556
+ *
+ * try:
+ * self.export_records(ranges) # <<<<<<<<<<<<<<
+ * finally:
+ * self.close()
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_export_records); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_ranges); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ } else {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_INCREF(__pyx_v_ranges);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_ranges);
+ __Pyx_GIVEREF(__pyx_v_ranges);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+
+ /* "cqlshlib/copyutil.py":558
+ * self.export_records(ranges)
+ * finally:
+ * self.close() # <<<<<<<<<<<<<<
+ *
+ * def close(self):
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_close); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ goto __pyx_L11;
+ }
+ /*exception exit:*/{
+ __pyx_L10_error:;
+ __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
+ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
+ __Pyx_XGOTREF(__pyx_t_18);
+ __Pyx_XGOTREF(__pyx_t_19);
+ __Pyx_XGOTREF(__pyx_t_20);
+ __Pyx_XGOTREF(__pyx_t_21);
+ __Pyx_XGOTREF(__pyx_t_22);
+ __Pyx_XGOTREF(__pyx_t_23);
+ __pyx_t_15 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
+ {
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_close); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ if (PY_MAJOR_VERSION >= 3) {
+ __Pyx_XGIVEREF(__pyx_t_21);
+ __Pyx_XGIVEREF(__pyx_t_22);
+ __Pyx_XGIVEREF(__pyx_t_23);
+ __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
+ }
+ __Pyx_XGIVEREF(__pyx_t_18);
+ __Pyx_XGIVEREF(__pyx_t_19);
+ __Pyx_XGIVEREF(__pyx_t_20);
+ __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
+ __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
+ __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
+ goto __pyx_L1_error;
+ __pyx_L13_error:;
+ if (PY_MAJOR_VERSION >= 3) {
+ __Pyx_XGIVEREF(__pyx_t_21);
+ __Pyx_XGIVEREF(__pyx_t_22);
+ __Pyx_XGIVEREF(__pyx_t_23);
+ __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
+ }
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
+ __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
+ goto __pyx_L1_error;
+ }
+ __pyx_L11:;
+ }
+
+ /* "cqlshlib/copyutil.py":526
+ * self.writer = ExportWriter(fname, shell, columns, options)
+ *
+ * def run(self): # <<<<<<<<<<<<<<
+ * """
+ * Initiates the export by starting the worker processes.
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_AddTraceback("cqlshlib.copyutil.ExportTask.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_shell);
+ __Pyx_XDECREF(__pyx_v_ranges);
+ __Pyx_XDECREF(__pyx_v_params);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "cqlshlib/copyutil.py":560
+ * self.close()
+ *
+ * def close(self): # <<<<<<<<<<<<<<
+ * CopyTask.close(self)
+ * self.writer.close()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_10ExportTask_5close(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_8cqlshlib_8copyutil_10ExportTask_5close = {"close", (PyCFunction)__pyx_pw_8cqlshlib_8copyutil_10ExportTask_5close, METH_O, 0};
+static PyObject *__pyx_pw_8cqlshlib_8copyutil_10ExportTask_5close(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("close (wrapper)", 0);
+ __pyx_r = __pyx_pf_8cqlshlib_8copyutil_10ExportTask_4close(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8cqlshlib_8copyutil_10ExportTask_4close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("close", 0);
+ __Pyx_TraceCall("close", __pyx_f[0], 560);
+
+ /* "cqlshlib/copyutil.py":561
+ *
+ * def close(self):
+ * CopyTask.close(self) # <<<<<<<<<<<<<<
+ * self.writer.close()
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CopyTask); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_INCREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "cqlshlib/copyutil.py":562
+ * def close(self):
+ * CopyTask.close(self)
+ * self.writer.close() # <<<<<<<<<<<<<<
+ *
+ * def get_ranges(self):
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_writer); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment