Merge branch 'cassandra-1.2' into trunk

This commit is contained in:
Dave Brosius 2013-04-08 23:31:30 -04:00
commit 39cf55a543
4 changed files with 20 additions and 9 deletions

View File

@ -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)

6
debian/changelog vendored
View File

@ -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

View File

@ -47,6 +47,8 @@ public abstract class AbstractJmxClient implements Closeable
protected final String host;
protected final int port;
protected final String username;
protected final String password;
protected JMXConnection jmxConn;
protected PrintStream out = System.out;
@ -54,6 +56,8 @@ public abstract class AbstractJmxClient implements Closeable
{
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");
}
@ -61,6 +65,8 @@ public abstract class AbstractJmxClient implements Closeable
{
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 @@ class JMXConnection
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;

View File

@ -233,7 +233,7 @@ public class Shuffle extends AbstractJmxClient
{
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 class Shuffle extends AbstractJmxClient
{
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 class Shuffle extends AbstractJmxClient
{
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 class Shuffle extends AbstractJmxClient
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 class Shuffle extends AbstractJmxClient
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
{