Interface TDigestSketchCommands

All Known Subinterfaces:
RedisBloomCommands, RedisModuleCommands
All Known Implementing Classes:
JedisCluster, JedisPooled, JedisSentineled, JedisSharding, UnifiedJedis

public interface TDigestSketchCommands
  • Method Details

    • tdigestCreate

      String tdigestCreate(String key)
      TDIGEST.CREATE key
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      Returns:
      OK
    • tdigestCreate

      String tdigestCreate(String key, int compression)
      TDIGEST.CREATE key [compression]
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      compression - The compression parameter. 100 is a common value for normal uses. 1000 is extremely large.
      Returns:
      OK
    • tdigestReset

      String tdigestReset(String key)
      TDIGEST.RESET key
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      Returns:
      OK
    • tdigestMerge

      String tdigestMerge(String destinationKey, String... sourceKeys)
      TDIGEST.MERGE destination-key numkeys source-key [source-key ...]
      Parameters:
      destinationKey - Sketch to copy observation values to (a t-digest data structure)
      sourceKeys - Sketch(es) to copy observation values from (a t-digest data structure)
      Returns:
      OK
    • tdigestMerge

      String tdigestMerge(TDigestMergeParams mergeParams, String destinationKey, String... sourceKeys)
      TDIGEST.MERGE destination-key numkeys source-key [source-key ...] [COMPRESSION compression] [OVERRIDE]
      Parameters:
      mergeParams - compression and override options
      destinationKey - Sketch to copy observation values to (a t-digest data structure)
      sourceKeys - Sketch(es) to copy observation values from (a t-digest data structure)
      Returns:
      OK
    • tdigestInfo

      Map<String,Object> tdigestInfo(String key)
      TDIGEST.INFO key
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      Returns:
      information about the sketch
    • tdigestAdd

      String tdigestAdd(String key, double... values)
      TDIGEST.ADD key value weight [ value weight ...]
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      values - The value of the observation (floating-point)
      Returns:
      OK
    • tdigestCDF

      List<Double> tdigestCDF(String key, double... values)
      TDIGEST.CDF key value [value ...]
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      values - upper limit of observation value, for which the fraction of all observations added which are ≤ value
      Returns:
      estimation of the fraction of all observations added which are ≤ value
    • tdigestQuantile

      List<Double> tdigestQuantile(String key, double... quantiles)
      TDIGEST.QUANTILE key quantile [quantile ...]
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      quantiles - The desired fraction(s) (between 0 and 1 inclusively)
      Returns:
      results
    • tdigestMin

      double tdigestMin(String key)
      TDIGEST.MIN key
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      Returns:
      minimum observation value from the sketch
    • tdigestMax

      double tdigestMax(String key)
      TDIGEST.MAX key
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      Returns:
      maximum observation value from the sketch
    • tdigestTrimmedMean

      double tdigestTrimmedMean(String key, double lowCutQuantile, double highCutQuantile)
      TDIGEST.TRIMMED_MEAN key low_cut_quantile high_cut_quantile
      Parameters:
      key - The name of the sketch (a t-digest data structure)
      lowCutQuantile - Exclude observation values lower than this quantile
      highCutQuantile - Exclude observation values higher than this quantile
      Returns:
      estimation of the mean value
    • tdigestRank

      List<Long> tdigestRank(String key, double... values)
    • tdigestRevRank

      List<Long> tdigestRevRank(String key, double... values)
    • tdigestByRank

      List<Double> tdigestByRank(String key, long... ranks)
    • tdigestByRevRank

      List<Double> tdigestByRevRank(String key, long... ranks)