[jira] Created: (CASSANDRA-1798) Simple GUI tool to monitor and manage clusters

2010-12-01 Thread Gary Dusbabek (JIRA)
Simple GUI tool to monitor and manage clusters
--

 Key: CASSANDRA-1798
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1798
 Project: Cassandra
  Issue Type: Task
  Components: Contrib
Reporter: Gary Dusbabek
Assignee: Gary Dusbabek
Priority: Minor


I wrote a simple swing gui tool that can monitor different cluster properties.  
See https://github.com/gdusbabek/casserole and 
http://www.onemanclapping.org/2010/12/introducing-casserole.html.

The purpose of this ticket is to gauge interest in moving it into 
cassandra/contrib.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



svn commit: r1041025 - in /cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra: cli/CliClient.java cli/CliOptions.java db/Memtable.java io/sstable/SSTableScanner.java locator/DynamicEndpoin

2010-12-01 Thread jbellis
Author: jbellis
Date: Wed Dec  1 14:43:24 2010
New Revision: 1041025

URL: http://svn.apache.org/viewvc?rev=1041025view=rev
Log:
move fields to locals or static fields where possible
patch by Dave Brosius; reviewed by jbellis for CASSANDRA-1793

Modified:

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliClient.java

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliOptions.java

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Memtable.java

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/io/sstable/SSTableScanner.java

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/tools/ClusterCmd.java

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/tools/NodeProbe.java

Modified: 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliClient.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliClient.java?rev=1041025r1=1041024r2=1041025view=diff
==
--- 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliClient.java
 (original)
+++ 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliClient.java
 Wed Dec  1 14:43:24 2010
@@ -89,6 +89,7 @@ public class CliClient extends CliUserHe
 PLACEMENT_STRATEGY,
 STRATEGY_OPTIONS
 }
+private static final String DEFAULT_PLACEMENT_STRATEGY = 
org.apache.cassandra.locator.SimpleStrategy;
 
 private Cassandra.Client thriftClient = null;
 private CliSessionState sessionState  = null;
@@ -97,7 +98,6 @@ public class CliClient extends CliUserHe
 private MapString, KsDef keyspacesMap = new HashMapString, KsDef();
 private MapString, AbstractType cfKeysComparators;
 
-private final String DEFAULT_PLACEMENT_STRATEGY = 
org.apache.cassandra.locator.SimpleStrategy;
 
 public CliClient(CliSessionState cliSessionState, Cassandra.Client 
thriftClient)
 {

Modified: 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliOptions.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliOptions.java?rev=1041025r1=1041024r2=1041025view=diff
==
--- 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliOptions.java
 (original)
+++ 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliOptions.java
 Wed Dec  1 14:43:24 2010
@@ -27,7 +27,6 @@ import org.apache.commons.cli.*;
 public class CliOptions {
 
 private static Options options = null; // Info about command line options
-private CommandLine cmd = null;// Command Line arguments
 
 // Command line options
 private static final String HOST_OPTION = host;
@@ -72,7 +71,78 @@ public class CliOptions {
 CommandLineParser parser = new PosixParser();
 try
 {
-cmd = parser.parse(options, args);
+CommandLine cmd = parser.parse(options, args);
+
+if (!cmd.hasOption(HOST_OPTION))
+{
+// host name not specified in command line.
+// In this case, we don't implicitly connect at CLI startup. 
In this case,
+// the user must use the connect CLI statement to connect.
+//
+css.hostName = null;
+
+// HelpFormatter formatter = new HelpFormatter();
+// formatter.printHelp(java 
com.facebook.infrastructure.cli.CliMain , options);
+// System.exit(1);
+}
+else 
+{
+css.hostName = cmd.getOptionValue(HOST_OPTION);
+}
+
+// Look to see if frame has been specified
+if (cmd.hasOption(UNFRAME_OPTION))
+{
+css.framed = false;
+}
+
+// Look to see if frame has been specified
+if (cmd.hasOption(DEBUG_OPTION))
+{
+css.debug = true;
+}
+
+// Look for optional args.
+if (cmd.hasOption(PORT_OPTION))
+{
+css.thriftPort = 
Integer.parseInt(cmd.getOptionValue(PORT_OPTION));
+}
+else
+{
+css.thriftPort = DEFAULT_THRIFT_PORT;
+}
+ 
+// Look for authentication credentials (username and password)
+if (cmd.hasOption(USERNAME_OPTION)) 
+{
+   css.username = cmd.getOptionValue(USERNAME_OPTION);
+}
+if (cmd.hasOption(PASSWORD_OPTION))
+{
+   css.password = cmd.getOptionValue(PASSWORD_OPTION);
+

[jira] Resolved: (CASSANDRA-1793) [patch] cleanup minor field usage that can be moved to static or locals

2010-12-01 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis resolved CASSANDRA-1793.
---

   Resolution: Fixed
Fix Version/s: 0.7.0
 Reviewer: jbellis
 Assignee: Dave Brosius

committed, thanks!

 [patch] cleanup minor field usage that can be moved to static or locals
 ---

 Key: CASSANDRA-1793
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1793
 Project: Cassandra
  Issue Type: Improvement
 Environment: ubuntu 10.10 jdk1.6.17 ant1.8
Reporter: Dave Brosius
Assignee: Dave Brosius
Priority: Trivial
 Fix For: 0.7.0

 Attachments: cleanup_fields.diff

   Original Estimate: 1h
  Remaining Estimate: 1h

 minor cleanups to move fields to statics, or locals to give the gc a small 
 helping hand.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



svn commit: r1041027 - /cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamily.java

2010-12-01 Thread jbellis
Author: jbellis
Date: Wed Dec  1 14:45:51 2010
New Revision: 1041027

URL: http://svn.apache.org/viewvc?rev=1041027view=rev
Log:
replace loop over keys + lookup w/ loop over map entries
patch by Dave Brosius; reviewed by jbellis for CASSANDRA-1794

Modified:

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamily.java

Modified: 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamily.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamily.java?rev=1041027r1=1041026r2=1041027view=diff
==
--- 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamily.java
 (original)
+++ 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamily.java
 Wed Dec  1 14:45:51 2010
@@ -24,7 +24,6 @@ import java.security.NoSuchAlgorithmExce
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.Map;
-import java.util.Set;
 import java.util.SortedSet;
 import java.util.concurrent.ConcurrentSkipListMap;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -302,11 +301,11 @@ public class ColumnFamily implements ICo
 // the delete tombstone, since cfNew was generated by CF.resolve, which
 // takes care of those for us.)
 MapByteBuffer, IColumn columns = cfComposite.getColumnsMap();
-SetByteBuffer cNames = columns.keySet();
-for (ByteBuffer cName : cNames)
+for (Map.EntryByteBuffer, IColumn entry : columns.entrySet())
 {
+ByteBuffer cName = entry.getKey();
 IColumn columnInternal = this.columns.get(cName);
-IColumn columnExternal = columns.get(cName);
+IColumn columnExternal = entry.getValue();
 if (columnInternal == null)
 {
 cfDiff.addColumn(columnExternal);




svn commit: r1041028 - /cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/gms/Gossiper.java

2010-12-01 Thread jbellis
Author: jbellis
Date: Wed Dec  1 14:47:30 2010
New Revision: 1041028

URL: http://svn.apache.org/viewvc?rev=1041028view=rev
Log:
s/Hashtable/MashMap/
patch by Dave Brosius; reviewed by jbellis for CASSANDRA-1795

Modified:

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/gms/Gossiper.java

Modified: 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/gms/Gossiper.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/gms/Gossiper.java?rev=1041028r1=1041027r2=1041028view=diff
==
--- 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/gms/Gossiper.java
 (original)
+++ 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/gms/Gossiper.java
 Wed Dec  1 14:47:30 2010
@@ -420,7 +420,7 @@ public class Gossiper implements IFailur
 
 if (!justRemovedEndpoints_.isEmpty())
 {
-HashtableInetAddress, Long copy = new HashtableInetAddress, 
Long(justRemovedEndpoints_);
+MapInetAddress, Long copy = new HashMapInetAddress, 
Long(justRemovedEndpoints_);
 for (Map.EntryInetAddress, Long entry : copy.entrySet())
 {
 if ((now - entry.getValue())  StorageService.RING_DELAY)




[jira] Resolved: (CASSANDRA-1795) [patch] avoid unnecessary use of synchronized collection for non escaped local varables

2010-12-01 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis resolved CASSANDRA-1795.
---

   Resolution: Fixed
Fix Version/s: 0.7.0
 Reviewer: jbellis
 Assignee: Dave Brosius

committed, thanks!

 [patch] avoid unnecessary use of synchronized collection for non escaped 
 local varables
 ---

 Key: CASSANDRA-1795
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1795
 Project: Cassandra
  Issue Type: Improvement
 Environment: ubuntu jdk1..6.17 ant 1.8
Reporter: Dave Brosius
Assignee: Dave Brosius
Priority: Trivial
 Fix For: 0.7.0

 Attachments: avoid_local_sync_collections.diff

   Original Estimate: 1h
  Remaining Estimate: 1h

 code uses a Hashtable even tho the collection is a local variable that is not 
 escaped from the method. The synchronization is not needed, switch to HashMap.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (CASSANDRA-1796) [patch] avoid npes when parsing potentially null strings-Integers

2010-12-01 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-1796:
--

 Reviewer: urandom
  Component/s: API
Affects Version/s: 0.8
Fix Version/s: 0.8
 Assignee: Dave Brosius

 [patch] avoid npes when parsing potentially null strings-Integers
 --

 Key: CASSANDRA-1796
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1796
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 0.8
 Environment: ubuntu 10.10 jdk 1.6.17 ant1.8
Reporter: Dave Brosius
Assignee: Dave Brosius
Priority: Trivial
 Fix For: 0.8

 Attachments: avoid_npes.diff

   Original Estimate: 1h
  Remaining Estimate: 1h

 code potentially performs Integer.parseInt(null) which throws NPEs, patch 
 guards against this, and returns 0 instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



svn commit: r1041029 - /cassandra/branches/cassandra-0.7/CHANGES.txt

2010-12-01 Thread jbellis
Author: jbellis
Date: Wed Dec  1 14:51:18 2010
New Revision: 1041029

URL: http://svn.apache.org/viewvc?rev=1041029view=rev
Log:
update CHANGES

Modified:
cassandra/branches/cassandra-0.7/CHANGES.txt

Modified: cassandra/branches/cassandra-0.7/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/CHANGES.txt?rev=1041029r1=1041028r2=1041029view=diff
==
--- cassandra/branches/cassandra-0.7/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.7/CHANGES.txt Wed Dec  1 14:51:18 2010
@@ -21,6 +21,7 @@ dev
  * add flush for each append to periodic commitlog mode; added
periodic_without_flush option to disable this (CASSANDRA-1780)
  * close file handle used for post-flush truncate (CASSANDRA-1790)
+ * various code cleanup (CASSANDRA-1793, -1794, -1795)
 
 
 0.7.0-rc1




[jira] Commented: (CASSANDRA-1796) [patch] avoid npes when parsing potentially null strings-Integers

2010-12-01 Thread Eric Evans (JIRA)

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

Eric Evans commented on CASSANDRA-1796:
---

Did you actually get an NPE here, or is this a hypothetical? I ask because this 
is all inlined in the grammar, there should be no way for it to throw since the 
only way this code can run is if the rule matches and INTEGER returns something 
parseable by Integer.parseInt.  

Actually, if for some reason this _did_ happen, it would constitute a serious 
bug in ANTlr, at which point an NPE would probably be preferable to assigning 
the value zero.

I think I'd rather leave things more concise (and readable) than protect 
against something that won't happen.

 [patch] avoid npes when parsing potentially null strings-Integers
 --

 Key: CASSANDRA-1796
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1796
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 0.8
 Environment: ubuntu 10.10 jdk 1.6.17 ant1.8
Reporter: Dave Brosius
Assignee: Dave Brosius
Priority: Trivial
 Fix For: 0.8

 Attachments: avoid_npes.diff

   Original Estimate: 1h
  Remaining Estimate: 1h

 code potentially performs Integer.parseInt(null) which throws NPEs, patch 
 guards against this, and returns 0 instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Resolved: (CASSANDRA-1796) [patch] avoid npes when parsing potentially null strings-Integers

2010-12-01 Thread Eric Evans (JIRA)

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

Eric Evans resolved CASSANDRA-1796.
---

Resolution: Won't Fix

 [patch] avoid npes when parsing potentially null strings-Integers
 --

 Key: CASSANDRA-1796
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1796
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 0.8
 Environment: ubuntu 10.10 jdk 1.6.17 ant1.8
Reporter: Dave Brosius
Assignee: Dave Brosius
Priority: Trivial
 Fix For: 0.8

 Attachments: avoid_npes.diff

   Original Estimate: 1h
  Remaining Estimate: 1h

 code potentially performs Integer.parseInt(null) which throws NPEs, patch 
 guards against this, and returns 0 instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Resolved: (CASSANDRA-1765) Compare serialization metrics between a few frameworks.

2010-12-01 Thread Gary Dusbabek (JIRA)

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

Gary Dusbabek resolved CASSANDRA-1765.
--

Resolution: Not A Problem

None of the libraries distinguished themselves as being a particularly crappy 
choice for serialization.

 Compare serialization metrics between a few frameworks.
 ---

 Key: CASSANDRA-1765
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1765
 Project: Cassandra
  Issue Type: Task
Reporter: Gary Dusbabek
Assignee: Gary Dusbabek
Priority: Minor
 Fix For: 0.8

 Attachments: 
 0001-CASSANDRA-1765-allocate-memory-for-binary-deserializ.patch, 
 0001-inserts-codes-for-properly-calling-full-GC-into-Mess.patch, 
 MessageSerializationThriftTest.java, 
 v1-0001-CASSANDRA-1765-create-reader-writer-once.txt, 
 v1-0001-CASSANDRA-1765-don-t-ser-dser-schema-string.txt, 
 v1-0001-IDL-and-RangeSliceCommand-alteration.txt, 
 v1-0002-msgpack-dependencies.txt, v1-0003-serialization-tests.txt, 
 v1-0004-jvm-warmup-and-other-improvements.-by-Muga-Nishizawa.txt, 
 v2-0001-CASSANDRA-1765-create-reader-writer-once.txt, 
 v2-0001-IDL-and-RangeSliceCommand-alteration.txt, 
 v2-0002-msgpack-dependencies.txt, v2-0003-serialization-tests.txt, 
 v2-0004-jvm-warmup-and-other-improvements.-by-Muga-Nishizawa.txt, 
 v2-0005-don-t-bother-with-sending-schema-on-avro-tests.-patch-.txt, 
 v2-0006-allocate-memory-more-efficently-for-msgpack.-patch-by-.txt


 Compare serialization performance of Cassandra (ICompactSerializer), Thrift, 
 Avro and Messagepack.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (CASSANDRA-1799) Allow session level 'assume' functionality for client

2010-12-01 Thread T Jake Luciani (JIRA)
Allow session level 'assume' functionality for client
-

 Key: CASSANDRA-1799
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1799
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Affects Versions: 0.7.0 rc 1
Reporter: T Jake Luciani



Currently with the cassandra-cli if I want to see what actual values cassandra 
holds I need to do:

 assume Standard2 COMPARATOR as utf8
 assume Standard2 VALIDATOR as utf8

Most types support toString rather, since this is a client I think it makes 
sense to default display values as utf8 and fallback to bytes on error.

Alternately we could support  the syntax 'assume default COMPARATOR as utf8' on 
the session.






-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (CASSANDRA-1799) Allow session level 'assume' functionality for client

2010-12-01 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-1799:
---

I think a default comparator would not be very useful in most cases.

But I would like to see the cli save/load assumptions made between sessions.

 Allow session level 'assume' functionality for client
 -

 Key: CASSANDRA-1799
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1799
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Affects Versions: 0.7.0 rc 1
Reporter: T Jake Luciani

 Currently with the cassandra-cli if I want to see what actual values 
 cassandra holds I need to do:
  assume Standard2 COMPARATOR as utf8
  assume Standard2 VALIDATOR as utf8
 Most types support toString rather, since this is a client I think it makes 
 sense to default display values as utf8 and fallback to bytes on error.
 Alternately we could support  the syntax 'assume default COMPARATOR as utf8' 
 on the session.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



svn commit: r1041105 - in /cassandra/branches/cassandra-0.6: ./ src/java/org/apache/cassandra/db/ src/java/org/apache/cassandra/io/ src/java/org/apache/cassandra/service/ src/java/org/apache/cassandra

2010-12-01 Thread jbellis
Author: jbellis
Date: Wed Dec  1 17:50:06 2010
New Revision: 1041105

URL: http://svn.apache.org/viewvc?rev=1041105view=rev
Log:
avoid opening readers on anticompacted to-be-streamed temporary files
patch by thobbs; reviewed by mdennis and jbellis for CASSANDRA-1752

Modified:
cassandra/branches/cassandra-0.6/CHANGES.txt

cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/CompactionManager.java
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/Table.java

cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/io/SSTableWriter.java

cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/AntiEntropyService.java

cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/streaming/StreamOut.java

Modified: cassandra/branches/cassandra-0.6/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/CHANGES.txt?rev=1041105r1=1041104r2=1041105view=diff
==
--- cassandra/branches/cassandra-0.6/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.6/CHANGES.txt Wed Dec  1 17:50:06 2010
@@ -10,6 +10,8 @@
  * detect and warn when obsolete version of JNA is present (CASSANDRA-1770)
  * fix live-column-count of slice ranges including tombstoned supercolumn 
with live subcolumn (CASSANDRA-1591)
+ * avoid opening readers on anticompacted to-be-streamed temporary
+   files (CASSANDRA-1752)
 
 
 0.6.8

Modified: 
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/CompactionManager.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/CompactionManager.java?rev=1041105r1=1041104r2=1041105view=diff
==
--- 
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/CompactionManager.java
 (original)
+++ 
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/CompactionManager.java
 Wed Dec  1 17:50:06 2010
@@ -133,11 +133,11 @@ public class CompactionManager implement
 return executor.submit(runnable);
 }
 
-public FutureListSSTableReader submitAnticompaction(final 
ColumnFamilyStore cfStore, final CollectionRange ranges, final InetAddress 
target)
+public FutureListString submitAnticompaction(final ColumnFamilyStore 
cfStore, final CollectionRange ranges, final InetAddress target)
 {
-CallableListSSTableReader callable = new 
CallableListSSTableReader()
+CallableListString callable = new CallableListString()
 {
-public ListSSTableReader call() throws IOException
+public ListString call() throws IOException
 {
 return doAntiCompaction(cfStore, cfStore.getSSTables(), 
ranges, target);
 }
@@ -320,18 +320,7 @@ public class CompactionManager implement
 return sstables.size();
 }
 
-/**
- * This function is used to do the anti compaction process , it spits out 
the file which has keys that belong to a given range
- * If the target is not specified it spits out the file as a compacted 
file with the unecessary ranges wiped out.
- *
- * @param cfs
- * @param sstables
- * @param ranges
- * @param target
- * @return
- * @throws java.io.IOException
- */
-private ListSSTableReader doAntiCompaction(ColumnFamilyStore cfs, 
CollectionSSTableReader sstables, CollectionRange ranges, InetAddress 
target)
+private SSTableWriter antiCompactionHelper(ColumnFamilyStore cfs, 
CollectionSSTableReader sstables, CollectionRange ranges, InetAddress 
target)
 throws IOException
 {
 Table table = cfs.getTable();
@@ -348,10 +337,9 @@ public class CompactionManager implement
 // compacting for streaming: send to subdirectory
 compactionFileLocation = compactionFileLocation + File.separator + 
DatabaseDescriptor.STREAMING_SUBDIR;
 }
-ListSSTableReader results = new ArrayListSSTableReader();
 
 long startTime = System.currentTimeMillis();
-long totalkeysWritten = 0;
+long totalKeysWritten = 0;
 
 int expectedBloomFilterSize = 
Math.max(DatabaseDescriptor.getIndexInterval(), 
(int)(SSTableReader.getApproximateKeyCount(sstables) / 2));
 if (logger.isDebugEnabled())
@@ -364,11 +352,6 @@ public class CompactionManager implement
 
 try
 {
-if (!nni.hasNext())
-{
-return results;
-}
-
 while (nni.hasNext())
 {
 CompactionIterator.CompactedRow row = nni.next();
@@ -379,7 +362,7 @@ public class CompactionManager implement
 writer = new SSTableWriter(newFilename, 
expectedBloomFilterSize, StorageService.getPartitioner());
 }
 writer.append(row.key, row.buffer);
-

buildbot failure in ASF Buildbot on cassandra-0.6

2010-12-01 Thread buildbot
The Buildbot has detected a new failure of cassandra-0.6 on ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/cassandra-0.6/builds/236

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: isis_ubuntu

Build Reason: 
Build Source Stamp: [branch cassandra/branches/cassandra-0.6] 1041105
Blamelist: jbellis

BUILD FAILED: failed compile

sincerely,
 -The Buildbot



svn commit: r1041107 - in /cassandra/branches/cassandra-0.7: ./ interface/thrift/gen-java/org/apache/cassandra/thrift/

2010-12-01 Thread jbellis
Author: jbellis
Date: Wed Dec  1 17:51:10 2010
New Revision: 1041107

URL: http://svn.apache.org/viewvc?rev=1041107view=rev
Log:
merge from 0.6

Modified:
cassandra/branches/cassandra-0.7/   (props changed)

cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
   (props changed)

cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
   (props changed)

cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
   (props changed)

cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
   (props changed)

cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
   (props changed)

Propchange: cassandra/branches/cassandra-0.7/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec  1 17:51:10 2010
@@ -1,4 +1,4 @@
-/cassandra/branches/cassandra-0.6:922689-1040580
+/cassandra/branches/cassandra-0.6:922689-1040580,1041105
 /cassandra/branches/cassandra-0.7:1035666
 /cassandra/trunk:1026516-1026734,1028929
 /incubator/cassandra/branches/cassandra-0.3:774578-796573

Propchange: 
cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec  1 17:51:10 2010
@@ -1,4 +1,4 @@
-/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1040580
+/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1040580,1041105
 
/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1035666
 
/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1026734,1028929
 
/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/Cassandra.java:774578-796573

Propchange: 
cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec  1 17:51:10 2010
@@ -1,4 +1,4 @@
-/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:922689-1040580
+/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:922689-1040580,1041105
 
/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1035666
 
/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1026516-1026734,1028929
 
/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/column_t.java:774578-792198

Propchange: 
cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec  1 17:51:10 2010
@@ -1,4 +1,4 @@
-/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:922689-1040580
+/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:922689-1040580,1041105
 
/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1035666
 
/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1026516-1026734,1028929
 
/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java:774578-796573

Propchange: 
cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec  1 17:51:10 2010
@@ -1,4 +1,4 @@
-/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:922689-1040580
+/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:922689-1040580,1041105
 
/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1035666
 
/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1026516-1026734,1028929
 
/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/NotFoundException.java:774578-796573

Propchange: 

[jira] Commented: (CASSANDRA-1752) repair leaving FDs unclosed

2010-12-01 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-1752:
---

reverted -- tests fail to build

 repair leaving FDs unclosed
 ---

 Key: CASSANDRA-1752
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1752
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Jonathan Ellis
Assignee: Tyler Hobbs
 Fix For: 0.6.9

 Attachments: 1752-0.6-v2.txt, 1752-0.6.txt


 We noticed that after a `nodetool repair` was ran, several of our nodes 
 reported high disk usage; -- even one node hit 100% disk usage. After a 
 restart of that node, disk usage drop instantly by 80 gigabytes -- well that 
 was confusing, but we quickly formed the theory that Cassandra must of been 
 holding open references to deleted file descriptors.
 Later, i found this node as an example, it is using about 8-10 gigabytes 
 more than it should be -- 118 gigabytes reported by df, yet du reports only 
 106 gigabytes in the cassandra directory (nothing else on the mahcine). As 
 you can see from the lsof listing, it is holding open FDs to files that no 
 longer exist on the filesystem, and there are no open streams or as far as I 
 can tell other reasons for the deleted sstable to be open.
 This seems to be related to running a repair, as we haven't seen it in any 
 other situations before.
 A quick check of FileStreamTask shows that the obvious base is covered:
 {code}
 finally
 {
 try
 {
 raf.close();
 }
 catch (IOException e)
 {
 throw new AssertionError(e);
 }
 }
 {code}
 So it seems that either the transfer loop is never finishing to get to that 
 finally block (in which case why isn't it showing up in outbound streams?) or 
 something else is the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Reopened: (CASSANDRA-1752) repair leaving FDs unclosed

2010-12-01 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis reopened CASSANDRA-1752:
---


 repair leaving FDs unclosed
 ---

 Key: CASSANDRA-1752
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1752
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Jonathan Ellis
Assignee: Tyler Hobbs
 Fix For: 0.6.9

 Attachments: 1752-0.6-v2.txt, 1752-0.6.txt


 We noticed that after a `nodetool repair` was ran, several of our nodes 
 reported high disk usage; -- even one node hit 100% disk usage. After a 
 restart of that node, disk usage drop instantly by 80 gigabytes -- well that 
 was confusing, but we quickly formed the theory that Cassandra must of been 
 holding open references to deleted file descriptors.
 Later, i found this node as an example, it is using about 8-10 gigabytes 
 more than it should be -- 118 gigabytes reported by df, yet du reports only 
 106 gigabytes in the cassandra directory (nothing else on the mahcine). As 
 you can see from the lsof listing, it is holding open FDs to files that no 
 longer exist on the filesystem, and there are no open streams or as far as I 
 can tell other reasons for the deleted sstable to be open.
 This seems to be related to running a repair, as we haven't seen it in any 
 other situations before.
 A quick check of FileStreamTask shows that the obvious base is covered:
 {code}
 finally
 {
 try
 {
 raf.close();
 }
 catch (IOException e)
 {
 throw new AssertionError(e);
 }
 }
 {code}
 So it seems that either the transfer loop is never finishing to get to that 
 finally block (in which case why isn't it showing up in outbound streams?) or 
 something else is the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



svn commit: r1041108 - in /cassandra/branches/cassandra-0.6: ./ src/java/org/apache/cassandra/db/ src/java/org/apache/cassandra/io/ src/java/org/apache/cassandra/service/ src/java/org/apache/cassandra

2010-12-01 Thread jbellis
Author: jbellis
Date: Wed Dec  1 18:00:37 2010
New Revision: 1041108

URL: http://svn.apache.org/viewvc?rev=1041108view=rev
Log:
revert last to fix test failures

Modified:
cassandra/branches/cassandra-0.6/CHANGES.txt

cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/CompactionManager.java
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/Table.java

cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/io/SSTableWriter.java

cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/AntiEntropyService.java

cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/streaming/StreamOut.java

Modified: cassandra/branches/cassandra-0.6/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/CHANGES.txt?rev=1041108r1=1041107r2=1041108view=diff
==
--- cassandra/branches/cassandra-0.6/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.6/CHANGES.txt Wed Dec  1 18:00:37 2010
@@ -10,8 +10,6 @@
  * detect and warn when obsolete version of JNA is present (CASSANDRA-1770)
  * fix live-column-count of slice ranges including tombstoned supercolumn 
with live subcolumn (CASSANDRA-1591)
- * avoid opening readers on anticompacted to-be-streamed temporary
-   files (CASSANDRA-1752)
 
 
 0.6.8

Modified: 
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/CompactionManager.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/CompactionManager.java?rev=1041108r1=1041107r2=1041108view=diff
==
--- 
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/CompactionManager.java
 (original)
+++ 
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/CompactionManager.java
 Wed Dec  1 18:00:37 2010
@@ -133,11 +133,11 @@ public class CompactionManager implement
 return executor.submit(runnable);
 }
 
-public FutureListString submitAnticompaction(final ColumnFamilyStore 
cfStore, final CollectionRange ranges, final InetAddress target)
+public FutureListSSTableReader submitAnticompaction(final 
ColumnFamilyStore cfStore, final CollectionRange ranges, final InetAddress 
target)
 {
-CallableListString callable = new CallableListString()
+CallableListSSTableReader callable = new 
CallableListSSTableReader()
 {
-public ListString call() throws IOException
+public ListSSTableReader call() throws IOException
 {
 return doAntiCompaction(cfStore, cfStore.getSSTables(), 
ranges, target);
 }
@@ -320,7 +320,18 @@ public class CompactionManager implement
 return sstables.size();
 }
 
-private SSTableWriter antiCompactionHelper(ColumnFamilyStore cfs, 
CollectionSSTableReader sstables, CollectionRange ranges, InetAddress 
target)
+/**
+ * This function is used to do the anti compaction process , it spits out 
the file which has keys that belong to a given range
+ * If the target is not specified it spits out the file as a compacted 
file with the unecessary ranges wiped out.
+ *
+ * @param cfs
+ * @param sstables
+ * @param ranges
+ * @param target
+ * @return
+ * @throws java.io.IOException
+ */
+private ListSSTableReader doAntiCompaction(ColumnFamilyStore cfs, 
CollectionSSTableReader sstables, CollectionRange ranges, InetAddress 
target)
 throws IOException
 {
 Table table = cfs.getTable();
@@ -337,9 +348,10 @@ public class CompactionManager implement
 // compacting for streaming: send to subdirectory
 compactionFileLocation = compactionFileLocation + File.separator + 
DatabaseDescriptor.STREAMING_SUBDIR;
 }
+ListSSTableReader results = new ArrayListSSTableReader();
 
 long startTime = System.currentTimeMillis();
-long totalKeysWritten = 0;
+long totalkeysWritten = 0;
 
 int expectedBloomFilterSize = 
Math.max(DatabaseDescriptor.getIndexInterval(), 
(int)(SSTableReader.getApproximateKeyCount(sstables) / 2));
 if (logger.isDebugEnabled())
@@ -352,6 +364,11 @@ public class CompactionManager implement
 
 try
 {
+if (!nni.hasNext())
+{
+return results;
+}
+
 while (nni.hasNext())
 {
 CompactionIterator.CompactedRow row = nni.next();
@@ -362,7 +379,7 @@ public class CompactionManager implement
 writer = new SSTableWriter(newFilename, 
expectedBloomFilterSize, StorageService.getPartitioner());
 }
 writer.append(row.key, row.buffer);
-totalKeysWritten++;
+totalkeysWritten++;
 }
 }
 finally
@@ -372,53 +389,12 

svn commit: r1041109 - /cassandra/branches/cassandra-0.7/test/unit/org/apache/cassandra/locator/SimpleStrategyTest.java

2010-12-01 Thread jbellis
Author: jbellis
Date: Wed Dec  1 18:01:51 2010
New Revision: 1041109

URL: http://svn.apache.org/viewvc?rev=1041109view=rev
Log:
SimpleStrategyTest extends CleanupHelper to avoid heisenbugs from other tests' 
left-overs
patch by jbellis

Modified:

cassandra/branches/cassandra-0.7/test/unit/org/apache/cassandra/locator/SimpleStrategyTest.java

Modified: 
cassandra/branches/cassandra-0.7/test/unit/org/apache/cassandra/locator/SimpleStrategyTest.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/test/unit/org/apache/cassandra/locator/SimpleStrategyTest.java?rev=1041109r1=1041108r2=1041109view=diff
==
--- 
cassandra/branches/cassandra-0.7/test/unit/org/apache/cassandra/locator/SimpleStrategyTest.java
 (original)
+++ 
cassandra/branches/cassandra-0.7/test/unit/org/apache/cassandra/locator/SimpleStrategyTest.java
 Wed Dec  1 18:01:51 2010
@@ -27,18 +27,19 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
 
-import org.apache.cassandra.config.ConfigurationException;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
-import org.apache.cassandra.SchemaLoader;
+import org.apache.cassandra.CleanupHelper;
+import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.config.DatabaseDescriptor;
 import org.apache.cassandra.db.Table;
 import org.apache.cassandra.dht.*;
 import org.apache.cassandra.service.StorageService;
 import org.apache.cassandra.service.StorageServiceAccessor;
 
-public class SimpleStrategyTest extends SchemaLoader
+import static org.junit.Assert.*;
+
+public class SimpleStrategyTest extends CleanupHelper
 {
 @Test
 public void tryValidTable()




buildbot success in ASF Buildbot on cassandra-0.6

2010-12-01 Thread buildbot
The Buildbot has detected a restored build of cassandra-0.6 on ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/cassandra-0.6/builds/237

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: isis_ubuntu

Build Reason: 
Build Source Stamp: [branch cassandra/branches/cassandra-0.6] 1041108
Blamelist: jbellis

Build succeeded!

sincerely,
 -The Buildbot



[jira] Commented: (CASSANDRA-1752) repair leaving FDs unclosed

2010-12-01 Thread Hudson (JIRA)

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

Hudson commented on CASSANDRA-1752:
---

Integrated in Cassandra-0.6 #13 (See 
[https://hudson.apache.org/hudson/job/Cassandra-0.6/13/])
avoid opening readers on anticompacted to-be-streamed temporary files
patch by thobbs; reviewed by mdennis and jbellis for CASSANDRA-1752


 repair leaving FDs unclosed
 ---

 Key: CASSANDRA-1752
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1752
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Jonathan Ellis
Assignee: Tyler Hobbs
 Fix For: 0.6.9

 Attachments: 1752-0.6-v2.txt, 1752-0.6.txt


 We noticed that after a `nodetool repair` was ran, several of our nodes 
 reported high disk usage; -- even one node hit 100% disk usage. After a 
 restart of that node, disk usage drop instantly by 80 gigabytes -- well that 
 was confusing, but we quickly formed the theory that Cassandra must of been 
 holding open references to deleted file descriptors.
 Later, i found this node as an example, it is using about 8-10 gigabytes 
 more than it should be -- 118 gigabytes reported by df, yet du reports only 
 106 gigabytes in the cassandra directory (nothing else on the mahcine). As 
 you can see from the lsof listing, it is holding open FDs to files that no 
 longer exist on the filesystem, and there are no open streams or as far as I 
 can tell other reasons for the deleted sstable to be open.
 This seems to be related to running a repair, as we haven't seen it in any 
 other situations before.
 A quick check of FileStreamTask shows that the obvious base is covered:
 {code}
 finally
 {
 try
 {
 raf.close();
 }
 catch (IOException e)
 {
 throw new AssertionError(e);
 }
 }
 {code}
 So it seems that either the transfer loop is never finishing to get to that 
 finally block (in which case why isn't it showing up in outbound streams?) or 
 something else is the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (CASSANDRA-1788) reduce copies on read, write paths

2010-12-01 Thread Gary Dusbabek (JIRA)

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

Gary Dusbabek commented on CASSANDRA-1788:
--

Could you save another copy on send if packIt returned a Message augmented with 
header information that would then be placed in the OutboundTcpConnection 
queue?  The consumer there would then take the message and serialize it 
directly to the stream.  The obvious disadvantage I see is that it shifts the 
serialization work onto the writer thread, which might be undesirable.

 reduce copies on read, write paths
 --

 Key: CASSANDRA-1788
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1788
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 0.7.0

 Attachments: 1788.txt


 Currently, we do _three_ unnecessary copies (that is, writing to the socket 
 is necessary; any other copies made are overhead) for each message:
 - constructing the Message body byte[] (this is typically a call to a 
 ICompactSerializer[2] serialize method, but sometimes we cheat e.g. in 
 SchemaCheckVerbHandler's reply)
 - which is copied to a buffer containing the entire Message (i.e. including 
 Header) when sendOneWay calls Message.serializer.serialize()
 - which is copied to a newly-allocated ByteBuffer when sendOneWay calls packIt
 - which is what we write to the socket
 For deserialize we perform a similar orgy of copies:
 - IncomingTcpConnection reads the Message length, allocates a byte[], and 
 reads the serialized Message into it
 - ITcpC then calls Message.serializer().deserialize, which allocates a new 
 byte[] for the body and copies that part
 - finally, the verbHandler (determined by the now-deserialized Message 
 header) deserializes the actual object represented by the body
 Most of these are out of scope for 0.7 but I think we can at least elide the 
 last copy on the write path and the first on the read.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (CASSANDRA-1072) Increment counters

2010-12-01 Thread Kelvin Kakugawa (JIRA)

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

Kelvin Kakugawa updated CASSANDRA-1072:
---

Attachment: CASSANDRA-1072.120110.patch

update interface:
- CounterUpdate: remove timestamp
- CounterMutation: added
- batch_add: via CounterMutation (instead of CounterUpdate)

 Increment counters
 --

 Key: CASSANDRA-1072
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1072
 Project: Cassandra
  Issue Type: Sub-task
  Components: Core
Reporter: Johan Oskarsson
Assignee: Kelvin Kakugawa
 Attachments: CASSANDRA-1072.112210.patch, 
 CASSANDRA-1072.120110.patch, CASSANDRA-1072.patch, increment_test.py, 
 Partitionedcountersdesigndoc.pdf


 Break out the increment counters out of CASSANDRA-580. Classes are shared 
 between the two features but without the plain version vector code the 
 changeset becomes smaller and more manageable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (CASSANDRA-1752) repair leaving FDs unclosed

2010-12-01 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs updated CASSANDRA-1752:
---

Attachment: 1752-0.6-v3.txt

Unit tests are fixed in the v3 patch.

 repair leaving FDs unclosed
 ---

 Key: CASSANDRA-1752
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1752
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Jonathan Ellis
Assignee: Tyler Hobbs
 Fix For: 0.6.9

 Attachments: 1752-0.6-v2.txt, 1752-0.6-v3.txt, 1752-0.6.txt


 We noticed that after a `nodetool repair` was ran, several of our nodes 
 reported high disk usage; -- even one node hit 100% disk usage. After a 
 restart of that node, disk usage drop instantly by 80 gigabytes -- well that 
 was confusing, but we quickly formed the theory that Cassandra must of been 
 holding open references to deleted file descriptors.
 Later, i found this node as an example, it is using about 8-10 gigabytes 
 more than it should be -- 118 gigabytes reported by df, yet du reports only 
 106 gigabytes in the cassandra directory (nothing else on the mahcine). As 
 you can see from the lsof listing, it is holding open FDs to files that no 
 longer exist on the filesystem, and there are no open streams or as far as I 
 can tell other reasons for the deleted sstable to be open.
 This seems to be related to running a repair, as we haven't seen it in any 
 other situations before.
 A quick check of FileStreamTask shows that the obvious base is covered:
 {code}
 finally
 {
 try
 {
 raf.close();
 }
 catch (IOException e)
 {
 throw new AssertionError(e);
 }
 }
 {code}
 So it seems that either the transfer loop is never finishing to get to that 
 finally block (in which case why isn't it showing up in outbound streams?) or 
 something else is the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (CASSANDRA-1800) avoid double RowMutation serialization on write.

2010-12-01 Thread Gary Dusbabek (JIRA)
avoid double RowMutation serialization on write.


 Key: CASSANDRA-1800
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1800
 Project: Cassandra
  Issue Type: Improvement
Reporter: Gary Dusbabek
Assignee: Gary Dusbabek
 Fix For: 0.8




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (CASSANDRA-1788) reduce copies on read, write paths

2010-12-01 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-1788:
--

Attachment: 1788-v3.txt

v3 w/ Gary's trick of copying just the Header part to maintain compatibility.

 reduce copies on read, write paths
 --

 Key: CASSANDRA-1788
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1788
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 0.7.0

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


 Currently, we do _three_ unnecessary copies (that is, writing to the socket 
 is necessary; any other copies made are overhead) for each message:
 - constructing the Message body byte[] (this is typically a call to a 
 ICompactSerializer[2] serialize method, but sometimes we cheat e.g. in 
 SchemaCheckVerbHandler's reply)
 - which is copied to a buffer containing the entire Message (i.e. including 
 Header) when sendOneWay calls Message.serializer.serialize()
 - which is copied to a newly-allocated ByteBuffer when sendOneWay calls packIt
 - which is what we write to the socket
 For deserialize we perform a similar orgy of copies:
 - IncomingTcpConnection reads the Message length, allocates a byte[], and 
 reads the serialized Message into it
 - ITcpC then calls Message.serializer().deserialize, which allocates a new 
 byte[] for the body and copies that part
 - finally, the verbHandler (determined by the now-deserialized Message 
 header) deserializes the actual object represented by the body
 Most of these are out of scope for 0.7 but I think we can at least elide the 
 last copy on the write path and the first on the read.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (CASSANDRA-1800) avoid double RowMutation serialization on write.

2010-12-01 Thread Gary Dusbabek (JIRA)

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

Gary Dusbabek updated CASSANDRA-1800:
-

Attachment: 
v1-0001-avoid-extra-RM-serialization-on-write-remove-dead-code.txt

 avoid double RowMutation serialization on write.
 

 Key: CASSANDRA-1800
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1800
 Project: Cassandra
  Issue Type: Improvement
Reporter: Gary Dusbabek
Assignee: Gary Dusbabek
 Fix For: 0.8

 Attachments: 
 v1-0001-avoid-extra-RM-serialization-on-write-remove-dead-code.txt




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (CASSANDRA-1072) Increment counters

2010-12-01 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-1072:
-

I would still made a few changes to this interface:

# CounterUpdate is lacking for batch_add, a CounterMutation should be a 
CounterUpdate or a Deletion.
# And since we don't want to expose timestamps to the client for counters, we 
should probably have 
a specific CounterDeletion struct with no timestamp. For the same reason the 
timestamp in remove_counter
should be removed too. 

About the deletion/remove, as it turns out it doesn't really work and probably 
never will, in that if new increments
follow too closely a remove, the remove could be ignored. I'm fine with keeping 
deletions as it (it's still useful, if only to remove definitively a counter) 
with a documentation explaining the limitation. But knowing it has limitation, 
we could also decide to keep removes restricted to the remove_counter function 
and not including it in batch updates. In which case we can get rid of 
CounterMutation altogether (and avoid creating a new CounterDeletion struct).

 Increment counters
 --

 Key: CASSANDRA-1072
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1072
 Project: Cassandra
  Issue Type: Sub-task
  Components: Core
Reporter: Johan Oskarsson
Assignee: Kelvin Kakugawa
 Attachments: CASSANDRA-1072.112210.patch, 
 CASSANDRA-1072.120110.patch, CASSANDRA-1072.patch, increment_test.py, 
 Partitionedcountersdesigndoc.pdf


 Break out the increment counters out of CASSANDRA-580. Classes are shared 
 between the two features but without the plain version vector code the 
 changeset becomes smaller and more manageable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (CASSANDRA-1800) avoid double RowMutation serialization on write.

2010-12-01 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-1800:
---

I don't think changing toByteArray to getData is valid since the raw data can 
contain uninitialized bytes at the end of the array.  We'd have to change 
Message to ByteBuffer to allow that (which looks super painful, so I don't 
think it's worth doing compared to what I outlined in CASSANDRA-1015)

 avoid double RowMutation serialization on write.
 

 Key: CASSANDRA-1800
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1800
 Project: Cassandra
  Issue Type: Improvement
Reporter: Gary Dusbabek
Assignee: Gary Dusbabek
 Fix For: 0.8

 Attachments: 
 v1-0001-avoid-extra-RM-serialization-on-write-remove-dead-code.txt




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (CASSANDRA-1800) avoid double RowMutation serialization on write.

2010-12-01 Thread Gary Dusbabek (JIRA)

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

Gary Dusbabek updated CASSANDRA-1800:
-

Attachment: 
v2-0001-avoid-extra-RM-serialization-on-write-remove-dead-code.txt

 avoid double RowMutation serialization on write.
 

 Key: CASSANDRA-1800
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1800
 Project: Cassandra
  Issue Type: Improvement
Reporter: Gary Dusbabek
Assignee: Gary Dusbabek
 Fix For: 0.8

 Attachments: 
 v1-0001-avoid-extra-RM-serialization-on-write-remove-dead-code.txt, 
 v2-0001-avoid-extra-RM-serialization-on-write-remove-dead-code.txt




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (CASSANDRA-1800) avoid double RowMutation serialization on write.

2010-12-01 Thread Gary Dusbabek (JIRA)

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

Gary Dusbabek commented on CASSANDRA-1800:
--

v2 serializes to a raw byte array to avoid the copy.  This enabled me to 
simplify the special casing in CommitLogSegment a bit.

 avoid double RowMutation serialization on write.
 

 Key: CASSANDRA-1800
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1800
 Project: Cassandra
  Issue Type: Improvement
Reporter: Gary Dusbabek
Assignee: Gary Dusbabek
 Fix For: 0.8

 Attachments: 
 v1-0001-avoid-extra-RM-serialization-on-write-remove-dead-code.txt, 
 v2-0001-avoid-extra-RM-serialization-on-write-remove-dead-code.txt




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (CASSANDRA-1800) avoid double RowMutation serialization on write.

2010-12-01 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-1800:
---

Can we init the preserializedBuffer in RMVH w/ the byte[] we already have 
instead of rebuilding it?

Can we drop the byte[] from the apply/commitlog path in favor of calling 
getSerializedBuffer?

(Still confused as to what extra serialization we're saving here but definitely 
good code cleanup.)

 avoid double RowMutation serialization on write.
 

 Key: CASSANDRA-1800
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1800
 Project: Cassandra
  Issue Type: Improvement
Reporter: Gary Dusbabek
Assignee: Gary Dusbabek
 Fix For: 0.8

 Attachments: 
 v1-0001-avoid-extra-RM-serialization-on-write-remove-dead-code.txt, 
 v2-0001-avoid-extra-RM-serialization-on-write-remove-dead-code.txt




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (CASSANDRA-1801) memory leak under heavy write load

2010-12-01 Thread Matthew F. Dennis (JIRA)
memory leak under heavy write load
--

 Key: CASSANDRA-1801
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1801
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 0.7 beta 3
Reporter: Matthew F. Dennis
Assignee: T Jake Luciani
 Fix For: 0.7.0
 Attachments: screenie.png

It appears C* isn't releasing buffers that were used during the writes of batch 
mutates.  See attached screenshot of heap dump.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (CASSANDRA-1801) memory leak under heavy write load

2010-12-01 Thread Matthew F. Dennis (JIRA)

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

Matthew F. Dennis updated CASSANDRA-1801:
-

Attachment: screenie.png

 memory leak under heavy write load
 --

 Key: CASSANDRA-1801
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1801
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 0.7 beta 3
Reporter: Matthew F. Dennis
Assignee: T Jake Luciani
 Fix For: 0.7.0

 Attachments: screenie.png


 It appears C* isn't releasing buffers that were used during the writes of 
 batch mutates.  See attached screenshot of heap dump.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (CASSANDRA-1801) memory leak under heavy write load

2010-12-01 Thread Jon Hermes (JIRA)

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

Jon Hermes commented on CASSANDRA-1801:
---

CASSANDRA-1014 cause?

 memory leak under heavy write load
 --

 Key: CASSANDRA-1801
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1801
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 0.7 beta 3
Reporter: Matthew F. Dennis
Assignee: T Jake Luciani
 Fix For: 0.7.0

 Attachments: screenie.png


 It appears C* isn't releasing buffers that were used during the writes of 
 batch mutates.  See attached screenshot of heap dump.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (CASSANDRA-1801) memory leak under heavy write load

2010-12-01 Thread Jon Hermes (JIRA)

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

Jon Hermes updated CASSANDRA-1801:
--

Comment: was deleted

(was: CASSANDRA-1014 cause?)

 memory leak under heavy write load
 --

 Key: CASSANDRA-1801
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1801
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 0.7 beta 3
Reporter: Matthew F. Dennis
Assignee: T Jake Luciani
 Fix For: 0.7.0

 Attachments: screenie.png


 It appears C* isn't releasing buffers that were used during the writes of 
 batch mutates.  See attached screenshot of heap dump.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



svn commit: r1041198 - in /cassandra/branches/cassandra-0.6: CHANGES.txt src/java/org/apache/cassandra/service/StorageService.java

2010-12-01 Thread jbellis
Author: jbellis
Date: Wed Dec  1 22:34:15 2010
New Revision: 1041198

URL: http://svn.apache.org/viewvc?rev=1041198view=rev
Log:
clean up log messages for gossip token notifications (backport from 0.7)

Modified:
cassandra/branches/cassandra-0.6/CHANGES.txt

cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/StorageService.java

Modified: cassandra/branches/cassandra-0.6/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/CHANGES.txt?rev=1041198r1=1041197r2=1041198view=diff
==
--- cassandra/branches/cassandra-0.6/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.6/CHANGES.txt Wed Dec  1 22:34:15 2010
@@ -10,6 +10,7 @@
  * detect and warn when obsolete version of JNA is present (CASSANDRA-1770)
  * fix live-column-count of slice ranges including tombstoned supercolumn 
with live subcolumn (CASSANDRA-1591)
+ * clean up log messages for gossip token notifications (CASSANDRA-1518)
 
 
 0.6.8

Modified: 
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/StorageService.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/StorageService.java?rev=1041198r1=1041197r2=1041198view=diff
==
--- 
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/StorageService.java
 (original)
+++ 
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/StorageService.java
 Wed Dec  1 22:34:15 2010
@@ -557,28 +557,48 @@ public class StorageService implements I
  * @param endPoint node
  * @param pieces STATE_NORMAL,token[,other_state,token]
  */
-private void handleStateNormal(InetAddress endPoint, String[] pieces)
+private void handleStateNormal(InetAddress endpoint, String[] pieces)
 {
 assert pieces.length = 2;
-Token token = 
getPartitioner().getTokenFactory().fromString(pieces[1]);
+Token token = getPartitioner().getTokenFactory().fromString(pieces[1]);
 
 if (logger_.isDebugEnabled())
-logger_.debug(Node  + endPoint +  state normal, token  + 
token);
+logger_.debug(Node  + endpoint +  state normal, token  + 
token);
 
-if (tokenMetadata_.isMember(endPoint))
-logger_.info(Node  + endPoint +  state jump to normal);
+if (tokenMetadata_.isMember(endpoint))
+logger_.info(Node  + endpoint +  state jump to normal);
 
 // we don't want to update if this node is responsible for the token 
and it has a later startup time than endpoint.
 InetAddress currentNode = tokenMetadata_.getEndPoint(token);
-if (currentNode == null || 
Gossiper.instance.compareEndpointStartup(endPoint, currentNode)  0)
-tokenMetadata_.updateNormalToken(token, endPoint);
+if (currentNode == null)
+{
+logger_.debug(New node  + endpoint +  at token  + token);
+tokenMetadata_.updateNormalToken(token, endpoint);
+if (!isClientMode)
+SystemTable.updateToken(endpoint, token);
+}
+else if (endpoint.equals(currentNode))
+{
+// nothing to do
+}
+else if (Gossiper.instance.compareEndpointStartup(endpoint, 
currentNode)  0)
+{
+logger_.info(String.format(Nodes %s and %s have the same token 
%s.  %s is the new owner,
+   endpoint, currentNode, token, 
endpoint));
+tokenMetadata_.updateNormalToken(token, endpoint);
+if (!isClientMode)
+SystemTable.updateToken(endpoint, token);
+}
 else
-logger_.info(Will not change my token ownership to  + endPoint);
-
+{
+logger_.info(String.format(Nodes %s and %s have the same token 
%s.  Ignoring %s,
+   endpoint, currentNode, token, 
endpoint));
+}
+
 if (pieces.length  2)
 {
 if (REMOVE_TOKEN.equals(pieces[2]))
-{ 
+{
 // remove token was called on a dead node.
 Token tokenThatLeft = 
getPartitioner().getTokenFactory().fromString(pieces[3]);
 InetAddress endpointThatLeft = 
tokenMetadata_.getEndPoint(tokenThatLeft);
@@ -598,10 +618,8 @@ public class StorageService implements I
 tokenMetadata_.removeBootstrapToken(tokenThatLeft);
 }
 }
-
+
 calculatePendingRanges();
-if (!isClientMode)
-SystemTable.updateToken(endPoint, token);
 }
 
 /**




svn commit: r1041200 - in /cassandra/branches/cassandra-0.6: src/java/org/apache/cassandra/db/ src/java/org/apache/cassandra/io/ src/java/org/apache/cassandra/service/ src/java/org/apache/cassandra/st

2010-12-01 Thread jbellis
Author: jbellis
Date: Wed Dec  1 22:41:23 2010
New Revision: 1041200

URL: http://svn.apache.org/viewvc?rev=1041200view=rev
Log:
avoid opening readers on anticompacted to-be-streamed temporary files
patch by thobbs; reviewed by mdennis and jbellis for CASSANDRA-1752

Modified:

cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/CompactionManager.java
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/Table.java

cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/io/SSTableWriter.java

cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/AntiEntropyService.java

cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/streaming/StreamOut.java

cassandra/branches/cassandra-0.6/test/unit/org/apache/cassandra/db/ColumnFamilyStoreTest.java

cassandra/branches/cassandra-0.6/test/unit/org/apache/cassandra/io/StreamingTest.java

Modified: 
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/CompactionManager.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/CompactionManager.java?rev=1041200r1=1041199r2=1041200view=diff
==
--- 
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/CompactionManager.java
 (original)
+++ 
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/CompactionManager.java
 Wed Dec  1 22:41:23 2010
@@ -133,11 +133,11 @@ public class CompactionManager implement
 return executor.submit(runnable);
 }
 
-public FutureListSSTableReader submitAnticompaction(final 
ColumnFamilyStore cfStore, final CollectionRange ranges, final InetAddress 
target)
+public FutureListString submitAnticompaction(final ColumnFamilyStore 
cfStore, final CollectionRange ranges, final InetAddress target)
 {
-CallableListSSTableReader callable = new 
CallableListSSTableReader()
+CallableListString callable = new CallableListString()
 {
-public ListSSTableReader call() throws IOException
+public ListString call() throws IOException
 {
 return doAntiCompaction(cfStore, cfStore.getSSTables(), 
ranges, target);
 }
@@ -320,18 +320,7 @@ public class CompactionManager implement
 return sstables.size();
 }
 
-/**
- * This function is used to do the anti compaction process , it spits out 
the file which has keys that belong to a given range
- * If the target is not specified it spits out the file as a compacted 
file with the unecessary ranges wiped out.
- *
- * @param cfs
- * @param sstables
- * @param ranges
- * @param target
- * @return
- * @throws java.io.IOException
- */
-private ListSSTableReader doAntiCompaction(ColumnFamilyStore cfs, 
CollectionSSTableReader sstables, CollectionRange ranges, InetAddress 
target)
+private SSTableWriter antiCompactionHelper(ColumnFamilyStore cfs, 
CollectionSSTableReader sstables, CollectionRange ranges, InetAddress 
target)
 throws IOException
 {
 Table table = cfs.getTable();
@@ -348,10 +337,9 @@ public class CompactionManager implement
 // compacting for streaming: send to subdirectory
 compactionFileLocation = compactionFileLocation + File.separator + 
DatabaseDescriptor.STREAMING_SUBDIR;
 }
-ListSSTableReader results = new ArrayListSSTableReader();
 
+long totalKeysWritten = 0;
 long startTime = System.currentTimeMillis();
-long totalkeysWritten = 0;
 
 int expectedBloomFilterSize = 
Math.max(DatabaseDescriptor.getIndexInterval(), 
(int)(SSTableReader.getApproximateKeyCount(sstables) / 2));
 if (logger.isDebugEnabled())
@@ -364,11 +352,6 @@ public class CompactionManager implement
 
 try
 {
-if (!nni.hasNext())
-{
-return results;
-}
-
 while (nni.hasNext())
 {
 CompactionIterator.CompactedRow row = nni.next();
@@ -379,22 +362,61 @@ public class CompactionManager implement
 writer = new SSTableWriter(newFilename, 
expectedBloomFilterSize, StorageService.getPartitioner());
 }
 writer.append(row.key, row.buffer);
-totalkeysWritten++;
+totalKeysWritten++;
 }
 }
 finally
 {
 ci.close();
 }
+if (writer != null) {
+ListString filenames = writer.getAllFilenames();
+String format = AntiCompacted to %s.  %d/%d bytes for %d keys.  
Time: %dms.;
+long dTime = System.currentTimeMillis() - startTime;
+long length = new File(filenames.get(filenames.size() 
-1)).length(); // Data file is last in the list
+logger.info(String.format(format, 

svn commit: r1041201 - /cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/net/OutboundTcpConnection.java

2010-12-01 Thread jbellis
Author: jbellis
Date: Wed Dec  1 22:44:50 2010
New Revision: 1041201

URL: http://svn.apache.org/viewvc?rev=1041201view=rev
Log:
include outbound socket exceptions at debug level

Modified:

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/net/OutboundTcpConnection.java

Modified: 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/net/OutboundTcpConnection.java?rev=1041201r1=1041200r2=1041201view=diff
==
--- 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
 (original)
+++ 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
 Wed Dec  1 22:44:50 2010
@@ -113,6 +113,7 @@ public class OutboundTcpConnection exten
 catch (IOException e)
 {
 logger.info(error writing to  + endpoint);
+logger.debug(error was , e);
 disconnect();
 }
 }




[jira] Resolved: (CASSANDRA-1802) Cassandra fails to start on Windows: rename failed of \var\lib\cassandra\data\system\LocationInfo-e-1-Data.db

2010-12-01 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis resolved CASSANDRA-1802.
---

Resolution: Duplicate

fixed in CASSANDRA-1790

 Cassandra fails to start on Windows: rename failed of 
 \var\lib\cassandra\data\system\LocationInfo-e-1-Data.db
 -

 Key: CASSANDRA-1802
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1802
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 0.7.0 rc 1
 Environment: Windows XP SP3
Reporter: F. Andy Seidl
Priority: Blocker

 Cassandra fails to start on Windows:
 C:\Apache\apache-cassandra-0.7.0-rc1\bincassandra
 Starting Cassandra Server
  INFO 16:47:38,941 Heap size: 1070399488/1070399488
  INFO 16:47:38,941 JNA not found. Native methods will be disabled.
  INFO 16:47:38,941 Loading settings from 
 file:/C:/Apache/apache-cassandra-0.7.0-rc1/conf/cassandra.yaml
  INFO 16:47:39,019 DiskAccessMode 'auto' determined to be standard, 
 indexAccessMode is standard
  INFO 16:47:39,066 Creating new commitlog segment 
 /var/lib/cassandra/commitlog\CommitLog-1291240059066.log
  INFO 16:47:39,097 read 0 from saved key cache
  INFO 16:47:39,097 read 0 from saved key cache
  INFO 16:47:39,097 read 0 from saved key cache
  INFO 16:47:39,097 read 0 from saved key cache
  INFO 16:47:39,097 read 0 from saved key cache
  INFO 16:47:39,113 loading row cache for LocationInfo of system
  INFO 16:47:39,113 completed loading (0 ms; 0 keys)  row cache for 
 LocationInfo of system
  INFO 16:47:39,113 loading row cache for HintsColumnFamily of system
  INFO 16:47:39,113 completed loading (0 ms; 0 keys)  row cache for 
 HintsColumnFamily of system
  INFO 16:47:39,113 loading row cache for Migrations of system
  INFO 16:47:39,113 completed loading (0 ms; 0 keys)  row cache for Migrations 
 of system
  INFO 16:47:39,113 loading row cache for Schema of system
  INFO 16:47:39,113 completed loading (0 ms; 0 keys)  row cache for Schema of 
 system
  INFO 16:47:39,113 loading row cache for IndexInfo of system
  INFO 16:47:39,113 completed loading (0 ms; 0 keys)  row cache for IndexInfo 
 of system
  INFO 16:47:39,128 Couldn't detect any schema definitions in local storage.
  INFO 16:47:39,128 Found table data in data directories. Consider using JMX 
 to call org.apache.cassandra.service.StorageService.loadSchemaFromYaml().
  INFO 16:47:39,128 No commitlog files found; skipping replay
  INFO 16:47:39,144 Upgrading to 0.7. Purging hints if there are any. Old 
 hints will be snapshotted.
  INFO 16:47:39,144 Cassandra version: 0.7.0-rc1
  INFO 16:47:39,144 Thrift API version: 19.4.0
  INFO 16:47:39,159 Loading persisted ring state
  INFO 16:47:39,159 Starting up server gossip
  INFO 16:47:39,159 switching in a fresh Memtable for LocationInfo at 
 CommitLogContext(file='/var/lib/cassandra/commitlog\CommitLog-1291240059066.log',
  position=700)
  INFO 16:47:39,159 Enqueuing flush of memtable-locationi...@9690924(227 
 bytes, 4 operations)
  INFO 16:47:39,159 Writing memtable-locationi...@9690924(227 bytes, 4 
 operations)
 ERROR 16:47:39,238 Fatal exception in thread Thread[FlushWriter:1,5,main]
 java.io.IOError: java.io.IOException: rename failed of 
 \var\lib\cassandra\data\system\LocationInfo-e-1-Data.db
 at 
 org.apache.cassandra.io.sstable.SSTableWriter.rename(SSTableWriter.java:214)
 at 
 org.apache.cassandra.io.sstable.SSTableWriter.closeAndOpenReader(SSTableWriter.java:184)
 at 
 org.apache.cassandra.io.sstable.SSTableWriter.closeAndOpenReader(SSTableWriter.java:167)
 at 
 org.apache.cassandra.db.Memtable.writeSortedContents(Memtable.java:161)
 at org.apache.cassandra.db.Memtable.access$000(Memtable.java:49)
 at org.apache.cassandra.db.Memtable$1.runMayThrow(Memtable.java:174)
 at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
 at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:619)
 Caused by: java.io.IOException: rename failed of 
 \var\lib\cassandra\data\system\LocationInfo-e-1-Data.db
 at 
 org.apache.cassandra.utils.FBUtilities.renameWithConfirm(FBUtilities.java:359)
 at 
 org.apache.cassandra.io.sstable.SSTableWriter.rename(SSTableWriter.java:210)
 ... 12 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a 

[jira] Created: (CASSANDRA-1803) fail fast in strongRead when insufficient replicas are available to satisfy ConsistencyLevel

2010-12-01 Thread Jonathan Ellis (JIRA)
fail fast in strongRead when insufficient replicas are available to satisfy 
ConsistencyLevel


 Key: CASSANDRA-1803
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1803
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 0.7.0


Currently strongRead (the patch for ConsistencyLevel  1) always sends out 
requests to all live replicas, even if there are not enough  to satisfy the 
ConsistencyLevel.  This is a violation of our contract w/ the client to throw 
UnavailableException when we know ahead of time that the request cannot be 
fulfilled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (CASSANDRA-1803) fail fast in strongRead when insufficient replicas are available to satisfy ConsistencyLevel

2010-12-01 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-1803:
--

Attachment: 1803.txt

Adds QRH.available() method to allow this.

Also cleans up response/result duplication between QRH/IResponseResolver 
classes.

 fail fast in strongRead when insufficient replicas are available to satisfy 
 ConsistencyLevel
 

 Key: CASSANDRA-1803
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1803
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 0.7.0

 Attachments: 1803.txt


 Currently strongRead (the patch for ConsistencyLevel  1) always sends out 
 requests to all live replicas, even if there are not enough  to satisfy the 
 ConsistencyLevel.  This is a violation of our contract w/ the client to throw 
 UnavailableException when we know ahead of time that the request cannot be 
 fulfilled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (CASSANDRA-1804) Quorum calculation code needs to use polymorphic Strategy method for determining replica counts

2010-12-01 Thread Jonathan Ellis (JIRA)
Quorum calculation code needs to use polymorphic Strategy method for 
determining replica counts
---

 Key: CASSANDRA-1804
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1804
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.7 beta 1
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
 Fix For: 0.7.0


Keyspace.replication_factor is only valid for SimpleStrategy and ONTS, we 
shouldn't use it directly anywhere.

Related: CASSANDRA-1263 would remove the temptation to do the Wrong Thing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (CASSANDRA-1804) Quorum calculation code needs to use polymorphic Strategy method for determining replica counts

2010-12-01 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-1804:
--

Attachment: 1804.txt

 Quorum calculation code needs to use polymorphic Strategy method for 
 determining replica counts
 ---

 Key: CASSANDRA-1804
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1804
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.7 beta 1
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
 Fix For: 0.7.0

 Attachments: 1804.txt


 Keyspace.replication_factor is only valid for SimpleStrategy and ONTS, we 
 shouldn't use it directly anywhere.
 Related: CASSANDRA-1263 would remove the temptation to do the Wrong Thing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (CASSANDRA-1752) repair leaving FDs unclosed

2010-12-01 Thread Hudson (JIRA)

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

Hudson commented on CASSANDRA-1752:
---

Integrated in Cassandra-0.6 #14 (See 
[https://hudson.apache.org/hudson/job/Cassandra-0.6/14/])
avoid opening readers on anticompacted to-be-streamed temporary files
patch by thobbs; reviewed by mdennis and jbellis for CASSANDRA-1752


 repair leaving FDs unclosed
 ---

 Key: CASSANDRA-1752
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1752
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Jonathan Ellis
Assignee: Tyler Hobbs
 Fix For: 0.6.9

 Attachments: 1752-0.6-v2.txt, 1752-0.6-v3.txt, 1752-0.6.txt


 We noticed that after a `nodetool repair` was ran, several of our nodes 
 reported high disk usage; -- even one node hit 100% disk usage. After a 
 restart of that node, disk usage drop instantly by 80 gigabytes -- well that 
 was confusing, but we quickly formed the theory that Cassandra must of been 
 holding open references to deleted file descriptors.
 Later, i found this node as an example, it is using about 8-10 gigabytes 
 more than it should be -- 118 gigabytes reported by df, yet du reports only 
 106 gigabytes in the cassandra directory (nothing else on the mahcine). As 
 you can see from the lsof listing, it is holding open FDs to files that no 
 longer exist on the filesystem, and there are no open streams or as far as I 
 can tell other reasons for the deleted sstable to be open.
 This seems to be related to running a repair, as we haven't seen it in any 
 other situations before.
 A quick check of FileStreamTask shows that the obvious base is covered:
 {code}
 finally
 {
 try
 {
 raf.close();
 }
 catch (IOException e)
 {
 throw new AssertionError(e);
 }
 }
 {code}
 So it seems that either the transfer loop is never finishing to get to that 
 finally block (in which case why isn't it showing up in outbound streams?) or 
 something else is the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (CASSANDRA-1804) Quorum calculation code needs to use polymorphic Strategy method for determining replica counts

2010-12-01 Thread Jon Hermes (JIRA)

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

Jon Hermes commented on CASSANDRA-1804:
---

+1.
(An optional improvement would be to leave getRF in ARS abstract, and to 
provide dummy implementations in the child strategies to be rewritten at a 
later date (namely for #1263)).

 Quorum calculation code needs to use polymorphic Strategy method for 
 determining replica counts
 ---

 Key: CASSANDRA-1804
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1804
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.7 beta 1
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
 Fix For: 0.7.0

 Attachments: 1804.txt


 Keyspace.replication_factor is only valid for SimpleStrategy and ONTS, we 
 shouldn't use it directly anywhere.
 Related: CASSANDRA-1263 would remove the temptation to do the Wrong Thing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (CASSANDRA-1743) Switch to TFastFramedTransport

2010-12-01 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-1743:
--

Attachment: 1743_v4.txt

rebased patch

 Switch to TFastFramedTransport
 --

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

 Attachments: 1743.txt, 1743.txt, 1743_v3.txt, 1743_v4.txt


 Forgot that after THRIFT-831 fast mode is not the default and is a separate 
 transport class.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (CASSANDRA-1781) Internal error processing get_range_slices

2010-12-01 Thread Stu Hood (JIRA)

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

Stu Hood updated CASSANDRA-1781:


Attachment: 1781.txt

Ack! Posted this to CASSANDRA-1787 yesterday: we had another missing test case. 
Should be applied to 0.6, 0.7, trunk, etc.

 Internal error processing get_range_slices
 --

 Key: CASSANDRA-1781
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1781
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.7.0 rc 1
 Environment: Debian Linux 2.6.32-openvz-amd64 x86_64 GNU/Linux, 
 Cloudera hadoop CDH3
Reporter: Patrik Modesto
 Fix For: 0.6.9, 0.7.0

 Attachments: 1781.txt


 Runnig mapreduce task on two or more Cassandra nodes gives following error:
 DEBUG 16:51:48,653 range_slice
 DEBUG 16:51:48,653 RangeSliceCommand{keyspace='TEST', column_family='Url', 
 super_column=null, 
 predicate=SlicePredicate(column_names:[java.nio.HeapByteBuffer[pos=57 lim=67 
 cap=177]]), 
 range=(162950022446285318630909295651345252065,9481098247439719900692337295923514899],
  max_keys=4096}
 DEBUG 16:51:48,653 restricted ranges for query 
 (162950022446285318630909295651345252065,9481098247439719900692337295923514899]
  are 
 [(162950022446285318630909295651345252065,9481098247439719900692337295923514899]]
 DEBUG 16:51:48,653 local range slice
 ERROR 16:51:48,653 Internal error processing get_range_slices
 java.lang.AssertionError: 
 (162950022446285318630909295651345252065,9481098247439719900692337295923514899]
 at 
 org.apache.cassandra.db.ColumnFamilyStore.getRangeSlice(ColumnFamilyStore.java:1264)
 at 
 org.apache.cassandra.service.StorageProxy.getRangeSlice(StorageProxy.java:429)
 at 
 org.apache.cassandra.thrift.CassandraServer.get_range_slices(CassandraServer.java:514)
 at 
 org.apache.cassandra.thrift.Cassandra$Processor$get_range_slices.process(Cassandra.java:2868)
 at 
 org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2555)
 at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:167)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:619)
 DEBUG 16:51:48,838 logged out: #User allow_all groups=[]
 You can reproduce this by just running contrib/word_count example. Mapreduce 
 last worked with Cassandra 0.7-beta2. Important is to run more than one node.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



svn commit: r1041242 - in /cassandra/branches/cassandra-0.6: CHANGES.txt src/java/org/apache/cassandra/dht/AbstractBounds.java src/java/org/apache/cassandra/service/StorageProxy.java test/unit/org/apa

2010-12-01 Thread jbellis
Author: jbellis
Date: Thu Dec  2 01:14:35 2010
New Revision: 1041242

URL: http://svn.apache.org/viewvc?rev=1041242view=rev
Log:
fix range queries against wrapped range
patch by Stu Hood; reviewed by jbellis for CASSANDRA-1781

Modified:
cassandra/branches/cassandra-0.6/CHANGES.txt

cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/dht/AbstractBounds.java

cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/StorageProxy.java

cassandra/branches/cassandra-0.6/test/unit/org/apache/cassandra/service/StorageProxyTest.java

Modified: cassandra/branches/cassandra-0.6/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/CHANGES.txt?rev=1041242r1=1041241r2=1041242view=diff
==
--- cassandra/branches/cassandra-0.6/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.6/CHANGES.txt Thu Dec  2 01:14:35 2010
@@ -11,6 +11,7 @@
  * fix live-column-count of slice ranges including tombstoned supercolumn 
with live subcolumn (CASSANDRA-1591)
  * clean up log messages for gossip token notifications (CASSANDRA-1518)
+ * fix range queries against wrapped range (CASSANDRA-1781)
 
 
 0.6.8

Modified: 
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/dht/AbstractBounds.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/dht/AbstractBounds.java?rev=1041242r1=1041241r2=1041242view=diff
==
--- 
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/dht/AbstractBounds.java
 (original)
+++ 
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/dht/AbstractBounds.java
 Thu Dec  2 01:14:35 2010
@@ -65,7 +65,7 @@ public abstract class AbstractBounds imp
  */
 public PairAbstractBounds,AbstractBounds split(Token token)
 {
-assert contains(token);
+assert left.equals(token) || contains(token);
 AbstractBounds lb = createFrom(token);
 // we contain this token, so only one of the left or right can be empty
 AbstractBounds rb = lb != null  token.equals(right) ? null : new 
Range(token, right);

Modified: 
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/StorageProxy.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/StorageProxy.java?rev=1041242r1=1041241r2=1041242view=diff
==
--- 
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/StorageProxy.java
 (original)
+++ 
cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/StorageProxy.java
 Thu Dec  2 01:14:35 2010
@@ -619,7 +619,7 @@ public class StorageProxy implements Sto
 while (ringIter.hasNext())
 {
 Token token = ringIter.next();
-if (remainder == null || !remainder.contains(token))
+if (remainder == null || !(remainder.left.equals(token) || 
remainder.contains(token)))
 // no more splits
 break;
 PairAbstractBounds,AbstractBounds splits = 
remainder.split(token);

Modified: 
cassandra/branches/cassandra-0.6/test/unit/org/apache/cassandra/service/StorageProxyTest.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/test/unit/org/apache/cassandra/service/StorageProxyTest.java?rev=1041242r1=1041241r2=1041242view=diff
==
--- 
cassandra/branches/cassandra-0.6/test/unit/org/apache/cassandra/service/StorageProxyTest.java
 (original)
+++ 
cassandra/branches/cassandra-0.6/test/unit/org/apache/cassandra/service/StorageProxyTest.java
 Thu Dec  2 01:14:35 2010
@@ -95,8 +95,9 @@ public class StorageProxyTest extends Cl
 // full wraps
 testGRR(range(0, 0), range(0, 1), range(1, 6), range(6, 
), range(, 0));
 testGRR(range(, ), range(, 1), range(1, 6), range(6, 
));
-// wrap on member token
+// wrap on member tokens
 testGRR(range(6, 6), range(6, ), range(, 1), range(1, 
6));
+testGRR(range(6, 1), range(6, ), range(, 1));
 // end wrapped
 testGRR(range(5, ), range(5, 6), range(6, ));
 }




svn commit: r1041243 - in /cassandra/branches/cassandra-0.7: ./ contrib/word_count/src/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/dht/ src/java/org/apache/ca

2010-12-01 Thread jbellis
Author: jbellis
Date: Thu Dec  2 01:17:09 2010
New Revision: 1041243

URL: http://svn.apache.org/viewvc?rev=1041243view=rev
Log:
merge from 0.6

Modified:
cassandra/branches/cassandra-0.7/   (props changed)
cassandra/branches/cassandra-0.7/CHANGES.txt
cassandra/branches/cassandra-0.7/contrib/word_count/src/WordCountSetup.java

cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
   (props changed)

cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
   (props changed)

cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
   (props changed)

cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
   (props changed)

cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
   (props changed)

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/AbstractBounds.java

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/StorageProxy.java

cassandra/branches/cassandra-0.7/test/unit/org/apache/cassandra/service/StorageProxyTest.java

Propchange: cassandra/branches/cassandra-0.7/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec  2 01:17:09 2010
@@ -1,4 +1,4 @@
-/cassandra/branches/cassandra-0.6:922689-1041201
+/cassandra/branches/cassandra-0.6:922689-1041242
 /cassandra/branches/cassandra-0.7:1035666
 /cassandra/trunk:1026516-1026734,1028929
 /incubator/cassandra/branches/cassandra-0.3:774578-796573

Modified: cassandra/branches/cassandra-0.7/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/CHANGES.txt?rev=1041243r1=1041242r2=1041243view=diff
==
--- cassandra/branches/cassandra-0.7/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.7/CHANGES.txt Thu Dec  2 01:17:09 2010
@@ -22,6 +22,7 @@ dev
periodic_without_flush option to disable this (CASSANDRA-1780)
  * close file handle used for post-flush truncate (CASSANDRA-1790)
  * various code cleanup (CASSANDRA-1793, -1794, -1795)
+ * fix range queries against wrapped range (CASSANDRA-1781)
 
 
 0.7.0-rc1
@@ -37,6 +38,8 @@ dev
  * Fix misuse of DataOutputBuffer.getData in AntiEntropyService
(CASSANDRA-1729)
  * detect and warn when obsolete version of JNA is present (CASSANDRA-1770)
+
+
  * Update windows .bat files to work outside of main Cassandra
directory (CASSANDRA-1713)
  * fix read repair regression from 0.6.7 (CASSANDRA-1727)

Modified: 
cassandra/branches/cassandra-0.7/contrib/word_count/src/WordCountSetup.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/contrib/word_count/src/WordCountSetup.java?rev=1041243r1=1041242r2=1041243view=diff
==
--- cassandra/branches/cassandra-0.7/contrib/word_count/src/WordCountSetup.java 
(original)
+++ cassandra/branches/cassandra-0.7/contrib/word_count/src/WordCountSetup.java 
Thu Dec  2 01:17:09 2010
@@ -103,6 +103,15 @@ public class WordCountSetup
 cfDefList.add(new CfDef(WordCount.KEYSPACE, 
WordCount.OUTPUT_COLUMN_FAMILY));
 
 client.system_add_keyspace(new KsDef(WordCount.KEYSPACE, 
org.apache.cassandra.locator.SimpleStrategy, 1, cfDefList));
+int magnitude = client.describe_ring(WordCount.KEYSPACE).size();
+try
+{
+Thread.sleep(1000 * magnitude);
+}
+catch (InterruptedException e)
+{
+throw new RuntimeException(e);
+}
 }
 
 private static Cassandra.Iface createConnection() throws 
TTransportException

Propchange: 
cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec  2 01:17:09 2010
@@ -1,4 +1,4 @@
-/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1041201
+/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1041242
 
/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1035666
 
/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1026734,1028929
 
/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/Cassandra.java:774578-796573

Propchange: 
cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
--
--- svn:mergeinfo (original)
+++ 

svn commit: r1041244 - in /cassandra/trunk: ./ conf/ contrib/word_count/src/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/cli/ src/java/org/apache/cassandra/con

2010-12-01 Thread jbellis
Author: jbellis
Date: Thu Dec  2 01:18:49 2010
New Revision: 1041244

URL: http://svn.apache.org/viewvc?rev=1041244view=rev
Log:
merge from 0.7

Modified:
cassandra/trunk/   (props changed)
cassandra/trunk/CHANGES.txt
cassandra/trunk/conf/cassandra.yaml
cassandra/trunk/contrib/word_count/src/WordCountSetup.java

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
   (props changed)
cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java
cassandra/trunk/src/java/org/apache/cassandra/cli/CliOptions.java
cassandra/trunk/src/java/org/apache/cassandra/config/Config.java
cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamily.java
cassandra/trunk/src/java/org/apache/cassandra/db/Memtable.java
cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLog.java

cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java
cassandra/trunk/src/java/org/apache/cassandra/dht/AbstractBounds.java
cassandra/trunk/src/java/org/apache/cassandra/gms/Gossiper.java
cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableScanner.java
cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java

cassandra/trunk/src/java/org/apache/cassandra/io/util/BufferedRandomAccessFile.java
cassandra/trunk/src/java/org/apache/cassandra/io/util/FileUtils.java

cassandra/trunk/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java
cassandra/trunk/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java
cassandra/trunk/src/java/org/apache/cassandra/tools/ClusterCmd.java
cassandra/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java

cassandra/trunk/test/unit/org/apache/cassandra/locator/SimpleStrategyTest.java
cassandra/trunk/test/unit/org/apache/cassandra/service/StorageProxyTest.java

Propchange: cassandra/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec  2 01:18:49 2010
@@ -1,5 +1,5 @@
-/cassandra/branches/cassandra-0.6:922689-1040580
-/cassandra/branches/cassandra-0.7:1026517-1040581
+/cassandra/branches/cassandra-0.6:922689-1041242
+/cassandra/branches/cassandra-0.7:1026517-1041243
 /incubator/cassandra/branches/cassandra-0.3:774578-796573
 /incubator/cassandra/branches/cassandra-0.4:810145-834239,834349-834350
 /incubator/cassandra/branches/cassandra-0.5:72-915439

Modified: cassandra/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=1041244r1=1041243r2=1041244view=diff
==
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Thu Dec  2 01:18:49 2010
@@ -18,6 +18,11 @@ dev
defined comparator, and decode properly in cli (CASSANDRA-1773)
  * use cross-platform newlines in cli (CASSANDRA-1786)
  * add ExpiringColumn support to sstable import/export (CASSANDRA-1754)
+ * add flush for each append to periodic commitlog mode; added
+   periodic_without_flush option to disable this (CASSANDRA-1780)
+ * close file handle used for post-flush truncate (CASSANDRA-1790)
+ * various code cleanup (CASSANDRA-1793, -1794, -1795)
+ * fix range queries against wrapped range (CASSANDRA-1781)
 
 
 0.7.0-rc1
@@ -33,6 +38,8 @@ dev
  * Fix misuse of DataOutputBuffer.getData in AntiEntropyService
(CASSANDRA-1729)
  * detect and warn when obsolete version of JNA is present (CASSANDRA-1770)
+
+
  * Update windows .bat files to work outside of main Cassandra
directory (CASSANDRA-1713)
  * fix read repair regression from 0.6.7 (CASSANDRA-1727)

Modified: cassandra/trunk/conf/cassandra.yaml
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/conf/cassandra.yaml?rev=1041244r1=1041243r2=1041244view=diff
==
--- cassandra/trunk/conf/cassandra.yaml (original)
+++ cassandra/trunk/conf/cassandra.yaml Thu Dec  2 01:18:49 2010
@@ -61,17 +61,32 @@ saved_caches_directory: /var/lib/cassand
 # Size to allow commitlog to grow to before creating a new segment 
 commitlog_rotation_threshold_in_mb: 128
 
-# commitlog_sync may be either periodic or batch. 
-# When in batch mode, Cassandra won't ack writes until the commit log
-# has been fsynced to disk.  It will wait up to
-# CommitLogSyncBatchWindowInMS milliseconds for other writes, before
-# 

[jira] Commented: (CASSANDRA-1525) Improve log4j configuration to provide the ability to modify logging levels dynamically via JMX

2010-12-01 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-1525:
---

Fails to build for me:

{code}
[javac] 
/Users/jonathan/projects/cassandra/svn-0.7/src/java/org/apache/cassandra/service/AbstractCassandraDaemon.java:22:
 cannot find symbol
[javac] symbol  : class LoggingInit
[javac] location: package org.apache.cassandra.utils
[javac] import org.apache.cassandra.utils.LoggingInit;
[javac]  ^
{code}

Did you mean to include LoggingInit in the patch, or is the import part of an 
earlier attempt?

 Improve log4j configuration to provide the ability to modify logging levels 
 dynamically via JMX
 ---

 Key: CASSANDRA-1525
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1525
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Nate McCall
Assignee: T Jake Luciani
 Fix For: 0.7.1

 Attachments: 1525_v1.txt


 It would nice to add some named appenders to log4j configuration in such a 
 way that their levels could be increased via jconsole. 
 I have done this with other logging libraries and I believe that most of the 
 capabilities here are built in to log4j. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.