This is an automated email from the ASF dual-hosted git repository.
samt pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/trunk by this push:
new e191aff Passing checksum and compressor as options from SimpleClient
e191aff is described below
commit e191aff385053bdb5325f15bc6d16d2dc0ee0589
Author: sumanthpasupuleti <[email protected]>
AuthorDate: Sat Mar 16 23:35:32 2019 -0700
Passing checksum and compressor as options from SimpleClient
Patch by Sumanth Pasupuleti; reviewed by Sam Tunnicliffe for CASSANDRA-15056
---
CHANGES.txt | 1 +
src/java/org/apache/cassandra/transport/SimpleClient.java | 3 +++
2 files changed, 4 insertions(+)
diff --git a/CHANGES.txt b/CHANGES.txt
index b511c18..c6aaf2b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
4.0
+ * SimpleClient should pass connection properties as options (CASSANDRA-15056)
* Set repaired data tracking flag on range reads if enabled (CASSANDRA-15019)
* Calculate pending ranges for BOOTSTRAP_REPLACE correctly (CASSANDRA-14802)
* Make TableCQLHelper reuse the single quote pattern (CASSANDRA-15033)
diff --git a/src/java/org/apache/cassandra/transport/SimpleClient.java
b/src/java/org/apache/cassandra/transport/SimpleClient.java
index 9ed4272..deba207 100644
--- a/src/java/org/apache/cassandra/transport/SimpleClient.java
+++ b/src/java/org/apache/cassandra/transport/SimpleClient.java
@@ -133,10 +133,13 @@ public class SimpleClient implements Closeable
{
Compressor compressor = useCompression ? LZ4Compressor.INSTANCE :
null;
connection.setTransformer(ChecksummingTransformer.getTransformer(ChecksumType.CRC32,
compressor));
+ options.put(StartupMessage.CHECKSUM, "crc32");
+ options.put(StartupMessage.COMPRESSION, "lz4");
}
else if (useCompression)
{
connection.setTransformer(CompressingTransformer.getTransformer(LZ4Compressor.INSTANCE));
+ options.put(StartupMessage.COMPRESSION, "lz4");
}
execute(new StartupMessage(options));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]