Questions tagged [twitter-finagle]
58 questions
2
votes
2 answers
Take control over /health endpoint in finagle
I'm trying to override health endpoint. I need to make it return something else then 'OK'.
As described in docs, I should use Lifecycle.Warmup trait.
Neither
HttpMuxer.addHandler(Route("/health", new ReplyHandler("not OK\n")))
nor overriding…

green-creeper
- 316
- 3
- 15
2
votes
1 answer
How to Create and test a Upload file service
I am trying my hands on with Finch. New to scala and Finch
I Would to know how to create and test a file upload service.
aim - to upload the file and read the contents of file
import java.nio.file.{Files, Paths}
import com.twitter.util.{Await,…

Prateek Mane
- 111
- 1
- 9
2
votes
1 answer
Refreshing DNS cache in twitter finagle library
Does twitter finagle library does DNS caching on its own? I ask this because we removed some of the hosts behind the vip but they were still getting requests from our client.
If there is such a cache, how do I set a time out for it ?

Piyush
- 321
- 2
- 13
2
votes
2 answers
Example of java facebook-swift, thrift usage
I have been looking on the net for an example of how to use thrift with facebook-swift in java but couldn't find anything.
Hasn't anyone got an example to share?

rojanu
- 1,592
- 5
- 20
- 34
1
vote
1 answer
Twitter Futures - how are unused futures handled?
So I have a api in Scala that uses twitter.util.Future.
In my case, I want to create 2 futures, one of which is dependent on the result of the other and return the first future:
def apiFunc(): Future[Response]={
val future1 = getFuture1()
val…

DFL
- 53
- 8
1
vote
1 answer
Starting two Scala Finagle ListeningServers at once
I need to start two Finagle ListeningServers at once because I have to implement two different traits that extend ListeningServer.
/* A simplified example to give you an idea of what I'm trying to do */
trait FirstListeningServer extends…

sentenza
- 1,608
- 3
- 29
- 51
1
vote
1 answer
How to make a finagle client automatic try to reconnect if the server goes down?
I'm testing finagle and got over the current situation:
Server:
import com.twitter.finagle.{Http, Service}
import com.twitter.finagle.http
import com.twitter.util.{Await, Future}
class Server(name: String, port: Int) {
val service = new…

Patrick
- 13
- 3
1
vote
1 answer
Finagle filter sequence of futures of option
I am using twitter finagle framework and given a sequence of future of optionals I would like to filter them based on the state of the option.
seqFuture : Seq[Future[Option[Foo]]]
val filteredFuture = seqFuture map { fut => fut map {
opt =>…

Radu Ionescu
- 3,462
- 5
- 24
- 43
1
vote
1 answer
How to publish services with ssl using docker-compose?
I have a service using finatra server running on docker container. Currently I am using letsencrypt , and I created my .pfx file etc. But I don't know how to use it with docker-compose. I have a keystore folder inside my project which has my ssl…

earlymorningtea
- 508
- 1
- 9
- 20
1
vote
0 answers
java.lang.NoClassDefFoundError: Could not initialize class com.twitter.finagle.Init$
I've project with dependency to finagle 7.1.0 and related libraries with Scala version as 2.11.11
When I upgraded the scala version to 2.12.6 and finagle version as 17.12.0 I'm getting below error.
Caused by: java.lang.NoClassDefFoundError: Could…

user51
- 8,843
- 21
- 79
- 158
1
vote
1 answer
How to change number of worker threads in finch/finagle?
I have a finch endpoint that works fine when sequential calls are made.in case of concurrent requests, service latency is increasing in the proportion of the number of concurrent requests.I have two questions regarding this.
Is blocking of thread…

Kumar Waghmode
- 509
- 2
- 18
1
vote
0 answers
Finnagle Error running client/server in same JVM
I´m having a very bizzare behaviour with Twitter finagle client/server.
Having a Server
def start(): Unit = {
val port=8500
println(s"Running Finagle Mock Server in port $port.......")
mockServer = Some(Http.server
…

paul
- 12,873
- 23
- 91
- 153
1
vote
1 answer
How Finagle aperture algorithm chooses "non overlapping" subsets?
I have been reading about Finagle and trying to understand the code to figure out how Aperture's subset choice works.
I have seen that ApertureLeastLoaded has a "useDeterministicOrdering" and an "EndpointFactory" which I guess should be the key…

M4rk
- 2,172
- 5
- 36
- 70
1
vote
1 answer
Finagle Resolver not found for scheme
I create my own finagle resolver, and I want to test it in my scalaTest. But since my test does not provide the META-INF/services/com.twitter.finagle.Resolver file, when I run the client
Http.client.newService("myResolver!foo.com:/endpoint",…

paul
- 12,873
- 23
- 91
- 153
1
vote
1 answer
Unable to find the correct SBT dependency
Today is my first day with Finch.
I am unable to find the right set of SBT dependencies for finch and finagle.
I have tried all the dependencies as shown in Image 2

Prateek Mane
- 111
- 1
- 9