Skip to content

Conversation

@alexmnyc
Copy link

@alexmnyc alexmnyc commented Sep 12, 2017

What changes were proposed in this pull request?

Upgrade codahale metrics library so that Graphite constructor can re-resolve hosts behind a CNAME with re-tried DNS lookups. When Graphite is deployed behind an ELB, ELB may change IP addresses based on auto-scaling needs. Using current approach yields Graphite usage impossible, fixing for that use case

  • Upgrade to codahale 3.1.5
  • Use new Graphite(host, port) constructor instead of new Graphite(new InetSocketAddress(host, port)) constructor

How was this patch tested?

The same logic is used for another project that is using the same configuration and code path, and graphite re-connect's behind ELB's are no longer an issue

This are proposed changes for codahale lib - dropwizard/metrics@v3.1.2...v3.1.5#diff-6916c85d2dd08d89fe771c952e3b8512R120. Specifically, https://github.com/dropwizard/metrics/blob/b4d246d34e8a059b047567848b3522567cbe6108/metrics-graphite/src/main/java/com/codahale/metrics/graphite/Graphite.java#L120

Please review http://spark.apache.org/contributing.html before opening a pull request.

alexmnyc added 2 commits September 12, 2017 14:49
…resolve hosts behind a CNAME with re-tried DNS lookups

Upgrade codahale metrics library so that Graphite constructor can re-resolve hosts behind a CNAME with re-tried DNS lookups. When Graphite is deployed behind an ELB, ELB may change IP addresses based on auto-scaling needs. Using current approach yields Graphite usage impossible, fixing for that use case
@alexmnyc alexmnyc changed the title Fix Graphite re-connects for Graphite instances behind ELB's or auto-scaled load balancers Fix Graphite re-connects for Graphite instances behind ELB's or auto-scaled load balancers. Upgrade codahale to 3.1.5 Sep 12, 2017
@jerryshao
Copy link
Contributor

You should also update the the files under dev/deps.

@alexmnyc
Copy link
Author

@jerryshao thanks. it's done.

@jerryshao
Copy link
Contributor

@HyukjinKwon would you please help to trigger the Jenkins? Thanks!

@HyukjinKwon
Copy link
Member

Sure.

ok to test

@HyukjinKwon
Copy link
Member

ok to test

@SparkQA
Copy link

SparkQA commented Sep 14, 2017

Test build #81754 has finished for PR 19210 at commit 8e982c7.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@jerryshao
Copy link
Contributor

Jenkins, retest this please.

@SparkQA
Copy link

SparkQA commented Sep 14, 2017

Test build #81770 has finished for PR 19210 at commit 8e982c7.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

val graphite = propertyToOption(GRAPHITE_KEY_PROTOCOL).map(_.toLowerCase(Locale.ROOT)) match {
case Some("udp") => new GraphiteUDP(new InetSocketAddress(host, port))
case Some("tcp") | None => new Graphite(new InetSocketAddress(host, port))
case Some("tcp") | None => new Graphite(host, port)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to change here also?

Copy link
Author

@alexmnyc alexmnyc Sep 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jerryshao Do you mean change Graphite constructor for "udp" case ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's what I mean, I'm not sure if it is required since I'm not familiar with this Graphite sink.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there is a constructor accepting hostname directly for UDP. I'll add that as well.

@alexmnyc
Copy link
Author

@jerryshao done

@jerryshao
Copy link
Contributor

BTW, can you please create a JIRA, and fix the PR title like other PRs.

@SparkQA
Copy link

SparkQA commented Sep 15, 2017

Test build #81802 has finished for PR 19210 at commit 0458123.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@alexmnyc
Copy link
Author

alexmnyc commented Sep 15, 2017

@jerryshao No problem. I don't have a JIRA account for Apache though. How do I go about getting one? - Actually NM, I found it. Will do. Thanks, Jerry.

@alexmnyc alexmnyc changed the title Fix Graphite re-connects for Graphite instances behind ELB's or auto-scaled load balancers. Upgrade codahale to 3.1.5 [SPARK-22030][CORE] Fix Graphite re-connects for Graphite instances behind ELB's or auto-scaled load balancers. Upgrade codahale to 3.1.5 Sep 15, 2017
@alexmnyc alexmnyc changed the title [SPARK-22030][CORE] Fix Graphite re-connects for Graphite instances behind ELB's or auto-scaled load balancers. Upgrade codahale to 3.1.5 [SPARK-22030][CORE] GraphiteSink fails to re-connect to Graphite instances behind an ELB or any other auto-scaled LB Sep 15, 2017
@alexmnyc
Copy link
Author

@jerryshao done

@jerryshao
Copy link
Contributor

Jenkins, retest this please.

@jerryshao
Copy link
Contributor

LGTM, let me retest this again.

@SparkQA
Copy link

SparkQA commented Sep 18, 2017

Test build #81875 has finished for PR 19210 at commit 0458123.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@jerryshao
Copy link
Contributor

LGTM, merging to master.

@asfgit asfgit closed this in 94f7e04 Sep 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants