Github user zznate commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/205#discussion_r173965027
  
    --- Diff: src/java/org/apache/cassandra/db/virtual/TableStats.java ---
    @@ -0,0 +1,166 @@
    +package org.apache.cassandra.db.virtual;
    +
    +import java.lang.reflect.Field;
    +import java.lang.reflect.Modifier;
    +import java.nio.ByteBuffer;
    +import java.util.*;
    +
    +import org.apache.cassandra.cql3.CQL3Type;
    +import org.apache.cassandra.cql3.QueryOptions;
    +import org.apache.cassandra.cql3.restrictions.StatementRestrictions;
    +import org.apache.cassandra.db.ColumnFamilyStore;
    +import org.apache.cassandra.db.InMemoryVirtualTable;
    +import org.apache.cassandra.db.marshal.CompositeType;
    +import org.apache.cassandra.metrics.LatencyMetrics;
    +import org.apache.cassandra.schema.TableMetadata;
    +import org.apache.cassandra.utils.EstimatedHistogram;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +import com.codahale.metrics.Counting;
    +import com.codahale.metrics.Gauge;
    +import com.codahale.metrics.Metric;
    +import com.codahale.metrics.Sampling;
    +import com.codahale.metrics.Snapshot;
    +import com.codahale.metrics.Timer;
    +import com.google.common.collect.ImmutableSet;
    +
    +public class TableStats extends InMemoryVirtualTable
    +{
    +    private static final Logger logger = 
LoggerFactory.getLogger(TableStats.class);
    +    private static final Field[] FIELDS = 
org.apache.cassandra.metrics.TableMetrics.class.getFields();
    +    static
    +    {
    +        Arrays.sort(FIELDS, Comparator.comparing(Field::getName));
    +    }
    +    private static final Collection<String> EH_GAUGES = ImmutableSet.of(
    +            "estimatedPartitionSizeHistogram",
    +            "estimatedColumnCountHistogram");
    +    private CompositeType keyType;
    +
    +    public static Map<String, CQL3Type> columns()
    --- End diff --
    
    same as above. Initialize statically. 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to