Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 995D2200D0C for ; Wed, 20 Sep 2017 16:08:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9839F1609E2; Wed, 20 Sep 2017 14:08:46 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BC9491609E5 for ; Wed, 20 Sep 2017 16:08:45 +0200 (CEST) Received: (qmail 55506 invoked by uid 500); 20 Sep 2017 14:08:44 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 55158 invoked by uid 99); 20 Sep 2017 14:08:44 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Sep 2017 14:08:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 023FCF5778; Wed, 20 Sep 2017 14:08:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jasobrown@apache.org To: commits@cassandra.apache.org Date: Wed, 20 Sep 2017 14:08:47 -0000 Message-Id: In-Reply-To: <85489db90fc8430ea788fdc90f70e848@git.apache.org> References: <85489db90fc8430ea788fdc90f70e848@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [05/15] cassandra git commit: Add storage port options to sstableloader archived-at: Wed, 20 Sep 2017 14:08:46 -0000 Add storage port options to sstableloader patch by Eduard Tudenhoefner; reviewed by Alex Petrov for CASSANDRA-13844 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/428eaa3e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/428eaa3e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/428eaa3e Branch: refs/heads/cassandra-3.11 Commit: 428eaa3e37cab7227c81fdf124d29dfc1db4257c Parents: 665f693 Author: Eduard Tudenhoefner Authored: Tue Sep 5 09:01:32 2017 -0700 Committer: Jason Brown Committed: Wed Sep 20 06:57:35 2017 -0700 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../org/apache/cassandra/tools/BulkLoader.java | 38 ++++++++++++++++---- 2 files changed, 33 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/428eaa3e/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 4f8f65f..848628b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.19 + * Add storage port options to sstableloader (CASSANDRA-13844) * Remove stress-test target in CircleCI as it's not existing (CASSANDRA-13775) * Clone HeartBeatState when building gossip messages. Make its generation/version volatile (CASSANDRA-13700) http://git-wip-us.apache.org/repos/asf/cassandra/blob/428eaa3e/src/java/org/apache/cassandra/tools/BulkLoader.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/tools/BulkLoader.java b/src/java/org/apache/cassandra/tools/BulkLoader.java index 0b1a1d4..52f9467 100644 --- a/src/java/org/apache/cassandra/tools/BulkLoader.java +++ b/src/java/org/apache/cassandra/tools/BulkLoader.java @@ -56,6 +56,8 @@ public class BulkLoader private static final String IGNORE_NODES_OPTION = "ignore"; private static final String INITIAL_HOST_ADDRESS_OPTION = "nodes"; private static final String RPC_PORT_OPTION = "port"; + private static final String STORAGE_PORT_OPTION = "storage-port"; + private static final String SSL_STORAGE_PORT_OPTION = "ssl-storage-port"; private static final String USER_OPTION = "username"; private static final String PASSWD_OPTION = "password"; private static final String THROTTLE_MBITS = "throttle"; @@ -399,7 +401,7 @@ public class BulkLoader public boolean debug; public boolean verbose; public boolean noProgress; - public int rpcPort = 9160; + public int rpcPort; public String user; public String passwd; public int throttle = 0; @@ -462,9 +464,6 @@ public class BulkLoader opts.verbose = cmd.hasOption(VERBOSE_OPTION); opts.noProgress = cmd.hasOption(NOPROGRESS_OPTION); - if (cmd.hasOption(RPC_PORT_OPTION)) - opts.rpcPort = Integer.parseInt(cmd.getOptionValue(RPC_PORT_OPTION)); - if (cmd.hasOption(USER_OPTION)) opts.user = cmd.getOptionValue(USER_OPTION); @@ -532,13 +531,38 @@ public class BulkLoader config.stream_throughput_outbound_megabits_per_sec = 0; config.inter_dc_stream_throughput_outbound_megabits_per_sec = 0; } - opts.storagePort = config.storage_port; - opts.sslStoragePort = config.ssl_storage_port; opts.throttle = config.stream_throughput_outbound_megabits_per_sec; opts.interDcThrottle = config.inter_dc_stream_throughput_outbound_megabits_per_sec; opts.encOptions = config.client_encryption_options; opts.serverEncOptions = config.server_encryption_options; + if (cmd.hasOption(RPC_PORT_OPTION)) + { + opts.rpcPort = Integer.parseInt(cmd.getOptionValue(RPC_PORT_OPTION)); + } + else + { + opts.rpcPort = config.rpc_port; + } + + if (cmd.hasOption(STORAGE_PORT_OPTION)) + { + opts.storagePort = Integer.parseInt(cmd.getOptionValue(STORAGE_PORT_OPTION)); + } + else + { + opts.storagePort = config.storage_port; + } + + if (cmd.hasOption(SSL_STORAGE_PORT_OPTION)) + { + opts.sslStoragePort = Integer.parseInt(cmd.getOptionValue(SSL_STORAGE_PORT_OPTION)); + } + else + { + opts.sslStoragePort = config.ssl_storage_port; + } + if (cmd.hasOption(THROTTLE_MBITS)) { opts.throttle = Integer.parseInt(cmd.getOptionValue(THROTTLE_MBITS)); @@ -667,6 +691,8 @@ public class BulkLoader options.addOption("i", IGNORE_NODES_OPTION, "NODES", "don't stream to this (comma separated) list of nodes"); options.addOption("d", INITIAL_HOST_ADDRESS_OPTION, "initial hosts", "Required. try to connect to these hosts (comma separated) initially for ring information"); options.addOption("p", RPC_PORT_OPTION, "rpc port", "port used for rpc (default 9160)"); + options.addOption("sp", STORAGE_PORT_OPTION, "storage port", "port used for internode communication (default 7000)"); + options.addOption("ssp", SSL_STORAGE_PORT_OPTION, "ssl storage port", "port used for TLS internode communication (default 7001)"); options.addOption("t", THROTTLE_MBITS, "throttle", "throttle speed in Mbits (default unlimited)"); options.addOption("idct", INTER_DC_THROTTLE_MBITS, "inter-dc-throttle", "inter-datacenter throttle speed in Mbits (default unlimited)"); options.addOption("u", USER_OPTION, "username", "username for cassandra authentication"); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org For additional commands, e-mail: commits-help@cassandra.apache.org