diff --git a/cassandra-3.11.0-remove-thrift.patch b/cassandra-3.11.0-remove-thrift.patch index 9f284f9..7510728 100644 --- a/cassandra-3.11.0-remove-thrift.patch +++ b/cassandra-3.11.0-remove-thrift.patch @@ -1,7 +1,7 @@ -From f277d8e0e34c091c4638ccc88e00b0fac384a13c Mon Sep 17 00:00:00 2001 +From 3a6566f3d28d86e6cd1a902270bc0bf381f26a6c Mon Sep 17 00:00:00 2001 From: Tomas Repik -Date: Wed, 12 Jul 2017 16:19:32 +0200 -Subject: [PATCH] remove thrift from 3.11 +Date: Thu, 24 Aug 2017 08:13:47 +0200 +Subject: [PATCH] remove thrift from Cassandra 3.11.0 --- NOTICE.txt | 7 - @@ -9,6 +9,7 @@ Subject: [PATCH] remove thrift from 3.11 bin/cqlsh.py | 6 +- build.xml | 163 - conf/cassandra-env.ps1 | 2 +- + conf/cassandra.yaml | 119 +- conf/jvm.options | 6 - conf/logback.xml | 1 - doc/SASI.md | 3 +- @@ -287,7 +288,7 @@ Subject: [PATCH] remove thrift from 3.11 .../cassandra/stress/util/SimpleThriftClient.java | 111 - .../cassandra/stress/util/SmartThriftClient.java | 282 - .../apache/cassandra/stress/util/ThriftClient.java | 57 - - 283 files changed, 950 insertions(+), 106670 deletions(-) + 284 files changed, 956 insertions(+), 106783 deletions(-) delete mode 100644 examples/hadoop_cql3_word_count/README.txt delete mode 100755 examples/hadoop_cql3_word_count/bin/word_count delete mode 100755 examples/hadoop_cql3_word_count/bin/word_count_counters @@ -809,6 +810,194 @@ index 2df7054..806eabc 100644 $env:CLASSPATH=$cp } +diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml +index 4bb5840..6a2e5ce 100644 +--- a/conf/cassandra.yaml ++++ b/conf/cassandra.yaml +@@ -232,10 +232,10 @@ disk_failure_policy: stop + # Policy for commit disk failures: + # + # die +-# shut down gossip and Thrift and kill the JVM, so the node can be replaced. ++# shut down the node and kill the JVM, so the node can be replaced. + # + # stop +-# shut down gossip and Thrift, leaving the node effectively dead, but ++# shut down the node, leaving the node effectively dead, but + # can still be inspected via JMX. + # + # stop_commit +@@ -265,15 +265,6 @@ commit_failure_policy: stop + # Default value ("auto") is 1/256th of the heap or 10MB, whichever is greater + prepared_statements_cache_size_mb: + +-# Maximum size of the Thrift prepared statement cache +-# +-# If you do not use Thrift at all, it is safe to leave this value at "auto". +-# +-# See description of 'prepared_statements_cache_size_mb' above for more information. +-# +-# Default value ("auto") is 1/256th of the heap or 10MB, whichever is greater +-thrift_prepared_statements_cache_size_mb: +- + # Maximum size of the key cache in memory. + # + # Each key cache hit saves 1 seek and each row cache hit saves 2 seeks at the +@@ -624,8 +615,7 @@ listen_address: localhost + # internode_authenticator: org.apache.cassandra.auth.AllowAllInternodeAuthenticator + + # Whether to start the native transport server. +-# Please note that the address on which the native transport is bound is the +-# same as the rpc_address. The port however is different and specified below. ++# The address on which the native transport is bound is defined by rpc_address. + start_native_transport: true + # port for the CQL native transport to listen for clients on + # For security reasons, you should not expose this port to the internet. Firewall it if needed. +@@ -638,10 +628,8 @@ native_transport_port: 9042 + # from native_transport_port will use encryption for native_transport_port_ssl while + # keeping native_transport_port unencrypted. + # native_transport_port_ssl: 9142 +-# The maximum threads for handling requests when the native transport is used. +-# This is similar to rpc_max_threads though the default differs slightly (and +-# there is no native_transport_min_threads, idle threads will always be stopped +-# after 30 seconds). ++# The maximum threads for handling requests (note that idle threads are stopped ++# after 30 seconds so there is not corresponding minimum setting). + # native_transport_max_threads: 128 + # + # The maximum size of allowed frame. Frame (requests) larger than this will +@@ -657,11 +645,7 @@ native_transport_port: 9042 + # The default is -1, which means unlimited. + # native_transport_max_concurrent_connections_per_ip: -1 + +-# Whether to start the thrift rpc server. +-start_rpc: false +- +-# The address or interface to bind the Thrift RPC service and native transport +-# server to. ++# The address or interface to bind the native transport server to. + # + # Set rpc_address OR rpc_interface, not both. + # +@@ -684,9 +668,6 @@ rpc_address: localhost + # ipv4. If there is only one address it will be selected regardless of ipv4/ipv6. + # rpc_interface_prefer_ipv6: false + +-# port for Thrift to listen for clients on +-rpc_port: 9160 +- + # RPC address to broadcast to drivers and other Cassandra nodes. This cannot + # be set to 0.0.0.0. If left blank, this will be set to the value of + # rpc_address. If rpc_address is set to 0.0.0.0, broadcast_rpc_address must +@@ -696,45 +677,6 @@ rpc_port: 9160 + # enable or disable keepalive on rpc/native connections + rpc_keepalive: true + +-# Cassandra provides two out-of-the-box options for the RPC Server: +-# +-# sync +-# One thread per thrift connection. For a very large number of clients, memory +-# will be your limiting factor. On a 64 bit JVM, 180KB is the minimum stack size +-# per thread, and that will correspond to your use of virtual memory (but physical memory +-# may be limited depending on use of stack space). +-# +-# hsha +-# Stands for "half synchronous, half asynchronous." All thrift clients are handled +-# asynchronously using a small number of threads that does not vary with the amount +-# of thrift clients (and thus scales well to many clients). The rpc requests are still +-# synchronous (one thread per active request). If hsha is selected then it is essential +-# that rpc_max_threads is changed from the default value of unlimited. +-# +-# The default is sync because on Windows hsha is about 30% slower. On Linux, +-# sync/hsha performance is about the same, with hsha of course using less memory. +-# +-# Alternatively, can provide your own RPC server by providing the fully-qualified class name +-# of an o.a.c.t.TServerFactory that can create an instance of it. +-rpc_server_type: sync +- +-# Uncomment rpc_min|max_thread to set request pool size limits. +-# +-# Regardless of your choice of RPC server (see above), the number of maximum requests in the +-# RPC thread pool dictates how many concurrent requests are possible (but if you are using the sync +-# RPC server, it also dictates the number of clients that can be connected at all). +-# +-# The default is unlimited and thus provides no protection against clients overwhelming the server. You are +-# encouraged to set a maximum that makes sense for you in production, but do keep in mind that +-# rpc_max_threads represents the maximum number of client requests this server may execute concurrently. +-# +-# rpc_min_threads: 16 +-# rpc_max_threads: 2048 +- +-# uncomment to set socket buffer sizes on rpc connections +-# rpc_send_buff_size_in_bytes: +-# rpc_recv_buff_size_in_bytes: +- + # Uncomment to set socket buffer size for internode communication + # Note that when setting this, the buffer size is limited by net.core.wmem_max + # and when not setting it it is defined by net.ipv4.tcp_wmem +@@ -751,9 +693,6 @@ rpc_server_type: sync + # and when not setting it it is defined by net.ipv4.tcp_wmem + # internode_recv_buff_size_in_bytes: + +-# Frame size for thrift (maximum message length). +-thrift_framed_transport_size_in_mb: 15 +- + # Set to true to have Cassandra create a hard link to each sstable + # flushed or streamed locally in a backups/ subdirectory of the + # keyspace data. Removing these links is the operator's +@@ -962,52 +901,6 @@ dynamic_snitch_reset_interval_in_ms: 600000 + # until the pinned host was 20% worse than the fastest. + dynamic_snitch_badness_threshold: 0.1 + +-# request_scheduler -- Set this to a class that implements +-# RequestScheduler, which will schedule incoming client requests +-# according to the specific policy. This is useful for multi-tenancy +-# with a single Cassandra cluster. +-# NOTE: This is specifically for requests from the client and does +-# not affect inter node communication. +-# org.apache.cassandra.scheduler.NoScheduler - No scheduling takes place +-# org.apache.cassandra.scheduler.RoundRobinScheduler - Round robin of +-# client requests to a node with a separate queue for each +-# request_scheduler_id. The scheduler is further customized by +-# request_scheduler_options as described below. +-request_scheduler: org.apache.cassandra.scheduler.NoScheduler +- +-# Scheduler Options vary based on the type of scheduler +-# +-# NoScheduler +-# Has no options +-# +-# RoundRobin +-# throttle_limit +-# The throttle_limit is the number of in-flight +-# requests per client. Requests beyond +-# that limit are queued up until +-# running requests can complete. +-# The value of 80 here is twice the number of +-# concurrent_reads + concurrent_writes. +-# default_weight +-# default_weight is optional and allows for +-# overriding the default which is 1. +-# weights +-# Weights are optional and will default to 1 or the +-# overridden default_weight. The weight translates into how +-# many requests are handled during each turn of the +-# RoundRobin, based on the scheduler id. +-# +-# request_scheduler_options: +-# throttle_limit: 80 +-# default_weight: 5 +-# weights: +-# Keyspace1: 1 +-# Keyspace2: 5 +- +-# request_scheduler_id -- An identifier based on which to perform +-# the request scheduling. Currently the only valid option is keyspace. +-# request_scheduler_id: keyspace +- + # Enable or disable inter-node encryption + # JVM defaults for supported SSL socket protocols and cipher suites can + # be replaced using custom encryption options. This is not recommended diff --git a/conf/jvm.options b/conf/jvm.options index f91466a..03378b1 100644 --- a/conf/jvm.options @@ -113776,5 +113965,5 @@ index 3b13758..0000000 - CqlResult execute_prepared_cql_query(int itemId, ByteBuffer key, List values) throws InvalidRequestException, UnavailableException, TimedOutException, SchemaDisagreementException, TException; -} -- -2.9.4 +2.9.5 diff --git a/cassandra-3.11.0-scripts.patch b/cassandra-3.11.0-scripts.patch index 85cd012..c79c4d6 100644 --- a/cassandra-3.11.0-scripts.patch +++ b/cassandra-3.11.0-scripts.patch @@ -33,10 +33,10 @@ index 57ea190..848c90d 100755 +wait_for_service_available() +{ -+ host=$(head -1 /etc/hosts | cut -d' ' -f1) ++ host=$(hostname -I | cut -d' ' -f1) + port=$(cat $CASSANDRA_CONF/cassandra.yaml | grep native_transport_port | head -1 | cut -d' ' -f2) + if ! nc -z $host $port; then -+ # echo "Waiting for Cassandra to start..." ++ # echo "Waiting for Cassandra to start at $host:$port ..." + while ! nc -z $host $port; do + sleep 1 + done diff --git a/cassandra.service b/cassandra.service index 92b8d0a..35a019f 100644 --- a/cassandra.service +++ b/cassandra.service @@ -6,11 +6,9 @@ After=syslog.target network.target [Service] Type=forking User=cassandra -EnvironmentFile=-/etc/sysconfig/cassandra -ExecStart=/usr/bin/cassandra $OPTIONS +ExecStart=/usr/bin/cassandra +TimeoutStopSec=25 SuccessExitStatus=0 143 -TimeoutStartSec=120 -TimeoutStopSec=9000 [Install] WantedBy=multi-user.target diff --git a/cassandra.spec b/cassandra.spec index 9d7c626..c8a728a 100644 --- a/cassandra.spec +++ b/cassandra.spec @@ -10,7 +10,7 @@ Name: %{?scl_prefix}cassandra Version: 3.11.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Client utilities for Cassandra # Apache (v2.0) BSD (3 clause): # ./src/java/org/apache/cassandra/utils/vint/VIntCoding.java @@ -457,6 +457,10 @@ exit 0 %license LICENSE.txt NOTICE.txt %changelog +* Wed Aug 30 2017 Tomas Repik - 3.11.0-4 +- remove thrift configurations from cassandra.yaml file +- tweak the service + * Wed Aug 02 2017 Fedora Release Engineering - 3.11.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild