git commit: Don't purge columns during upgradesstables

2012-07-27 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.0 1ad710b6e - 7ff8e3c38


Don't purge columns during upgradesstables

patch by slebresne; reviewed by jbellis for CASSANDRA-4462


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7ff8e3c3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7ff8e3c3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7ff8e3c3

Branch: refs/heads/cassandra-1.0
Commit: 7ff8e3c384df32eaca361cbb77632d04cc64060b
Parents: 1ad710b
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Fri Jul 27 10:06:33 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Fri Jul 27 10:06:33 2012 +0200

--
 CHANGES.txt|1 +
 .../cassandra/db/compaction/CompactionManager.java |7 +--
 2 files changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7ff8e3c3/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 79278aa..b3fa1a8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -12,6 +12,7 @@
  * fix 1.0.x node join to mixed version cluster, other nodes = 1.1 
(CASSANDRA-4195)
  * Fix LCS splitting sstable base on uncompressed size (CASSANDRA-4419)
  * Push the validation of secondary index values to the SecondaryIndexManager 
(CASSANDRA-4240)
+ * Don't purge columns during upgradesstables (CASSANDRA-4462)
 
 1.0.10
  * fix maxTimestamp to include row tombstones (CASSANDRA-4116)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7ff8e3c3/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 872ce0b..2400cfe 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -67,6 +67,9 @@ public class CompactionManager implements 
CompactionManagerMBean
 private static final Logger logger = 
LoggerFactory.getLogger(CompactionManager.class);
 public static final CompactionManager instance;
 
+public static final int NO_GC = Integer.MIN_VALUE;
+public static final int GC_ALL = Integer.MAX_VALUE;
+
 /**
  * compactionLock has two purposes:
  * - Compaction acquires its readLock so that multiple compactions can 
happen simultaneously,
@@ -238,7 +241,7 @@ public class CompactionManager implements 
CompactionManagerMBean
 {
 // SSTables are marked by the caller
 // NOTE: it is important that the task create one and only 
one sstable, even for Leveled compaction (see LeveledManifest.replace())
-CompactionTask task = new CompactionTask(cfs, 
Collections.singletonList(sstable), Integer.MAX_VALUE);
+CompactionTask task = new CompactionTask(cfs, 
Collections.singletonList(sstable), NO_GC);
 task.isUserDefined(true);
 task.setCompactionType(OperationType.UPGRADE_SSTABLES);
 task.execute(executor);
@@ -974,7 +977,7 @@ public class CompactionManager implements 
CompactionManagerMBean
 static int getDefaultGcBefore(ColumnFamilyStore cfs)
 {
 return cfs.isIndex()
-   ? Integer.MAX_VALUE
+   ? GC_ALL
: (int) (System.currentTimeMillis() / 1000) - 
cfs.metadata.getGcGraceSeconds();
 }
 



[2/2] git commit: Don't purge columns during upgradesstables

2012-07-27 Thread slebresne
Don't purge columns during upgradesstables

patch by slebresne; reviewed by jbellis for CASSANDRA-4462


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7ff8e3c3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7ff8e3c3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7ff8e3c3

Branch: refs/heads/cassandra-1.1
Commit: 7ff8e3c384df32eaca361cbb77632d04cc64060b
Parents: 1ad710b
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Fri Jul 27 10:06:33 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Fri Jul 27 10:06:33 2012 +0200

--
 CHANGES.txt|1 +
 .../cassandra/db/compaction/CompactionManager.java |7 +--
 2 files changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7ff8e3c3/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 79278aa..b3fa1a8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -12,6 +12,7 @@
  * fix 1.0.x node join to mixed version cluster, other nodes = 1.1 
(CASSANDRA-4195)
  * Fix LCS splitting sstable base on uncompressed size (CASSANDRA-4419)
  * Push the validation of secondary index values to the SecondaryIndexManager 
(CASSANDRA-4240)
+ * Don't purge columns during upgradesstables (CASSANDRA-4462)
 
 1.0.10
  * fix maxTimestamp to include row tombstones (CASSANDRA-4116)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7ff8e3c3/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 872ce0b..2400cfe 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -67,6 +67,9 @@ public class CompactionManager implements 
CompactionManagerMBean
 private static final Logger logger = 
LoggerFactory.getLogger(CompactionManager.class);
 public static final CompactionManager instance;
 
+public static final int NO_GC = Integer.MIN_VALUE;
+public static final int GC_ALL = Integer.MAX_VALUE;
+
 /**
  * compactionLock has two purposes:
  * - Compaction acquires its readLock so that multiple compactions can 
happen simultaneously,
@@ -238,7 +241,7 @@ public class CompactionManager implements 
CompactionManagerMBean
 {
 // SSTables are marked by the caller
 // NOTE: it is important that the task create one and only 
one sstable, even for Leveled compaction (see LeveledManifest.replace())
-CompactionTask task = new CompactionTask(cfs, 
Collections.singletonList(sstable), Integer.MAX_VALUE);
+CompactionTask task = new CompactionTask(cfs, 
Collections.singletonList(sstable), NO_GC);
 task.isUserDefined(true);
 task.setCompactionType(OperationType.UPGRADE_SSTABLES);
 task.execute(executor);
@@ -974,7 +977,7 @@ public class CompactionManager implements 
CompactionManagerMBean
 static int getDefaultGcBefore(ColumnFamilyStore cfs)
 {
 return cfs.isIndex()
-   ? Integer.MAX_VALUE
+   ? GC_ALL
: (int) (System.currentTimeMillis() / 1000) - 
cfs.metadata.getGcGraceSeconds();
 }
 



[1/2] git commit: Merge branch 'cassandra-1.0' into cassandra-1.1

2012-07-27 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.1 070c1d8dd - ccd436c0f


Merge branch 'cassandra-1.0' into cassandra-1.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/ccd436c0
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ccd436c0
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ccd436c0

Branch: refs/heads/cassandra-1.1
Commit: ccd436c0fe0c75db09dd7cd87a516f005f4e7289
Parents: 070c1d8 7ff8e3c
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Fri Jul 27 10:14:34 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Fri Jul 27 10:14:34 2012 +0200

--
 CHANGES.txt|2 ++
 .../cassandra/db/compaction/CompactionManager.java |9 ++---
 2 files changed, 8 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ccd436c0/CHANGES.txt
--
diff --cc CHANGES.txt
index bcf56b7,b3fa1a8..fd6991c
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,155 -1,6 +1,157 @@@
 -1.0.11
 +1.1.3
 + * (JMX) rename getRangeKeySample to sampleKeyRange to avoid returning
 +   multi-MB results as an attribute (CASSANDRA-4452)
 + * flush based on data size, not throughput; overwritten columns no 
 +   longer artificially inflate liveRatio (CASSANDRA-4399)
 + * update default commitlog segment size to 32MB and total commitlog
 +   size to 32/1024 MB for 32/64 bit JVMs, respectively (CASSANDRA-4422)
 + * avoid using global partitioner to estimate ranges in index sstables
 +   (CASSANDRA-4403)
 + * restore pre-CASSANDRA-3862 approach to removing expired tombstones
 +   from row cache during compaction (CASSANDRA-4364)
 + * (stress) support for CQL prepared statements (CASSANDRA-3633)
 + * Correctly catch exception when Snappy cannot be loaded (CASSANDRA-4400)
 + * (cql3) Support ORDER BY when IN condition is given in WHERE clause 
(CASSANDRA-4327)
 + * (cql3) delete component_index column on DROP TABLE call (CASSANDRA-4420)
 + * change nanoTime() to currentTimeInMillis() in schema related code 
(CASSANDRA-4432)
 + * add a token generation tool (CASSANDRA-3709)
 + * Fix LCS bug with sstable containing only 1 row (CASSANDRA-4411)
 + * fix Can't Modify Index Name problem on CF update (CASSANDRA-4439)
 + * Fix assertion error in getOverlappingSSTables during repair 
(CASSANDRA-4456)
 + * fix nodetool's setcompactionthreshold command (CASSANDRA-4455)
 + * Ensure compacted files are never used, to avoid counter overcount 
(CASSANDRA-4436)
 +Merged from 1.0:
 + * Push the validation of secondary index values to the SecondaryIndexManager 
(CASSANDRA-4240)
   * allow dropping columns shadowed by not-yet-expired supercolumn or row
 tombstones in PrecompactedRow (CASSANDRA-4396)
 + * fix 1.0.x node join to mixed version cluster, other nodes = 1.1 
(CASSANDRA-4195)
 + * Fix LCS splitting sstable base on uncompressed size (CASSANDRA-4419)
 + * Bootstraps that fail are detected upon restart and will retry safely 
without
 +   needing to delete existing data first (CASSANDRA-4427)
 + * (cqlsh) add a COPY TO command to copy a CF to a CSV file (CASSANDRA-4434)
++ * Don't purge columns during upgradesstables (CASSANDRA-4462)
++ * Push the validation of secondary index values to the SecondaryIndexManager 
(CASSANDRA-4240)
 +
 +
 +1.1.2
 + * Fix cleanup not deleting index entries (CASSANDRA-4379)
 + * Use correct partitioner when saving + loading caches (CASSANDRA-4331)
 + * Check schema before trying to export sstable (CASSANDRA-2760)
 + * Raise a meaningful exception instead of NPE when PFS encounters
 +   an unconfigured node + no default (CASSANDRA-4349)
 + * fix bug in sstable blacklisting with LCS (CASSANDRA-4343)
 + * LCS no longer promotes tiny sstables out of L0 (CASSANDRA-4341)
 + * skip tombstones during hint replay (CASSANDRA-4320)
 + * fix NPE in compactionstats (CASSANDRA-4318)
 + * enforce 1m min keycache for auto (CASSANDRA-4306)
 + * Have DeletedColumn.isMFD always return true (CASSANDRA-4307)
 + * (cql3) exeption message for ORDER BY constraints said primary filter can be
 +an IN clause, which is misleading (CASSANDRA-4319)
 + * (cql3) Reject (not yet supported) creation of 2ndardy indexes on tables 
with
 +   composite primary keys (CASSANDRA-4328)
 + * Set JVM stack size to 160k for java 7 (CASSANDRA-4275)
 + * cqlsh: add COPY command to load data from CSV flat files (CASSANDRA-4012)
 + * CFMetaData.fromThrift to throw ConfigurationException upon error 
(CASSANDRA-4353)
 + * Use CF comparator to sort indexed columns in SecondaryIndexManager
 +   (CASSANDRA-4365)
 + * add strategy_options to the KSMetaData.toString() output (CASSANDRA-4248)
 + * (cql3) fix range queries containing unqueried results 

[1/3] git commit: Merge branch 'cassandra-1.1' into trunk

2012-07-27 Thread slebresne
Updated Branches:
  refs/heads/trunk dc071e702 - 9af3b023e


Merge branch 'cassandra-1.1' into trunk

Conflicts:
src/java/org/apache/cassandra/db/compaction/CompactionManager.java


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9af3b023
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9af3b023
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9af3b023

Branch: refs/heads/trunk
Commit: 9af3b023ee9d6e0f787339e05887a21209eafabc
Parents: dc071e7 ccd436c
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Fri Jul 27 10:36:40 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Fri Jul 27 10:36:40 2012 +0200

--
 CHANGES.txt|2 ++
 .../cassandra/db/compaction/CompactionManager.java |   11 ++-
 2 files changed, 8 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9af3b023/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9af3b023/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--
diff --cc src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index be101bf,0f5be39..06ca1a2
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@@ -856,9 -851,11 +859,7 @@@ public class CompactionManager implemen
  {
  public ValidationCompactionController(ColumnFamilyStore cfs, 
CollectionSSTableReader sstables)
  {
--super(cfs,
-   Integer.MAX_VALUE,
-   null);
 -  NO_GC,
 -  true,
 -  null,
 -  
cfs.getCompactionStrategy().isKeyExistenceExpensive(ImmutableSet.copyOf(sstables)));
++super(cfs, NO_GC, null);
  }
  
  @Override



[3/3] git commit: Don't purge columns during upgradesstables

2012-07-27 Thread slebresne
Don't purge columns during upgradesstables

patch by slebresne; reviewed by jbellis for CASSANDRA-4462


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7ff8e3c3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7ff8e3c3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7ff8e3c3

Branch: refs/heads/trunk
Commit: 7ff8e3c384df32eaca361cbb77632d04cc64060b
Parents: 1ad710b
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Fri Jul 27 10:06:33 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Fri Jul 27 10:06:33 2012 +0200

--
 CHANGES.txt|1 +
 .../cassandra/db/compaction/CompactionManager.java |7 +--
 2 files changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7ff8e3c3/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 79278aa..b3fa1a8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -12,6 +12,7 @@
  * fix 1.0.x node join to mixed version cluster, other nodes = 1.1 
(CASSANDRA-4195)
  * Fix LCS splitting sstable base on uncompressed size (CASSANDRA-4419)
  * Push the validation of secondary index values to the SecondaryIndexManager 
(CASSANDRA-4240)
+ * Don't purge columns during upgradesstables (CASSANDRA-4462)
 
 1.0.10
  * fix maxTimestamp to include row tombstones (CASSANDRA-4116)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7ff8e3c3/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 872ce0b..2400cfe 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -67,6 +67,9 @@ public class CompactionManager implements 
CompactionManagerMBean
 private static final Logger logger = 
LoggerFactory.getLogger(CompactionManager.class);
 public static final CompactionManager instance;
 
+public static final int NO_GC = Integer.MIN_VALUE;
+public static final int GC_ALL = Integer.MAX_VALUE;
+
 /**
  * compactionLock has two purposes:
  * - Compaction acquires its readLock so that multiple compactions can 
happen simultaneously,
@@ -238,7 +241,7 @@ public class CompactionManager implements 
CompactionManagerMBean
 {
 // SSTables are marked by the caller
 // NOTE: it is important that the task create one and only 
one sstable, even for Leveled compaction (see LeveledManifest.replace())
-CompactionTask task = new CompactionTask(cfs, 
Collections.singletonList(sstable), Integer.MAX_VALUE);
+CompactionTask task = new CompactionTask(cfs, 
Collections.singletonList(sstable), NO_GC);
 task.isUserDefined(true);
 task.setCompactionType(OperationType.UPGRADE_SSTABLES);
 task.execute(executor);
@@ -974,7 +977,7 @@ public class CompactionManager implements 
CompactionManagerMBean
 static int getDefaultGcBefore(ColumnFamilyStore cfs)
 {
 return cfs.isIndex()
-   ? Integer.MAX_VALUE
+   ? GC_ALL
: (int) (System.currentTimeMillis() / 1000) - 
cfs.metadata.getGcGraceSeconds();
 }
 



[2/3] git commit: Merge branch 'cassandra-1.0' into cassandra-1.1

2012-07-27 Thread slebresne
Merge branch 'cassandra-1.0' into cassandra-1.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/ccd436c0
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ccd436c0
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ccd436c0

Branch: refs/heads/trunk
Commit: ccd436c0fe0c75db09dd7cd87a516f005f4e7289
Parents: 070c1d8 7ff8e3c
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Fri Jul 27 10:14:34 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Fri Jul 27 10:14:34 2012 +0200

--
 CHANGES.txt|2 ++
 .../cassandra/db/compaction/CompactionManager.java |9 ++---
 2 files changed, 8 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ccd436c0/CHANGES.txt
--
diff --cc CHANGES.txt
index bcf56b7,b3fa1a8..fd6991c
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,155 -1,6 +1,157 @@@
 -1.0.11
 +1.1.3
 + * (JMX) rename getRangeKeySample to sampleKeyRange to avoid returning
 +   multi-MB results as an attribute (CASSANDRA-4452)
 + * flush based on data size, not throughput; overwritten columns no 
 +   longer artificially inflate liveRatio (CASSANDRA-4399)
 + * update default commitlog segment size to 32MB and total commitlog
 +   size to 32/1024 MB for 32/64 bit JVMs, respectively (CASSANDRA-4422)
 + * avoid using global partitioner to estimate ranges in index sstables
 +   (CASSANDRA-4403)
 + * restore pre-CASSANDRA-3862 approach to removing expired tombstones
 +   from row cache during compaction (CASSANDRA-4364)
 + * (stress) support for CQL prepared statements (CASSANDRA-3633)
 + * Correctly catch exception when Snappy cannot be loaded (CASSANDRA-4400)
 + * (cql3) Support ORDER BY when IN condition is given in WHERE clause 
(CASSANDRA-4327)
 + * (cql3) delete component_index column on DROP TABLE call (CASSANDRA-4420)
 + * change nanoTime() to currentTimeInMillis() in schema related code 
(CASSANDRA-4432)
 + * add a token generation tool (CASSANDRA-3709)
 + * Fix LCS bug with sstable containing only 1 row (CASSANDRA-4411)
 + * fix Can't Modify Index Name problem on CF update (CASSANDRA-4439)
 + * Fix assertion error in getOverlappingSSTables during repair 
(CASSANDRA-4456)
 + * fix nodetool's setcompactionthreshold command (CASSANDRA-4455)
 + * Ensure compacted files are never used, to avoid counter overcount 
(CASSANDRA-4436)
 +Merged from 1.0:
 + * Push the validation of secondary index values to the SecondaryIndexManager 
(CASSANDRA-4240)
   * allow dropping columns shadowed by not-yet-expired supercolumn or row
 tombstones in PrecompactedRow (CASSANDRA-4396)
 + * fix 1.0.x node join to mixed version cluster, other nodes = 1.1 
(CASSANDRA-4195)
 + * Fix LCS splitting sstable base on uncompressed size (CASSANDRA-4419)
 + * Bootstraps that fail are detected upon restart and will retry safely 
without
 +   needing to delete existing data first (CASSANDRA-4427)
 + * (cqlsh) add a COPY TO command to copy a CF to a CSV file (CASSANDRA-4434)
++ * Don't purge columns during upgradesstables (CASSANDRA-4462)
++ * Push the validation of secondary index values to the SecondaryIndexManager 
(CASSANDRA-4240)
 +
 +
 +1.1.2
 + * Fix cleanup not deleting index entries (CASSANDRA-4379)
 + * Use correct partitioner when saving + loading caches (CASSANDRA-4331)
 + * Check schema before trying to export sstable (CASSANDRA-2760)
 + * Raise a meaningful exception instead of NPE when PFS encounters
 +   an unconfigured node + no default (CASSANDRA-4349)
 + * fix bug in sstable blacklisting with LCS (CASSANDRA-4343)
 + * LCS no longer promotes tiny sstables out of L0 (CASSANDRA-4341)
 + * skip tombstones during hint replay (CASSANDRA-4320)
 + * fix NPE in compactionstats (CASSANDRA-4318)
 + * enforce 1m min keycache for auto (CASSANDRA-4306)
 + * Have DeletedColumn.isMFD always return true (CASSANDRA-4307)
 + * (cql3) exeption message for ORDER BY constraints said primary filter can be
 +an IN clause, which is misleading (CASSANDRA-4319)
 + * (cql3) Reject (not yet supported) creation of 2ndardy indexes on tables 
with
 +   composite primary keys (CASSANDRA-4328)
 + * Set JVM stack size to 160k for java 7 (CASSANDRA-4275)
 + * cqlsh: add COPY command to load data from CSV flat files (CASSANDRA-4012)
 + * CFMetaData.fromThrift to throw ConfigurationException upon error 
(CASSANDRA-4353)
 + * Use CF comparator to sort indexed columns in SecondaryIndexManager
 +   (CASSANDRA-4365)
 + * add strategy_options to the KSMetaData.toString() output (CASSANDRA-4248)
 + * (cql3) fix range queries containing unqueried results (CASSANDRA-4372)
 + * (cql3) allow updating column_alias types (CASSANDRA-4041)
 + * 

[jira] [Commented] (CASSANDRA-4462) upgradesstables strips active data from sstables

2012-07-27 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13423749#comment-13423749
 ] 

Sylvain Lebresne commented on CASSANDRA-4462:
-

bq. I'm not really convinced that GC_ALL and NO_GC are improvements since we 
don't really get any extra typesafety from it

The goal is not really to gain type safety, but to avoid having to take the few 
seconds to think about which of MIN_VALUE or MAX_VALUE means to not GC anything 
or conversely to GC everything. At least I have a tendency of screwing that up 
as showed by this issue, and I think having more explicit and readable constant 
names might avoid that kind of mistake in the future (again, at least for me). 
Anyway, I've committed as is, but if you really don't like, feel free to ninja 
edit it.

 upgradesstables strips active data from sstables
 

 Key: CASSANDRA-4462
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4462
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.0.4
 Environment: Ubuntu 11.04 64-bit
Reporter: Mike Heffner
Assignee: Sylvain Lebresne
 Fix For: 1.0.11, 1.1.3

 Attachments: 4462.txt


 From the discussion here: 
 http://mail-archives.apache.org/mod_mbox/cassandra-user/201207.mbox/%3CCAOac0GCtyDqS6ocuHOuQqre4re5wKj3o-ZpUZGkGsjCHzDVbTA%40mail.gmail.com%3E
 We are trying to migrate a 0.8.8 cluster to 1.1.2 by migrating the sstables 
 from the 0.8.8 ring to a parallel 1.1.2 ring. However, every time we run the 
 `nodetool upgradesstables` step we find it removes active data from our CFs 
 -- leading to lost data in our application.
 The steps we took were:
 1. Bring up a 1.1.2 ring in the same AZ/data center configuration with
 tokens matching the corresponding nodes in the 0.8.8 ring.
 2. Create the same keyspace on 1.1.2.
 3. Create each CF in the keyspace on 1.1.2.
 4. Flush each node of the 0.8.8 ring.
 5. Rsync each non-compacted sstable from 0.8.8 to the corresponding node in
 1.1.2.
 6. Move each 0.8.8 sstable into the 1.1.2 directory structure by renaming the 
 file to the  /cassandra/data/keyspace/cf/keyspace-cf... format. For 
 example, for the keyspace Metrics and CF epochs_60 we get:
 cassandra/data/Metrics/epochs_60/Metrics-epochs_60-g-941-Data.db.
 7. On each 1.1.2 node run `nodetool -h localhost refresh Metrics CF` for 
 each CF in the keyspace. We notice that storage load jumps accordingly.
 8. On each 1.1.2 node run `nodetool -h localhost upgradesstables`.
 Afterwards we would test the validity of the data by comparing it with data 
 from the original 0.8.8 ring. After an upgradesstables command the data was 
 always incorrect.
 With further testing we found that we could successfully use scrub to convert 
 our sstables without data loss. However, any invocation of upgradesstables 
 causes active data to be culled from the sstables:
  INFO [CompactionExecutor:4] 2012-07-24 04:27:36,837 CompactionTask.java 
 (line 109) Compacting 
 [SSTableReader(path='/raid0/cassandra/data/Metrics/metrics_900/Metrics-metrics_900-hd-51-Data.db')]
  INFO [CompactionExecutor:4] 2012-07-24 04:27:51,090 CompactionTask.java 
 (line 221) Compacted to 
 [/raid0/cassandra/data/Metrics/metrics_900/Metrics-metrics_900-hd-58-Data.db,].
   60,449,155 to 2,578,102 (~4% of original) bytes for 4,002 keys at 
 0.172562MB/s.  Time: 14,248ms.
 These are the steps we've tried:
 WORKS refresh - scrub
 WORKS refresh - scrub - major compaction
 WORKS refresh - scrub - cleanup
 WORKS refresh - scrub - repair
 FAILS refresh - upgradesstables
 FAILS refresh - scrub - upgradesstables
 FAILS refresh - scrub - repair - upgradesstables
 FAILS refresh - scrub - major compaction - upgradesstables
 We have fewer than 143 million row keys in the CFs we're testing and none
 of the *-Filter.db files are  10MB, so I don't believe this is our
 problem: https://issues.apache.org/jira/browse/CASSANDRA-3820
 The keyspace is defined as:
 Keyspace: Metrics:
   Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
   Durable Writes: true
 Options: [us-east:3]
 And the column family that we tested with is defined as:
 ColumnFamily: metrics_900
   Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
   Default column value validator: 
 org.apache.cassandra.db.marshal.BytesType
   Columns sorted by: 
 org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.LongType,org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.UTF8Type)
   GC grace seconds: 0
   Compaction min/max thresholds: 4/32
   Read repair chance: 0.1
   DC Local Read repair chance: 0.0
   Replicate on write: 

[jira] [Commented] (CASSANDRA-4427) Restarting a failed bootstrap instajoins the ring

2012-07-27 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13423777#comment-13423777
 ] 

Sylvain Lebresne commented on CASSANDRA-4427:
-

In the check for bootstrap:
{noformat}
if (DatabaseDescriptor.isAutoBootstrap()
 (SystemTable.bootstrapInProgress() || (!SystemTable.bootstrapComplete() 
 !schemaPresent)))
{noformat}
I believe the schemaPresent condition shouldn't be negated. We want to skip 
boostrap is there is no schema, but bootstrap if there is one.

Even with that fixed, this breaks some of the unit tests (BoostrapperTest, 
EmbeddedCassandraServiceTest, StreamingTransferTest and 
AntiEntropyServiceStandardTest). Namely:
{noformat}
junit] java.lang.RuntimeException: No other nodes seen!  Unable to bootstrap.If 
you intended to start a single-node cluster, you should make sure your 
broadcast_address (or listen_address) is listed as a seed.  Otherwise, you need 
to determine why the seed being contacted has no knowledge of the rest of the 
cluster.  Usually, this can be solved by giving all nodes the same seed list.
junit]  at 
org.apache.cassandra.dht.BootStrapper.getBootstrapSource(BootStrapper.java:127)
junit]  at 
org.apache.cassandra.dht.BootStrapper.getBalancedToken(BootStrapper.java:109)
junit]  at 
org.apache.cassandra.dht.BootStrapper.getBootstrapToken(BootStrapper.java:104)
junit]  at 
org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:629)
junit]  at 
org.apache.cassandra.service.StorageService.initServer(StorageService.java:526)
junit]  at 
org.apache.cassandra.dht.BootStrapperTest.testTokenRoundtrip(BootStrapperTest.java:50)
{noformat}

On committing to 1.0, I'm not sure what was the intention, but this feels a bit 
bigger than what I'm plainly confortable pushing in 1.0 at this point, and it 
feels we can tell people on 1.0 to wipe the data dir on a failed boostrap 
before retrying. That's not a strong opposition though, more an opinion.

Nits:
* Instead of calculateEmptySchema(), I would have put the initialization fo 
Schema.emptyVersion in a static block to make it explicit that it's a one time 
initialization. Though if you made that on purpose because you don't like 
static blocks, that's good enough for me.
* We log when we detect a boostrap failure, but it could be nice to also log 
whether we're going to boostrap or not and why in the other case.


 Restarting a failed bootstrap instajoins the ring
 -

 Key: CASSANDRA-4427
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4427
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.0.0
Reporter: Brandon Williams
Assignee: Jonathan Ellis
 Fix For: 1.0.11, 1.1.3

 Attachments: 4427-v2.txt, 4427-v3.txt, 4427.txt


 I think when we made auto_bootstrap = true the default, we broke the check 
 for the bootstrap flag, creating a dangerous situation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-4466) ColumnFamilyRecordReader hadoop integration fails with ghost keys

2012-07-27 Thread Niel Drummond (JIRA)
Niel Drummond created CASSANDRA-4466:


 Summary: ColumnFamilyRecordReader hadoop integration fails with 
ghost keys
 Key: CASSANDRA-4466
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4466
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Affects Versions: 1.1.2
Reporter: Niel Drummond
Priority: Minor


When running hadoop-cassandra jobs with range queries over ghost keys, the 
ColumnFamilyRecordReader throws an exception if the last key in a slice_range 
query is a ghost key. 

This seems to be related to changes made in #2855 ( 
https://issues.apache.org/jira/browse/CASSANDRA-2855 ), to prevent ghost keys 
appearing in a hadoop map. 

The stack trace I get is:
java.lang.RuntimeException: java.util.NoSuchElementException
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:392)
 ~[cassandra-all-1.1.2.jar:1.1.2]
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:398)
 ~[cassandra-all-1.1.2.jar:1.1.2]
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:324)
 ~[cassandra-all-1.1.2.jar:1.1.2]
at 
com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141)
 ~[guava-r09.jar:na]
at 
com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136) 
~[guava-r09.jar:na]
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader.nextKeyValue(ColumnFamilyRecordReader.java:189)
 ~[cassandra-all-1.1.2.jar:1.1.2]
at 
org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:532)
 ~[hadoop-core-0.20.205.0.jar:na]
at 
org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67) 
~[hadoop-core-0.20.205.0.jar:na]
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143) 
~[hadoop-core-0.20.205.0.jar:na]
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764) 
~[hadoop-core-0.20.205.0.jar:na]
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370) 
~[hadoop-core-0.20.205.0.jar:na]
at 
org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:212) 
~[hadoop-core-0.20.205.0.jar:na]
Caused by: java.util.NoSuchElementException: null
at com.google.common.collect.Iterables.getLast(Iterables.java:713) 
~[guava-r09.jar:na]
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:342)
 ~[cassandra-all-1.1.2.jar:1.1.2]
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:382)
 ~[cassandra-all-1.1.2.jar:1.1.2]
... 11 common frames omitted


I made a one-line change to ColumnFamilyRecordReader.java, which seems to solve 
this issue for us.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-4466) ColumnFamilyRecordReader hadoop integration fails with ghost keys

2012-07-27 Thread Niel Drummond (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-4466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Niel Drummond updated CASSANDRA-4466:
-

Attachment: 4466-v0.patch

 ColumnFamilyRecordReader hadoop integration fails with ghost keys
 -

 Key: CASSANDRA-4466
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4466
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Affects Versions: 1.1.2
Reporter: Niel Drummond
Priority: Minor
 Attachments: 4466-v0.patch


 When running hadoop-cassandra jobs with range queries over ghost keys, the 
 ColumnFamilyRecordReader throws an exception if the last key in a slice_range 
 query is a ghost key. 
 This seems to be related to changes made in #2855 ( 
 https://issues.apache.org/jira/browse/CASSANDRA-2855 ), to prevent ghost keys 
 appearing in a hadoop map. 
 The stack trace I get is:
 java.lang.RuntimeException: java.util.NoSuchElementException
   at 
 org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:392)
  ~[cassandra-all-1.1.2.jar:1.1.2]
   at 
 org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:398)
  ~[cassandra-all-1.1.2.jar:1.1.2]
   at 
 org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:324)
  ~[cassandra-all-1.1.2.jar:1.1.2]
   at 
 com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141)
  ~[guava-r09.jar:na]
   at 
 com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136) 
 ~[guava-r09.jar:na]
   at 
 org.apache.cassandra.hadoop.ColumnFamilyRecordReader.nextKeyValue(ColumnFamilyRecordReader.java:189)
  ~[cassandra-all-1.1.2.jar:1.1.2]
   at 
 org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:532)
  ~[hadoop-core-0.20.205.0.jar:na]
   at 
 org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67) 
 ~[hadoop-core-0.20.205.0.jar:na]
   at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143) 
 ~[hadoop-core-0.20.205.0.jar:na]
   at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764) 
 ~[hadoop-core-0.20.205.0.jar:na]
   at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370) 
 ~[hadoop-core-0.20.205.0.jar:na]
   at 
 org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:212) 
 ~[hadoop-core-0.20.205.0.jar:na]
 Caused by: java.util.NoSuchElementException: null
   at com.google.common.collect.Iterables.getLast(Iterables.java:713) 
 ~[guava-r09.jar:na]
   at 
 org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:342)
  ~[cassandra-all-1.1.2.jar:1.1.2]
   at 
 org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:382)
  ~[cassandra-all-1.1.2.jar:1.1.2]
   ... 11 common frames omitted
 I made a one-line change to ColumnFamilyRecordReader.java, which seems to 
 solve this issue for us.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-4466) ColumnFamilyRecordReader hadoop integration fails with ghost keys

2012-07-27 Thread Niel Drummond (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-4466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Niel Drummond updated CASSANDRA-4466:
-

Attachment: 4466-stack

exception call stack

 ColumnFamilyRecordReader hadoop integration fails with ghost keys
 -

 Key: CASSANDRA-4466
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4466
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Affects Versions: 1.1.2
Reporter: Niel Drummond
Priority: Minor
 Attachments: 4466-stack, 4466-v0.patch


 When running hadoop-cassandra jobs with range queries over ghost keys, the 
 ColumnFamilyRecordReader throws an exception if the last key in a slice_range 
 query is a ghost key. 
 This seems to be related to changes made in #2855 ( 
 https://issues.apache.org/jira/browse/CASSANDRA-2855 ), to prevent ghost keys 
 appearing in a hadoop map. 
 The stack trace I get is:
 java.lang.RuntimeException: java.util.NoSuchElementException
   at 
 org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:392)
  ~[cassandra-all-1.1.2.jar:1.1.2]
   at 
 org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:398)
  ~[cassandra-all-1.1.2.jar:1.1.2]
   at 
 org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:324)
  ~[cassandra-all-1.1.2.jar:1.1.2]
   at 
 com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141)
  ~[guava-r09.jar:na]
   at 
 com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136) 
 ~[guava-r09.jar:na]
   at 
 org.apache.cassandra.hadoop.ColumnFamilyRecordReader.nextKeyValue(ColumnFamilyRecordReader.java:189)
  ~[cassandra-all-1.1.2.jar:1.1.2]
   at 
 org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:532)
  ~[hadoop-core-0.20.205.0.jar:na]
   at 
 org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67) 
 ~[hadoop-core-0.20.205.0.jar:na]
   at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143) 
 ~[hadoop-core-0.20.205.0.jar:na]
   at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764) 
 ~[hadoop-core-0.20.205.0.jar:na]
   at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370) 
 ~[hadoop-core-0.20.205.0.jar:na]
   at 
 org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:212) 
 ~[hadoop-core-0.20.205.0.jar:na]
 Caused by: java.util.NoSuchElementException: null
   at com.google.common.collect.Iterables.getLast(Iterables.java:713) 
 ~[guava-r09.jar:na]
   at 
 org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:342)
  ~[cassandra-all-1.1.2.jar:1.1.2]
   at 
 org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:382)
  ~[cassandra-all-1.1.2.jar:1.1.2]
   ... 11 common frames omitted
 I made a one-line change to ColumnFamilyRecordReader.java, which seems to 
 solve this issue for us.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-4466) ColumnFamilyRecordReader hadoop integration fails with ghost keys

2012-07-27 Thread Niel Drummond (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-4466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Niel Drummond updated CASSANDRA-4466:
-

Description: 
When running hadoop-cassandra jobs with range queries over ghost keys, the 
ColumnFamilyRecordReader throws an exception if the last key in a slice_range 
query is a ghost key. 

This seems to be related to changes made in #2855 ( 
https://issues.apache.org/jira/browse/CASSANDRA-2855 ), to prevent ghost keys 
appearing in a hadoop map. 

The call stack trace is attached.

I made a one-line change to ColumnFamilyRecordReader.java, which seems to solve 
this issue for us.


  was:
When running hadoop-cassandra jobs with range queries over ghost keys, the 
ColumnFamilyRecordReader throws an exception if the last key in a slice_range 
query is a ghost key. 

This seems to be related to changes made in #2855 ( 
https://issues.apache.org/jira/browse/CASSANDRA-2855 ), to prevent ghost keys 
appearing in a hadoop map. 

The stack trace I get is:
java.lang.RuntimeException: java.util.NoSuchElementException
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:392)
 ~[cassandra-all-1.1.2.jar:1.1.2]
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:398)
 ~[cassandra-all-1.1.2.jar:1.1.2]
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:324)
 ~[cassandra-all-1.1.2.jar:1.1.2]
at 
com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141)
 ~[guava-r09.jar:na]
at 
com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136) 
~[guava-r09.jar:na]
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader.nextKeyValue(ColumnFamilyRecordReader.java:189)
 ~[cassandra-all-1.1.2.jar:1.1.2]
at 
org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:532)
 ~[hadoop-core-0.20.205.0.jar:na]
at 
org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67) 
~[hadoop-core-0.20.205.0.jar:na]
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143) 
~[hadoop-core-0.20.205.0.jar:na]
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764) 
~[hadoop-core-0.20.205.0.jar:na]
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370) 
~[hadoop-core-0.20.205.0.jar:na]
at 
org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:212) 
~[hadoop-core-0.20.205.0.jar:na]
Caused by: java.util.NoSuchElementException: null
at com.google.common.collect.Iterables.getLast(Iterables.java:713) 
~[guava-r09.jar:na]
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:342)
 ~[cassandra-all-1.1.2.jar:1.1.2]
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:382)
 ~[cassandra-all-1.1.2.jar:1.1.2]
... 11 common frames omitted


I made a one-line change to ColumnFamilyRecordReader.java, which seems to solve 
this issue for us.



 ColumnFamilyRecordReader hadoop integration fails with ghost keys
 -

 Key: CASSANDRA-4466
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4466
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Affects Versions: 1.1.2
Reporter: Niel Drummond
Priority: Minor
 Attachments: 4466-stack, 4466-v0.patch


 When running hadoop-cassandra jobs with range queries over ghost keys, the 
 ColumnFamilyRecordReader throws an exception if the last key in a slice_range 
 query is a ghost key. 
 This seems to be related to changes made in #2855 ( 
 https://issues.apache.org/jira/browse/CASSANDRA-2855 ), to prevent ghost keys 
 appearing in a hadoop map. 
 The call stack trace is attached.
 I made a one-line change to ColumnFamilyRecordReader.java, which seems to 
 solve this issue for us.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-4038) Investigate improving the dynamic snitch with reservoir sampling

2012-07-27 Thread Pavel Yaskevich (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-4038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavel Yaskevich updated CASSANDRA-4038:
---

Attachment: CASSANDRA-4038.patch

 Investigate improving the dynamic snitch with reservoir sampling
 

 Key: CASSANDRA-4038
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4038
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Brandon Williams
Assignee: Pavel Yaskevich
 Fix For: 1.2

 Attachments: CASSANDRA-4038.patch


 Dsnitch's UPDATES_PER_INTERVAL and WINDOW_SIZE are chosen somewhat 
 arbitrarily.  A better fit may be something similar to Metric's 
 ExponentiallyDecayingSample, where more recent information is weighted 
 heavier than past information, and reservoir sampling would also be an 
 efficient way of keeping a statistically significant sample rather than 
 refusing updates after UPDATES_PER_INTERVAL and only keeping WINDOW_SIZE 
 amount.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2771) Remove commitlog_rotation_threshold_in_mb

2012-07-27 Thread Tuure Laurinolli (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13423834#comment-13423834
 ] 

Tuure Laurinolli commented on CASSANDRA-2771:
-

http://wiki.apache.org/cassandra/StorageConfiguration still lists 
commitlog_rotation_threshold_in_mb. 

  Remove commitlog_rotation_threshold_in_mb
 --

 Key: CASSANDRA-2771
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2771
 Project: Cassandra
  Issue Type: Improvement
Reporter: Patricio Echague
Assignee: Patricio Echague
Priority: Minor
  Labels: commitlog
 Fix For: 1.0.0

 Attachments: CASSANDRA-2771-2-trunk.txt, CASSANDRA-2771-3-trunk.txt


 Remove the commitlog segment size config setting, nobody has ever changed it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3935) Hints not delivered possibly because of pagination issue

2012-07-27 Thread Will Pierce (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13423891#comment-13423891
 ] 

Will Pierce commented on CASSANDRA-3935:


i saw a similar thing with cassandra 1.1.2 on a test cluster of 5 nodes when 
doing some testing of writes with 1 node down.  the hinted handoffs (of 0 rows) 
only stopped after i did a manual compact.   for a while i was seeing data show 
up in memtables on the resurrected node, long after it had already recovered.

 Hints not delivered possibly because of pagination issue
 

 Key: CASSANDRA-3935
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3935
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.0
Reporter: B. Todd Burruss

 I'm testing hinted handoff in 1.1 beta1 and cannot seem to get a hint 
 delivered.  3 node cluster, RF = 3, writing with CL = ONE.  killed a host 
 then did the write using the CLI on another node.  I can see hint waiting 
 using CLI and I see the log messages at the end of this email.  this suggests 
 the hints exist bu are not being delivered (and I'll see the log messages 
 over and over.)
 I did see tracing with debugger and see that in 
 HintedHandoffManager.deliverHintsToEndpointInternal, this line will remove 
 the hint because of the Integer.MAX_VALUE
 ColumnFamily hintsPage = 
 ColumnFamilyStore.removeDeleted(hintStore.getColumnFamily(filter), 
 Integer.MAX_VALUE);
 I'm not sure I quite understand while MAX is used when the same remove is 
 done in getColumnFamily(filter).  regardless if it is useful or not, it 
 prevents the hints from delivery.
 any thoughts?
 [default@unknown] use system;
 Authenticated to keyspace: system
 [default@system] list hintscolumnfamily;
 Using default limit of 100
 ---
 RowKey: 00
 = (super_column=493ecfa05c1411e10da23097c7ff,
  (column=6b6579, value=6b35, timestamp=132999580, ttl=86400)
  (column=6d75746174696f6e, 
 value=000662746f64646200026b35000103e80103e87fff80010002633504b96d055fd13c68696e746564207772697465,
  timestamp=132999579, ttl=86400)
  (column=7461626c65, value=62746f646462, timestamp=132999580, 
 ttl=86400)
  (column=76657273696f6e, value=0004, timestamp=132999580, 
 ttl=86400))
 1 Row Returned.
 Elapsed time: 58 msec(s).
 INFO [HintedHandoff:1] 2012-02-20 14:44:53,811 HintedHandOffManager.java 
 (line 296) Started hinted handoff for token: 0 with IP: /192.168.56.1
 INFO [HintedHandoff:1] 2012-02-20 14:44:53,815 HintedHandOffManager.java 
 (line 373) Finished hinted handoff of 0 rows to endpoint /192.168.56.1

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-4427) Restarting a failed bootstrap instajoins the ring

2012-07-27 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13423909#comment-13423909
 ] 

Sylvain Lebresne commented on CASSANDRA-4427:
-

I suspect the test failures are due to the removal of the seeds special case 
and because our tests are not fully realistic. Namely, in the tests, while 
localhost is a seed, it gets a schema loaded before joinTokenRing is called, 
and so it ends up with schemaPresent = true and tries to bootstrap (even though 
it's the only node). That shouldn't happen in real life but at least on the 
short term fixing the tests themselves is more work than is worth it, so maybe 
we can:
* Either we back the isSeed test
* Or exclude ourselves when we check for schemaPresent

Some Preference?

 Restarting a failed bootstrap instajoins the ring
 -

 Key: CASSANDRA-4427
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4427
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.0.0
Reporter: Brandon Williams
Assignee: Jonathan Ellis
 Fix For: 1.0.11, 1.1.3

 Attachments: 4427-v2.txt, 4427-v3.txt, 4427.txt


 I think when we made auto_bootstrap = true the default, we broke the check 
 for the bootstrap flag, creating a dangerous situation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




git commit: Update versions, news and changes for 1.0.11 release

2012-07-27 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.0 7ff8e3c38 - 4f0237acd


Update versions, news and changes for 1.0.11 release


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4f0237ac
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4f0237ac
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4f0237ac

Branch: refs/heads/cassandra-1.0
Commit: 4f0237acd5ee8097f90732ac416622588e4d7552
Parents: 7ff8e3c
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Fri Jul 27 17:14:32 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Fri Jul 27 17:14:32 2012 +0200

--
 CHANGES.txt  |4 
 NEWS.txt |8 
 build.xml|2 +-
 debian/changelog |6 ++
 4 files changed, 19 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4f0237ac/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b3fa1a8..c708aea 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -13,6 +13,10 @@
  * Fix LCS splitting sstable base on uncompressed size (CASSANDRA-4419)
  * Push the validation of secondary index values to the SecondaryIndexManager 
(CASSANDRA-4240)
  * Don't purge columns during upgradesstables (CASSANDRA-4462)
+ * Make cqlsh work with piping (CASSANDRA-4113)
+ * Validate arguments for nodetool decommission (CASSANDRA-4061)
+ * Report thrift status in nodetool info (CASSANDRA-4010)
+
 
 1.0.10
  * fix maxTimestamp to include row tombstones (CASSANDRA-4116)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4f0237ac/NEWS.txt
--
diff --git a/NEWS.txt b/NEWS.txt
index 42bea7c..1654b44 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -8,6 +8,14 @@ upgrade, just in case you need to roll back to the previous 
version.
 (Cassandra version X + 1 will always be able to read data files created
 by version X, but the inverse is not necessarily the case.)
 
+1.0.11
+==
+
+Upgrading
+-
+- Nothing specific to 1.0.10
+
+
 1.0.10
 ==
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4f0237ac/build.xml
--
diff --git a/build.xml b/build.xml
index 261691d..705db5e 100644
--- a/build.xml
+++ b/build.xml
@@ -25,7 +25,7 @@
 property name=debuglevel value=source,lines,vars/
 
 !-- default version and SCM information --
-property name=base.version value=1.0.10/
+property name=base.version value=1.0.11/
 property name=scm.connection 
value=scm:git://git.apache.org/cassandra.git/
 property name=scm.developerConnection 
value=scm:git://git.apache.org/cassandra.git/
 property name=scm.url 
value=http://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=tree/

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4f0237ac/debian/changelog
--
diff --git a/debian/changelog b/debian/changelog
index c34d7a0..7631284 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+cassandra (1.0.11) unstable; urgency=low
+
+  * New release
+
+ -- Sylvain Lebresne slebre...@apache.org  Fri, 27 Jul 2012 17:04:14 +0200
+
 cassandra (1.0.10) unstable; urgency=low
 
   * New release



[1/50] [abbrv] git commit: use slf4j api for logging

2012-07-27 Thread yukim
Updated Branches:
  refs/heads/cassandra-1.1 ccd436c0f - 203d0d109
  refs/heads/trunk 9af3b023e - 203d0d109


use slf4j api for logging


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/203d0d10
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/203d0d10
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/203d0d10

Branch: refs/heads/trunk
Commit: 203d0d109e00cc6c6cbf076bac70e6cee1a93d36
Parents: 9af3b02
Author: Yuki Morishita yu...@apache.org
Authored: Fri Jul 27 10:17:18 2012 -0500
Committer: Yuki Morishita yu...@apache.org
Committed: Fri Jul 27 10:17:18 2012 -0500

--
 .../org/apache/cassandra/db/CounterColumn.java |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/203d0d10/src/java/org/apache/cassandra/db/CounterColumn.java
--
diff --git a/src/java/org/apache/cassandra/db/CounterColumn.java 
b/src/java/org/apache/cassandra/db/CounterColumn.java
index ecfe2f1..0aa22ec 100644
--- a/src/java/org/apache/cassandra/db/CounterColumn.java
+++ b/src/java/org/apache/cassandra/db/CounterColumn.java
@@ -24,7 +24,8 @@ import java.security.MessageDigest;
 import java.util.concurrent.TimeoutException;
 import java.util.Collection;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.config.DatabaseDescriptor;
@@ -46,7 +47,7 @@ import org.apache.cassandra.utils.*;
  */
 public class CounterColumn extends Column
 {
-private static final Logger logger = Logger.getLogger(CounterColumn.class);
+private static final Logger logger = 
LoggerFactory.getLogger(CounterColumn.class);
 
 protected static final CounterContext contextManager = 
CounterContext.instance();
 



[2/50] [abbrv] git commit: use slf4j api for logging

2012-07-27 Thread yukim
use slf4j api for logging


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/203d0d10
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/203d0d10
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/203d0d10

Branch: refs/heads/cassandra-1.1
Commit: 203d0d109e00cc6c6cbf076bac70e6cee1a93d36
Parents: 9af3b02
Author: Yuki Morishita yu...@apache.org
Authored: Fri Jul 27 10:17:18 2012 -0500
Committer: Yuki Morishita yu...@apache.org
Committed: Fri Jul 27 10:17:18 2012 -0500

--
 .../org/apache/cassandra/db/CounterColumn.java |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/203d0d10/src/java/org/apache/cassandra/db/CounterColumn.java
--
diff --git a/src/java/org/apache/cassandra/db/CounterColumn.java 
b/src/java/org/apache/cassandra/db/CounterColumn.java
index ecfe2f1..0aa22ec 100644
--- a/src/java/org/apache/cassandra/db/CounterColumn.java
+++ b/src/java/org/apache/cassandra/db/CounterColumn.java
@@ -24,7 +24,8 @@ import java.security.MessageDigest;
 import java.util.concurrent.TimeoutException;
 import java.util.Collection;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.config.DatabaseDescriptor;
@@ -46,7 +47,7 @@ import org.apache.cassandra.utils.*;
  */
 public class CounterColumn extends Column
 {
-private static final Logger logger = Logger.getLogger(CounterColumn.class);
+private static final Logger logger = 
LoggerFactory.getLogger(CounterColumn.class);
 
 protected static final CounterContext contextManager = 
CounterContext.instance();
 



[3/50] [abbrv] git commit: Merge branch 'cassandra-1.1' into trunk

2012-07-27 Thread yukim
Merge branch 'cassandra-1.1' into trunk

Conflicts:
src/java/org/apache/cassandra/db/compaction/CompactionManager.java


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9af3b023
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9af3b023
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9af3b023

Branch: refs/heads/cassandra-1.1
Commit: 9af3b023ee9d6e0f787339e05887a21209eafabc
Parents: dc071e7 ccd436c
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Fri Jul 27 10:36:40 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Fri Jul 27 10:36:40 2012 +0200

--
 CHANGES.txt|2 ++
 .../cassandra/db/compaction/CompactionManager.java |   11 ++-
 2 files changed, 8 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9af3b023/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9af3b023/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--
diff --cc src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index be101bf,0f5be39..06ca1a2
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@@ -856,9 -851,11 +859,7 @@@ public class CompactionManager implemen
  {
  public ValidationCompactionController(ColumnFamilyStore cfs, 
CollectionSSTableReader sstables)
  {
--super(cfs,
-   Integer.MAX_VALUE,
-   null);
 -  NO_GC,
 -  true,
 -  null,
 -  
cfs.getCompactionStrategy().isKeyExistenceExpensive(ImmutableSet.copyOf(sstables)));
++super(cfs, NO_GC, null);
  }
  
  @Override



[4/50] [abbrv] git commit: fix compile

2012-07-27 Thread yukim
fix compile


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/dc071e70
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/dc071e70
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/dc071e70

Branch: refs/heads/cassandra-1.1
Commit: dc071e702e20bf49f05b70fd75de0e63474707c5
Parents: 80baefd
Author: Dave Brosius dbros...@apache.org
Authored: Thu Jul 26 21:47:25 2012 -0400
Committer: Dave Brosius dbros...@apache.org
Committed: Thu Jul 26 21:47:25 2012 -0400

--
 .../cassandra/db/SecondaryIndexColumnSizeTest.java |   74 +++---
 1 files changed, 37 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/dc071e70/test/unit/org/apache/cassandra/db/SecondaryIndexColumnSizeTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/db/SecondaryIndexColumnSizeTest.java 
b/test/unit/org/apache/cassandra/db/SecondaryIndexColumnSizeTest.java
index 89479e9..9b5f070 100644
--- a/test/unit/org/apache/cassandra/db/SecondaryIndexColumnSizeTest.java
+++ b/test/unit/org/apache/cassandra/db/SecondaryIndexColumnSizeTest.java
@@ -43,31 +43,31 @@ public class SecondaryIndexColumnSizeTest
 {
 Column column = new Column();
 column.name = ByteBufferUtil.bytes(test);
- 
+
 // a byte buffer more than 64k
 ByteBuffer buffer = ByteBuffer.allocate(1024 * 65);
 buffer.clear();
-
+
 //read more than 64k
 for (int i=0; i1024*64/4 + 1; i++)
 buffer.putInt(0);
-
+
 // for read
-buffer.flip(); 
+buffer.flip();
 column.value = buffer;
 
 MockRowIndex mockRowIndex = new MockRowIndex();
 MockColumnIndex mockColumnIndex = new MockColumnIndex();
-
+
 assertTrue(mockRowIndex.validate(column));
 assertFalse(mockColumnIndex.validate(column));
-
+
 // test less than 64k value
 buffer.flip();
 buffer.clear();
 buffer.putInt(20);
 buffer.flip();
-
+
 assertTrue(mockRowIndex.validate(column));
 assertTrue(mockColumnIndex.validate(column));
 }
@@ -75,141 +75,141 @@ public class SecondaryIndexColumnSizeTest
 private class MockRowIndex extends PerRowSecondaryIndex
 {
 @Override
-public void applyIndexUpdates(ByteBuffer rowKey, ColumnFamily cf, 
SortedSetByteBuffer mutatedIndexedColumns, ColumnFamily oldIndexedColumns) 
throws IOException 
+public void applyIndexUpdates(ByteBuffer rowKey, ColumnFamily cf, 
SortedSetByteBuffer mutatedIndexedColumns, ColumnFamily oldIndexedColumns) 
throws IOException
 {
 }
 
 @Override
-public void init() 
-{   
+public void init()
+{
 }
 
 @Override
-public void validateOptions() throws ConfigurationException 
+public void validateOptions() throws ConfigurationException
 {
 }
 
 @Override
-public String getIndexName() 
+public String getIndexName()
 {
 return null;
 }
 
 @Override
-protected SecondaryIndexSearcher 
createSecondaryIndexSearcher(SetByteBuffer columns) 
+protected SecondaryIndexSearcher 
createSecondaryIndexSearcher(SetByteBuffer columns)
 {
 return null;
 }
 
 @Override
-public void forceBlockingFlush() throws IOException 
+public void forceBlockingFlush() throws IOException
 {
 }
 
 @Override
-public long getLiveSize() 
+public long getLiveSize()
 {
 return 0;
 }
 
 @Override
-public ColumnFamilyStore getIndexCfs() 
+public ColumnFamilyStore getIndexCfs()
 {
 return null;
 }
 
 @Override
-public void removeIndex(ByteBuffer columnName) throws IOException 
+public void removeIndex(ByteBuffer columnName) throws IOException
 {
 }
 
 @Override
-public void invalidate() 
+public void invalidate()
 {
 }
 
 @Override
-public void truncate(long truncatedAt) 
+public void truncate(long truncatedAt)
 {
 }
 
 @Override
-public void deleteFromIndex(DecoratedKey? key, ListIColumn 
indexedColumnsInRow)
-{  
+public void deleteFromIndex(DecoratedKey key, ListIColumn 
indexedColumnsInRow)
+{
 }
-
+
 }
-
-
+
+
 private class MockColumnIndex extends PerColumnSecondaryIndex
 {
 @Override
-public void init() 
+public void init()
 {
 }
 

[5/50] [abbrv] git commit: merge from 1.1

2012-07-27 Thread yukim
merge from 1.1


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/80baefdd
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/80baefdd
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/80baefdd

Branch: refs/heads/cassandra-1.1
Commit: 80baefddc5749a15edc21b6ea9fa84bdfb879883
Parents: 94e413f 070c1d8
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Jul 26 17:17:21 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Jul 26 17:17:21 2012 -0500

--
 CHANGES.txt|3 +
 .../db/index/PerColumnSecondaryIndex.java  |8 +
 .../cassandra/db/index/PerRowSecondaryIndex.java   |7 +
 .../apache/cassandra/db/index/SecondaryIndex.java  |3 +
 .../cassandra/db/index/SecondaryIndexManager.java  |   19 +-
 .../apache/cassandra/thrift/ThriftValidation.java  |   14 +-
 .../cassandra/db/SecondaryIndexColumnSizeTest.java |  215 +++
 .../cassandra/thrift/ThriftValidationTest.java |   58 +
 8 files changed, 259 insertions(+), 68 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/80baefdd/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/80baefdd/src/java/org/apache/cassandra/db/index/PerColumnSecondaryIndex.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/80baefdd/src/java/org/apache/cassandra/db/index/PerRowSecondaryIndex.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/80baefdd/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/80baefdd/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/80baefdd/src/java/org/apache/cassandra/thrift/ThriftValidation.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/80baefdd/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java
--
diff --cc test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java
index d57f9c1,af0e668..04f0d0f
--- a/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java
+++ b/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java
@@@ -24,19 -24,15 +24,12 @@@ package org.apache.cassandra.thrift
  import org.junit.Test;
  
  import org.apache.cassandra.SchemaLoader;
--import org.apache.cassandra.config.CFMetaData;
--import org.apache.cassandra.config.ConfigurationException;
--import org.apache.cassandra.config.ColumnDefinition;
--import org.apache.cassandra.config.KSMetaData;
--import org.apache.cassandra.config.Schema;
++import org.apache.cassandra.config.*;
  import org.apache.cassandra.db.marshal.AsciiType;
  import org.apache.cassandra.db.marshal.UTF8Type;
  import org.apache.cassandra.locator.LocalStrategy;
  import org.apache.cassandra.locator.NetworkTopologyStrategy;
 +import org.apache.cassandra.utils.ByteBufferUtil;
- import org.apache.cassandra.utils.FBUtilities;
  
  public class ThriftValidationTest extends SchemaLoader
  {



[6/50] [abbrv] git commit: Merge branch 'cassandra-1.1' into trunk

2012-07-27 Thread yukim
Merge branch 'cassandra-1.1' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/94e413f5
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/94e413f5
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/94e413f5

Branch: refs/heads/cassandra-1.1
Commit: 94e413f5a127f374728a0b9ade931acc1d442c84
Parents: 1507ce8 10372c2
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Jul 26 12:39:41 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Jul 26 12:39:41 2012 -0500

--
 bin/cqlsh |9 -
 1 files changed, 8 insertions(+), 1 deletions(-)
--




[12/50] [abbrv] git commit: fix String.format parameter type for enum value

2012-07-27 Thread yukim
fix String.format parameter type for enum value


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/732d83b7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/732d83b7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/732d83b7

Branch: refs/heads/cassandra-1.1
Commit: 732d83b7581b89394bd28a8c03124bff733efe7c
Parents: d96e813
Author: Dave Brosius dbros...@apache.org
Authored: Wed Jul 25 23:46:01 2012 -0400
Committer: Dave Brosius dbros...@apache.org
Committed: Wed Jul 25 23:46:01 2012 -0400

--
 .../apache/cassandra/transport/OptionCodec.java|2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/732d83b7/src/java/org/apache/cassandra/transport/OptionCodec.java
--
diff --git a/src/java/org/apache/cassandra/transport/OptionCodec.java 
b/src/java/org/apache/cassandra/transport/OptionCodec.java
index 2898300..71d3193 100644
--- a/src/java/org/apache/cassandra/transport/OptionCodec.java
+++ b/src/java/org/apache/cassandra/transport/OptionCodec.java
@@ -77,7 +77,7 @@ public class OptionCodecT extends EnumT  
OptionCodec.CodecableT
 T opt = fromId(body.readUnsignedShort());
 Object value = opt.readValue(body);
 if (options.containsKey(opt))
-throw new ProtocolException(String.format(Duplicate option %d 
in message, opt));
+throw new ProtocolException(String.format(Duplicate option %s 
in message, opt.name()));
 options.put(opt, value);
 }
 return options;



[8/50] [abbrv] git commit: Merge branch 'cassandra-1.1' into trunk

2012-07-27 Thread yukim
Merge branch 'cassandra-1.1' into trunk

Conflicts:
src/java/org/apache/cassandra/db/ColumnFamilyStore.java
src/java/org/apache/cassandra/io/sstable/Descriptor.java
src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java
src/java/org/apache/cassandra/io/sstable/SSTableReader.java


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/111f6c93
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/111f6c93
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/111f6c93

Branch: refs/heads/cassandra-1.1
Commit: 111f6c9392766205823e326422f3dffae826cf97
Parents: f650d3e 6a6b7ec
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Jul 26 18:04:14 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Jul 26 18:04:14 2012 +0200

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/db/ColumnFamilyStore.java |   34 +++--
 src/java/org/apache/cassandra/db/Directories.java  |   11 
 .../org/apache/cassandra/io/sstable/Component.java |2 +
 .../apache/cassandra/io/sstable/Descriptor.java|8 +++
 .../org/apache/cassandra/io/sstable/SSTable.java   |2 +
 .../cassandra/io/sstable/SSTableMetadata.java  |   33 +---
 .../apache/cassandra/io/sstable/SSTableReader.java |   40 ---
 .../apache/cassandra/tools/StandaloneScrubber.java |2 +-
 .../org/apache/cassandra/db/DirectoriesTest.java   |   21 ++--
 10 files changed, 84 insertions(+), 70 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/111f6c93/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/111f6c93/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 7692e59,a39530a..695e480
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@@ -229,13 -231,28 +229,28 @@@ public class ColumnFamilyStore implemen
  
  if (loadSSTables)
  {
- Directories.SSTableLister sstables = 
directories.sstableLister().skipCompacted(true).skipTemporary(true);
- 
data.addInitialSSTables(SSTableReader.batchOpen(sstables.list().entrySet(), 
data, metadata, this.partitioner));
 -Directories.SSTableLister sstableFiles = 
directories.sstableLister().skipCompacted(true).skipTemporary(true);
 -CollectionSSTableReader sstables = 
SSTableReader.batchOpen(sstableFiles.list().entrySet(), savedKeys, data, 
metadata, this.partitioner);
++Directories.SSTableLister sstableFiles = 
directories.sstableLister().skipTemporary(true);
++CollectionSSTableReader sstables = 
SSTableReader.batchOpen(sstableFiles.list().entrySet(), data, metadata, 
this.partitioner);
+ 
+ // Filter non-compacted sstables, remove compacted ones
+ SetInteger compactedSSTables = new HashSetInteger();
+ for (SSTableReader sstable : sstables)
+ compactedSSTables.addAll(sstable.getAncestors());
+ 
+ SetSSTableReader liveSSTables = new HashSetSSTableReader();
+ for (SSTableReader sstable : sstables)
+ {
+ if (compactedSSTables.contains(sstable.descriptor.generation))
+ sstable.releaseReference(); // this amount to deleting 
the sstable
+ else
+ liveSSTables.add(sstable);
+ }
+ data.addInitialSSTables(liveSSTables);
  }
  
 +if (caching == Caching.ALL || caching == Caching.KEYS_ONLY)
 +CacheService.instance.keyCache.loadSaved(this);
 +
  // compaction strategy should be created after the CFS has been 
prepared
  this.compactionStrategy = 
metadata.createCompactionStrategyInstance(this);
  
@@@ -451,7 -480,7 +466,7 @@@
  currentDescriptors.add(sstable.descriptor);
  SetSSTableReader newSSTables = new HashSetSSTableReader();
  
--Directories.SSTableLister lister = 
directories.sstableLister().skipCompacted(true).skipTemporary(true);
++Directories.SSTableLister lister = 
directories.sstableLister().skipTemporary(true);
  for (Map.EntryDescriptor, SetComponent entry : 
lister.list().entrySet())
  {
  Descriptor descriptor = entry.getKey();
@@@ -478,7 -507,7 +493,7 @@@
  SSTableReader reader;
  try
  {
- reader = SSTableReader.open(newDescriptor, entry.getValue(), 
data, metadata, partitioner);
 -reader = 

[13/50] [abbrv] git commit: Fix SystemTable.setBootstrapState and other merge fallout from #4427. Patch by Dave Brosius and brandonwilliams, reviewed by Dave Brosius for CASSANDRA-4460

2012-07-27 Thread yukim
Fix SystemTable.setBootstrapState and other merge fallout from #4427.
Patch by Dave Brosius and brandonwilliams, reviewed by Dave Brosius for
CASSANDRA-4460


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d96e813e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d96e813e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d96e813e

Branch: refs/heads/cassandra-1.1
Commit: d96e813e06cc9fdf902d79af2962f38f047b14fa
Parents: 5cde66b
Author: Brandon Williams brandonwilli...@apache.org
Authored: Wed Jul 25 20:34:11 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Wed Jul 25 20:36:49 2012 -0500

--
 .../org/apache/cassandra/config/CFMetaData.java|2 +-
 src/java/org/apache/cassandra/db/SystemTable.java  |   15 ---
 2 files changed, 9 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d96e813e/src/java/org/apache/cassandra/config/CFMetaData.java
--
diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java 
b/src/java/org/apache/cassandra/config/CFMetaData.java
index 906017c..4321175 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -166,7 +166,7 @@ public final class CFMetaData
  + token_bytes blob,
  + cluster_name text,
  + gossip_generation 
int,
- + bootstrapped 
boolean,
+ + bootstrapped text,
  + ring_id uuid,
  + release_version 
text,
  + thrift_version 
text,

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d96e813e/src/java/org/apache/cassandra/db/SystemTable.java
--
diff --git a/src/java/org/apache/cassandra/db/SystemTable.java 
b/src/java/org/apache/cassandra/db/SystemTable.java
index e852003..778f3cb 100644
--- a/src/java/org/apache/cassandra/db/SystemTable.java
+++ b/src/java/org/apache/cassandra/db/SystemTable.java
@@ -80,8 +80,8 @@ public class SystemTable
 
 public enum BootstrapState
 {
-NEEDS_BOOTSTRAP, // ordered for boolean backward compatibility, false
-COMPLETED, // true
+NEEDS_BOOTSTRAP,
+COMPLETED,
 IN_PROGRESS
 }
 
@@ -136,8 +136,8 @@ public class SystemTable
 Token token = 
StorageService.getPartitioner().getTokenFactory().fromByteArray(oldColumns.next().value());
 String tokenBytes = 
ByteBufferUtil.bytesToHex(serializeTokens(Collections.singleton(token)));
 // (assume that any node getting upgraded was bootstrapped, since 
that was stored in a separate row for no particular reason)
-String req = INSERT INTO system.%s (key, cluster_name, 
token_bytes, bootstrapped) VALUES ('%s', '%s', '%s', 'true');
-processInternal(String.format(req, LOCAL_CF, LOCAL_KEY, 
clusterName, tokenBytes));
+String req = INSERT INTO system.%s (key, cluster_name, 
token_bytes, bootstrapped) VALUES ('%s', '%s', '%s', '%s');
+processInternal(String.format(req, LOCAL_CF, LOCAL_KEY, 
clusterName, tokenBytes, BootstrapState.COMPLETED.name()));
 
 oldStatusCfs.truncate();
 }
@@ -372,7 +372,8 @@ public class SystemTable
 
 if (result.isEmpty() || !result.one().has(bootstrapped))
 return BootstrapState.NEEDS_BOOTSTRAP;
-return BootstrapState.values()[result.one().getInt(bootstrapped)];
+
+return BootstrapState.valueOf(result.one().getString(bootstrapped));
 }
 
 public static boolean bootstrapComplete()
@@ -387,8 +388,8 @@ public class SystemTable
 
 public static void setBootstrapState(BootstrapState state)
 {
-String req = INSERT INTO system.%s (key, bootstrapped) VALUES ('%s', 
'%b');
-processInternal(String.format(req, LOCAL_CF, LOCAL_KEY, 
getBootstrapState()));
+String req = INSERT INTO system.%s (key, bootstrapped) VALUES ('%s', 
'%s');
+processInternal(String.format(req, LOCAL_CF, LOCAL_KEY, state.name()));
 forceBlockingFlush(LOCAL_CF);
 }
 



[11/50] [abbrv] git commit: fix String.format parameter type for UUID

2012-07-27 Thread yukim
fix String.format parameter type for UUID


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fae7a23b
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fae7a23b
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fae7a23b

Branch: refs/heads/cassandra-1.1
Commit: fae7a23b5f1ff2d3335ddbfe56c1c8973c8803fe
Parents: 732d83b
Author: Dave Brosius dbros...@apache.org
Authored: Wed Jul 25 23:54:25 2012 -0400
Committer: Dave Brosius dbros...@apache.org
Committed: Wed Jul 25 23:54:25 2012 -0400

--
 .../org/apache/cassandra/cache/RowCacheKey.java|2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fae7a23b/src/java/org/apache/cassandra/cache/RowCacheKey.java
--
diff --git a/src/java/org/apache/cassandra/cache/RowCacheKey.java 
b/src/java/org/apache/cassandra/cache/RowCacheKey.java
index 2477a06..f6c743f 100644
--- a/src/java/org/apache/cassandra/cache/RowCacheKey.java
+++ b/src/java/org/apache/cassandra/cache/RowCacheKey.java
@@ -76,6 +76,6 @@ public class RowCacheKey implements CacheKey, 
ComparableRowCacheKey
 @Override
 public String toString()
 {
-return String.format(RowCacheKey(cfId:%d, key:%s), cfId, 
Arrays.toString(key));
+return String.format(RowCacheKey(cfId:%s, key:%s), cfId, 
Arrays.toString(key));
 }
 }



[10/50] [abbrv] cleanup unused import warnings, and trailing whitespace

2012-07-27 Thread yukim
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f650d3e8/src/java/org/apache/cassandra/service/MigrationTask.java
--
diff --git a/src/java/org/apache/cassandra/service/MigrationTask.java 
b/src/java/org/apache/cassandra/service/MigrationTask.java
index 7124f16..70b917d 100644
--- a/src/java/org/apache/cassandra/service/MigrationTask.java
+++ b/src/java/org/apache/cassandra/service/MigrationTask.java
@@ -20,14 +20,11 @@ package org.apache.cassandra.service;
 import java.io.IOException;
 import java.net.InetAddress;
 import java.util.Collection;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.config.ConfigurationException;
-import org.apache.cassandra.config.DatabaseDescriptor;
 import org.apache.cassandra.db.DefsTable;
 import org.apache.cassandra.db.RowMutation;
 import org.apache.cassandra.gms.FailureDetector;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f650d3e8/src/java/org/apache/cassandra/service/RangeSliceVerbHandler.java
--
diff --git a/src/java/org/apache/cassandra/service/RangeSliceVerbHandler.java 
b/src/java/org/apache/cassandra/service/RangeSliceVerbHandler.java
index 2449d75..e3b1d79 100644
--- a/src/java/org/apache/cassandra/service/RangeSliceVerbHandler.java
+++ b/src/java/org/apache/cassandra/service/RangeSliceVerbHandler.java
@@ -28,8 +28,6 @@ import org.apache.cassandra.db.RangeSliceCommand;
 import org.apache.cassandra.db.RangeSliceReply;
 import org.apache.cassandra.db.Row;
 import org.apache.cassandra.db.Table;
-import org.apache.cassandra.db.filter.QueryFilter;
-import org.apache.cassandra.db.filter.IFilter;
 import org.apache.cassandra.net.IVerbHandler;
 import org.apache.cassandra.net.MessageIn;
 import org.apache.cassandra.net.MessagingService;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f650d3e8/src/java/org/apache/cassandra/service/RowDigestResolver.java
--
diff --git a/src/java/org/apache/cassandra/service/RowDigestResolver.java 
b/src/java/org/apache/cassandra/service/RowDigestResolver.java
index 056f2fb..e0e262b 100644
--- a/src/java/org/apache/cassandra/service/RowDigestResolver.java
+++ b/src/java/org/apache/cassandra/service/RowDigestResolver.java
@@ -19,7 +19,6 @@ package org.apache.cassandra.service;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
-import java.util.Map;
 
 import org.apache.cassandra.db.ColumnFamily;
 import org.apache.cassandra.db.ReadResponse;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f650d3e8/src/java/org/apache/cassandra/service/RowRepairResolver.java
--
diff --git a/src/java/org/apache/cassandra/service/RowRepairResolver.java 
b/src/java/org/apache/cassandra/service/RowRepairResolver.java
index cb5ba32..5618cf0 100644
--- a/src/java/org/apache/cassandra/service/RowRepairResolver.java
+++ b/src/java/org/apache/cassandra/service/RowRepairResolver.java
@@ -23,7 +23,6 @@ import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import java.util.Map;
 
 import com.google.common.collect.Iterables;
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f650d3e8/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 2224180..0c4bfa3 100644
--- a/src/java/org/apache/cassandra/service/StorageServiceMBean.java
+++ b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
@@ -21,7 +21,6 @@ import java.io.IOException;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.nio.ByteBuffer;
-import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ExecutionException;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f650d3e8/src/java/org/apache/cassandra/streaming/FileStreamTask.java
--
diff --git a/src/java/org/apache/cassandra/streaming/FileStreamTask.java 
b/src/java/org/apache/cassandra/streaming/FileStreamTask.java
index b557573..ba7d9f3 100644
--- a/src/java/org/apache/cassandra/streaming/FileStreamTask.java
+++ b/src/java/org/apache/cassandra/streaming/FileStreamTask.java
@@ -27,7 +27,6 @@ import org.slf4j.LoggerFactory;
 
 import com.ning.compress.lzf.LZFOutputStream;
 import org.apache.cassandra.config.DatabaseDescriptor;
-import org.apache.cassandra.gms.Gossiper;
 import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.io.util.RandomAccessReader;
 import 

[16/50] [abbrv] git commit: Merge branch 'cassandra-1.1' into trunk

2012-07-27 Thread yukim
Merge branch 'cassandra-1.1' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d62f8c1e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d62f8c1e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d62f8c1e

Branch: refs/heads/cassandra-1.1
Commit: d62f8c1e5f4a901652cd9dd7ef7f8ecb4b779450
Parents: e73b2a6 6f384c5
Author: Brandon Williams brandonwilli...@apache.org
Authored: Wed Jul 25 12:09:14 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Wed Jul 25 12:09:14 2012 -0500

--
 examples/pig/test/populate-cli.txt |4 ++--
 .../cassandra/hadoop/pig/CassandraStorage.java |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d62f8c1e/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
--



[15/50] [abbrv] git commit: Merge branch 'cassandra-1.1' into trunk

2012-07-27 Thread yukim
Merge branch 'cassandra-1.1' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b167e9ba
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b167e9ba
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b167e9ba

Branch: refs/heads/cassandra-1.1
Commit: b167e9ba74fa917aeed55cfdcbff9133c13720d5
Parents: d62f8c1 f46232c
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed Jul 25 13:15:29 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed Jul 25 13:15:29 2012 -0500

--
 CHANGES.txt|2 ++
 .../apache/cassandra/service/StorageService.java   |2 +-
 .../cassandra/service/StorageServiceMBean.java |8 +---
 src/java/org/apache/cassandra/tools/NodeCmd.java   |2 +-
 src/java/org/apache/cassandra/tools/NodeProbe.java |4 ++--
 5 files changed, 11 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b167e9ba/CHANGES.txt
--
diff --cc CHANGES.txt
index c558c3f,c160d69..6dc6382
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,39 -1,6 +1,41 @@@
 +1.2-dev
 + * Introduce new json format with row level deletion (CASSANDRA-4054)
 + * remove redundant name column from schema_keyspaces (CASSANDRA-4433)
 + * improve nodetool ring handling of multi-dc clusters (CASSANDRA-3047)
 + * update NTS calculateNaturalEndpoints to be O(N log N) (CASSANDRA-3881)
 + * add UseCondCardMark XX jvm settings on jdk 1.7 (CASSANDRA-4366)
 + * split up rpc timeout by operation type (CASSANDRA-2819)
 + * rewrite key cache save/load to use only sequential i/o (CASSANDRA-3762)
 + * update MS protocol with a version handshake + broadcast address id
 +   (CASSANDRA-4311)
 + * multithreaded hint replay (CASSANDRA-4189)
 + * add inter-node message compression (CASSANDRA-3127)
 + * remove COPP (CASSANDRA-2479)
 + * Track tombstone expiration and compact when tombstone content is
 +   higher than a configurable threshold, default 20% (CASSANDRA-3442, 4234)
 + * update MurmurHash to version 3 (CASSANDRA-2975)
 + * (CLI) track elapsed time for `delete' operation (CASSANDRA-4060)
 + * (CLI) jline version is bumped to 1.0 to properly  support
 +   'delete' key function (CASSANDRA-4132)
 + * Save IndexSummary into new SSTable 'Summary' component (CASSANDRA-2392, 
4289)
 + * Add support for range tombstones (CASSANDRA-3708)
 + * Improve MessagingService efficiency (CASSANDRA-3617)
 + * Avoid ID conflicts from concurrent schema changes (CASSANDRA-3794)
 + * Set thrift HSHA server thread limit to unlimited by default 
(CASSANDRA-4277)
 + * Avoids double serialization of CF id in RowMutation messages
 +   (CASSANDRA-4293)
 + * stream compressed sstables directly with java nio (CASSANDRA-4297)
 + * Support multiple ranges in SliceQueryFilter (CASSANDRA-3885)
 + * Add column metadata to system column families (CASSANDRA-4018)
 + * (cql3) Always use composite types by default (CASSANDRA-4329)
 + * (cql3) Add support for set, map and list (CASSANDRA-3647)
 + * Validate date type correctly (CASSANDRA-4441)
 + * (cql3) Allow definitions with only a PK (CASSANDRA-4361)
 +
 +
  1.1.3
+  * (JMX) rename getRangeKeySample to sampleKeyRange to avoid returning
+multi-MB results as an attribute (CASSANDRA-4452)
   * flush based on data size, not throughput; overwritten columns no 
 longer artificially inflate liveRatio (CASSANDRA-4399)
   * update default commitlog segment size to 32MB and total commitlog

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b167e9ba/src/java/org/apache/cassandra/service/StorageService.java
--
diff --cc src/java/org/apache/cassandra/service/StorageService.java
index d8bed6f,bfc8c81..4af399d
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@@ -3289,11 -3080,9 +3289,11 @@@ public class StorageService implements 
  /**
   * #{@inheritDoc}
   */
- public ListString getRangeKeySample()
+ public ListString sampleKeyRange() // do not rename to getter - see 
CASSANDRA-4452 for details
  {
 -ListDecoratedKey keys = 
keySamples(ColumnFamilyStore.allUserDefined(), getLocalPrimaryRange());
 +ListDecoratedKey keys = new ArrayListDecoratedKey();
 +for (RangeToken range : getLocalPrimaryRanges())
 +keys.addAll(keySamples(ColumnFamilyStore.allUserDefined(), 
range));
  
  ListString sampledKeys = new ArrayListString(keys.size());
  for (DecoratedKey key : keys)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b167e9ba/src/java/org/apache/cassandra/service/StorageServiceMBean.java

[20/50] [abbrv] git commit: Merge branch 'cassandra-1.1' into trunk

2012-07-27 Thread yukim
Merge branch 'cassandra-1.1' into trunk

Conflicts:
src/java/org/apache/cassandra/db/compaction/CompactionManager.java


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/49f29741
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/49f29741
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/49f29741

Branch: refs/heads/cassandra-1.1
Commit: 49f297417d121354851faf7a820e56243e49f15c
Parents: d6b7dd6 aba1f16
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Jul 23 19:21:12 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Jul 23 19:21:12 2012 +0200

--
 CHANGES.txt|1 +
 .../cassandra/db/compaction/CompactionManager.java |   24 ++-
 2 files changed, 24 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/49f29741/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/49f29741/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--
diff --cc src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 6a1c850,4b39280..c9a3823
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@@ -844,7 -834,31 +844,29 @@@ public class CompactionManager implemen
  {
  super(OperationType.VALIDATION,
cfs.getCompactionStrategy().getScanners(sstables, range),
-   new CompactionController(cfs, sstables, 
getDefaultGcBefore(cfs), true));
+   new ValidationCompactionController(cfs, sstables));
+ }
+ }
+ 
+ /*
+  * Controller for validation compaction that never purges.
+  * Note that we should not call cfs.getOverlappingSSTables on the provided
+  * sstables because those sstables are not guaranteed to be active 
sstables
+  * (since we can run repair on a snapshot).
+  */
+ private static class ValidationCompactionController extends 
CompactionController
+ {
+ public ValidationCompactionController(ColumnFamilyStore cfs, 
CollectionSSTableReader sstables)
+ {
+ super(cfs,
+   Integer.MAX_VALUE,
 -  true,
 -  null,
 -  
cfs.getCompactionStrategy().isKeyExistenceExpensive(ImmutableSet.copyOf(sstables)));
++  null);
+ }
+ 
+ @Override
+ public boolean shouldPurge(DecoratedKey key)
+ {
+ return false;
  }
  }
  



[25/50] [abbrv] git commit: Be kind to potential client libraries reusing some of the binary transport code

2012-07-27 Thread yukim
Be kind to potential client libraries reusing some of the binary transport code


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/864e0367
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/864e0367
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/864e0367

Branch: refs/heads/cassandra-1.1
Commit: 864e03671abf3e99410175df21106efa1a463772
Parents: d741037
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Jul 23 15:17:14 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Jul 23 15:17:20 2012 +0200

--
 .../transport/messages/ResultMessage.java  |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/864e0367/src/java/org/apache/cassandra/transport/messages/ResultMessage.java
--
diff --git 
a/src/java/org/apache/cassandra/transport/messages/ResultMessage.java 
b/src/java/org/apache/cassandra/transport/messages/ResultMessage.java
index 35f8207..3d1d7c1 100644
--- a/src/java/org/apache/cassandra/transport/messages/ResultMessage.java
+++ b/src/java/org/apache/cassandra/transport/messages/ResultMessage.java
@@ -57,7 +57,7 @@ public abstract class ResultMessage extends Message.Response
 }
 };
 
-private enum Kind
+public enum Kind
 {
 VOID (1, Void.subcodec),
 ROWS (2, Rows.subcodec),
@@ -97,7 +97,7 @@ public abstract class ResultMessage extends Message.Response
 }
 }
 
-private final Kind kind;
+public final Kind kind;
 
 protected ResultMessage(Kind kind)
 {



[18/50] [abbrv] git commit: (CQL3) Allow definitions with only a PK

2012-07-27 Thread yukim
(CQL3) Allow definitions with only a PK

patch by slebresne; reviewed by jbellis for CASSANDRA-4361


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/79517461
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/79517461
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/79517461

Branch: refs/heads/cassandra-1.1
Commit: 795174611b7a9bea4ee2d64f8640c8bfebe07cfb
Parents: d0d1b2c
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Tue Jul 24 09:31:56 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Tue Jul 24 09:31:56 2012 +0200

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/config/CFMetaData.java|4 +-
 .../org/apache/cassandra/cql3/CFDefinition.java|   22 --
 .../cassandra/cql3/operations/ColumnOperation.java |   18 -
 .../cassandra/cql3/statements/ColumnGroupMap.java  |6 --
 .../statements/CreateColumnFamilyStatement.java|   66 +-
 .../cassandra/cql3/statements/SelectStatement.java |   51 +++
 .../cassandra/cql3/statements/UpdateStatement.java |   43 --
 8 files changed, 145 insertions(+), 66 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/79517461/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 8d61f64..979e3ef 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -30,6 +30,7 @@
  * (cql3) Always use composite types by default (CASSANDRA-4329)
  * (cql3) Add support for set, map and list (CASSANDRA-3647)
  * Validate date type correctly (CASSANDRA-4441)
+ * (cql3) Allow definitions with only a PK (CASSANDRA-4361)
 
 
 1.1.3

http://git-wip-us.apache.org/repos/asf/cassandra/blob/79517461/src/java/org/apache/cassandra/config/CFMetaData.java
--
diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java 
b/src/java/org/apache/cassandra/config/CFMetaData.java
index 3cf41d7..906017c 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -1080,8 +1080,6 @@ public final class CFMetaData
 {
 if (alias != null)
 {
-if (!alias.hasRemaining())
-throw new ConfigurationException(msg +  alias may not be 
empty);
 try
 {
 UTF8Type.instance.validate(alias);
@@ -1259,9 +1257,9 @@ public final class CFMetaData
 cfm.caching(Caching.valueOf(result.getString(caching)));
 
cfm.compactionStrategyClass(createCompactionStrategy(result.getString(compaction_strategy_class)));
 
cfm.compressionParameters(CompressionParameters.create(fromJsonMap(result.getString(compression_parameters;
+
cfm.columnAliases(columnAliasesFromStrings(fromJsonList(result.getString(column_aliases;
 if (result.has(value_alias))
 cfm.valueAlias(result.getBytes(value_alias));
-
cfm.columnAliases(columnAliasesFromStrings(fromJsonList(result.getString(column_aliases;
 
cfm.compactionStrategyOptions(fromJsonMap(result.getString(compaction_strategy_options)));
 
 return cfm;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/79517461/src/java/org/apache/cassandra/cql3/CFDefinition.java
--
diff --git a/src/java/org/apache/cassandra/cql3/CFDefinition.java 
b/src/java/org/apache/cassandra/cql3/CFDefinition.java
index 23edd62..d960a79 100644
--- a/src/java/org/apache/cassandra/cql3/CFDefinition.java
+++ b/src/java/org/apache/cassandra/cql3/CFDefinition.java
@@ -51,8 +51,8 @@ public class CFDefinition implements 
IterableCFDefinition.Name
 public final MapColumnIdentifier, Name metadata = new 
TreeMapColumnIdentifier, Name();
 
 public final boolean isComposite;
-// Note that isCompact means here that no componet of the comparator 
correspond to the column names
-// defined in the CREATE TABLE QUERY. This is not exactly equivalent to 
the 'WITH COMPACT STORAGE'
+// Note that isCompact means here that no component of the comparator 
correspond to the column names
+// defined in the CREATE TABLE QUERY. This is not exactly equivalent to 
using the 'WITH COMPACT STORAGE'
 // option when creating a table in that static CF without a composite 
type will have isCompact == false
 // even though one must use 'WITH COMPACT STORAGE' to declare them.
 public final boolean isCompact;
@@ -66,7 +66,7 @@ public class CFDefinition implements 
IterableCFDefinition.Name
 {
 this.isComposite = true;
 CompositeType composite = 

[7/50] [abbrv] git commit: Merge branch 'cassandra-1.1' into trunk

2012-07-27 Thread yukim
Merge branch 'cassandra-1.1' into trunk

Conflicts:
src/java/org/apache/cassandra/io/sstable/Descriptor.java


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1507ce8c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1507ce8c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1507ce8c

Branch: refs/heads/cassandra-1.1
Commit: 1507ce8cd4c5c9896a4923d9e0a74d85b6a83184
Parents: 111f6c9 bb37a0f
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Jul 26 18:05:54 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Jul 26 18:05:54 2012 +0200

--

--




[21/50] [abbrv] git commit: Merge branch 'cassandra-1.1' into trunk

2012-07-27 Thread yukim
Merge branch 'cassandra-1.1' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d6b7dd60
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d6b7dd60
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d6b7dd60

Branch: refs/heads/cassandra-1.1
Commit: d6b7dd60fe826f2d66f8f38e0e44c4857a6e967d
Parents: 655a76f 29379a5
Author: Brandon Williams brandonwilli...@apache.org
Authored: Mon Jul 23 11:46:29 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Mon Jul 23 11:46:29 2012 -0500

--
 bin/cassandra |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6b7dd60/bin/cassandra
--



[24/50] [abbrv] git commit: remove unused import

2012-07-27 Thread yukim
remove unused import


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8d6fe24c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8d6fe24c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8d6fe24c

Branch: refs/heads/cassandra-1.1
Commit: 8d6fe24ce490847aaf3fdb472095279850bbfbd8
Parents: 864e036
Author: Yuki Morishita yu...@apache.org
Authored: Mon Jul 23 09:44:08 2012 -0500
Committer: Yuki Morishita yu...@apache.org
Committed: Mon Jul 23 09:44:08 2012 -0500

--
 src/java/org/apache/cassandra/tools/NodeCmd.java |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8d6fe24c/src/java/org/apache/cassandra/tools/NodeCmd.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeCmd.java 
b/src/java/org/apache/cassandra/tools/NodeCmd.java
index 9fff6c5..49893a1 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -46,7 +46,6 @@ import org.apache.cassandra.service.StorageProxyMBean;
 import org.apache.cassandra.thrift.InvalidRequestException;
 import org.apache.cassandra.utils.EstimatedHistogram;
 import org.apache.cassandra.utils.Pair;
-import org.apache.rat.document.UnreadableArchiveException;
 
 public class NodeCmd
 {



[19/50] [abbrv] git commit: Fix scary message about secondaries always being created at startup

2012-07-27 Thread yukim
Fix scary message about secondaries always being created at startup


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d0d1b2cf
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d0d1b2cf
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d0d1b2cf

Branch: refs/heads/cassandra-1.1
Commit: d0d1b2cf3cd2bb2ddf66aa9fcdab5566954683ab
Parents: 49f2974
Author: Brandon Williams brandonwilli...@apache.org
Authored: Mon Jul 23 18:30:13 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Mon Jul 23 18:31:09 2012 -0500

--
 .../cassandra/db/index/SecondaryIndexManager.java  |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d0d1b2cf/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
--
diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java 
b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
index f1d6268..c57f580 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@ -205,7 +205,6 @@ public class SecondaryIndexManager
 return null;
 
 assert cdef.getIndexType() != null;
-logger.info(Creating new index : {},cdef);
 
 SecondaryIndex index;
 try
@@ -231,6 +230,7 @@ public class SecondaryIndexManager
 {
 index = currentIndex;
 index.addColumnDef(cdef);
+logger.info(Creating new index : {},cdef);
 }
 }
 else



[31/50] [abbrv] update versions on license files

2012-07-27 Thread yukim
http://git-wip-us.apache.org/repos/asf/cassandra/blob/82e6edd9/lib/licenses/snappy-java-1.0.4.1.txt
--
diff --git a/lib/licenses/snappy-java-1.0.4.1.txt 
b/lib/licenses/snappy-java-1.0.4.1.txt
new file mode 100644
index 000..d5c4984
--- /dev/null
+++ b/lib/licenses/snappy-java-1.0.4.1.txt
@@ -0,0 +1,209 @@
+
+ Apache License
+   Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+  License shall mean the terms and conditions for use, reproduction,
+  and distribution as defined by Sections 1 through 9 of this document.
+
+  Licensor shall mean the copyright owner or entity authorized by
+  the copyright owner that is granting the License.
+
+  Legal Entity shall mean the union of the acting entity and all
+  other entities that control, are controlled by, or are under common
+  control with that entity. For the purposes of this definition,
+  control means (i) the power, direct or indirect, to cause the
+  direction or management of such entity, whether by contract or
+  otherwise, or (ii) ownership of fifty percent (50%) or more of the
+  outstanding shares, or (iii) beneficial ownership of such entity.
+
+  You (or Your) shall mean an individual or Legal Entity
+  exercising permissions granted by this License.
+
+  Source form shall mean the preferred form for making modifications,
+  including but not limited to software source code, documentation
+  source, and configuration files.
+
+  Object form shall mean any form resulting from mechanical
+  transformation or translation of a Source form, including but
+  not limited to compiled object code, generated documentation,
+  and conversions to other media types.
+
+  Work shall mean the work of authorship, whether in Source or
+  Object form, made available under the License, as indicated by a
+  copyright notice that is included in or attached to the work
+  (an example is provided in the Appendix below).
+
+  Derivative Works shall mean any work, whether in Source or Object
+  form, that is based on (or derived from) the Work and for which the
+  editorial revisions, annotations, elaborations, or other modifications
+  represent, as a whole, an original work of authorship. For the purposes
+  of this License, Derivative Works shall not include works that remain
+  separable from, or merely link (or bind by name) to the interfaces of,
+  the Work and Derivative Works thereof.
+
+  Contribution shall mean any work of authorship, including
+  the original version of the Work and any modifications or additions
+  to that Work or Derivative Works thereof, that is intentionally
+  submitted to Licensor for inclusion in the Work by the copyright owner
+  or by an individual or Legal Entity authorized to submit on behalf of
+  the copyright owner. For the purposes of this definition, submitted
+  means any form of electronic, verbal, or written communication sent
+  to the Licensor or its representatives, including but not limited to
+  communication on electronic mailing lists, source code control systems,
+  and issue tracking systems that are managed by, or on behalf of, the
+  Licensor for the purpose of discussing and improving the Work, but
+  excluding communication that is conspicuously marked or otherwise
+  designated in writing by the copyright owner as Not a Contribution.
+
+  Contributor shall mean Licensor and any individual or Legal Entity
+  on behalf of whom a Contribution has been received by Licensor and
+  subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+  this License, each Contributor hereby grants to You a perpetual,
+  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+  copyright license to reproduce, prepare Derivative Works of,
+  publicly display, publicly perform, sublicense, and distribute the
+  Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+  this License, each Contributor hereby grants to You a perpetual,
+  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+  (except as stated in this section) patent license to make, have made,
+  use, offer to sell, sell, import, and otherwise transfer the Work,
+  where such license applies only to those patent claims licensable
+  by such Contributor that are necessarily infringed by their
+  Contribution(s) alone or by combination of their Contribution(s)
+  with the Work to which such Contribution(s) was submitted. If You
+

[22/50] [abbrv] git commit: fix merge from 1.1 to use UUID instead of Integer for CF identifier.

2012-07-27 Thread yukim
fix merge from 1.1 to use UUID instead of Integer for CF identifier.


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/655a76fa
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/655a76fa
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/655a76fa

Branch: refs/heads/cassandra-1.1
Commit: 655a76face34c18370d49c4fb0a1232395187ea1
Parents: 34cd691
Author: Pavel Yaskevich xe...@apache.org
Authored: Mon Jul 23 19:33:45 2012 +0300
Committer: Pavel Yaskevich xe...@apache.org
Committed: Mon Jul 23 19:33:45 2012 +0300

--
 .../org/apache/cassandra/config/CFMetaData.java|2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/655a76fa/src/java/org/apache/cassandra/config/CFMetaData.java
--
diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java 
b/src/java/org/apache/cassandra/config/CFMetaData.java
index a54b4ff..3cf41d7 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -886,7 +886,7 @@ public final class CFMetaData
 public void addDefaultIndexNames() throws ConfigurationException
 {
 // if this is ColumnFamily update we need to add previously defined 
index names to the existing columns first
-Integer cfId = Schema.instance.getId(ksName, cfName);
+UUID cfId = Schema.instance.getId(ksName, cfName);
 if (cfId != null)
 {
 CFMetaData cfm = Schema.instance.getCFMetaData(cfId);



[23/50] [abbrv] git commit: Merge #4427 to trunk

2012-07-27 Thread yukim
Merge #4427 to trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/34cd6912
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/34cd6912
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/34cd6912

Branch: refs/heads/cassandra-1.1
Commit: 34cd6912b0e506f923ef33329fc9966d79222e77
Parents: 8d6fe24 ff64c5d
Author: Brandon Williams brandonwilli...@apache.org
Authored: Mon Jul 23 11:22:37 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Mon Jul 23 11:22:37 2012 -0500

--
 CHANGES.txt|6 +++
 debian/cassandra.postinst  |   10 +-
 doc/cql3/CQL.textile   |7 +++-
 .../org/apache/cassandra/config/CFMetaData.java|   25 +
 src/java/org/apache/cassandra/db/SystemTable.java  |   28 ---
 src/java/org/apache/cassandra/dht/Bounds.java  |5 ++-
 .../apache/cassandra/service/StorageService.java   |   25 +
 test/unit/org/apache/cassandra/cli/CliTest.java|8 
 8 files changed, 97 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/34cd6912/CHANGES.txt
--
diff --cc CHANGES.txt
index e9fdbf4,b2a9faf..55d0bcd
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,38 -1,6 +1,40 @@@
 +1.2-dev
 + * Introduce new json format with row level deletion (CASSANDRA-4054)
 + * remove redundant name column from schema_keyspaces (CASSANDRA-4433)
 + * improve nodetool ring handling of multi-dc clusters (CASSANDRA-3047)
 + * update NTS calculateNaturalEndpoints to be O(N log N) (CASSANDRA-3881)
 + * add UseCondCardMark XX jvm settings on jdk 1.7 (CASSANDRA-4366)
 + * split up rpc timeout by operation type (CASSANDRA-2819)
 + * rewrite key cache save/load to use only sequential i/o (CASSANDRA-3762)
 + * update MS protocol with a version handshake + broadcast address id
 +   (CASSANDRA-4311)
 + * multithreaded hint replay (CASSANDRA-4189)
 + * add inter-node message compression (CASSANDRA-3127)
 + * remove COPP (CASSANDRA-2479)
 + * Track tombstone expiration and compact when tombstone content is
 +   higher than a configurable threshold, default 20% (CASSANDRA-3442, 4234)
 + * update MurmurHash to version 3 (CASSANDRA-2975)
 + * (CLI) track elapsed time for `delete' operation (CASSANDRA-4060)
 + * (CLI) jline version is bumped to 1.0 to properly  support
 +   'delete' key function (CASSANDRA-4132)
 + * Save IndexSummary into new SSTable 'Summary' component (CASSANDRA-2392, 
4289)
 + * Add support for range tombstones (CASSANDRA-3708)
 + * Improve MessagingService efficiency (CASSANDRA-3617)
 + * Avoid ID conflicts from concurrent schema changes (CASSANDRA-3794)
 + * Set thrift HSHA server thread limit to unlimited by default 
(CASSANDRA-4277)
 + * Avoids double serialization of CF id in RowMutation messages
 +   (CASSANDRA-4293)
 + * stream compressed sstables directly with java nio (CASSANDRA-4297)
 + * Support multiple ranges in SliceQueryFilter (CASSANDRA-3885)
 + * Add column metadata to system column families (CASSANDRA-4018)
 + * (cql3) Always use composite types by default (CASSANDRA-4329)
 + * (cql3) Add support for set, map and list (CASSANDRA-3647)
 + * Validate date type correctly (CASSANDRA-4441)
 +
 +
  1.1.3
+  * flush based on data size, not throughput; overwritten columns no 
+longer artificially inflate liveRatio (CASSANDRA-4399)
   * update default commitlog segment size to 32MB and total commitlog
 size to 32/1024 MB for 32/64 bit JVMs, respectively (CASSANDRA-4422)
   * avoid using global partitioner to estimate ranges in index sstables

http://git-wip-us.apache.org/repos/asf/cassandra/blob/34cd6912/src/java/org/apache/cassandra/config/CFMetaData.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/34cd6912/src/java/org/apache/cassandra/db/SystemTable.java
--
diff --cc src/java/org/apache/cassandra/db/SystemTable.java
index 48d9151,af07156..e852003
--- a/src/java/org/apache/cassandra/db/SystemTable.java
+++ b/src/java/org/apache/cassandra/db/SystemTable.java
@@@ -358,20 -359,45 +365,31 @@@ public class SystemTabl
  return generation;
  }
  
- public static boolean isBootstrapped()
+ public static BootstrapState getBootstrapState()
  {
 -Table table = Table.open(Table.SYSTEM_TABLE);
 -QueryFilter filter = 
QueryFilter.getNamesFilter(decorate(BOOTSTRAP_KEY),
 -new 
QueryPath(STATUS_CF),
 -BOOTSTRAP);
 -

[17/50] [abbrv] git commit: cqlsh: add a COPY TO command Patch by paul cannon, reviewed by brandonwilliams for CASSANDRA-4434

2012-07-27 Thread yukim
cqlsh: add a COPY TO command
Patch by paul cannon, reviewed by brandonwilliams for CASSANDRA-4434


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e73b2a68
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e73b2a68
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e73b2a68

Branch: refs/heads/cassandra-1.1
Commit: e73b2a68bf25597b351cbaa52700edad4ed773de
Parents: 7951746
Author: Brandon Williams brandonwilli...@apache.org
Authored: Tue Jul 24 13:57:19 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Tue Jul 24 14:01:42 2012 -0500

--
 CHANGES.txt |1 +
 bin/cqlsh   |  126 -
 2 files changed, 105 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e73b2a68/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 979e3ef..c558c3f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -58,6 +58,7 @@ Merged from 1.0:
  * Fix LCS splitting sstable base on uncompressed size (CASSANDRA-4419)
  * Bootstraps that fail are detected upon restart and will retry safely without
needing to delete existing data first (CASSANDRA-4427)
+ * (cqlsh) add a COPY TO command to copy a CF to a CSV file (CASSANDRA-4434)
 
 
 1.1.2

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e73b2a68/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index 574d49b..c67a818 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -224,7 +224,8 @@ cqlsh_extra_syntax_rules = r'''
 
 copyCommand ::= COPY cf=columnFamilyName
  ( ( [colnames]=colname ( , [colnames]=colname 
)* ) )?
- FROM ( fname=stringLiteral | STDIN )
+ ( dir=FROM ( fname=stringLiteral | STDIN )
+ | dir=TO   ( fname=stringLiteral | STDOUT ) )
  ( WITH copyOption ( AND copyOption )* )?
 ;
 
@@ -303,12 +304,16 @@ def complete_copy_column_names(ctxt, cqlsh):
 return [colnames[0]]
 return set(colnames[1:]) - set(existcols)
 
-COPY_OPTIONS = ('DELIMITER', 'QUOTE', 'ESCAPE', 'HEADER')
+COPY_OPTIONS = ('DELIMITER', 'QUOTE', 'ESCAPE', 'HEADER', 'ENCODING', 'NULL')
 
 @cqlsh_syntax_completer('copyOption', 'optnames')
 def complete_copy_options(ctxt, cqlsh):
 optnames = map(str.upper, ctxt.get_binding('optnames', ()))
-return set(COPY_OPTIONS) - set(optnames)
+direction = ctxt.get_binding('dir').upper()
+opts = set(COPY_OPTIONS) - set(optnames)
+if direction == 'FROM':
+opts -= ('ENCODING', 'NULL')
+return opts
 
 @cqlsh_syntax_completer('copyOption', 'optvals')
 def complete_copy_opt_values(ctxt, cqlsh):
@@ -448,13 +453,13 @@ def unix_time_from_uuid1(u):
 return (u.get_time() - 0x01B21DD213814000) / 1000.0
 
 def format_value(val, casstype, output_encoding, addcolor=False, 
time_format='',
- float_precision=3, colormap=DEFAULT_VALUE_COLORS):
+ float_precision=3, colormap=DEFAULT_VALUE_COLORS, 
nullval='null'):
 color = colormap['default']
 coloredval = None
 displaywidth = None
 
 if val is None:
-bval = 'null'
+bval = nullval
 color = colormap['error']
 elif isinstance(val, DecodeError):
 casstype = 'BytesType'
@@ -727,7 +732,7 @@ class Shell(cmd.Cmd):
 def get_column_names(self, ksname, cfname):
 if ksname is None:
 ksname = self.current_keyspace
-if self.cqlver_atleast(3):
+if ksname != 'system' and self.cqlver_atleast(3):
 return self.get_column_names_from_layout(ksname, cfname)
 else:
 return self.get_column_names_from_cfdef(ksname, cfname)
@@ -1433,6 +1438,9 @@ class Shell(cmd.Cmd):
 COPY table_name [ ( column [, ...] ) ]
  FROM ( 'filename' | STDIN )
  [ WITH option='value' [AND ...] ];
+COPY table_name [ ( column [, ...] ) ]
+ TO ( 'filename' | STDOUT )
+ [ WITH option='value' [AND ...] ];
 
 Available options and defaults:
 
@@ -1440,6 +1448,8 @@ class Shell(cmd.Cmd):
   QUOTE=''- quoting character to be used to quote fields
   ESCAPE='\'   - character to appear before the QUOTE char when 
quoted
   HEADER=false - whether to ignore the first line
+  ENCODING='utf8'  - encoding for CSV output (COPY TO only)
+  NULL=''  - string that represents a null value (COPY TO only)
 
 When entering CSV data on STDIN, you can use the sequence \.
 on a line by itself to end the data input.
@@ -1448,12 +1458,11 @@ class Shell(cmd.Cmd):

[14/50] [abbrv] git commit: merge from 1.1

2012-07-27 Thread yukim
merge from 1.1


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5cde66ba
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5cde66ba
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5cde66ba

Branch: refs/heads/cassandra-1.1
Commit: 5cde66bab30e7aa8f98bae9a7504b2a4a17cdda1
Parents: b167e9b cc0be1b
Author: Pavel Yaskevich xe...@apache.org
Authored: Wed Jul 25 22:01:14 2012 +0300
Committer: Pavel Yaskevich xe...@apache.org
Committed: Wed Jul 25 22:01:14 2012 +0300

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/db/ColumnFamilyStore.java |   33 +--
 .../cassandra/db/ColumnFamilyStoreMBean.java   |5 ++
 .../compaction/SizeTieredCompactionStrategy.java   |3 +-
 src/java/org/apache/cassandra/tools/NodeProbe.java |3 +-
 .../cassandra/db/compaction/CompactionsTest.java   |3 +-
 6 files changed, 29 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cde66ba/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cde66ba/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cde66ba/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cde66ba/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cde66ba/src/java/org/apache/cassandra/tools/NodeProbe.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cde66ba/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
--



[28/50] [abbrv] Refactor set/list/map CQL3 code

2012-07-27 Thread yukim
http://git-wip-us.apache.org/repos/asf/cassandra/blob/2b62df24/src/java/org/apache/cassandra/db/marshal/SetType.java
--
diff --git a/src/java/org/apache/cassandra/db/marshal/SetType.java 
b/src/java/org/apache/cassandra/db/marshal/SetType.java
index 7a72fe9..1090d09 100644
--- a/src/java/org/apache/cassandra/db/marshal/SetType.java
+++ b/src/java/org/apache/cassandra/db/marshal/SetType.java
@@ -27,13 +27,8 @@ import java.util.Map;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.cassandra.cql3.ColumnNameBuilder;
-import org.apache.cassandra.cql3.Term;
-import org.apache.cassandra.cql3.UpdateParameters;
-import org.apache.cassandra.db.ColumnFamily;
 import org.apache.cassandra.db.IColumn;
 import org.apache.cassandra.config.ConfigurationException;
-import org.apache.cassandra.thrift.InvalidRequestException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.FBUtilities;
 import org.apache.cassandra.utils.Pair;
@@ -73,12 +68,12 @@ public class SetType extends CollectionType
 this.elements = elements;
 }
 
-protected AbstractType? nameComparator()
+public AbstractType? nameComparator()
 {
 return elements;
 }
 
-protected AbstractType? valueComparator()
+public AbstractType? valueComparator()
 {
 return EmptyType.instance;
 }
@@ -88,41 +83,6 @@ public class SetType extends CollectionType
 
sb.append(getClass().getName()).append(TypeParser.stringifyTypeParameters(Collections.AbstractType?singletonList(elements)));
 }
 
-public void executeFunction(ColumnFamily cf, ColumnNameBuilder fullPath, 
Function fct, ListTerm args, UpdateParameters params) throws 
InvalidRequestException
-{
-switch (fct)
-{
-case ADD:
-doAdd(cf, fullPath, args, params);
-break;
-case DISCARD_SET:
-doDiscard(cf, fullPath, args, params);
-break;
-default:
-throw new AssertionError(Unsupported function  + fct);
-}
-}
-
-public void doAdd(ColumnFamily cf, ColumnNameBuilder builder, ListTerm 
values, UpdateParameters params) throws InvalidRequestException
-{
-for (int i = 0; i  values.size(); ++i)
-{
-ColumnNameBuilder b = i == values.size() - 1 ? builder : 
builder.copy();
-ByteBuffer name = b.add(values.get(i).getByteBuffer(elements, 
params.variables)).build();
-cf.addColumn(params.makeColumn(name, 
ByteBufferUtil.EMPTY_BYTE_BUFFER));
-}
-}
-
-public void doDiscard(ColumnFamily cf, ColumnNameBuilder builder, 
ListTerm values, UpdateParameters params) throws InvalidRequestException
-{
-for (int i = 0; i  values.size(); ++i)
-{
-ColumnNameBuilder b = i == values.size() - 1 ? builder : 
builder.copy();
-ByteBuffer name = b.add(values.get(i).getByteBuffer(elements, 
params.variables)).build();
-cf.addColumn(params.makeTombstone(name));
-}
-}
-
 public ByteBuffer serializeForThrift(ListPairByteBuffer, IColumn 
columns)
 {
 // We're using a list for now, since json doesn't have maps



[36/50] [abbrv] git commit: group stream out ranges

2012-07-27 Thread yukim
group stream out ranges

Patch by Sam Overton; reviewed by Brandon Williams for CASSANDRA-4122


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8c09e87e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8c09e87e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8c09e87e

Branch: refs/heads/cassandra-1.1
Commit: 8c09e87e40020139611088cf836f8f079bffb0ce
Parents: 1a3661f
Author: Eric Evans eev...@apache.org
Authored: Wed Jul 18 13:35:53 2012 -0500
Committer: Eric Evans eev...@apache.org
Committed: Wed Jul 18 13:35:53 2012 -0500

--
 .../apache/cassandra/service/StorageService.java   |   51 ++
 1 files changed, 36 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8c09e87e/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 207bf69..3875054 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -2984,42 +2984,62 @@ public class StorageService implements 
IEndpointStateChangeSubscriber, StorageSe
  */
 private CountDownLatch streamRanges(final MapString, 
MultimapRangeToken, InetAddress rangesToStreamByTable)
 {
-final CountDownLatch latch = new 
CountDownLatch(rangesToStreamByTable.keySet().size());
+// First, we build a list of ranges to stream to each host, per table
+final MapString, MapInetAddress, ListRangeToken 
sessionsToStreamByTable = new HashMapString, MapInetAddress, 
ListRangeToken();
+// The number of stream out sessions we need to start, to be built up 
as we build sessionsToStreamByTable
+int sessionCount = 0;
+
 for (Map.EntryString, MultimapRangeToken, InetAddress entry : 
rangesToStreamByTable.entrySet())
 {
 MultimapRangeToken, InetAddress rangesWithEndpoints = 
entry.getValue();
 
 if (rangesWithEndpoints.isEmpty())
-{
-latch.countDown();
 continue;
-}
 
 final String table = entry.getKey();
 
-final SetMap.EntryRangeToken, InetAddress pending = new 
HashSetMap.EntryRangeToken, InetAddress(rangesWithEndpoints.entries());
+MapInetAddress, ListRangeToken rangesPerEndpoint = new 
HashMapInetAddress, ListRangeToken();
 
 for (final Map.EntryRangeToken, InetAddress endPointEntry : 
rangesWithEndpoints.entries())
 {
 final RangeToken range = endPointEntry.getKey();
-final InetAddress newEndpoint = endPointEntry.getValue();
+final InetAddress endpoint = endPointEntry.getValue();
+
+ListRangeToken curRanges = rangesPerEndpoint.get(endpoint);
+if (curRanges == null)
+{
+curRanges = new LinkedListRangeToken();
+rangesPerEndpoint.put(endpoint, curRanges);
+}
+curRanges.add(range);
+}
+
+sessionCount += rangesPerEndpoint.size();
+sessionsToStreamByTable.put(table, rangesPerEndpoint);
+}
+
+final CountDownLatch latch = new CountDownLatch(sessionCount);
+
+for (Map.EntryString, MapInetAddress, ListRangeToken entry : 
sessionsToStreamByTable.entrySet())
+{
+final String table = entry.getKey();
+final MapInetAddress, ListRangeToken rangesPerEndpoint = 
entry.getValue();
+
+for (final Map.EntryInetAddress, ListRangeToken rangesEntry 
: rangesPerEndpoint.entrySet())
+{
+final ListRangeToken ranges = rangesEntry.getValue();
+final InetAddress newEndpoint = rangesEntry.getKey();
 
 final IStreamCallback callback = new IStreamCallback()
 {
 public void onSuccess()
 {
-synchronized (pending)
-{
-pending.remove(endPointEntry);
-
-if (pending.isEmpty())
-latch.countDown();
-}
+latch.countDown();
 }
 
 public void onFailure()
 {
-logger.warn(Streaming to  + endPointEntry +  
failed);
+logger.warn(Streaming to  + newEndpoint +  failed);
 onSuccess(); // calling onSuccess for latch countdown
 }
 };
@@ -3029,7 

[33/50] [abbrv] git commit: remove dead assignment

2012-07-27 Thread yukim
remove dead assignment


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7af91424
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7af91424
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7af91424

Branch: refs/heads/cassandra-1.1
Commit: 7af91424d9b2929a72138c3f8ee75e09256aa5ef
Parents: 201fe94
Author: Dave Brosius dbros...@apache.org
Authored: Wed Jul 18 21:18:21 2012 -0400
Committer: Dave Brosius dbros...@apache.org
Committed: Wed Jul 18 21:18:21 2012 -0400

--
 src/java/org/apache/cassandra/db/SystemTable.java |   12 +---
 1 files changed, 5 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7af91424/src/java/org/apache/cassandra/db/SystemTable.java
--
diff --git a/src/java/org/apache/cassandra/db/SystemTable.java 
b/src/java/org/apache/cassandra/db/SystemTable.java
index 9634515..48d9151 100644
--- a/src/java/org/apache/cassandra/db/SystemTable.java
+++ b/src/java/org/apache/cassandra/db/SystemTable.java
@@ -159,7 +159,7 @@ public class SystemTable
 {
 String req = INSERT INTO system.%s (token_bytes, peer) VALUES 
('%s', '%s');
 String tokenBytes = 
ByteBufferUtil.bytesToHex(p.getTokenFactory().toByteArray(token));
-processInternal(String.format(req, PEERS_CF, tokenBytes, 
ep.getHostAddress()));   
+processInternal(String.format(req, PEERS_CF, tokenBytes, 
ep.getHostAddress()));
 }
 forceBlockingFlush(PEERS_CF);
 }
@@ -175,7 +175,7 @@ public class SystemTable
 {
 String req = DELETE FROM system.%s WHERE token_bytes = '%s';
 String tokenBytes = 
ByteBufferUtil.bytesToHex(p.getTokenFactory().toByteArray(token));
-processInternal(String.format(req, PEERS_CF, tokenBytes));   
+processInternal(String.format(req, PEERS_CF, tokenBytes));
 }
 forceBlockingFlush(PEERS_CF);
 }
@@ -185,8 +185,6 @@ public class SystemTable
 */
 public static synchronized void updateTokens(CollectionToken tokens)
 {
-IPartitioner p = StorageService.getPartitioner();
-
 String req = INSERT INTO system.%s (key, token_bytes) VALUES ('%s', 
'%s');
 String tokenBytes = ByteBufferUtil.bytesToHex(serializeTokens(tokens));
 processInternal(String.format(req, LOCAL_CF, LOCAL_KEY, tokenBytes));
@@ -214,15 +212,15 @@ public class SystemTable
 newToks.put(toks);
 toks = newToks;
 }
-
+
 toks.putShort((short)tokenBytes.remaining());
 toks.put(tokenBytes);
 }
-
+
 toks.flip();
 return toks;
 }
-
+
 private static CollectionToken deserializeTokens(ByteBuffer tokenBytes)
 {
 ListToken tokens = new ArrayListToken();



[32/50] [abbrv] git commit: Disable background compaction on hints; patch by yukim/jbellis, reviewed by jbellis for CASSANDRA-4435

2012-07-27 Thread yukim
Disable background compaction on hints; patch by yukim/jbellis, reviewed
by jbellis for CASSANDRA-4435


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8f40f38e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8f40f38e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8f40f38e

Branch: refs/heads/cassandra-1.1
Commit: 8f40f38e1a2c4ceb0dc07089dd5ccbf036529c67
Parents: 7af9142
Author: Yuki Morishita yu...@apache.org
Authored: Thu Jul 19 11:41:40 2012 -0500
Committer: Yuki Morishita yu...@apache.org
Committed: Thu Jul 19 11:41:40 2012 -0500

--
 .../org/apache/cassandra/config/CFMetaData.java|5 -
 1 files changed, 4 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8f40f38e/src/java/org/apache/cassandra/config/CFMetaData.java
--
diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java 
b/src/java/org/apache/cassandra/config/CFMetaData.java
index fb9ae88..b619ccf 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -151,7 +151,10 @@ public final class CFMetaData
  + message_version 
int,
  + mutation blob,
  + PRIMARY KEY 
(target_id, hint_id, message_version)
- + ) WITH COMPACT 
STORAGE AND COMMENT='hints awaiting delivery');
+ + ) WITH COMPACT 
STORAGE 
+ + AND 
COMPACTION_STRATEGY_OPTIONS:MIN_COMPACTION_THRESHOLD=0 
+ + AND 
COMPACTION_STRATEGY_OPTIONS:MAX_COMPACTION_THRESHOLD=0 
+ + AND COMMENT='hints 
awaiting delivery');
 
 public static final CFMetaData PeersCf = compile(12, CREATE TABLE  + 
SystemTable.PEERS_CF +  (
  + token_bytes blob 
PRIMARY KEY,



[29/50] [abbrv] git commit: fix extension

2012-07-27 Thread yukim
fix extension


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1dadaa70
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1dadaa70
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1dadaa70

Branch: refs/heads/cassandra-1.1
Commit: 1dadaa708ab1f17ef5857e84ad58d0a5fe7adf10
Parents: 82e6edd
Author: Dave Brosius dbros...@apache.org
Authored: Thu Jul 19 22:06:25 2012 -0400
Committer: Dave Brosius dbros...@apache.org
Committed: Thu Jul 19 22:06:25 2012 -0400

--
 lib/licenses/concurrentlinkedhashmap-lru-1.3.jar |  202 -
 lib/licenses/concurrentlinkedhashmap-lru-1.3.txt |  202 +
 2 files changed, 202 insertions(+), 202 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1dadaa70/lib/licenses/concurrentlinkedhashmap-lru-1.3.jar
--
diff --git a/lib/licenses/concurrentlinkedhashmap-lru-1.3.jar 
b/lib/licenses/concurrentlinkedhashmap-lru-1.3.jar
deleted file mode 100644
index d645695..000
--- a/lib/licenses/concurrentlinkedhashmap-lru-1.3.jar
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
-   Version 2.0, January 2004
-http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-  License shall mean the terms and conditions for use, reproduction,
-  and distribution as defined by Sections 1 through 9 of this document.
-
-  Licensor shall mean the copyright owner or entity authorized by
-  the copyright owner that is granting the License.
-
-  Legal Entity shall mean the union of the acting entity and all
-  other entities that control, are controlled by, or are under common
-  control with that entity. For the purposes of this definition,
-  control means (i) the power, direct or indirect, to cause the
-  direction or management of such entity, whether by contract or
-  otherwise, or (ii) ownership of fifty percent (50%) or more of the
-  outstanding shares, or (iii) beneficial ownership of such entity.
-
-  You (or Your) shall mean an individual or Legal Entity
-  exercising permissions granted by this License.
-
-  Source form shall mean the preferred form for making modifications,
-  including but not limited to software source code, documentation
-  source, and configuration files.
-
-  Object form shall mean any form resulting from mechanical
-  transformation or translation of a Source form, including but
-  not limited to compiled object code, generated documentation,
-  and conversions to other media types.
-
-  Work shall mean the work of authorship, whether in Source or
-  Object form, made available under the License, as indicated by a
-  copyright notice that is included in or attached to the work
-  (an example is provided in the Appendix below).
-
-  Derivative Works shall mean any work, whether in Source or Object
-  form, that is based on (or derived from) the Work and for which the
-  editorial revisions, annotations, elaborations, or other modifications
-  represent, as a whole, an original work of authorship. For the purposes
-  of this License, Derivative Works shall not include works that remain
-  separable from, or merely link (or bind by name) to the interfaces of,
-  the Work and Derivative Works thereof.
-
-  Contribution shall mean any work of authorship, including
-  the original version of the Work and any modifications or additions
-  to that Work or Derivative Works thereof, that is intentionally
-  submitted to Licensor for inclusion in the Work by the copyright owner
-  or by an individual or Legal Entity authorized to submit on behalf of
-  the copyright owner. For the purposes of this definition, submitted
-  means any form of electronic, verbal, or written communication sent
-  to the Licensor or its representatives, including but not limited to
-  communication on electronic mailing lists, source code control systems,
-  and issue tracking systems that are managed by, or on behalf of, the
-  Licensor for the purpose of discussing and improving the Work, but
-  excluding communication that is conspicuously marked or otherwise
-  designated in writing by the copyright owner as Not a Contribution.
-
-  Contributor shall mean Licensor and any individual or Legal Entity
-  on behalf of whom a Contribution has been received by Licensor and
-  subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-  this License, each Contributor hereby 

[26/50] [abbrv] git commit: fix incorrect hasIrrelevantData result for live CF; patch by yukim, reviewed by jbellis/slebresne for CASSANDRA-3855

2012-07-27 Thread yukim
fix incorrect hasIrrelevantData result for live CF; patch by yukim, reviewed by 
jbellis/slebresne for CASSANDRA-3855


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d7410373
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d7410373
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d7410373

Branch: refs/heads/cassandra-1.1
Commit: d74103735126658d64cb92a16f4bb40f63d5e2e8
Parents: 2b62df2
Author: Yuki Morishita yu...@apache.org
Authored: Fri Jul 20 17:33:05 2012 -0500
Committer: Yuki Morishita yu...@apache.org
Committed: Fri Jul 20 17:33:05 2012 -0500

--
 .../cassandra/db/AbstractColumnContainer.java  |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d7410373/src/java/org/apache/cassandra/db/AbstractColumnContainer.java
--
diff --git a/src/java/org/apache/cassandra/db/AbstractColumnContainer.java 
b/src/java/org/apache/cassandra/db/AbstractColumnContainer.java
index f58f6ab..2c86070 100644
--- a/src/java/org/apache/cassandra/db/AbstractColumnContainer.java
+++ b/src/java/org/apache/cassandra/db/AbstractColumnContainer.java
@@ -197,12 +197,13 @@ public abstract class AbstractColumnContainer implements 
IColumnContainer, IIter
 
 public boolean hasIrrelevantData(int gcBefore)
 {
-if (deletionInfo().purge(gcBefore) == DeletionInfo.LIVE)
+// Do we have gcable deletion infos?
+if (!deletionInfo().purge(gcBefore).equals(deletionInfo()))
 return true;
 
-long deletedAt = deletionInfo().maxTimestamp();
+// Do we have colums that are either deleted by the container or 
gcable tombstone?
 for (IColumn column : columns)
-if (column.mostRecentLiveChangeAt() = deletedAt || 
column.hasIrrelevantData(gcBefore))
+if (deletionInfo().isDeleted(column) || 
column.hasIrrelevantData(gcBefore))
 return true;
 
 return false;



[40/50] [abbrv] git commit: Fix validation of dates

2012-07-27 Thread yukim
Fix validation of dates

patch by slebresne; reviewed by jbellis for CASSANDRA-4441


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6399c94e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6399c94e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6399c94e

Branch: refs/heads/cassandra-1.1
Commit: 6399c94e48203d233d997372dc9fccf713177d99
Parents: b3ca94b
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Jul 16 19:09:03 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Jul 16 20:32:21 2012 +0200

--
 lib/commons-lang-2.4.jar   |  Bin 261809 - 0 bytes
 lib/commons-lang-2.6.jar   |  Bin 0 - 284220 bytes
 .../org/apache/cassandra/db/marshal/DateType.java  |2 +-
 3 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6399c94e/lib/commons-lang-2.4.jar
--
diff --git a/lib/commons-lang-2.4.jar b/lib/commons-lang-2.4.jar
deleted file mode 100644
index 532939e..000
Binary files a/lib/commons-lang-2.4.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6399c94e/lib/commons-lang-2.6.jar
--
diff --git a/lib/commons-lang-2.6.jar b/lib/commons-lang-2.6.jar
new file mode 100644
index 000..98467d3
Binary files /dev/null and b/lib/commons-lang-2.6.jar differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6399c94e/src/java/org/apache/cassandra/db/marshal/DateType.java
--
diff --git a/src/java/org/apache/cassandra/db/marshal/DateType.java 
b/src/java/org/apache/cassandra/db/marshal/DateType.java
index 56d00a6..4270511 100644
--- a/src/java/org/apache/cassandra/db/marshal/DateType.java
+++ b/src/java/org/apache/cassandra/db/marshal/DateType.java
@@ -108,7 +108,7 @@ public class DateType extends AbstractTypeDate
   {
   try
   {
-  millis = DateUtils.parseDate(source, iso8601Patterns).getTime();
+  millis = DateUtils.parseDateStrictly(source, 
iso8601Patterns).getTime();
   }
   catch (ParseException e1)
   {



[35/50] [abbrv] git commit: jmx / nodetool support for virtual nodes

2012-07-27 Thread yukim
jmx / nodetool support for virtual nodes

Patch by eevans; reviewed by Brandon Williams for CASSANDRA-4125


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4f9fd76d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4f9fd76d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4f9fd76d

Branch: refs/heads/cassandra-1.1
Commit: 4f9fd76db3b63cea98426097e424524dc07237ad
Parents: 8c09e87
Author: Eric Evans eev...@apache.org
Authored: Wed Jul 18 13:39:29 2012 -0500
Committer: Eric Evans eev...@apache.org
Committed: Wed Jul 18 13:39:29 2012 -0500

--
 .../apache/cassandra/service/StorageService.java   |   54 ++--
 .../cassandra/service/StorageServiceMBean.java |   14 +-
 src/java/org/apache/cassandra/tools/NodeCmd.java   |  282 ---
 src/java/org/apache/cassandra/tools/NodeProbe.java |   18 +-
 4 files changed, 283 insertions(+), 85 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4f9fd76d/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 3875054..b5d6d20 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -1726,9 +1726,22 @@ public class StorageService implements 
IEndpointStateChangeSubscriber, StorageSe
 
 /* These methods belong to the MBean interface */
 
-public String getToken()
+public ListString getTokens()
 {
-return getLocalTokens().iterator().next().toString();
+return getTokens(FBUtilities.getBroadcastAddress());
+}
+
+public ListString getTokens(String endpoint) throws UnknownHostException
+{
+return getTokens(InetAddress.getByName(endpoint));
+}
+
+private ListString getTokens(InetAddress endpoint)
+{
+ListString strTokens = new ArrayListString();
+for (Token tok : getTokenMetadata().getTokens(endpoint))
+strTokens.add(tok.toString());
+return strTokens;
 }
 
 public String getReleaseVersion()
@@ -2432,6 +2445,14 @@ public class StorageService implements 
IEndpointStateChangeSubscriber, StorageSe
 
 // address of the current node
 InetAddress localAddress = FBUtilities.getBroadcastAddress();
+
+// This doesn't make any sense in a vnodes environment.
+if (getTokenMetadata().getTokens(localAddress).size()  1)
+{
+logger.error(Invalid request to move(Token); This node has more 
than one token and cannot be moved thusly.);
+throw new UnsupportedOperationException(This node has more than 
one token and cannot be moved thusly.);
+}
+
 ListString tablesToProcess = Schema.instance.getNonSystemTables();
 
 // checking if data is moving to this node
@@ -2861,39 +2882,14 @@ public class StorageService implements 
IEndpointStateChangeSubscriber, StorageSe
 // calculate ownership per dc
 for (CollectionInetAddress endpoints : endpointsGroupedByDc)
 {
-// sort the endpoints by their tokens
-ListInetAddress sortedEndpoints = 
Lists.newArrayListWithExpectedSize(endpoints.size());
-sortedEndpoints.addAll(endpoints);
-
-Collections.sort(sortedEndpoints, new ComparatorInetAddress()
-{
-public int compare(InetAddress o1, InetAddress o2)
-{
-byte[] b1 = o1.getAddress();
-byte[] b2 = o2.getAddress();
-
-if(b1.length  b2.length) return -1;
-if(b1.length  b2.length) return 1;
-
-for(int i = 0; i  b1.length; i++)
-{
-int left = (int)b1[i]  0xFF;
-int right = (int)b2[i]  0xFF;
-if (left  right)   return -1;
-else if (left  right)  return 1;
-}
-return 0;
-}
-});
-
 // calculate the ownership with replication and add the endpoint 
to the final ownership map
 for (InetAddress endpoint : endpoints)
 {
 float ownership = 0.0f;
 for (RangeToken range : getRangesForEndpoint(keyspace, 
endpoint))
 {
-if (tokenOwnership.containsKey(range.left))
-ownership += tokenOwnership.get(range.left);
+if (tokenOwnership.containsKey(range.right))
+ownership += tokenOwnership.get(range.right);
 }

[39/50] [abbrv] git commit: Fix changelog

2012-07-27 Thread yukim
Fix changelog


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/72aa8240
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/72aa8240
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/72aa8240

Branch: refs/heads/cassandra-1.1
Commit: 72aa8240117dab6f6e7eaeaab112538b3bc557ca
Parents: 6399c94
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Tue Jul 17 10:40:03 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Tue Jul 17 10:40:03 2012 +0200

--
 CHANGES.txt |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/72aa8240/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 5578aae..e9fdbf4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -29,6 +29,7 @@
  * Add column metadata to system column families (CASSANDRA-4018)
  * (cql3) Always use composite types by default (CASSANDRA-4329)
  * (cql3) Add support for set, map and list (CASSANDRA-3647)
+ * Validate date type correctly (CASSANDRA-4441)
 
 
 1.1.3



[34/50] [abbrv] git commit: migration support for virtual nodes

2012-07-27 Thread yukim
migration support for virtual nodes

Patch by Sam Overton; reviewed by Brandon Williams for CASSANDRA-4127


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/201fe944
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/201fe944
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/201fe944

Branch: refs/heads/cassandra-1.1
Commit: 201fe94413db0125d73e01afff45fa6bd7b295a0
Parents: 4f9fd76
Author: Eric Evans eev...@apache.org
Authored: Wed Jul 18 13:47:39 2012 -0500
Committer: Eric Evans eev...@apache.org
Committed: Wed Jul 18 13:47:39 2012 -0500

--
 .../apache/cassandra/service/StorageService.java   |   53 ++-
 1 files changed, 52 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/201fe944/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 b5d6d20..621b06b 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -621,7 +621,58 @@ public class StorageService implements 
IEndpointStateChangeSubscriber, StorageSe
 }
 else
 {
-logger.info(Using saved token  + tokens);
+// if we were already bootstrapped with 1 token but num_tokens 
is set higher in the config,
+// then we need to migrate to multi-token
+if (tokens.size() == 1  DatabaseDescriptor.getNumTokens()  
1)
+{
+// wait for ring info
+logger.info(Sleeping for ring delay ( + delay + ms));
+try
+{
+Thread.sleep(delay);
+}
+catch (InterruptedException e)
+{
+throw new AssertionError(e);
+}
+logger.info(Calculating new tokens);
+// calculate num_tokens tokens evenly spaced in the range 
(left, right]
+Token right = tokens.iterator().next();
+TokenMetadata clone = tokenMetadata.cloneOnlyTokenMap();
+clone.updateNormalToken(right, 
FBUtilities.getBroadcastAddress());
+Token left = clone.getPredecessor(right);
+
+// get (num_tokens - 1) tokens spaced evenly, and the last 
token will be our current token (right)
+for (int tok = 1; tok  DatabaseDescriptor.getNumTokens(); 
++tok)
+{
+Token l = left;
+Token r = right;
+// iteratively calculate the location of the token 
using midpoint
+// num iterations is number of bits in IEE754 mantissa 
(including implicit leading 1)
+// we stop early for terminating fractions
+// TODO: alternatively we could add an interpolate() 
method to IPartitioner
+double frac = (double)tok / 
(double)DatabaseDescriptor.getNumTokens();
+Token midpoint = getPartitioner().midpoint(l, r);
+for (int i = 0; i  53; ++i)
+{
+frac *= 2;
+if (frac == 1.0) /* not a bug */
+break;
+else if (frac  1.0)
+{
+l = midpoint;
+frac -= 1.0;
+}
+else
+r = midpoint;
+midpoint = getPartitioner().midpoint(l, r);
+}
+tokens.add(midpoint);
+}
+logger.info(Split previous range ( + left + ,  + right 
+ ] into  + tokens);
+}
+else
+logger.info(Using saved token  + tokens);
 }
 }
 



[41/50] [abbrv] git commit: Regenerate serialized messages

2012-07-27 Thread yukim
Regenerate serialized messages


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b3ca94bd
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b3ca94bd
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b3ca94bd

Branch: refs/heads/cassandra-1.1
Commit: b3ca94bdbfb52e520f849807f6ae34819cf7afeb
Parents: cbb15e5
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Jul 16 18:40:35 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Jul 16 18:40:35 2012 +0200

--
 .../serialization/1.2/db.RangeSliceCommand.bin |  Bin 717 - 733 bytes
 test/data/serialization/1.2/db.Row.bin |  Bin 527 - 527 bytes
 test/data/serialization/1.2/db.RowMutation.bin |  Bin 3410 - 3410 bytes
 .../serialization/1.2/db.SliceFromReadCommand.bin  |  Bin 385 - 409 bytes
 test/data/serialization/1.2/gms.EndpointState.bin  |  Bin 110 - 110 bytes
 .../serialization/1.2/service.TreeResponse.bin |  Bin 930 - 930 bytes
 test/data/serialization/1.2/utils.BloomFilter.bin  |  Bin 2500016 - 2500016 
bytes
 7 files changed, 0 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3ca94bd/test/data/serialization/1.2/db.RangeSliceCommand.bin
--
diff --git a/test/data/serialization/1.2/db.RangeSliceCommand.bin 
b/test/data/serialization/1.2/db.RangeSliceCommand.bin
index 259037a..45a4aea 100644
Binary files a/test/data/serialization/1.2/db.RangeSliceCommand.bin and 
b/test/data/serialization/1.2/db.RangeSliceCommand.bin differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3ca94bd/test/data/serialization/1.2/db.Row.bin
--
diff --git a/test/data/serialization/1.2/db.Row.bin 
b/test/data/serialization/1.2/db.Row.bin
index 99e9be4..ed5ad9d 100644
Binary files a/test/data/serialization/1.2/db.Row.bin and 
b/test/data/serialization/1.2/db.Row.bin differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3ca94bd/test/data/serialization/1.2/db.RowMutation.bin
--
diff --git a/test/data/serialization/1.2/db.RowMutation.bin 
b/test/data/serialization/1.2/db.RowMutation.bin
index 2800321..e62daed 100644
Binary files a/test/data/serialization/1.2/db.RowMutation.bin and 
b/test/data/serialization/1.2/db.RowMutation.bin differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3ca94bd/test/data/serialization/1.2/db.SliceFromReadCommand.bin
--
diff --git a/test/data/serialization/1.2/db.SliceFromReadCommand.bin 
b/test/data/serialization/1.2/db.SliceFromReadCommand.bin
index b2741af..3e68cd3 100644
Binary files a/test/data/serialization/1.2/db.SliceFromReadCommand.bin and 
b/test/data/serialization/1.2/db.SliceFromReadCommand.bin differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3ca94bd/test/data/serialization/1.2/gms.EndpointState.bin
--
diff --git a/test/data/serialization/1.2/gms.EndpointState.bin 
b/test/data/serialization/1.2/gms.EndpointState.bin
index d44c6ab..cd85279 100644
Binary files a/test/data/serialization/1.2/gms.EndpointState.bin and 
b/test/data/serialization/1.2/gms.EndpointState.bin differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3ca94bd/test/data/serialization/1.2/service.TreeResponse.bin
--
diff --git a/test/data/serialization/1.2/service.TreeResponse.bin 
b/test/data/serialization/1.2/service.TreeResponse.bin
index b9de706..90f3c6f 100644
Binary files a/test/data/serialization/1.2/service.TreeResponse.bin and 
b/test/data/serialization/1.2/service.TreeResponse.bin differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3ca94bd/test/data/serialization/1.2/utils.BloomFilter.bin
--
diff --git a/test/data/serialization/1.2/utils.BloomFilter.bin 
b/test/data/serialization/1.2/utils.BloomFilter.bin
index baaad3c..6b4e7de 100644
Binary files a/test/data/serialization/1.2/utils.BloomFilter.bin and 
b/test/data/serialization/1.2/utils.BloomFilter.bin differ



[37/50] [abbrv] git commit: support for node removal with virtual nodes

2012-07-27 Thread yukim
support for node removal with virtual nodes

Patch by Sam Overton and eevans; reviewed by Brandon Williams for CASSANDRA-4122


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1a3661f6
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1a3661f6
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1a3661f6

Branch: refs/heads/cassandra-1.1
Commit: 1a3661f641e62d3fdc03eae32c60b2b33a5d90bb
Parents: 66b96ee
Author: Eric Evans eev...@apache.org
Authored: Wed Jul 18 13:34:02 2012 -0500
Committer: Eric Evans eev...@apache.org
Committed: Wed Jul 18 13:34:02 2012 -0500

--
 .../apache/cassandra/service/StorageService.java   |   15 ++-
 1 files changed, 6 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1a3661f6/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 a58653d..207bf69 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -1305,18 +1305,16 @@ public class StorageService implements 
IEndpointStateChangeSubscriber, StorageSe
 if (tokenMetadata.isMember(endpoint))
 {
 String state = pieces[0];
-Token removeToken = tokenMetadata.getToken(endpoint);
+CollectionToken removeTokens = tokenMetadata.getTokens(endpoint);
 
 if (VersionedValue.REMOVED_TOKEN.equals(state))
 {
-excise(Collections.singleton(removeToken),
-   endpoint,
-   extractExpireTime(pieces, 
MessagingService.instance().getVersion(endpoint)));
+excise(removeTokens, endpoint, extractExpireTime(pieces, 
MessagingService.instance().getVersion(endpoint)));
 }
 else if (VersionedValue.REMOVING_TOKEN.equals(state))
 {
 if (logger.isDebugEnabled())
-logger.debug(Token  + removeToken +  removed manually 
(endpoint was  + endpoint + ));
+logger.debug(Tokens  + removeTokens +  removed manually 
(endpoint was  + endpoint + ));
 
 // Note that the endpoint is being removed
 tokenMetadata.addLeavingEndpoint(endpoint);
@@ -2580,8 +2578,7 @@ public class StorageService implements 
IEndpointStateChangeSubscriber, StorageSe
 {
 UUID hostId = tokenMetadata.getHostId(endpoint);
 Gossiper.instance.advertiseTokenRemoved(endpoint, hostId);
-Token token = tokenMetadata.getToken(endpoint);
-excise(Collections.singleton(token), endpoint);
+excise(tokenMetadata.getTokens(endpoint), endpoint);
 }
 replicatingNodes.clear();
 removingNode = null;
@@ -2611,7 +2608,7 @@ public class StorageService implements 
IEndpointStateChangeSubscriber, StorageSe
 if (endpoint == null)
 throw new UnsupportedOperationException(Host ID not found.);
 
-Token token = tokenMetadata.getToken(endpoint);
+CollectionToken tokens = tokenMetadata.getTokens(endpoint);
 
 if (endpoint.equals(myAddress))
  throw new UnsupportedOperationException(Cannot remove self);
@@ -2669,7 +2666,7 @@ public class StorageService implements 
IEndpointStateChangeSubscriber, StorageSe
 }
 }
 
-excise(Collections.singleton(token), endpoint);
+excise(tokens, endpoint);
 
 // gossiper will indicate the token has left
 Gossiper.instance.advertiseTokenRemoved(endpoint, hostId);



[42/50] [abbrv] git commit: Regenerate sstable to fix scrub tests

2012-07-27 Thread yukim
Regenerate sstable to fix scrub tests


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cbb15e58
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cbb15e58
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cbb15e58

Branch: refs/heads/cassandra-1.1
Commit: cbb15e58a67b408f9cef264638bae7615b7b8e87
Parents: 91bdf7f
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Jul 16 18:27:24 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Jul 16 18:27:24 2012 +0200

--
 .../Keyspace1-Standard3-hd-1-Data.db   |  Bin 498 - 0 bytes
 .../Keyspace1-Standard3-hd-1-Filter.db |  Bin 256 - 0 bytes
 .../Keyspace1-Standard3-hd-1-Index.db  |  Bin 66 - 0 bytes
 .../Keyspace1-Standard3-hd-1-Statistics.db |  Bin 4354 - 0 bytes
 .../Keyspace1-Standard3-ia-1-Data.db   |  Bin 0 - 354 bytes
 .../Keyspace1-Standard3-ia-1-Filter.db |  Bin 0 - 256 bytes
 .../Keyspace1-Standard3-ia-1-Index.db  |  Bin 0 - 90 bytes
 .../Keyspace1-Standard3-ia-1-Statistics.db |  Bin 0 - 4349 bytes
 test/unit/org/apache/cassandra/db/ScrubTest.java   |   24 +++---
 9 files changed, 12 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cbb15e58/test/data/corrupt-sstables/Keyspace1-Standard3-hd-1-Data.db
--
diff --git a/test/data/corrupt-sstables/Keyspace1-Standard3-hd-1-Data.db 
b/test/data/corrupt-sstables/Keyspace1-Standard3-hd-1-Data.db
deleted file mode 100644
index 4530034..000
Binary files a/test/data/corrupt-sstables/Keyspace1-Standard3-hd-1-Data.db and 
/dev/null differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cbb15e58/test/data/corrupt-sstables/Keyspace1-Standard3-hd-1-Filter.db
--
diff --git a/test/data/corrupt-sstables/Keyspace1-Standard3-hd-1-Filter.db 
b/test/data/corrupt-sstables/Keyspace1-Standard3-hd-1-Filter.db
deleted file mode 100644
index 1b5e708..000
Binary files a/test/data/corrupt-sstables/Keyspace1-Standard3-hd-1-Filter.db 
and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cbb15e58/test/data/corrupt-sstables/Keyspace1-Standard3-hd-1-Index.db
--
diff --git a/test/data/corrupt-sstables/Keyspace1-Standard3-hd-1-Index.db 
b/test/data/corrupt-sstables/Keyspace1-Standard3-hd-1-Index.db
deleted file mode 100644
index 2cbe319..000
Binary files a/test/data/corrupt-sstables/Keyspace1-Standard3-hd-1-Index.db and 
/dev/null differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cbb15e58/test/data/corrupt-sstables/Keyspace1-Standard3-hd-1-Statistics.db
--
diff --git a/test/data/corrupt-sstables/Keyspace1-Standard3-hd-1-Statistics.db 
b/test/data/corrupt-sstables/Keyspace1-Standard3-hd-1-Statistics.db
deleted file mode 100644
index 7231157..000
Binary files 
a/test/data/corrupt-sstables/Keyspace1-Standard3-hd-1-Statistics.db and 
/dev/null differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cbb15e58/test/data/corrupt-sstables/Keyspace1-Standard3-ia-1-Data.db
--
diff --git a/test/data/corrupt-sstables/Keyspace1-Standard3-ia-1-Data.db 
b/test/data/corrupt-sstables/Keyspace1-Standard3-ia-1-Data.db
new file mode 100644
index 000..70e64e0
Binary files /dev/null and 
b/test/data/corrupt-sstables/Keyspace1-Standard3-ia-1-Data.db differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cbb15e58/test/data/corrupt-sstables/Keyspace1-Standard3-ia-1-Filter.db
--
diff --git a/test/data/corrupt-sstables/Keyspace1-Standard3-ia-1-Filter.db 
b/test/data/corrupt-sstables/Keyspace1-Standard3-ia-1-Filter.db
new file mode 100644
index 000..7e129e3
Binary files /dev/null and 
b/test/data/corrupt-sstables/Keyspace1-Standard3-ia-1-Filter.db differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cbb15e58/test/data/corrupt-sstables/Keyspace1-Standard3-ia-1-Index.db
--
diff --git a/test/data/corrupt-sstables/Keyspace1-Standard3-ia-1-Index.db 
b/test/data/corrupt-sstables/Keyspace1-Standard3-ia-1-Index.db
new file mode 100644
index 000..5da2914
Binary files /dev/null and 
b/test/data/corrupt-sstables/Keyspace1-Standard3-ia-1-Index.db differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cbb15e58/test/data/corrupt-sstables/Keyspace1-Standard3-ia-1-Statistics.db

[48/50] [abbrv] git commit: Track tombstone for LCS; patch by yukim reviewed by jbellis for CASSANDRA-4234

2012-07-27 Thread yukim
Track tombstone for LCS; patch by yukim reviewed by jbellis for CASSANDRA-4234


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0091af93
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0091af93
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0091af93

Branch: refs/heads/cassandra-1.1
Commit: 0091af932c6ef65a0a5917f123fe24398b79c079
Parents: 13f8eee
Author: Yuki Morishita yu...@apache.org
Authored: Fri Jul 13 13:17:51 2012 -0500
Committer: Yuki Morishita yu...@apache.org
Committed: Fri Jul 13 13:17:51 2012 -0500

--
 CHANGES.txt|2 +-
 .../db/compaction/AbstractCompactionStrategy.java  |   44 
 .../db/compaction/LeveledCompactionStrategy.java   |   45 -
 .../cassandra/db/compaction/LeveledManifest.java   |6 ++
 .../cassandra/db/compaction/OperationType.java |2 +
 .../compaction/SizeTieredCompactionStrategy.java   |   35 +-
 .../cassandra/db/compaction/CompactionsTest.java   |   53 ++-
 7 files changed, 148 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0091af93/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 03e3fba..fb66fd6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -12,7 +12,7 @@
  * add inter-node message compression (CASSANDRA-3127)
  * remove COPP (CASSANDRA-2479)
  * Track tombstone expiration and compact when tombstone content is
-   higher than a configurable threshold, default 20% (CASSANDRA-3442)
+   higher than a configurable threshold, default 20% (CASSANDRA-3442, 4234)
  * update MurmurHash to version 3 (CASSANDRA-2975)
  * (CLI) track elapsed time for `delete' operation (CASSANDRA-4060)
  * (CLI) jline version is bumped to 1.0 to properly  support

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0091af93/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java
--
diff --git 
a/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java 
b/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java
index 41128b0..bf6c87f 100644
--- 
a/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java
+++ 
b/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java
@@ -38,15 +38,23 @@ import org.apache.cassandra.service.StorageService;
  */
 public abstract class AbstractCompactionStrategy
 {
+protected static final float DEFAULT_TOMBSTONE_THRESHOLD = 0.2f;
+protected static final String TOMBSTONE_THRESHOLD_KEY = 
tombstone_threshold;
+
 protected final ColumnFamilyStore cfs;
 protected final MapString, String options;
 
+protected float tombstoneThreshold;
+
 protected AbstractCompactionStrategy(ColumnFamilyStore cfs, MapString, 
String options)
 {
 assert cfs != null;
 this.cfs = cfs;
 this.options = options;
 
+String optionValue = options.get(TOMBSTONE_THRESHOLD_KEY);
+tombstoneThreshold = (null != optionValue) ? 
Float.parseFloat(optionValue) : DEFAULT_TOMBSTONE_THRESHOLD;
+
 // start compactions in five minutes (if no flushes have occurred by 
then to do so)
 Runnable runnable = new Runnable()
 {
@@ -146,4 +154,40 @@ public abstract class AbstractCompactionStrategy
 {
 return getScanners(toCompact, null);
 }
+
+/**
+ * @param sstable SSTable to check
+ * @param gcBefore time to drop tombstones
+ * @return true if given sstable's tombstones are expected to be removed
+ */
+protected boolean worthDroppingTombstones(SSTableReader sstable, int 
gcBefore)
+{
+double droppableRatio = 
sstable.getEstimatedDroppableTombstoneRatio(gcBefore);
+if (droppableRatio = tombstoneThreshold)
+return false;
+
+SetSSTableReader overlaps = 
cfs.getOverlappingSSTables(Collections.singleton(sstable));
+if (overlaps.isEmpty())
+{
+// there is no overlap, tombstones are safely droppable
+return true;
+}
+else
+{
+// what percentage of columns do we expect to compact outside of 
overlap?
+// first, calculate estimated keys that do not overlap
+long keys = sstable.estimatedKeys();
+SetRangeToken ranges = new HashSetRangeToken();
+for (SSTableReader overlap : overlaps)
+ranges.add(new RangeToken(overlap.first.token, 
overlap.last.token, overlap.partitioner));
+long remainingKeys = keys - sstable.estimatedKeysForRanges(ranges);
+// next, calculate what percentage of columns we have 

[49/50] [abbrv] git commit: CS.schedule throws UE instead of TOE patch by jbellis; reviewed by slebresne for CASSANDRA-4414

2012-07-27 Thread yukim
CS.schedule throws UE instead of TOE
patch by jbellis; reviewed by slebresne for CASSANDRA-4414


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/13f8eee9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/13f8eee9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/13f8eee9

Branch: refs/heads/cassandra-1.1
Commit: 13f8eee99d0acb7063eab5dab7a8980d1b71a3b9
Parents: c9a13c3
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed Jul 11 23:29:37 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Fri Jul 13 11:32:21 2012 -0500

--
 .../apache/cassandra/thrift/CassandraServer.java   |   11 +--
 1 files changed, 9 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/13f8eee9/src/java/org/apache/cassandra/thrift/CassandraServer.java
--
diff --git a/src/java/org/apache/cassandra/thrift/CassandraServer.java 
b/src/java/org/apache/cassandra/thrift/CassandraServer.java
index 15084c6..e594236 100644
--- a/src/java/org/apache/cassandra/thrift/CassandraServer.java
+++ b/src/java/org/apache/cassandra/thrift/CassandraServer.java
@@ -893,9 +893,16 @@ public class CassandraServer implements Cassandra.Iface
 /**
  * Schedule the current thread for access to the required services
  */
-private void schedule(long timeoutMS) throws TimeoutException
+private void schedule(long timeoutMS) throws UnavailableException
 {
-requestScheduler.queue(Thread.currentThread(), 
state().getSchedulingValue(), timeoutMS);
+try
+{
+requestScheduler.queue(Thread.currentThread(), 
state().getSchedulingValue(), timeoutMS);
+}
+catch (TimeoutException e)
+{
+throw new UnavailableException();
+}
 }
 
 /**



[45/50] [abbrv] Add lists, sets and maps support

2012-07-27 Thread yukim
http://git-wip-us.apache.org/repos/asf/cassandra/blob/91bdf7fb/src/java/org/apache/cassandra/db/marshal/SetType.java
--
diff --git a/src/java/org/apache/cassandra/db/marshal/SetType.java 
b/src/java/org/apache/cassandra/db/marshal/SetType.java
new file mode 100644
index 000..7a72fe9
--- /dev/null
+++ b/src/java/org/apache/cassandra/db/marshal/SetType.java
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.db.marshal;
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.cassandra.cql3.ColumnNameBuilder;
+import org.apache.cassandra.cql3.Term;
+import org.apache.cassandra.cql3.UpdateParameters;
+import org.apache.cassandra.db.ColumnFamily;
+import org.apache.cassandra.db.IColumn;
+import org.apache.cassandra.config.ConfigurationException;
+import org.apache.cassandra.thrift.InvalidRequestException;
+import org.apache.cassandra.utils.ByteBufferUtil;
+import org.apache.cassandra.utils.FBUtilities;
+import org.apache.cassandra.utils.Pair;
+
+public class SetType extends CollectionType
+{
+private static final Logger logger = 
LoggerFactory.getLogger(SetType.class);
+
+// interning instances
+private static final MapAbstractType?, SetType instances = new 
HashMapAbstractType?, SetType();
+
+public final AbstractType? elements;
+
+public static SetType getInstance(TypeParser parser) throws 
ConfigurationException
+{
+ListAbstractType? l = parser.getTypeParameters();
+if (l.size() != 1)
+throw new ConfigurationException(SetType takes exactly 1 type 
parameter);
+
+return getInstance(l.get(0));
+}
+
+public static synchronized SetType getInstance(AbstractType? elements)
+{
+SetType t = instances.get(elements);
+if (t == null)
+{
+t = new SetType(elements);
+instances.put(elements, t);
+}
+return t;
+}
+
+public SetType(AbstractType? elements)
+{
+super(Kind.SET);
+this.elements = elements;
+}
+
+protected AbstractType? nameComparator()
+{
+return elements;
+}
+
+protected AbstractType? valueComparator()
+{
+return EmptyType.instance;
+}
+
+protected void appendToStringBuilder(StringBuilder sb)
+{
+
sb.append(getClass().getName()).append(TypeParser.stringifyTypeParameters(Collections.AbstractType?singletonList(elements)));
+}
+
+public void executeFunction(ColumnFamily cf, ColumnNameBuilder fullPath, 
Function fct, ListTerm args, UpdateParameters params) throws 
InvalidRequestException
+{
+switch (fct)
+{
+case ADD:
+doAdd(cf, fullPath, args, params);
+break;
+case DISCARD_SET:
+doDiscard(cf, fullPath, args, params);
+break;
+default:
+throw new AssertionError(Unsupported function  + fct);
+}
+}
+
+public void doAdd(ColumnFamily cf, ColumnNameBuilder builder, ListTerm 
values, UpdateParameters params) throws InvalidRequestException
+{
+for (int i = 0; i  values.size(); ++i)
+{
+ColumnNameBuilder b = i == values.size() - 1 ? builder : 
builder.copy();
+ByteBuffer name = b.add(values.get(i).getByteBuffer(elements, 
params.variables)).build();
+cf.addColumn(params.makeColumn(name, 
ByteBufferUtil.EMPTY_BYTE_BUFFER));
+}
+}
+
+public void doDiscard(ColumnFamily cf, ColumnNameBuilder builder, 
ListTerm values, UpdateParameters params) throws InvalidRequestException
+{
+for (int i = 0; i  values.size(); ++i)
+{
+ColumnNameBuilder b = i == values.size() - 1 ? builder : 
builder.copy();
+ByteBuffer name = b.add(values.get(i).getByteBuffer(elements, 
params.variables)).build();
+cf.addColumn(params.makeTombstone(name));
+}
+}
+
+public 

[47/50] [abbrv] git commit: Default start_rpc to true in Config

2012-07-27 Thread yukim
Default start_rpc to true in Config


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1cb0ad5c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1cb0ad5c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1cb0ad5c

Branch: refs/heads/cassandra-1.1
Commit: 1cb0ad5c402be4dbfa179f1fc35063c8fc6ef782
Parents: 0091af9
Author: Brandon Williams brandonwilli...@apache.org
Authored: Fri Jul 13 14:53:49 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Fri Jul 13 14:53:49 2012 -0500

--
 src/java/org/apache/cassandra/config/Config.java |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1cb0ad5c/src/java/org/apache/cassandra/config/Config.java
--
diff --git a/src/java/org/apache/cassandra/config/Config.java 
b/src/java/org/apache/cassandra/config/Config.java
index afa1c54..f5f4ef6 100644
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@ -65,7 +65,7 @@ public class Config
 public String listen_address;
 public String broadcast_address;
 
-public Boolean start_rpc = false;
+public Boolean start_rpc = true;
 public String rpc_address;
 public Integer rpc_port = 9160;
 public String rpc_server_type = sync;



[50/50] [abbrv] git commit: add ack count to TimedOutException on writes patch by jbellis; reviewed by slebresne for CASSANDRA-4414

2012-07-27 Thread yukim
add ack count to TimedOutException on writes
patch by jbellis; reviewed by slebresne for CASSANDRA-4414


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c9a13c3c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c9a13c3c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c9a13c3c

Branch: refs/heads/cassandra-1.1
Commit: c9a13c3c452d3e9e49bca158da93f9a9bbae7379
Parents: 2711548
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed Jul 11 18:13:25 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Fri Jul 13 11:32:12 2012 -0500

--
 interface/cassandra.thrift |8 +-
 .../org/apache/cassandra/thrift/Cassandra.java |4 +
 .../org/apache/cassandra/thrift/Constants.java |2 +-
 .../apache/cassandra/thrift/TimedOutException.java |  118 ++-
 .../org/apache/cassandra/cql/QueryProcessor.java   |   17 +--
 .../cql3/statements/ModificationStatement.java |9 +-
 .../org/apache/cassandra/db/CounterColumn.java |2 +-
 .../cassandra/db/CounterMutationVerbHandler.java   |7 +-
 .../apache/cassandra/db/HintedHandOffManager.java  |4 +-
 .../service/AbstractWriteResponseHandler.java  |7 +-
 .../DatacenterSyncWriteResponseHandler.java|   14 ++-
 .../cassandra/service/IWriteResponseHandler.java   |3 +-
 .../org/apache/cassandra/service/StorageProxy.java |   18 +-
 .../cassandra/service/WriteResponseHandler.java|   10 +-
 .../apache/cassandra/thrift/CassandraServer.java   |   17 +--
 15 files changed, 182 insertions(+), 58 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9a13c3c/interface/cassandra.thrift
--
diff --git a/interface/cassandra.thrift b/interface/cassandra.thrift
index 6df9628..1041661 100644
--- a/interface/cassandra.thrift
+++ b/interface/cassandra.thrift
@@ -55,7 +55,7 @@ namespace rb CassandraThrift
 # An effort should be made not to break forward-client-compatibility either
 # (e.g. one should avoid removing obsolete fields from the IDL), but no
 # guarantees in this respect are made by the Cassandra project.
-const string VERSION = 19.32.0
+const string VERSION = 19.33.0
 
 
 #
@@ -140,6 +140,12 @@ exception UnavailableException {
 
 /** RPC timeout was exceeded.  either a node failed mid-operation, or load was 
too high, or the requested op was too large. */
 exception TimedOutException {
+/** 
+ * if a write operation was acknowledged some replicas but not enough to 
+ * satisfy the required ConsistencyLevel, the number of successful 
+ * replies will be given here
+ */
+1: optional i32 acknowledged_by
 }
 
 /** invalid authentication request (invalid keyspace, user does not exist, or 
credentials invalid) */

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9a13c3c/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
--
diff --git 
a/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java 
b/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
index 1c6ec69..ec4982e 100644
--- a/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
+++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
@@ -17817,6 +17817,8 @@ public class Cassandra {
 
 private void readObject(java.io.ObjectInputStream in) throws 
java.io.IOException, ClassNotFoundException {
   try {
+// it doesn't seem like you should have to do this, but java 
serialization is wacky, and doesn't call the default constructor.
+__isset_bit_vector = new BitSet(1);
 read(new org.apache.thrift.protocol.TCompactProtocol(new 
org.apache.thrift.transport.TIOStreamTransport(in)));
   } catch (org.apache.thrift.TException te) {
 throw new java.io.IOException(te);
@@ -34876,6 +34878,8 @@ public class Cassandra {
 
 private void readObject(java.io.ObjectInputStream in) throws 
java.io.IOException, ClassNotFoundException {
   try {
+// it doesn't seem like you should have to do this, but java 
serialization is wacky, and doesn't call the default constructor.
+__isset_bit_vector = new BitSet(1);
 read(new org.apache.thrift.protocol.TCompactProtocol(new 
org.apache.thrift.transport.TIOStreamTransport(in)));
   } catch (org.apache.thrift.TException te) {
 throw new java.io.IOException(te);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9a13c3c/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java
--
diff --git 
a/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java 

[46/50] [abbrv] git commit: Merge branch 'cassandra-1.1' into trunk

2012-07-27 Thread yukim
Merge branch 'cassandra-1.1' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3c92afdd
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3c92afdd
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3c92afdd

Branch: refs/heads/cassandra-1.1
Commit: 3c92afdd8a6d75a23e66cb9d26f616b544112e50
Parents: 1cb0ad5 9f32efa
Author: Brandon Williams brandonwilli...@apache.org
Authored: Sat Jul 14 16:22:14 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Sat Jul 14 16:22:14 2012 -0500

--
 pylib/cqlshlib/cql3handling.py |   28 ++--
 pylib/cqlshlib/cqlhandling.py  |6 +-
 2 files changed, 23 insertions(+), 11 deletions(-)
--




[jira] [Commented] (CASSANDRA-4038) Investigate improving the dynamic snitch with reservoir sampling

2012-07-27 Thread Brandon Williams (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13423924#comment-13423924
 ] 

Brandon Williams commented on CASSANDRA-4038:
-

I'm a bit concerned that shoehorning latency timings into a long from a double 
will always yield zero in a healthy gigabit network where the timings are 
generally fractional.  But, there's a good chance in a situation with such 
similar values their weight is irrelevant after CASSANDRA-3722 anyway.

Have you done any profiling to see if this actually is cheaper than the fixed 
window size?  Specifically I'm worried about receiveTiming becoming more 
expensive.

 Investigate improving the dynamic snitch with reservoir sampling
 

 Key: CASSANDRA-4038
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4038
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Brandon Williams
Assignee: Pavel Yaskevich
 Fix For: 1.2

 Attachments: CASSANDRA-4038.patch


 Dsnitch's UPDATES_PER_INTERVAL and WINDOW_SIZE are chosen somewhat 
 arbitrarily.  A better fit may be something similar to Metric's 
 ExponentiallyDecayingSample, where more recent information is weighted 
 heavier than past information, and reservoir sampling would also be an 
 efficient way of keeping a statistically significant sample rather than 
 refusing updates after UPDATES_PER_INTERVAL and only keeping WINDOW_SIZE 
 amount.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Assigned] (CASSANDRA-4398) Incorrect english for cassandra-cli help

2012-07-27 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-4398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tommy Tynjä reassigned CASSANDRA-4398:
--

Assignee: Tommy Tynjä

 Incorrect english for cassandra-cli help
 

 Key: CASSANDRA-4398
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4398
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Aurelien Derouineau
Assignee: Tommy Tynjä
Priority: Trivial

 Some of the help provided for the CLI is not written correctly.
 For example:
 {{describeDescribe a keyspace and it's column families or 
 column family in current keyspace.}}
 {{drop column family  Remove a column family and it's data.}}
 {{drop keyspace   Remove a keyspace and it's data.}}
 Here all the *it's* should be *its*.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-4427) Restarting a failed bootstrap instajoins the ring

2012-07-27 Thread Sylvain Lebresne (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-4427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylvain Lebresne updated CASSANDRA-4427:


Fix Version/s: (was: 1.0.11)

 Restarting a failed bootstrap instajoins the ring
 -

 Key: CASSANDRA-4427
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4427
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.0.0
Reporter: Brandon Williams
Assignee: Jonathan Ellis
 Fix For: 1.1.3

 Attachments: 4427-v2.txt, 4427-v3.txt, 4427.txt


 I think when we made auto_bootstrap = true the default, we broke the check 
 for the bootstrap flag, creating a dangerous situation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




Git Push Summary

2012-07-27 Thread slebresne
Updated Tags:  refs/tags/1.0.11-tentative [created] 4f0237acd
  refs/tags/1.0.7-tentative [created] 6a1ed6205


[jira] [Commented] (CASSANDRA-4451) add thousand separator when display size

2012-07-27 Thread JIRA

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13423933#comment-13423933
 ] 

Tommy Tynjä commented on CASSANDRA-4451:


This can easily be achieved with java.text.MessageFormat, which also has Locale 
support if desired. I applied this to the MeteredFlusher: 
https://github.com/tommysdk/cassandra/commit/c6ab6e7d0d8a205f89e5c96741449c49130cf078.
 The approach can obviously be applied to other classes as well.

 add thousand separator when display size
 

 Key: CASSANDRA-4451
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4451
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.1.2
Reporter: feng qu
Priority: Minor

 I would like to see size displayed using thousand separator in system log as 
 well as in nodetool compactionstats/cfstats/netstats/tpstats etc. 
 here is an example in system.log
  INFO [OptionalTasks:1] 2012-07-19 10:02:21,137 MeteredFlusher.java (line 62) 
 flushing high-traffic column family CFS(Keyspace='mobilelogks', 
 ColumnFamily='UserNotificationLog') (estimated 1632406241 bytes)
 1,632,406,241 is better to read than 1632406241. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2771) Remove commitlog_rotation_threshold_in_mb

2012-07-27 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13423937#comment-13423937
 ] 

Jonathan Ellis commented on CASSANDRA-2771:
---

It's a public wiki; go ahead and update it.

  Remove commitlog_rotation_threshold_in_mb
 --

 Key: CASSANDRA-2771
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2771
 Project: Cassandra
  Issue Type: Improvement
Reporter: Patricio Echague
Assignee: Patricio Echague
Priority: Minor
  Labels: commitlog
 Fix For: 1.0.0

 Attachments: CASSANDRA-2771-2-trunk.txt, CASSANDRA-2771-3-trunk.txt


 Remove the commitlog segment size config setting, nobody has ever changed it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-4292) Per-disk I/O queues

2012-07-27 Thread Yuki Morishita (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13423951#comment-13423951
 ] 

Yuki Morishita commented on CASSANDRA-4292:
---

Here's the code for choosing disk from attached patch.

{code}
// DiskWriter.java
private ExecutorService selectExecutor(DiskBoundTask task)
{
// sort by available disk space
SortedSetDiskBoundTaskExecutor executors;
synchronized (perDiskTaskExecutors)
{
executors = ImmutableSortedSet.copyOf(perDiskTaskExecutors);
}

// if there is disk with sufficient space and no activity running on it, 
then use it
for (DiskBoundTaskExecutor executor : executors)
{
long spaceAvailable = executor.getEstimatedAvailableSpace();
if (task.getExpectedWriteSize()  spaceAvailable  
executor.getActiveCount() == 0)
return executor;
}

// if not, use the one that has largest free space
if (task.getExpectedWriteSize()  
executors.first().getEstimatedAvailableSpace())
return executors.first();
else
   return task.recalculateWriteSize() ? selectExecutor(task) : null; // 
retry if needed
}
{code}

Before choosing disk, we sort by available disk space, but then choose the one 
that 1) fits for new sstable and 2) has zero task.
If we cannot find, then 3) we choose the one with largest free space.
So I think above code works as you described.

 Per-disk I/O queues
 ---

 Key: CASSANDRA-4292
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4292
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Jonathan Ellis
Assignee: Yuki Morishita
 Fix For: 1.2

 Attachments: 4292-v2.txt, 4292.txt


 As noted in CASSANDRA-809, we have a certain amount of flush (and compaction) 
 threads, which mix and match disk volumes indiscriminately.  It may be worth 
 creating a tight thread - disk affinity, to prevent unnecessary conflict at 
 that level.
 OTOH as SSDs become more prevalent this becomes a non-issue.  Unclear how 
 much pain this actually causes in practice in the meantime.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-4292) Per-disk I/O queues

2012-07-27 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13423953#comment-13423953
 ] 

Jonathan Ellis commented on CASSANDRA-4292:
---

Hmm, may have been looking at the wrong patch.  Will reinspect.

 Per-disk I/O queues
 ---

 Key: CASSANDRA-4292
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4292
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Jonathan Ellis
Assignee: Yuki Morishita
 Fix For: 1.2

 Attachments: 4292-v2.txt, 4292.txt


 As noted in CASSANDRA-809, we have a certain amount of flush (and compaction) 
 threads, which mix and match disk volumes indiscriminately.  It may be worth 
 creating a tight thread - disk affinity, to prevent unnecessary conflict at 
 that level.
 OTOH as SSDs become more prevalent this becomes a non-issue.  Unclear how 
 much pain this actually causes in practice in the meantime.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




Git Push Summary

2012-07-27 Thread slebresne
Updated Tags:  refs/tags/1.0.7-tentative [deleted] 6a1ed6205


[jira] [Commented] (CASSANDRA-4038) Investigate improving the dynamic snitch with reservoir sampling

2012-07-27 Thread Pavel Yaskevich (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13423959#comment-13423959
 ] 

Pavel Yaskevich commented on CASSANDRA-4038:


bq. Have you done any profiling to see if this actually is cheaper than the 
fixed window size? Specifically I'm worried about receiveTiming becoming more 
expensive.

Yes, I did a few profiling tests and I see ~30 ms degradation in receiveTiming 
speed inserting 10 latency records (increased UPDATES_PER_INTERVAL value to 
be fare with the test).

 Investigate improving the dynamic snitch with reservoir sampling
 

 Key: CASSANDRA-4038
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4038
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Brandon Williams
Assignee: Pavel Yaskevich
 Fix For: 1.2

 Attachments: CASSANDRA-4038.patch


 Dsnitch's UPDATES_PER_INTERVAL and WINDOW_SIZE are chosen somewhat 
 arbitrarily.  A better fit may be something similar to Metric's 
 ExponentiallyDecayingSample, where more recent information is weighted 
 heavier than past information, and reservoir sampling would also be an 
 efficient way of keeping a statistically significant sample rather than 
 refusing updates after UPDATES_PER_INTERVAL and only keeping WINDOW_SIZE 
 amount.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-4447) enable jamm for OpenJDK = 1.6.0.23

2012-07-27 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13423967#comment-13423967
 ] 

Sylvain Lebresne commented on CASSANDRA-4447:
-

lgtm, +1

 enable jamm for OpenJDK = 1.6.0.23
 ---

 Key: CASSANDRA-4447
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4447
 Project: Cassandra
  Issue Type: Improvement
  Components: Packaging
 Environment: openjdk
Reporter: Ilya Shipitsin
Assignee: Brandon Williams
Priority: Trivial
 Fix For: 1.1.3

 Attachments: 4447.txt


 we tested jamm with OpenJDK, it works well starting at 1.6.0.23, so I suggest
 --- cassandra-env.sh.dist   2012-07-19 12:24:44.938886154 +0600
 +++ cassandra-env.sh2012-07-19 12:28:34.913886847 +0600
 @@ -119,8 +119,10 @@
  
  # add the jamm javaagent
  check_openjdk=`${JAVA:-java} -version 21 | awk '{if (NR == 2) {print 
 $1}}'`
 -if [ $check_openjdk != OpenJDK ]
 +check_openjdk_is_good_for_jamm=`${JAVA:-java} -version 21 | awk -F 
 _|\ '/1\.6\.0/  $3  23 {print bad }'`
 +if [ $check_openjdk = OpenJDK ]  [ $check_openjdk_is_good_for_jamm = 
 bad ]
  then
 +else 
  JVM_OPTS=$JVM_OPTS -javaagent:$CASSANDRA_HOME/lib/jamm-0.2.5.jar
  fi

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-4467) insufficient space for compaction when upgrade compaction strategy from SizeTiered to Leveled

2012-07-27 Thread Cheng Zhang (JIRA)
Cheng Zhang created CASSANDRA-4467:
--

 Summary: insufficient space for compaction when upgrade compaction 
strategy from SizeTiered to Leveled
 Key: CASSANDRA-4467
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4467
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.0.10
 Environment: Ubuntu,Oracle Java 1.7,Cassandra 1.0.10

Reporter: Cheng Zhang


Cassandra has two data directories as follow:
cassandra-disk0 use about 500G, about 250G free space
cassandra-disk1 use about 500G, about 250G free space
The max data file is about 400G. When I upgrade from 
SizeTieredCompactionStrategy to LeveledCompactionStrategy, there is no space to 
do this, for the free space of every data directory is small than the largest 
data file. But the total free space is enough for compaction.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-4447) enable jamm for OpenJDK = 1.6.0.23

2012-07-27 Thread paul cannon (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-4447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

paul cannon updated CASSANDRA-4447:
---

Attachment: 4447-2.txt

I was going to recommend something like this instead, since at least on a few 
of my machines, java -version is pretty slow, and this would be cleaner.

 enable jamm for OpenJDK = 1.6.0.23
 ---

 Key: CASSANDRA-4447
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4447
 Project: Cassandra
  Issue Type: Improvement
  Components: Packaging
 Environment: openjdk
Reporter: Ilya Shipitsin
Assignee: Brandon Williams
Priority: Trivial
 Fix For: 1.1.3

 Attachments: 4447-2.txt, 4447.txt


 we tested jamm with OpenJDK, it works well starting at 1.6.0.23, so I suggest
 --- cassandra-env.sh.dist   2012-07-19 12:24:44.938886154 +0600
 +++ cassandra-env.sh2012-07-19 12:28:34.913886847 +0600
 @@ -119,8 +119,10 @@
  
  # add the jamm javaagent
  check_openjdk=`${JAVA:-java} -version 21 | awk '{if (NR == 2) {print 
 $1}}'`
 -if [ $check_openjdk != OpenJDK ]
 +check_openjdk_is_good_for_jamm=`${JAVA:-java} -version 21 | awk -F 
 _|\ '/1\.6\.0/  $3  23 {print bad }'`
 +if [ $check_openjdk = OpenJDK ]  [ $check_openjdk_is_good_for_jamm = 
 bad ]
  then
 +else 
  JVM_OPTS=$JVM_OPTS -javaagent:$CASSANDRA_HOME/lib/jamm-0.2.5.jar
  fi

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[2/3] git commit: Merge branch 'cassandra-1.1' into trunk

2012-07-27 Thread brandonwilliams
Merge branch 'cassandra-1.1' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6c521cae
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6c521cae
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6c521cae

Branch: refs/heads/trunk
Commit: 6c521caec460f1528099c58e51197a59acf19cb4
Parents: 9af3b02 5dab451
Author: Brandon Williams brandonwilli...@apache.org
Authored: Fri Jul 27 11:52:03 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Fri Jul 27 11:52:03 2012 -0500

--
 .../org/apache/cassandra/db/CounterColumn.java |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6c521cae/src/java/org/apache/cassandra/db/CounterColumn.java
--



[1/3] git commit: Merge branch 'cassandra-1.1' into trunk

2012-07-27 Thread brandonwilliams
Updated Branches:
  refs/heads/trunk 203d0d109 - d080f6f10


Merge branch 'cassandra-1.1' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d080f6f1
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d080f6f1
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d080f6f1

Branch: refs/heads/trunk
Commit: d080f6f103acb88ed590b9b7ecf6b8ea4631a2c6
Parents: 6c521ca 203d0d1
Author: Brandon Williams brandonwilli...@apache.org
Authored: Fri Jul 27 11:56:12 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Fri Jul 27 11:56:12 2012 -0500

--

--




[3/3] git commit: use slf4j api for logging

2012-07-27 Thread brandonwilliams
use slf4j api for logging


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5dab451a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5dab451a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5dab451a

Branch: refs/heads/trunk
Commit: 5dab451afc6a9b63206bf2428022d641682b60b2
Parents: ccd436c
Author: Yuki Morishita yu...@apache.org
Authored: Fri Jul 27 10:17:18 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Fri Jul 27 11:51:40 2012 -0500

--
 .../org/apache/cassandra/db/CounterColumn.java |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5dab451a/src/java/org/apache/cassandra/db/CounterColumn.java
--
diff --git a/src/java/org/apache/cassandra/db/CounterColumn.java 
b/src/java/org/apache/cassandra/db/CounterColumn.java
index 7871b7c..2ea0779 100644
--- a/src/java/org/apache/cassandra/db/CounterColumn.java
+++ b/src/java/org/apache/cassandra/db/CounterColumn.java
@@ -25,7 +25,8 @@ import java.security.MessageDigest;
 import java.util.concurrent.TimeoutException;
 import java.util.Collection;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.config.DatabaseDescriptor;
@@ -47,7 +48,7 @@ import org.apache.cassandra.utils.*;
  */
 public class CounterColumn extends Column
 {
-private static final Logger logger = Logger.getLogger(CounterColumn.class);
+private static final Logger logger = 
LoggerFactory.getLogger(CounterColumn.class);
 
 protected static final CounterContext contextManager = 
CounterContext.instance();
 



[jira] [Updated] (CASSANDRA-4467) insufficient space for compaction when upgrade compaction strategy from SizeTiered to Leveled

2012-07-27 Thread Cheng Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-4467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Cheng Zhang updated CASSANDRA-4467:
---

Issue Type: Improvement  (was: Bug)

 insufficient space for compaction when upgrade compaction strategy from 
 SizeTiered to Leveled
 -

 Key: CASSANDRA-4467
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4467
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.0.10
 Environment: Ubuntu,Oracle Java 1.7,Cassandra 1.0.10
Reporter: Cheng Zhang

 Cassandra has two data directories as follow:
 cassandra-disk0 use about 500G, about 250G free space
 cassandra-disk1 use about 500G, about 250G free space
 The max data file is about 400G. When I upgrade from 
 SizeTieredCompactionStrategy to LeveledCompactionStrategy, there is no space 
 to do this, for the free space of every data directory is small than the 
 largest data file. But the total free space is enough for compaction.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




Git Push Summary

2012-07-27 Thread brandonwilliams
Updated Branches:
  refs/heads/cassandra-1.1 203d0d109 - ccd436c0f (forced update)


git commit: use slf4j api for logging

2012-07-27 Thread brandonwilliams
Updated Branches:
  refs/heads/cassandra-1.1 ccd436c0f - 8227f43a7


use slf4j api for logging


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8227f43a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8227f43a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8227f43a

Branch: refs/heads/cassandra-1.1
Commit: 8227f43a7553d492b63d297733baef38f1f433ce
Parents: ccd436c
Author: Yuki Morishita yu...@apache.org
Authored: Fri Jul 27 10:17:18 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Fri Jul 27 12:03:55 2012 -0500

--
 .../org/apache/cassandra/db/CounterColumn.java |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8227f43a/src/java/org/apache/cassandra/db/CounterColumn.java
--
diff --git a/src/java/org/apache/cassandra/db/CounterColumn.java 
b/src/java/org/apache/cassandra/db/CounterColumn.java
index 7871b7c..2ea0779 100644
--- a/src/java/org/apache/cassandra/db/CounterColumn.java
+++ b/src/java/org/apache/cassandra/db/CounterColumn.java
@@ -25,7 +25,8 @@ import java.security.MessageDigest;
 import java.util.concurrent.TimeoutException;
 import java.util.Collection;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.config.DatabaseDescriptor;
@@ -47,7 +48,7 @@ import org.apache.cassandra.utils.*;
  */
 public class CounterColumn extends Column
 {
-private static final Logger logger = Logger.getLogger(CounterColumn.class);
+private static final Logger logger = 
LoggerFactory.getLogger(CounterColumn.class);
 
 protected static final CounterContext contextManager = 
CounterContext.instance();
 



[1/2] git commit: Merge branch 'cassandra-1.1' into trunk

2012-07-27 Thread brandonwilliams
Updated Branches:
  refs/heads/trunk d080f6f10 - ca5318d37


Merge branch 'cassandra-1.1' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ca5318d3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ca5318d3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ca5318d3

Branch: refs/heads/trunk
Commit: ca5318d37d352a4422fcc23008b4c839ea43e58c
Parents: d080f6f 8227f43
Author: Brandon Williams brandonwilli...@apache.org
Authored: Fri Jul 27 12:08:07 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Fri Jul 27 12:08:07 2012 -0500

--

--




[2/2] git commit: use slf4j api for logging

2012-07-27 Thread brandonwilliams
use slf4j api for logging


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8227f43a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8227f43a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8227f43a

Branch: refs/heads/trunk
Commit: 8227f43a7553d492b63d297733baef38f1f433ce
Parents: ccd436c
Author: Yuki Morishita yu...@apache.org
Authored: Fri Jul 27 10:17:18 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Fri Jul 27 12:03:55 2012 -0500

--
 .../org/apache/cassandra/db/CounterColumn.java |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8227f43a/src/java/org/apache/cassandra/db/CounterColumn.java
--
diff --git a/src/java/org/apache/cassandra/db/CounterColumn.java 
b/src/java/org/apache/cassandra/db/CounterColumn.java
index 7871b7c..2ea0779 100644
--- a/src/java/org/apache/cassandra/db/CounterColumn.java
+++ b/src/java/org/apache/cassandra/db/CounterColumn.java
@@ -25,7 +25,8 @@ import java.security.MessageDigest;
 import java.util.concurrent.TimeoutException;
 import java.util.Collection;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.config.DatabaseDescriptor;
@@ -47,7 +48,7 @@ import org.apache.cassandra.utils.*;
  */
 public class CounterColumn extends Column
 {
-private static final Logger logger = Logger.getLogger(CounterColumn.class);
+private static final Logger logger = 
LoggerFactory.getLogger(CounterColumn.class);
 
 protected static final CounterContext contextManager = 
CounterContext.instance();
 



[jira] [Updated] (CASSANDRA-3533) TimeoutException when there is a firewall issue.

2012-07-27 Thread Brandon Williams (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brandon Williams updated CASSANDRA-3533:


Attachment: 3533.txt

bq. Thats great, but in cassandra we have DSnitch which can mark nodes down too.

We can't actually mark a node down with the dsnitch, we can just choose to not 
use it (for a while)

bq. Will it make sense for us to poll just before we mark the node up (To 
double check)? 

I looked at doing this, and frankly integrating a check here is pretty scary 
and messy.  For instance we need to report new nodes in handleMajorStateChange 
that sends onJoin events, which _cause_ the initial connection, so to poll we'd 
have to change that, or make an extra connection, neither of which is very 
desirable to put in Gossiper and both of which are scary to put in a minor 
release, in my opinion.  Furthermore, in the case of natural, _temporary_ 
partitions of this kind, there are some things we still want to retry instead 
of failing fast, like streaming.

Instead, in the attached patch, I took a different, more coordinator-based 
approach, that requires the FD report the node as alive as well as confirming 
there is a live outbound connection to the destination before a read/write is 
attempted, otherwise UE is thrown.

 TimeoutException when there is a firewall issue.
 

 Key: CASSANDRA-3533
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3533
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Vijay
Assignee: Brandon Williams
Priority: Minor
 Fix For: 1.1.4

 Attachments: 3533.txt


 When one node in the cluster is not able to talk to the other DC/RAC due to 
 firewall or network related issue (StorageProxy calls fail), and the nodes 
 are NOT marked down because at least one node in the cluster can talk to the 
 other DC/RAC, we get timeoutException instead of throwing a 
 unavailableException.
 The problem with this:
 1) It is hard to monitor/identify these errors.
 2) It is hard to diffrentiate from the client if the node being bad vs a bad 
 query.
 3) when this issue happens we have to wait for at-least the RPC timeout time 
 to know that the query wont succeed.
 Possible Solution: when marking a node down we might want to check if the 
 node is actually alive by trying to communicate to it? So we can be sure that 
 the node is actually alive.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3533) TimeoutException when there is a firewall issue.

2012-07-27 Thread Brandon Williams (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13424048#comment-13424048
 ] 

Brandon Williams commented on CASSANDRA-3533:
-

I'll also note that yes, everything can be ok and UE will be thrown (the 
connection just hasn't established yet, but will on OTC's next attempt) but 
penalizing the client ~100ms to find out instead of just failing out and 
letting them try another coordinator seems like an improvement.

 TimeoutException when there is a firewall issue.
 

 Key: CASSANDRA-3533
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3533
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Vijay
Assignee: Brandon Williams
Priority: Minor
 Fix For: 1.1.4

 Attachments: 3533.txt


 When one node in the cluster is not able to talk to the other DC/RAC due to 
 firewall or network related issue (StorageProxy calls fail), and the nodes 
 are NOT marked down because at least one node in the cluster can talk to the 
 other DC/RAC, we get timeoutException instead of throwing a 
 unavailableException.
 The problem with this:
 1) It is hard to monitor/identify these errors.
 2) It is hard to diffrentiate from the client if the node being bad vs a bad 
 query.
 3) when this issue happens we have to wait for at-least the RPC timeout time 
 to know that the query wont succeed.
 Possible Solution: when marking a node down we might want to check if the 
 node is actually alive by trying to communicate to it? So we can be sure that 
 the node is actually alive.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




git commit: Fix typos in cli help. Patch by Tommy Tynjä, reviewed by brandonwilliams for CASSANDRA-4398

2012-07-27 Thread brandonwilliams
Updated Branches:
  refs/heads/cassandra-1.1 8227f43a7 - 96075b31c


Fix typos in cli help.
Patch by Tommy Tynjä, reviewed by brandonwilliams for CASSANDRA-4398


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/96075b31
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/96075b31
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/96075b31

Branch: refs/heads/cassandra-1.1
Commit: 96075b31c3e2cde777f20367442f1c0cb13c40c1
Parents: 8227f43
Author: Brandon Williams brandonwilli...@apache.org
Authored: Fri Jul 27 13:44:43 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Fri Jul 27 13:44:43 2012 -0500

--
 .../org/apache/cassandra/cli/CliHelp.yaml  |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/96075b31/src/resources/org/apache/cassandra/cli/CliHelp.yaml
--
diff --git a/src/resources/org/apache/cassandra/cli/CliHelp.yaml 
b/src/resources/org/apache/cassandra/cli/CliHelp.yaml
index 017b54e..7426c43 100644
--- a/src/resources/org/apache/cassandra/cli/CliHelp.yaml
+++ b/src/resources/org/apache/cassandra/cli/CliHelp.yaml
@@ -39,9 +39,9 @@ help: |
 del Delete a column, super column or row.
 decrDecrements a counter column.
 describe clusterDescribe the cluster configuration.
-describeDescribe a keyspace and it's column families or 
column family in current keyspace.
-drop column family  Remove a column family and it's data.
-drop keyspace   Remove a keyspace and it's data.
+describeDescribe a keyspace and its column families or 
column family in current keyspace.
+drop column family  Remove a column family and its data.
+drop keyspace   Remove a keyspace and its data.
 drop index  Remove an existing index from specific column.
 get Get rows and columns.
 incrIncrements a counter column.



[1/2] git commit: Merge branch 'cassandra-1.1' into trunk

2012-07-27 Thread brandonwilliams
Updated Branches:
  refs/heads/trunk ca5318d37 - acedc3438


Merge branch 'cassandra-1.1' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/acedc343
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/acedc343
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/acedc343

Branch: refs/heads/trunk
Commit: acedc343821be16c4119400b4ac4e246b890a8ce
Parents: ca5318d 96075b3
Author: Brandon Williams brandonwilli...@apache.org
Authored: Fri Jul 27 13:46:06 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Fri Jul 27 13:46:06 2012 -0500

--
 .../org/apache/cassandra/cli/CliHelp.yaml  |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
--




[2/2] git commit: Fix typos in cli help. Patch by Tommy Tynjä, reviewed by brandonwilliams for CASSANDRA-4398

2012-07-27 Thread brandonwilliams
Fix typos in cli help.
Patch by Tommy Tynjä, reviewed by brandonwilliams for CASSANDRA-4398


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/96075b31
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/96075b31
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/96075b31

Branch: refs/heads/trunk
Commit: 96075b31c3e2cde777f20367442f1c0cb13c40c1
Parents: 8227f43
Author: Brandon Williams brandonwilli...@apache.org
Authored: Fri Jul 27 13:44:43 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Fri Jul 27 13:44:43 2012 -0500

--
 .../org/apache/cassandra/cli/CliHelp.yaml  |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/96075b31/src/resources/org/apache/cassandra/cli/CliHelp.yaml
--
diff --git a/src/resources/org/apache/cassandra/cli/CliHelp.yaml 
b/src/resources/org/apache/cassandra/cli/CliHelp.yaml
index 017b54e..7426c43 100644
--- a/src/resources/org/apache/cassandra/cli/CliHelp.yaml
+++ b/src/resources/org/apache/cassandra/cli/CliHelp.yaml
@@ -39,9 +39,9 @@ help: |
 del Delete a column, super column or row.
 decrDecrements a counter column.
 describe clusterDescribe the cluster configuration.
-describeDescribe a keyspace and it's column families or 
column family in current keyspace.
-drop column family  Remove a column family and it's data.
-drop keyspace   Remove a keyspace and it's data.
+describeDescribe a keyspace and its column families or 
column family in current keyspace.
+drop column family  Remove a column family and its data.
+drop keyspace   Remove a keyspace and its data.
 drop index  Remove an existing index from specific column.
 get Get rows and columns.
 incrIncrements a counter column.



[jira] [Updated] (CASSANDRA-1337) parallelize fetching rows for low-cardinality indexes

2012-07-27 Thread David Alves (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Alves updated CASSANDRA-1337:
---

Attachment: 1137-bugfix.patch

patch that addresses the bugs raised by sylvain. (StoragProxyTest and 
cql_test.py both pass) namely:
- local path counts as one less handler
- enough check moven out of the remote branch
- estimatedKeysPerRange take into account replication factor
- columns.maxIsColumns sets concurrency to 1

still working on the dtest that proves (or disproves that this works) 

I'd like to move the rest of the issues raised by sylvain to another ticket.

 parallelize fetching rows for low-cardinality indexes
 -

 Key: CASSANDRA-1337
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1337
 Project: Cassandra
  Issue Type: Improvement
Reporter: Jonathan Ellis
Assignee: David Alves
 Fix For: 1.2

 Attachments: 
 0001-CASSANDRA-1337-scan-concurrently-depending-on-num-rows.txt, 
 1137-bugfix.patch, CASSANDRA-1337.patch

   Original Estimate: 8h
  Remaining Estimate: 8h

 currently, we read the indexed rows from the first node (in partitioner 
 order); if that does not have enough matching rows, we read the rows from the 
 next, and so forth.
 we should use the statistics fom CASSANDRA-1155 to query multiple nodes in 
 parallel, such that we have a high chance of getting enough rows w/o having 
 to do another round of queries (but, if our estimate is incorrect, we do need 
 to loop and do more rounds until we have enough data or we have fetched from 
 each node).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Comment Edited] (CASSANDRA-1337) parallelize fetching rows for low-cardinality indexes

2012-07-27 Thread David Alves (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13424071#comment-13424071
 ] 

David Alves edited comment on CASSANDRA-1337 at 7/27/12 7:07 PM:
-

patch that addresses the bugs raised by sylvain. (StoragProxyTest and 
cql_test.py both pass) namely:
- local path counts as one less handler
- enough check moved out of the remote branch
- estimatedKeysPerRange take into account replication factor
- columns.maxIsColumns sets concurrency to 1

still working on the dtest that proves (or disproves that this works) but both 
StorageProxyTest and the regression test created by Sylvain pass

I'd like to move the rest of the issues raised by sylvain to another ticket.

  was (Author: dr-alves):
patch that addresses the bugs raised by sylvain. (StoragProxyTest and 
cql_test.py both pass) namely:
- local path counts as one less handler
- enough check moven out of the remote branch
- estimatedKeysPerRange take into account replication factor
- columns.maxIsColumns sets concurrency to 1

still working on the dtest that proves (or disproves that this works) 

I'd like to move the rest of the issues raised by sylvain to another ticket.
  
 parallelize fetching rows for low-cardinality indexes
 -

 Key: CASSANDRA-1337
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1337
 Project: Cassandra
  Issue Type: Improvement
Reporter: Jonathan Ellis
Assignee: David Alves
 Fix For: 1.2

 Attachments: 
 0001-CASSANDRA-1337-scan-concurrently-depending-on-num-rows.txt, 
 1137-bugfix.patch, CASSANDRA-1337.patch

   Original Estimate: 8h
  Remaining Estimate: 8h

 currently, we read the indexed rows from the first node (in partitioner 
 order); if that does not have enough matching rows, we read the rows from the 
 next, and so forth.
 we should use the statistics fom CASSANDRA-1155 to query multiple nodes in 
 parallel, such that we have a high chance of getting enough rows w/o having 
 to do another round of queries (but, if our estimate is incorrect, we do need 
 to loop and do more rounds until we have enough data or we have fetched from 
 each node).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Comment Edited] (CASSANDRA-1337) parallelize fetching rows for low-cardinality indexes

2012-07-27 Thread David Alves (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13424071#comment-13424071
 ] 

David Alves edited comment on CASSANDRA-1337 at 7/27/12 7:09 PM:
-

patch that addresses the bugs raised by sylvain. (StoragProxyTest and 
cql_test.py both pass) namely:
- local path counts as one less handler
- enough check moved out of the remote branch
- estimatedKeysPerRange take into account replication factor
- columns.maxIsColumns sets concurrency to 1

still working on the dtest that proves (or disproves that this works)

I'd like to move the rest of the issues raised by sylvain to another ticket.

  was (Author: dr-alves):
patch that addresses the bugs raised by sylvain. (StoragProxyTest and 
cql_test.py both pass) namely:
- local path counts as one less handler
- enough check moved out of the remote branch
- estimatedKeysPerRange take into account replication factor
- columns.maxIsColumns sets concurrency to 1

still working on the dtest that proves (or disproves that this works) but both 
StorageProxyTest and the regression test created by Sylvain pass

I'd like to move the rest of the issues raised by sylvain to another ticket.
  
 parallelize fetching rows for low-cardinality indexes
 -

 Key: CASSANDRA-1337
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1337
 Project: Cassandra
  Issue Type: Improvement
Reporter: Jonathan Ellis
Assignee: David Alves
 Fix For: 1.2

 Attachments: 
 0001-CASSANDRA-1337-scan-concurrently-depending-on-num-rows.txt, 
 1137-bugfix.patch, CASSANDRA-1337.patch

   Original Estimate: 8h
  Remaining Estimate: 8h

 currently, we read the indexed rows from the first node (in partitioner 
 order); if that does not have enough matching rows, we read the rows from the 
 next, and so forth.
 we should use the statistics fom CASSANDRA-1155 to query multiple nodes in 
 parallel, such that we have a high chance of getting enough rows w/o having 
 to do another round of queries (but, if our estimate is incorrect, we do need 
 to loop and do more rounds until we have enough data or we have fetched from 
 each node).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-4467) insufficient space for compaction when upgrade compaction strategy from SizeTiered to Leveled

2012-07-27 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-4467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-4467:
--

 Priority: Minor  (was: Major)
Affects Version/s: (was: 1.0.10)
   1.0.0
 Assignee: Yuki Morishita

Yuki, can you have a look at what would be required to make compaction able to 
span multiple target directories?

My gut is that this is not a small change, in which case I'd rather mark it 
Later since it's a pretty niche scenario.

 insufficient space for compaction when upgrade compaction strategy from 
 SizeTiered to Leveled
 -

 Key: CASSANDRA-4467
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4467
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.0.0
 Environment: Ubuntu,Oracle Java 1.7,Cassandra 1.0.10
Reporter: Cheng Zhang
Assignee: Yuki Morishita
Priority: Minor

 Cassandra has two data directories as follow:
 cassandra-disk0 use about 500G, about 250G free space
 cassandra-disk1 use about 500G, about 250G free space
 The max data file is about 400G. When I upgrade from 
 SizeTieredCompactionStrategy to LeveledCompactionStrategy, there is no space 
 to do this, for the free space of every data directory is small than the 
 largest data file. But the total free space is enough for compaction.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-4466) ColumnFamilyRecordReader hadoop integration fails with ghost keys

2012-07-27 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13424089#comment-13424089
 ] 

Jonathan Ellis commented on CASSANDRA-4466:
---

setting rows=null is the signal to stop looping over that inputsplit, so that's 
not going to work very well in the general case.

 ColumnFamilyRecordReader hadoop integration fails with ghost keys
 -

 Key: CASSANDRA-4466
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4466
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Affects Versions: 1.1.2
Reporter: Niel Drummond
Priority: Minor
 Fix For: 1.1.4

 Attachments: 4466-stack, 4466-v0.patch


 When running hadoop-cassandra jobs with range queries over ghost keys, the 
 ColumnFamilyRecordReader throws an exception if the last key in a slice_range 
 query is a ghost key. 
 This seems to be related to changes made in #2855 ( 
 https://issues.apache.org/jira/browse/CASSANDRA-2855 ), to prevent ghost keys 
 appearing in a hadoop map. 
 The call stack trace is attached.
 I made a one-line change to ColumnFamilyRecordReader.java, which seems to 
 solve this issue for us.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-4466) ColumnFamilyRecordReader hadoop integration fails with ghost keys

2012-07-27 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-4466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-4466:
--

Fix Version/s: 1.1.4

 ColumnFamilyRecordReader hadoop integration fails with ghost keys
 -

 Key: CASSANDRA-4466
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4466
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Affects Versions: 1.1.2
Reporter: Niel Drummond
Priority: Minor
 Fix For: 1.1.4

 Attachments: 4466-stack, 4466-v0.patch


 When running hadoop-cassandra jobs with range queries over ghost keys, the 
 ColumnFamilyRecordReader throws an exception if the last key in a slice_range 
 query is a ghost key. 
 This seems to be related to changes made in #2855 ( 
 https://issues.apache.org/jira/browse/CASSANDRA-2855 ), to prevent ghost keys 
 appearing in a hadoop map. 
 The call stack trace is attached.
 I made a one-line change to ColumnFamilyRecordReader.java, which seems to 
 solve this issue for us.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[5/5] clean up ioexceptions patch by Aleksey Yeschenko and jbellis for CASSANDRA-2116

2012-07-27 Thread jbellis
http://git-wip-us.apache.org/repos/asf/cassandra/blob/debb15ed/src/java/org/apache/cassandra/utils/MergeIterator.java
--
diff --git a/src/java/org/apache/cassandra/utils/MergeIterator.java 
b/src/java/org/apache/cassandra/utils/MergeIterator.java
index 1eb8b0f..be97803 100644
--- a/src/java/org/apache/cassandra/utils/MergeIterator.java
+++ b/src/java/org/apache/cassandra/utils/MergeIterator.java
@@ -18,7 +18,6 @@
 package org.apache.cassandra.utils;
 
 import java.io.IOException;
-import java.io.IOError;
 import java.util.*;
 
 import com.google.common.collect.AbstractIterator;
@@ -61,7 +60,7 @@ public abstract class MergeIteratorIn,Out extends 
AbstractIteratorOut implem
 }
 catch (IOException e)
 {
-throw new IOError(e);
+throw new RuntimeException(e);
 }
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/debb15ed/test/unit/org/apache/cassandra/SchemaLoader.java
--
diff --git a/test/unit/org/apache/cassandra/SchemaLoader.java 
b/test/unit/org/apache/cassandra/SchemaLoader.java
index eb4f3dc..8c425a4 100644
--- a/test/unit/org/apache/cassandra/SchemaLoader.java
+++ b/test/unit/org/apache/cassandra/SchemaLoader.java
@@ -15,7 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.cassandra;
 
 import java.io.File;
@@ -24,8 +23,12 @@ import java.nio.ByteBuffer;
 import java.util.*;
 import java.util.concurrent.atomic.AtomicInteger;
 
-
 import com.google.common.base.Charsets;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import org.apache.cassandra.config.*;
 import org.apache.cassandra.db.*;
 import org.apache.cassandra.db.commitlog.CommitLog;
@@ -42,11 +45,6 @@ import org.apache.cassandra.service.MigrationManager;
 import org.apache.cassandra.thrift.IndexType;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 public class SchemaLoader
 {
 private static Logger logger = LoggerFactory.getLogger(SchemaLoader.class);
@@ -348,7 +346,7 @@ public class SchemaLoader
 return cfmd;
 }
 
-public static void cleanupAndLeaveDirs() throws IOException
+public static void cleanupAndLeaveDirs()
 {
 mkdirs();
 cleanup();
@@ -356,7 +354,7 @@ public class SchemaLoader
 CommitLog.instance.resetUnsafe(); // cleanup screws w/ CommitLog, this 
brings it back to safe state
 }
 
-public static void cleanup() throws IOException
+public static void cleanup()
 {
 // clean up commitlog
 String[] directoryNames = { DatabaseDescriptor.getCommitLogLocation(), 
};
@@ -382,14 +380,7 @@ public class SchemaLoader
 
 public static void mkdirs()
 {
-try
-{
-DatabaseDescriptor.createAllDirectories();
-}
-catch (IOException e)
-{
-throw new RuntimeException(e);
-}
+DatabaseDescriptor.createAllDirectories();
 }
 
 protected void insertData(String keyspace, String columnFamily, int 
offset, int numberOfRows) throws IOException

http://git-wip-us.apache.org/repos/asf/cassandra/blob/debb15ed/test/unit/org/apache/cassandra/Util.java
--
diff --git a/test/unit/org/apache/cassandra/Util.java 
b/test/unit/org/apache/cassandra/Util.java
index d783413..336755c 100644
--- a/test/unit/org/apache/cassandra/Util.java
+++ b/test/unit/org/apache/cassandra/Util.java
@@ -250,7 +250,7 @@ public class Util
 return CompactionManager.instance.submitUserDefined(cfs, descriptors, 
Integer.MAX_VALUE);
 }
 
-public static void compact(ColumnFamilyStore cfs, 
CollectionSSTableReader sstables, boolean forceDeserialize) throws IOException
+public static void compact(ColumnFamilyStore cfs, 
CollectionSSTableReader sstables, boolean forceDeserialize)
 {
 CompactionTask task = new CompactionTask(cfs, sstables, (int) 
(System.currentTimeMillis() / 1000) - cfs.metadata.getGcGraceSeconds());
 task.isUserDefined(forceDeserialize);
@@ -270,7 +270,7 @@ public class Util
 {
 callable.call();
 }
-catch (Exception e)
+catch (Throwable e)
 {
 assert e.getClass().equals(exception) : e.getClass().getName() +  
is not  + exception.getName();
 thrown = true;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/debb15ed/test/unit/org/apache/cassandra/db/DirectoriesTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/DirectoriesTest.java 

[1/5] git commit: replace FBUtilities.unchecked with Throwables.propagate

2012-07-27 Thread jbellis
Updated Branches:
  refs/heads/trunk acedc3438 - 3d23188a0


replace FBUtilities.unchecked with Throwables.propagate


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3d23188a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3d23188a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3d23188a

Branch: refs/heads/trunk
Commit: 3d23188a0e7a526992aa3dcb756e75d7d0870fcc
Parents: debb15e
Author: Jonathan Ellis jbel...@apache.org
Authored: Fri Jul 27 15:46:49 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Fri Jul 27 15:46:49 2012 -0500

--
 .../cassandra/streaming/IncomingStreamReader.java  |4 ++--
 .../org/apache/cassandra/utils/FBUtilities.java|6 +-
 .../apache/cassandra/utils/WrappedRunnable.java|4 +++-
 3 files changed, 6 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3d23188a/src/java/org/apache/cassandra/streaming/IncomingStreamReader.java
--
diff --git a/src/java/org/apache/cassandra/streaming/IncomingStreamReader.java 
b/src/java/org/apache/cassandra/streaming/IncomingStreamReader.java
index 43d053e..1e5553a 100644
--- a/src/java/org/apache/cassandra/streaming/IncomingStreamReader.java
+++ b/src/java/org/apache/cassandra/streaming/IncomingStreamReader.java
@@ -23,6 +23,7 @@ import java.net.InetSocketAddress;
 import java.net.Socket;
 import java.util.Collections;
 
+import com.google.common.base.Throwables;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -40,7 +41,6 @@ import org.apache.cassandra.service.StorageService;
 import org.apache.cassandra.streaming.compress.CompressedInputStream;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.BytesReadTracker;
-import org.apache.cassandra.utils.FBUtilities;
 import org.apache.cassandra.utils.Pair;
 import com.ning.compress.lzf.LZFInputStream;
 
@@ -176,7 +176,7 @@ public class IncomingStreamReader
 if (e instanceof IOException)
 throw (IOException) e;
 else
-throw FBUtilities.unchecked(e);
+throw Throwables.propagate(e);
 }
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3d23188a/src/java/org/apache/cassandra/utils/FBUtilities.java
--
diff --git a/src/java/org/apache/cassandra/utils/FBUtilities.java 
b/src/java/org/apache/cassandra/utils/FBUtilities.java
index 38bf47b..04a832a 100644
--- a/src/java/org/apache/cassandra/utils/FBUtilities.java
+++ b/src/java/org/apache/cassandra/utils/FBUtilities.java
@@ -34,6 +34,7 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
 import com.google.common.base.Joiner;
+import com.google.common.base.Throwables;
 import com.google.common.collect.AbstractIterator;
 import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
@@ -597,9 +598,4 @@ public class FBUtilities
buffer.getData().length, buffer.getLength(), 
size, object);
 return buffer.getData();
 }
-
-public static RuntimeException unchecked(Throwable e)
-{
-return e instanceof RuntimeException ? (RuntimeException) e : new 
RuntimeException(e);
-}
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3d23188a/src/java/org/apache/cassandra/utils/WrappedRunnable.java
--
diff --git a/src/java/org/apache/cassandra/utils/WrappedRunnable.java 
b/src/java/org/apache/cassandra/utils/WrappedRunnable.java
index bee0599..1de7a46 100644
--- a/src/java/org/apache/cassandra/utils/WrappedRunnable.java
+++ b/src/java/org/apache/cassandra/utils/WrappedRunnable.java
@@ -17,6 +17,8 @@
  */
 package org.apache.cassandra.utils;
 
+import com.google.common.base.Throwables;
+
 public abstract class WrappedRunnable implements Runnable
 {
 public final void run()
@@ -27,7 +29,7 @@ public abstract class WrappedRunnable implements Runnable
 }
 catch (Exception e)
 {
-throw FBUtilities.unchecked(e);
+throw Throwables.propagate(e);
 }
 }
 



[jira] [Commented] (CASSANDRA-2116) Separate out filesystem errors from generic IOErrors

2012-07-27 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13424135#comment-13424135
 ] 

Jonathan Ellis commented on CASSANDRA-2116:
---

Okay.  Made some minor updates to v6 and committed.

Still to fix:
- SequentialWriter has a lot of IOExceptions that should be converted to FSWE


 Separate out filesystem errors from generic IOErrors
 

 Key: CASSANDRA-2116
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2116
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Chris Goffinet
Assignee: Aleksey Yeschenko
 Fix For: 1.2

 Attachments: 
 0001-Issue-2116-Replace-some-IOErrors-with-more-informati.patch, 
 0001-Separate-out-filesystem-errors-from-generic-IOErrors.patch, 2116-v5.txt, 
 CASSANDRA-2116-v3.patch, CASSANDRA-2116-v4.patch, CASSANDRA-2116-v6.patch


 We throw IOErrors everywhere today in the codebase. We should separate out 
 specific errors such as (reading, writing) from filesystem into FSReadError 
 and FSWriteError. This makes it possible in the next ticket to allow certain 
 failure modes (kill the server if reads or writes fail to disk).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-4292) Per-disk I/O queues

2012-07-27 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13424149#comment-13424149
 ] 

Jonathan Ellis commented on CASSANDRA-4292:
---

Can you rebase post-CASSANDRA-2116?

 Per-disk I/O queues
 ---

 Key: CASSANDRA-4292
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4292
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Jonathan Ellis
Assignee: Yuki Morishita
 Fix For: 1.2

 Attachments: 4292-v2.txt, 4292.txt


 As noted in CASSANDRA-809, we have a certain amount of flush (and compaction) 
 threads, which mix and match disk volumes indiscriminately.  It may be worth 
 creating a tight thread - disk affinity, to prevent unnecessary conflict at 
 that level.
 OTOH as SSDs become more prevalent this becomes a non-issue.  Unclear how 
 much pain this actually causes in practice in the meantime.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-4427) Restarting a failed bootstrap instajoins the ring

2012-07-27 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13424177#comment-13424177
 ] 

Jonathan Ellis commented on CASSANDRA-4427:
---

bq. I believe the schemaPresent condition shouldn't be negated

Right, fix pushed to same github branch.

bq. I would have put the initialization fo Schema.emptyVersion in a static 
block to make it explicit that it's a one time initialization

I thought you couldn't declare emptyVersion final that way...  I was wrong, the 
compiler is smart enough to recognize the static block.  Also fixed.

bq. it could be nice to also log whether we're going to boostrap or not and why 
in the other case.

Added a debug line.

bq. exclude ourselves when we check for schemaPresent

Done.  (Since we can't have one ourselves unless another does too -- or unless 
we already joined the ring successfully -- there is no loss of correctness.)

bq. this feels a bit bigger than what I'm plainly confortable pushing in 1.0 at 
this point

+1, let's leave it as a known issue in 1.0.

 Restarting a failed bootstrap instajoins the ring
 -

 Key: CASSANDRA-4427
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4427
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.0.0
Reporter: Brandon Williams
Assignee: Jonathan Ellis
 Fix For: 1.1.3

 Attachments: 4427-v2.txt, 4427-v3.txt, 4427.txt


 I think when we made auto_bootstrap = true the default, we broke the check 
 for the bootstrap flag, creating a dangerous situation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2771) Remove commitlog_rotation_threshold_in_mb

2012-07-27 Thread Tuure Laurinolli (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13424215#comment-13424215
 ] 

Tuure Laurinolli commented on CASSANDRA-2771:
-

Is there some other documentation besides the wiki? It would seem pretty useful 
to have version-specific documentation that would e.g. list all configuration 
parameters that are available in a given version, together with their meanings.

As you say, the wiki is public (although apparently not editable without yet 
another login), and thus perhaps not the best reference for configuration 
parameters.

  Remove commitlog_rotation_threshold_in_mb
 --

 Key: CASSANDRA-2771
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2771
 Project: Cassandra
  Issue Type: Improvement
Reporter: Patricio Echague
Assignee: Patricio Echague
Priority: Minor
  Labels: commitlog
 Fix For: 1.0.0

 Attachments: CASSANDRA-2771-2-trunk.txt, CASSANDRA-2771-3-trunk.txt


 Remove the commitlog segment size config setting, nobody has ever changed it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira