【问题标题】:Mahout, PostgreSQL and connection poolMahout、PostgreSQL 和连接池
【发布时间】:2014-12-15 22:03:53
【问题描述】:

在 Mahout 0.9 中使用 PostgreSQL 作为数据源,我不断得到

WARN org.apache.mahout.cf.taste.impl.model.jdbc.AbstractJDBCDataModel - You are not using ConnectionPoolDataSource. Make sure your DataSource pools connections to the database itself, or database performance will be severely reduced.

警告。

这是真的 - 每个请求都会不断打开新的连接。

有什么方法可以将PGConnectionPoolDataSource 用于PostgreSQLBooleanPrefJDBCDataModel

(目前我有no constructorfor arguments n Java::OrgApacheMahoutCfTasteImplModelJdbc::PostgreSQLBooleanPrefJDBCDataModel错误)

【问题讨论】:

    标签: connection-pooling mahout pg-jdbc


    【解决方案1】:

    事实上,您可能根本不需要连接池,因为正确的解决方案是使用基于内存的 ReloadFromJDBCDataModel 包装器,其副作用是将连接数减少到 1。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-04-03
      • 2016-06-03
      • 1970-01-01
      • 2013-10-12
      • 2017-03-13
      • 1970-01-01
      • 2012-01-15
      • 2018-04-30
      相关资源
      最近更新 更多