cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1053691 - in /cassandra/branches/cassandra-0.7.0: ./ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/cli/ src/java/org/apache/cassandra/db/ src/java/org/apache/cassandra/service/ test/unit/org/apache/ca...
Date Wed, 29 Dec 2010 18:14:54 GMT
Author: jbellis
Date: Wed Dec 29 18:14:53 2010
New Revision: 1053691

URL: http://svn.apache.org/viewvc?rev=1053691&view=rev
Log:
merge r1052002, r1052021, r1052027, r1052355 from 0.7

Modified:
    cassandra/branches/cassandra-0.7.0/   (props changed)
    cassandra/branches/cassandra-0.7.0/CHANGES.txt
    cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
  (props changed)
    cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
  (props changed)
    cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
  (props changed)
    cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
  (props changed)
    cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
  (props changed)
    cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/cli/CliClient.java
    cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/cli/CliMain.java
    cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/db/ReadResponse.java
    cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/db/ReadVerbHandler.java
    cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/service/StorageProxy.java
    cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/service/StorageProxyMBean.java
    cassandra/branches/cassandra-0.7.0/test/unit/org/apache/cassandra/cli/CliTest.java

Propchange: cassandra/branches/cassandra-0.7.0/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec 29 18:14:53 2010
@@ -1,5 +1,5 @@
 /cassandra/branches/cassandra-0.6:922689-1051640,1051662
-/cassandra/branches/cassandra-0.7:1035666,1050269
+/cassandra/branches/cassandra-0.7:1035666,1050269,1052002,1052021,1052027,1052355
 /cassandra/trunk:1026516-1026734,1028929
 /incubator/cassandra/branches/cassandra-0.3:774578-796573
 /incubator/cassandra/branches/cassandra-0.4:810145-834239,834349-834350

Modified: cassandra/branches/cassandra-0.7.0/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7.0/CHANGES.txt?rev=1053691&r1=1053690&r2=1053691&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7.0/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.7.0/CHANGES.txt Wed Dec 29 18:14:53 2010
@@ -1,3 +1,10 @@
+dev
+ * fix cli crash after backgrounding (CASSANDRA-1875)
+ * count timeouts in storageproxy latencies, and include latency 
+   histograms in StorageProxyMBean (CASSANDRA-1893)
+ * fix CLI get recognition of supercolumns (CASSANDRA-1899)
+
+
 0.7.0-rc3
  * expose getNaturalEndpoints in StorageServiceMBean taking byte[]
    key; RMI cannot serialize ByteBuffer (CASSANDRA-1833)

Propchange: cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec 29 18:14:53 2010
@@ -1,5 +1,5 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1051640,1051662
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1035666,1050269
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1035666,1050269,1052002,1052021,1052027,1052355
 /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
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/Cassandra.java:810145-834239,834349-834350

Propchange: cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec 29 18:14:53 2010
@@ -1,5 +1,5 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:922689-1051640,1051662
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1035666,1050269
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1035666,1050269,1052002,1052021,1052027,1052355
 /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
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/Column.java:810145-834239,834349-834350

Propchange: cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec 29 18:14:53 2010
@@ -1,5 +1,5 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:922689-1051640,1051662
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1035666,1050269
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1035666,1050269,1052002,1052021,1052027,1052355
 /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
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java:810145-834239,834349-834350

Propchange: cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec 29 18:14:53 2010
@@ -1,5 +1,5 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:922689-1051640,1051662
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1035666,1050269
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1035666,1050269,1052002,1052021,1052027,1052355
 /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
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/NotFoundException.java:810145-834239,834349-834350

Propchange: cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec 29 18:14:53 2010
@@ -1,5 +1,5 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:922689-1051640,1051662
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1035666,1050269
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1035666,1050269,1052002,1052021,1052027,1052355
 /cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1026516-1026734,1028929
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/superColumn_t.java:774578-792198
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/SuperColumn.java:810145-834239,834349-834350

Modified: cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/cli/CliClient.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/cli/CliClient.java?rev=1053691&r1=1053690&r2=1053691&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/cli/CliClient.java (original)
+++ cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/cli/CliClient.java Wed
Dec 29 18:14:53 2010
@@ -376,7 +376,7 @@ public class CliClient extends CliUserHe
         ByteBuffer key = getKeyAsBytes(columnFamily, columnFamilySpec.getChild(1));
         int columnSpecCnt = CliCompiler.numColumnSpecifiers(columnFamilySpec);
         CfDef cfDef = getCfDef(columnFamily);
-        boolean isSuper = cfDef.comparator_type.equals("Super");
+        boolean isSuper = cfDef.column_type.equals("Super");
         
         byte[] superColumnName = null;
         ByteBuffer columnName;

Modified: cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/cli/CliMain.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/cli/CliMain.java?rev=1053691&r1=1053690&r2=1053691&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/cli/CliMain.java (original)
+++ cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/cli/CliMain.java Wed
Dec 29 18:14:53 2010
@@ -325,7 +325,14 @@ public class CliMain
         {
             prompt = (inCompoundStatement) ? "...\t" : getPrompt(cliClient);
 
-            line = reader.readLine(prompt);
+            try
+            {
+                line = reader.readLine(prompt);
+            }
+            catch (IOException e)
+            {
+                // retry on I/O Exception
+            }
 
             if (line == null)
                 return;

Modified: cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/db/ReadResponse.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/db/ReadResponse.java?rev=1053691&r1=1053690&r2=1053691&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/db/ReadResponse.java
(original)
+++ cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/db/ReadResponse.java
Wed Dec 29 18:14:53 2010
@@ -47,20 +47,21 @@ private static ICompactSerializer<ReadRe
         return serializer_;
     }
     
-	private Row row_;
-	private ByteBuffer digest_ = FBUtilities.EMPTY_BYTE_BUFFER;
-    private boolean isDigestQuery_ = false;
+	private final Row row_;
+	private final ByteBuffer digest_;
 
 	public ReadResponse(ByteBuffer digest )
     {
         assert digest != null;
 		digest_= digest;
+        row_ = null;
 	}
 
 	public ReadResponse(Row row)
     {
         assert row != null;
 		row_ = row;
+        digest_ = null;
 	}
 
 	public Row row() 
@@ -75,12 +76,7 @@ private static ICompactSerializer<ReadRe
 
 	public boolean isDigestQuery()
     {
-    	return isDigestQuery_;
-    }
-    
-    public void setIsDigestQuery(boolean isDigestQuery)
-    {
-    	isDigestQuery_ = isDigestQuery;
+    	return digest_ != null;
     }
 }
 
@@ -88,31 +84,35 @@ class ReadResponseSerializer implements 
 {
 	public void serialize(ReadResponse rm, DataOutputStream dos) throws IOException
 	{
-        dos.writeInt(rm.digest().remaining());
-        dos.write(rm.digest().array(), rm.digest().position() + rm.digest().arrayOffset(),
rm.digest().remaining());
+        dos.writeInt(rm.isDigestQuery() ? rm.digest().remaining() : 0);
+        ByteBuffer buffer = rm.isDigestQuery() ? rm.digest() : FBUtilities.EMPTY_BYTE_BUFFER;
+        dos.write(buffer.array(), buffer.position() + buffer.arrayOffset(), buffer.remaining());
         dos.writeBoolean(rm.isDigestQuery());
-        
-        if( !rm.isDigestQuery() && rm.row() != null )
-        {            
+
+        if (!rm.isDigestQuery())
+        {
             Row.serializer().serialize(rm.row(), dos);
-        }				
-	}
+        }
+    }
 	
     public ReadResponse deserialize(DataInputStream dis) throws IOException
     {
+        byte[] digest = null;
         int digestSize = dis.readInt();
-        byte[] digest = new byte[digestSize];
-        dis.read(digest, 0 , digestSize);
+        if (digestSize > 0)
+        {
+            digest = new byte[digestSize];
+            dis.readFully(digest, 0, digestSize);
+        }
         boolean isDigest = dis.readBoolean();
-        
+        assert isDigest == digestSize > 0;
+
         Row row = null;
         if (!isDigest)
         {
             row = Row.serializer().deserialize(dis);
         }
 
-        ReadResponse rmsg = isDigest ? new ReadResponse(ByteBuffer.wrap(digest)) : new ReadResponse(row);
-        rmsg.setIsDigestQuery(isDigest);
-    	return rmsg;
+        return isDigest ? new ReadResponse(ByteBuffer.wrap(digest)) : new ReadResponse(row);
     } 
 }

Modified: cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/db/ReadVerbHandler.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/db/ReadVerbHandler.java?rev=1053691&r1=1053690&r2=1053691&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/db/ReadVerbHandler.java
(original)
+++ cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/db/ReadVerbHandler.java
Wed Dec 29 18:14:53 2010
@@ -82,7 +82,6 @@ public class ReadVerbHandler implements 
             {
                 readResponse = new ReadResponse(row);
             }
-            readResponse.setIsDigestQuery(command.isDigestQuery());
             /* serialize the ReadResponseMessage. */
             readCtx.bufOut_.reset();
 

Modified: cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/service/StorageProxy.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/service/StorageProxy.java?rev=1053691&r1=1053690&r2=1053691&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/service/StorageProxy.java
(original)
+++ cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/service/StorageProxy.java
Wed Dec 29 18:14:53 2010
@@ -176,7 +176,6 @@ public class StorageProxy implements Sto
         {
             writeStats.addNano(System.nanoTime() - startTime);
         }
-
     }
 
     private static void addHintHeader(Message message, InetAddress target) throws IOException
@@ -217,19 +216,23 @@ public class StorageProxy implements Sto
         if (StorageService.instance.isBootstrapMode())
             throw new UnavailableException();
         long startTime = System.nanoTime();
-
         List<Row> rows;
-        if (consistency_level == ConsistencyLevel.ONE)
+        try
         {
-            rows = weakRead(commands);
+            if (consistency_level == ConsistencyLevel.ONE)
+            {
+                rows = weakRead(commands);
+            }
+            else
+            {
+                assert consistency_level.getValue() >= ConsistencyLevel.QUORUM.getValue();
+                rows = strongRead(commands, consistency_level);
+            }
         }
-        else
+        finally
         {
-            assert consistency_level.getValue() >= ConsistencyLevel.QUORUM.getValue();
-            rows = strongRead(commands, consistency_level);
+            readStats.addNano(System.nanoTime() - startTime);
         }
-
-        readStats.addNano(System.nanoTime() - startTime);
         return rows;
     }
 
@@ -415,77 +418,82 @@ public class StorageProxy implements Sto
         if (logger.isDebugEnabled())
             logger.debug(command.toString());
         long startTime = System.nanoTime();
-
-        List<AbstractBounds> ranges = getRestrictedRanges(command.range);
+        List<Row> rows;
         // now scan until we have enough results
-        List<Row> rows = new ArrayList<Row>(command.max_keys);
-        for (AbstractBounds range : ranges)
+        try
         {
-            List<InetAddress> liveEndpoints = StorageService.instance.getLiveNaturalEndpoints(command.keyspace,
range.right);
-
-            if (consistency_level == ConsistencyLevel.ONE && liveEndpoints.contains(FBUtilities.getLocalAddress()))

+            rows = new ArrayList<Row>(command.max_keys);
+            List<AbstractBounds> ranges = getRestrictedRanges(command.range);
+            for (AbstractBounds range : ranges)
             {
-                if (logger.isDebugEnabled())
-                    logger.debug("local range slice");
-                ColumnFamilyStore cfs = Table.open(command.keyspace).getColumnFamilyStore(command.column_family);
-                try 
-                {
-                    rows.addAll(cfs.getRangeSlice(command.super_column,
-                                                  range,
-                                                  command.max_keys,
-                                                  QueryFilter.getFilter(command.predicate,
cfs.getComparator())));
-                } 
-                catch (ExecutionException e) 
-                {
-                    throw new RuntimeException(e.getCause());
-                } 
-                catch (InterruptedException e) 
-                {
-                    throw new AssertionError(e);
-                }           
-            }
-            else 
-            {
-                DatabaseDescriptor.getEndpointSnitch().sortByProximity(FBUtilities.getLocalAddress(),
liveEndpoints);
-                RangeSliceCommand c2 = new RangeSliceCommand(command.keyspace, command.column_family,
command.super_column, command.predicate, range, command.max_keys);
-                Message message = c2.getMessage();
-
-                // collect replies and resolve according to consistency level
-                RangeSliceResponseResolver resolver = new RangeSliceResponseResolver(command.keyspace,
liveEndpoints);
-                AbstractReplicationStrategy rs = Table.open(command.keyspace).getReplicationStrategy();
-                QuorumResponseHandler<List<Row>> handler = rs.getQuorumResponseHandler(resolver,
consistency_level);
-                // TODO bail early if live endpoints can't satisfy requested consistency
level
-                for (InetAddress endpoint : liveEndpoints) 
+                List<InetAddress> liveEndpoints = StorageService.instance.getLiveNaturalEndpoints(command.keyspace,
range.right);
+
+                if (consistency_level == ConsistencyLevel.ONE && liveEndpoints.contains(FBUtilities.getLocalAddress()))

                 {
-                    MessagingService.instance.sendRR(message, endpoint, handler);
                     if (logger.isDebugEnabled())
-                        logger.debug("reading " + c2 + " from " + message.getMessageId()
+ "@" + endpoint);
+                        logger.debug("local range slice");
+                    ColumnFamilyStore cfs = Table.open(command.keyspace).getColumnFamilyStore(command.column_family);
+                    try 
+                    {
+                        rows.addAll(cfs.getRangeSlice(command.super_column,
+                                                    range,
+                                                    command.max_keys,
+                                                    QueryFilter.getFilter(command.predicate,
cfs.getComparator())));
+                    } 
+                    catch (ExecutionException e) 
+                    {
+                        throw new RuntimeException(e.getCause());
+                    } 
+                    catch (InterruptedException e) 
+                    {
+                        throw new AssertionError(e);
+                    }           
                 }
-                // TODO read repair on remaining replicas?
-
-                // if we're done, great, otherwise, move to the next range
-                try 
+                else 
                 {
-                    if (logger.isDebugEnabled()) 
+                    DatabaseDescriptor.getEndpointSnitch().sortByProximity(FBUtilities.getLocalAddress(),
liveEndpoints);
+                    RangeSliceCommand c2 = new RangeSliceCommand(command.keyspace, command.column_family,
command.super_column, command.predicate, range, command.max_keys);
+                    Message message = c2.getMessage();
+
+                    // collect replies and resolve according to consistency level
+                    RangeSliceResponseResolver resolver = new RangeSliceResponseResolver(command.keyspace,
liveEndpoints);
+                    AbstractReplicationStrategy rs = Table.open(command.keyspace).getReplicationStrategy();
+                    QuorumResponseHandler<List<Row>> handler = rs.getQuorumResponseHandler(resolver,
consistency_level);
+                    // TODO bail early if live endpoints can't satisfy requested consistency
level
+                    for (InetAddress endpoint : liveEndpoints) 
                     {
-                        for (Row row : handler.get()) 
+                        MessagingService.instance.sendRR(message, endpoint, handler);
+                        if (logger.isDebugEnabled())
+                            logger.debug("reading " + c2 + " from " + message.getMessageId()
+ "@" + endpoint);
+                    }
+                    // TODO read repair on remaining replicas?
+
+                    // if we're done, great, otherwise, move to the next range
+                    try 
+                    {
+                        if (logger.isDebugEnabled()) 
                         {
-                            logger.debug("range slices read " + row.key);
+                            for (Row row : handler.get()) 
+                            {
+                                logger.debug("range slices read " + row.key);
+                            }
                         }
+                        rows.addAll(handler.get());
+                    } 
+                    catch (DigestMismatchException e) 
+                    {
+                        throw new AssertionError(e); // no digests in range slices yet
                     }
-                    rows.addAll(handler.get());
-                } 
-                catch (DigestMismatchException e) 
-                {
-                    throw new AssertionError(e); // no digests in range slices yet
                 }
+            
+                if (rows.size() >= command.max_keys)
+                    break;
             }
-          
-            if (rows.size() >= command.max_keys)
-                break;
         }
-
-        rangeStats.addNano(System.nanoTime() - startTime);
+        finally
+        {
+            rangeStats.addNano(System.nanoTime() - startTime);
+        }
         return rows.size() > command.max_keys ? rows.subList(0, command.max_keys) : rows;
     }
 
@@ -620,6 +628,16 @@ public class StorageProxy implements Sto
         return readStats.getRecentLatencyMicros();
     }
 
+    public long[] getTotalReadLatencyHistogramMicros()
+    {
+        return readStats.getTotalLatencyHistogramMicros();
+    }
+
+    public long[] getRecentReadLatencyHistogramMicros()
+    {
+        return readStats.getRecentLatencyHistogramMicros();
+    }
+
     public long getRangeOperations()
     {
         return rangeStats.getOpCount();
@@ -635,6 +653,16 @@ public class StorageProxy implements Sto
         return rangeStats.getRecentLatencyMicros();
     }
 
+    public long[] getTotalRangeLatencyHistogramMicros()
+    {
+        return rangeStats.getTotalLatencyHistogramMicros();
+    }
+
+    public long[] getRecentRangeLatencyHistogramMicros()
+    {
+        return rangeStats.getRecentLatencyHistogramMicros();
+    }
+
     public long getWriteOperations()
     {
         return writeStats.getOpCount();
@@ -650,6 +678,16 @@ public class StorageProxy implements Sto
         return writeStats.getRecentLatencyMicros();
     }
 
+    public long[] getTotalWriteLatencyHistogramMicros()
+    {
+        return writeStats.getTotalLatencyHistogramMicros();
+    }
+
+    public long[] getRecentWriteLatencyHistogramMicros()
+    {
+        return writeStats.getRecentLatencyHistogramMicros();
+    }
+
     public static List<Row> scan(String keyspace, String column_family, IndexClause
index_clause, SlicePredicate column_predicate, ConsistencyLevel consistency_level)
     throws IOException, TimeoutException, UnavailableException
     {

Modified: cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/service/StorageProxyMBean.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/service/StorageProxyMBean.java?rev=1053691&r1=1053690&r2=1053691&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/service/StorageProxyMBean.java
(original)
+++ cassandra/branches/cassandra-0.7.0/src/java/org/apache/cassandra/service/StorageProxyMBean.java
Wed Dec 29 18:14:53 2010
@@ -23,14 +23,20 @@ public interface StorageProxyMBean
     public long getReadOperations();
     public long getTotalReadLatencyMicros();
     public double getRecentReadLatencyMicros();
+    public long[] getTotalReadLatencyHistogramMicros();
+    public long[] getRecentReadLatencyHistogramMicros();
 
     public long getRangeOperations();
     public long getTotalRangeLatencyMicros();
     public double getRecentRangeLatencyMicros();
+    public long[] getTotalRangeLatencyHistogramMicros();
+    public long[] getRecentRangeLatencyHistogramMicros();
 
     public long getWriteOperations();
     public long getTotalWriteLatencyMicros();
     public double getRecentWriteLatencyMicros();
+    public long[] getTotalWriteLatencyHistogramMicros();
+    public long[] getRecentWriteLatencyHistogramMicros();
 
     public boolean getHintedHandoffEnabled();
     public void setHintedHandoffEnabled(boolean b);

Modified: cassandra/branches/cassandra-0.7.0/test/unit/org/apache/cassandra/cli/CliTest.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7.0/test/unit/org/apache/cassandra/cli/CliTest.java?rev=1053691&r1=1053690&r2=1053691&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7.0/test/unit/org/apache/cassandra/cli/CliTest.java (original)
+++ cassandra/branches/cassandra-0.7.0/test/unit/org/apache/cassandra/cli/CliTest.java Wed
Dec 29 18:14:53 2010
@@ -108,6 +108,9 @@ public class CliTest extends CleanupHelp
         "drop column family cF8;",
         "create keyspace TESTIN;",
         "drop keyspace tesTIN;",
+        "create column family myCF with column_type='Super' and comparator='UTF8Type' AND
subcomparator='UTF8Type';",
+        "set myCF['key']['scName']['firstname'] = 'John';",
+        "get myCF['key']['scName']",
         "use TestKEYSpace;",
     };
     



Mime
View raw message