Permalink
Browse files

Merge branch 'cassandra-1.2' into trunk

  • Loading branch information...
2 parents 4902bdc + c5820ed commit 39cf55a543efc0ef9d3cc83ea225a8d068d3d537 @mebigfatguy mebigfatguy committed Apr 9, 2013
View
@@ -64,6 +64,7 @@
* Fix potential incremental backups race (CASSANDRA-5410)
* Fix prepared BATCH statements with batch-level timestamps (CASSANDRA-5415)
* Allow overriding superuser setup delay (CASSANDRA-5430)
+ * cassandra-shuffle with JMX usernames and passwords (CASSANDRA-5431)
Merged from 1.1:
* cli: Quote ks and cf names in schema output when needed (CASSANDRA-5052)
* Fix bad default for min/max timestamp in SSTableMetadata (CASSANDRA-5372)
View
@@ -1,3 +1,9 @@
+cassandra (1.2.4) unstable; urgency=low
+
+ * New release
+
+ -- Sylvain Lebresne <slebresne@apache.org> Mon, 08 Apr 2013 18:52:23 +0200
+
cassandra (1.2.3) unstable; urgency=low
* New release
@@ -47,20 +47,26 @@
protected final String host;
protected final int port;
+ protected final String username;
+ protected final String password;
protected JMXConnection jmxConn;
protected PrintStream out = System.out;
static
{
options.addOption("h", "host", true, "JMX hostname or IP address (Default: localhost)");
options.addOption("p", "port", true, "JMX port number (Default: 7199)");
+ options.addOption("u", "username", true, "JMX username");
+ options.addOption("pw", "password", true, "JMX password");
options.addOption("H", "help", false, "Print help information");
}
public AbstractJmxClient(String host, Integer port, String username, String password) throws IOException
{
this.host = (host != null) ? host : DEFAULT_HOST;
this.port = (port != null) ? port : DEFAULT_JMX_PORT;
+ this.username = username;
+ this.password = password;
jmxConn = new JMXConnection(this.host, this.port, username, password);
}
@@ -133,11 +139,6 @@ public static void printHelp(String synopsis, String header)
private JMXConnector jmxc;
private MBeanServerConnection mbeanServerConn;
- JMXConnection(String host, int port) throws IOException
- {
- this(host, port, null, null);
- }
-
JMXConnection(String host, int port, String username, String password) throws IOException
{
this.host = host;
@@ -233,7 +233,7 @@ public void enableRelocations(Collection<String> endpoints)
{
try
{
- JMXConnection conn = new JMXConnection(endpoint, port);
+ JMXConnection conn = new JMXConnection(endpoint, port, username, password);
getSSProxy(conn.getMbeanServerConn()).enableScheduledRangeXfers();
conn.close();
}
@@ -265,7 +265,7 @@ public void disableRelocations(Collection<String> endpoints)
{
try
{
- JMXConnection conn = new JMXConnection(endpoint, port);
+ JMXConnection conn = new JMXConnection(endpoint, port, username, password);
getSSProxy(conn.getMbeanServerConn()).disableScheduledRangeXfers();
conn.close();
}
@@ -286,7 +286,7 @@ public void disableRelocations(Collection<String> endpoints)
{
try
{
- JMXConnection conn = new JMXConnection(host, port);
+ JMXConnection conn = new JMXConnection(host, port, username, password);
return getSSProxy(conn.getMbeanServerConn()).getLiveNodes();
}
catch (IOException e)
@@ -631,6 +631,8 @@ public static void main(String[] args) throws Exception
String hostName = (cmd.getOptionValue("host") != null) ? cmd.getOptionValue("host") : DEFAULT_HOST;
String port = (cmd.getOptionValue("port") != null) ? cmd.getOptionValue("port") : Integer.toString(DEFAULT_JMX_PORT);
+ String username = cmd.getOptionValue("username");
+ String password = cmd.getOptionValue("password");
String thriftHost = (cmd.getOptionValue("thrift-host") != null) ? cmd.getOptionValue("thrift-host") : hostName;
String thriftPort = (cmd.getOptionValue("thrift-port") != null) ? cmd.getOptionValue("thrift-port") : "9160";
String onlyDc = cmd.getOptionValue("only-dc");
@@ -670,7 +672,8 @@ public static void main(String[] args) throws Exception
else
thriftPortNum = 9160;
- Shuffle shuffler = new Shuffle(hostName, portNum, thriftHost, thriftPortNum, thriftFramed, null, null);
+ Shuffle shuffler = new Shuffle(hostName, portNum, thriftHost, thriftPortNum, thriftFramed,
+ username, password);
try
{

0 comments on commit 39cf55a

Please sign in to comment.