【问题标题】:Oracle Coherence - Distinct Values from combination of columnsOracle Coherence - 列组合中的不同值
【发布时间】:2014-08-16 06:01:51
【问题描述】:

我想构建基于 Oracle Coherence 网格中的两列检索不同值的查询。网格例如包含列 InvoiceID、ProductName、Description、BookedAtTime、Updated By (etc...)

检索不同值的列组合是 ProductName-BookedAtTime,因此应提取具有不同 Product 和 BookedAtTime 的任何记录。这是一个包含数百万条记录的大容量网格,我需要在特定时间间隔内继续查看新值。

我尝试探索 Coherence 文档以找到构建此查询的方法, 我可以找到 DistinctValues 过滤器http://download.oracle.com/otn_hosted_doc/coherence/341/com/tangosol/util/aggregator/DistinctValues.html

然而,构造函数只允许一个字符串。我需要知道可以使用哪个过滤器来构建

  • 可在此处用于提取值的查询
  • 从 Coherence 网格中持续检索数据的最佳方法 像这样的高容量场景。

我是 Coherence 的新手,如果有任何帮助,我将不胜感激。

【问题讨论】:

    标签: oracle-coherence


    【解决方案1】:

    该类具有以下构造函数:

    DistinctValues(ValueExtractor extractor)
    

    您可以使用 MultiExtractor 来获取属性组合。

    MultiExtractor:基于提取器数组的复合 ValueExtractor 实现。数组中的所有提取器都应用于同一个目标对象,提取的结果是提取值的列表。

    使用 MultiExtractor 的常见场景涉及 DistinctValues 或 GroupAggregator 聚合器,它们允许客户端收集给定属性集的所有不同组合,或者针对相应的条目组收集和运行附加聚合。

    见: http://download.oracle.com/otn_hosted_doc/coherence/341/com/tangosol/util/extractor/MultiExtractor.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-20
      • 1970-01-01
      • 2023-01-28
      • 2013-06-19
      相关资源
      最近更新 更多