cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [5/6] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Date Thu, 19 Sep 2013 05:50:46 GMT
Merge branch 'cassandra-1.2' into cassandra-2.0

Conflicts:
	src/java/org/apache/cassandra/metrics/HintedHandoffMetrics.java
	src/java/org/apache/cassandra/metrics/ReadRepairMetrics.java


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

Branch: refs/heads/cassandra-2.0
Commit: 6e3a241e1a421d391f499a5e430b37a85fb05714
Parents: 997c49a eb390d0
Author: Yuki Morishita <yukim@apache.org>
Authored: Thu Sep 19 00:50:09 2013 -0500
Committer: Yuki Morishita <yukim@apache.org>
Committed: Thu Sep 19 00:50:09 2013 -0500

----------------------------------------------------------------------
 .../apache/cassandra/metrics/CacheMetrics.java  | 18 +++--
 .../cassandra/metrics/ClientRequestMetrics.java | 10 +--
 .../cassandra/metrics/CommitLogMetrics.java     | 10 ++-
 .../cassandra/metrics/CompactionMetrics.java    | 12 ++--
 .../cassandra/metrics/ConnectionMetrics.java    | 32 ++++-----
 .../cassandra/metrics/DefaultNameFactory.java   | 71 ++++++++++++++++++++
 .../metrics/DroppedMessageMetrics.java          |  7 +-
 .../cassandra/metrics/HintedHandoffMetrics.java |  8 +--
 .../cassandra/metrics/LatencyMetrics.java       | 30 ++-------
 .../cassandra/metrics/ReadRepairMetrics.java    | 37 +++++-----
 .../cassandra/metrics/StorageMetrics.java       | 11 +--
 .../cassandra/metrics/StreamingMetrics.java     | 13 ++--
 .../cassandra/scheduler/WeightedQueue.java      |  2 +-
 13 files changed, 148 insertions(+), 113 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e3a241e/src/java/org/apache/cassandra/metrics/CompactionMetrics.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e3a241e/src/java/org/apache/cassandra/metrics/HintedHandoffMetrics.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/metrics/HintedHandoffMetrics.java
index 560f290,a851f50..d002e39
--- a/src/java/org/apache/cassandra/metrics/HintedHandoffMetrics.java
+++ b/src/java/org/apache/cassandra/metrics/HintedHandoffMetrics.java
@@@ -40,8 -40,7 +39,7 @@@ public class HintedHandoffMetric
  {
      private static final Logger logger = LoggerFactory.getLogger(HintedHandoffMetrics.class);
  
-     public static final String GROUP_NAME = "org.apache.cassandra.metrics";
-     public static final String TYPE_NAME = "HintedHandOffManager";
 -    private final MetricNameFactory factory;
++    private final MetricNameFactory factory = new DefaultNameFactory("HintedHandOffManager");
  
      /** Total number of hints which are not stored, This is not a cache. */
      private final LoadingCache<InetAddress, DifferencingCounter> notStored = CacheBuilder.newBuilder().build(new
CacheLoader<InetAddress, DifferencingCounter>()
@@@ -52,18 -51,9 +50,18 @@@
          }
      });
  
 -    public HintedHandoffMetrics()
 +    /** Total number of hints that have been created, This is not a cache. */
 +    private final LoadingCache<InetAddress, Counter> createdHintCounts = CacheBuilder.newBuilder().build(new
CacheLoader<InetAddress, Counter>()
      {
 -        factory = new DefaultNameFactory("HintedHandOffManager");
 +        public Counter load(InetAddress address)
 +        {
-             return Metrics.newCounter(new MetricName(GROUP_NAME, TYPE_NAME, "Hints_created-"
+ address.getHostAddress()));
++            return Metrics.newCounter(factory.createMetricName("Hints_created-" + address.getHostAddress()));
 +        }
 +    });
 +
 +    public void incrCreatedHints(InetAddress address)
 +    {
 +        createdHintCounts.getUnchecked(address).inc();
      }
  
      public void incrPastWindow(InetAddress address)
@@@ -90,15 -87,15 +88,15 @@@
  
          public DifferencingCounter(InetAddress address)
          {
-             this.meter = Metrics.newCounter(new MetricName(GROUP_NAME, TYPE_NAME, "Hints_not_stored-"
+ address.getHostAddress()));
 -            this.meter = Metrics.newCounter(factory.createMetricName("Hints_not_stored-"
+ address.toString()));
++            this.meter = Metrics.newCounter(factory.createMetricName("Hints_not_stored-"
+ address.getHostAddress()));
          }
  
 -        public long diffrence()
 +        public long difference()
          {
              long current = meter.count();
 -            long diffrence = current - reported;
 +            long difference = current - reported;
              this.reported = current;
 -            return diffrence;
 +            return difference;
          }
  
          public long count()


Mime
View raw message