【发布时间】:2015-05-11 00:12:35
【问题描述】:
我有一个使用 Scala Play 的项目 - Finagle 和 ElasticSearch
我正在使用带有旧版本 API 的 Finagle 客户端,如下所示:
val client = ClientBuilder()
.codec(Http)
.hosts("localhost:10000,localhost:10001,localhost:10003")
.hostConnectionLimit(1)
.build()
这是我的代码:
https://gist.github.com/hectorgool/f217d16e2c15b122d7a7
并且工作正常,但现在我想将我的代码升级到新的 API 版本,如下所示:
val client = Http.newService("localhost:10000,localhost:10001")
我的代码的新版本在这里:
https://github.com/hectorgool/es-client/blob/master/app/lib/FinagleClient.scala
但是,现在我的项目没有编译,这行(111)有错误:
111: val client = clientFactory.apply()()
不知道怎么解决
【问题讨论】:
-
您遇到的错误是什么?
-
方法应用的参数不足:(请求:org.jboss.netty.handler.codec.http.HttpRequest)com.twitter.util.Future[org.jboss.netty.handler.codec. http.HttpResponse] 在服务类中。 [错误] 未指定值参数请求。
标签: scala playframework finagle