You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ma...@apache.org on 2014/09/05 11:11:36 UTC
[1/2] git commit: Don't expose internal classes over JMX
Repository: cassandra
Updated Branches:
refs/heads/cassandra-2.1 d304b7cab -> dd972e6c3
Don't expose internal classes over JMX
Patch by marcuse; reviewed by slebresne for CASSANDRA-7879
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/45014886
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/45014886
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/45014886
Branch: refs/heads/cassandra-2.1
Commit: 45014886e89e5bd47bf2f4c9871391d77702ad82
Parents: c81dc4b
Author: Marcus Eriksson <ma...@apache.org>
Authored: Fri Sep 5 11:02:29 2014 +0200
Committer: Marcus Eriksson <ma...@apache.org>
Committed: Fri Sep 5 11:02:29 2014 +0200
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../db/compaction/CompactionManager.java | 9 +++++-
.../cassandra/service/StorageService.java | 12 ++++----
.../cassandra/service/StorageServiceMBean.java | 6 ++--
.../org/apache/cassandra/tools/NodeProbe.java | 30 ++++++++------------
5 files changed, 30 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/45014886/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 93d77c1..befdcd7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
2.1.0
+ * Avoid exposing internal classes over JMX (CASSANDRA-7879)
* Add null check for keys when freezing collection (CASSANDRA-7869)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/45014886/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 65c4882..09c068f 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -289,7 +289,14 @@ public class CompactionManager implements CompactionManagerMBean
void execute(SSTableReader input) throws IOException;
}
- public enum AllSSTableOpStatus { ABORTED, SUCCESSFUL }
+ public enum AllSSTableOpStatus { ABORTED(1), SUCCESSFUL(0);
+ public final int statusCode;
+
+ AllSSTableOpStatus(int statusCode)
+ {
+ this.statusCode = statusCode;
+ }
+ }
public AllSSTableOpStatus performScrub(final ColumnFamilyStore cfs, final boolean skipCorrupted) throws InterruptedException, ExecutionException
{
http://git-wip-us.apache.org/repos/asf/cassandra/blob/45014886/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java
index 735bf7b..5c6dbd6 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -2156,7 +2156,7 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
return Gossiper.instance.getCurrentGenerationNumber(FBUtilities.getBroadcastAddress());
}
- public CompactionManager.AllSSTableOpStatus forceKeyspaceCleanup(String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException
+ public int forceKeyspaceCleanup(String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException
{
if (keyspaceName.equals(Keyspace.SYSTEM_KS))
throw new RuntimeException("Cleanup of the system keyspace is neither necessary nor wise");
@@ -2168,10 +2168,10 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
if (oneStatus != CompactionManager.AllSSTableOpStatus.SUCCESSFUL)
status = oneStatus;
}
- return status;
+ return status.statusCode;
}
- public CompactionManager.AllSSTableOpStatus scrub(boolean disableSnapshot, boolean skipCorrupted, String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException
+ public int scrub(boolean disableSnapshot, boolean skipCorrupted, String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException
{
CompactionManager.AllSSTableOpStatus status = CompactionManager.AllSSTableOpStatus.SUCCESSFUL;
for (ColumnFamilyStore cfStore : getValidColumnFamilies(false, false, keyspaceName, columnFamilies))
@@ -2180,10 +2180,10 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
if (oneStatus != CompactionManager.AllSSTableOpStatus.SUCCESSFUL)
status = oneStatus;
}
- return status;
+ return status.statusCode;
}
- public CompactionManager.AllSSTableOpStatus upgradeSSTables(String keyspaceName, boolean excludeCurrentVersion, String... columnFamilies) throws IOException, ExecutionException, InterruptedException
+ public int upgradeSSTables(String keyspaceName, boolean excludeCurrentVersion, String... columnFamilies) throws IOException, ExecutionException, InterruptedException
{
CompactionManager.AllSSTableOpStatus status = CompactionManager.AllSSTableOpStatus.SUCCESSFUL;
for (ColumnFamilyStore cfStore : getValidColumnFamilies(true, true, keyspaceName, columnFamilies))
@@ -2192,7 +2192,7 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
if (oneStatus != CompactionManager.AllSSTableOpStatus.SUCCESSFUL)
status = oneStatus;
}
- return status;
+ return status.statusCode;
}
public void forceKeyspaceCompaction(String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException
http://git-wip-us.apache.org/repos/asf/cassandra/blob/45014886/src/java/org/apache/cassandra/service/StorageServiceMBean.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageServiceMBean.java b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
index b4cc45b..8bb13ae 100644
--- a/src/java/org/apache/cassandra/service/StorageServiceMBean.java
+++ b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
@@ -238,7 +238,7 @@ public interface StorageServiceMBean extends NotificationEmitter
/**
* Trigger a cleanup of keys on a single keyspace
*/
- public CompactionManager.AllSSTableOpStatus forceKeyspaceCleanup(String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException;
+ public int forceKeyspaceCleanup(String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException;
/**
* Scrub (deserialize + reserialize at the latest version, skipping bad rows if any) the given keyspace.
@@ -246,13 +246,13 @@ public interface StorageServiceMBean extends NotificationEmitter
*
* Scrubbed CFs will be snapshotted first, if disableSnapshot is false
*/
- public CompactionManager.AllSSTableOpStatus scrub(boolean disableSnapshot, boolean skipCorrupted, String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException;
+ public int scrub(boolean disableSnapshot, boolean skipCorrupted, String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException;
/**
* Rewrite all sstables to the latest version.
* Unlike scrub, it doesn't skip bad rows and do not snapshot sstables first.
*/
- public CompactionManager.AllSSTableOpStatus upgradeSSTables(String keyspaceName, boolean excludeCurrentVersion, String... columnFamilies) throws IOException, ExecutionException, InterruptedException;
+ public int upgradeSSTables(String keyspaceName, boolean excludeCurrentVersion, String... columnFamilies) throws IOException, ExecutionException, InterruptedException;
/**
* Flush all memtables for the given column families, or all columnfamilies for the given keyspace
http://git-wip-us.apache.org/repos/asf/cassandra/blob/45014886/src/java/org/apache/cassandra/tools/NodeProbe.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java b/src/java/org/apache/cassandra/tools/NodeProbe.java
index 1a2364b..3f3073d 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -186,51 +186,45 @@ public class NodeProbe implements AutoCloseable
jmxc.close();
}
- public CompactionManager.AllSSTableOpStatus forceKeyspaceCleanup(String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException
+ public int forceKeyspaceCleanup(String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException
{
return ssProxy.forceKeyspaceCleanup(keyspaceName, columnFamilies);
}
- public CompactionManager.AllSSTableOpStatus scrub(boolean disableSnapshot, boolean skipCorrupted, String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException
+ public int scrub(boolean disableSnapshot, boolean skipCorrupted, String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException
{
return ssProxy.scrub(disableSnapshot, skipCorrupted, keyspaceName, columnFamilies);
}
- public CompactionManager.AllSSTableOpStatus upgradeSSTables(String keyspaceName, boolean excludeCurrentVersion, String... columnFamilies) throws IOException, ExecutionException, InterruptedException
+ public int upgradeSSTables(String keyspaceName, boolean excludeCurrentVersion, String... columnFamilies) throws IOException, ExecutionException, InterruptedException
{
return ssProxy.upgradeSSTables(keyspaceName, excludeCurrentVersion, columnFamilies);
}
public void forceKeyspaceCleanup(PrintStream out, String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException
{
- switch (forceKeyspaceCleanup(keyspaceName, columnFamilies))
+ if (forceKeyspaceCleanup(keyspaceName, columnFamilies) != 0)
{
- case ABORTED:
- failed = true;
- out.println("Aborted cleaning up atleast one column family in keyspace "+keyspaceName+", check server logs for more information.");
- break;
+ failed = true;
+ out.println("Aborted cleaning up atleast one column family in keyspace "+keyspaceName+", check server logs for more information.");
}
}
public void scrub(PrintStream out, boolean disableSnapshot, boolean skipCorrupted, String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException
{
- switch (scrub(disableSnapshot, skipCorrupted, keyspaceName, columnFamilies))
+ if (scrub(disableSnapshot, skipCorrupted, keyspaceName, columnFamilies) != 0)
{
- case ABORTED:
- failed = true;
- out.println("Aborted scrubbing atleast one column family in keyspace "+keyspaceName+", check server logs for more information.");
- break;
+ failed = true;
+ out.println("Aborted scrubbing atleast one column family in keyspace "+keyspaceName+", check server logs for more information.");
}
}
public void upgradeSSTables(PrintStream out, String keyspaceName, boolean excludeCurrentVersion, String... columnFamilies) throws IOException, ExecutionException, InterruptedException
{
- switch (upgradeSSTables(keyspaceName, excludeCurrentVersion, columnFamilies))
+ if (upgradeSSTables(keyspaceName, excludeCurrentVersion, columnFamilies) != 0)
{
- case ABORTED:
- failed = true;
- out.println("Aborted upgrading sstables for atleast one column family in keyspace "+keyspaceName+", check server logs for more information.");
- break;
+ failed = true;
+ out.println("Aborted upgrading sstables for atleast one column family in keyspace "+keyspaceName+", check server logs for more information.");
}
}
[2/2] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Posted by ma...@apache.org.
Merge branch 'cassandra-2.1.0' into cassandra-2.1
Conflicts:
CHANGES.txt
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/dd972e6c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/dd972e6c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/dd972e6c
Branch: refs/heads/cassandra-2.1
Commit: dd972e6c3f48619d30e4167dde92cd333d58ffad
Parents: d304b7c 4501488
Author: Marcus Eriksson <ma...@apache.org>
Authored: Fri Sep 5 11:06:57 2014 +0200
Committer: Marcus Eriksson <ma...@apache.org>
Committed: Fri Sep 5 11:06:57 2014 +0200
----------------------------------------------------------------------
CHANGES.txt | 2 ++
.../db/compaction/CompactionManager.java | 9 +++++-
.../cassandra/service/StorageService.java | 12 ++++----
.../cassandra/service/StorageServiceMBean.java | 6 ++--
.../org/apache/cassandra/tools/NodeProbe.java | 30 ++++++++------------
5 files changed, 31 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd972e6c/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 5404f83,befdcd7..a0ba08b
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,56 -1,9 +1,58 @@@
+2.1.1
+ * (cqlsh): Show progress of COPY operations (CASSANDRA-7789)
+ * Add syntax to remove multiple elements from a map (CASSANDRA-6599)
+ * Support non-equals conditions in lightweight transactions (CASSANDRA-6839)
+ * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606)
+ * (cqlsh) Display the current logged-in user (CASSANDRA-7785)
+ * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815)
+ * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE
+ output (CASSANDRA-7659)
+ * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671)
+ * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405)
+ * Support list index operations with conditions (CASSANDRA-7499)
+ * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731)
+ * Validate IPv6 wildcard addresses properly (CASSANDRA-7680)
+ * (cqlsh) Error when tracing query (CASSANDRA-7613)
+ * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569)
+ * SSTableExport uses correct validator to create string representation of partition
+ keys (CASSANDRA-7498)
+ * Avoid NPEs when receiving type changes for an unknown keyspace (CASSANDRA-7689)
+ * Add support for custom 2i validation (CASSANDRA-7575)
+ * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
+ * Add listen_interface and rpc_interface options (CASSANDRA-7417)
+ * Improve schema merge performance (CASSANDRA-7444)
+ * Adjust MT depth based on # of partition validating (CASSANDRA-5263)
+ * Optimise NativeCell comparisons (CASSANDRA-6755)
+ * Configurable client timeout for cqlsh (CASSANDRA-7516)
+ * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111)
+Merged from 2.0:
+ * Explicitly disallow mixing multi-column and single-column
+ relations on clustering columns (CASSANDRA-7711)
+ * Better error message when condition is set on PK column (CASSANDRA-7804)
+ * Don't send schema change responses and events for no-op DDL
+ statements (CASSANDRA-7600)
+ * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774)
+ * Throw InvalidRequestException when queries contain relations on entire
+ collection columns (CASSANDRA-7506)
+ * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577)
+ * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252)
+ * (cqlsh) cqlsh should automatically disable tracing when selecting
+ from system_traces (CASSANDRA-7641)
+ * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927)
+ * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508)
+ * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703)
+ * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229)
+ * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635)
+ * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS (CASSANDRA-7611)
+ * Catch errors when the JVM pulls the rug out from GCInspector (CASSANDRA-5345)
+ * cqlsh fails when version number parts are not int (CASSANDRA-7524)
+Merged from 1.2:
+ * Improve PasswordAuthenticator default super user setup (CASSANDRA-7788)
+
+
2.1.0
+ * Avoid exposing internal classes over JMX (CASSANDRA-7879)
+ * Add null check for keys when freezing collection (CASSANDRA-7869)
-
-
-2.1.0-rc7
* Add frozen keyword and require UDT to be frozen (CASSANDRA-7857)
* Track added sstable size correctly (CASSANDRA-7239)
* (cqlsh) Fix case insensitivity (CASSANDRA-7834)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd972e6c/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
----------------------------------------------------------------------