This repository has been archived by the owner on Nov 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
Split udp packets #15
Open
JensRantil
wants to merge
13
commits into
organicveggie:master
Choose a base branch
from
JensRantil:split-udp-packets
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I see no reason to keep things overly visible. All tests pass.
This will make it easier to check how many bytes have actually been written (ie. not just buffered). The is a preparatory commit to split the sending into multiple packets.
Will be reused when comparing multiple packets.
Currently, a test is lacking.
@JensRantil Thanks for this pull request. Limitation on the size of UDP packet is a serious issue when you need to send large monitoring data. We're using the current version of this in one of our project, we are facing exactly the same problem. 19:40:38.212 [metrics-statsd-reporter-thread-1] INFO com.bealetech.metrics.reporting.Statsd - Metrics output size by StatsD writer :: 68924
19:40:38.213 [metrics-statsd-reporter-thread-1] ERROR c.b.metrics.reporting.StatsdReporter - Error disconnecting from StatsD server
java.io.IOException: Message too long
at java.net.PlainDatagramSocketImpl.send(Native Method) ~[na:1.7.0_65]
at java.net.DatagramSocket.send(DatagramSocket.java:676) ~[na:1.7.0_65]
at com.bealetech.metrics.reporting.Statsd.close(Statsd.java:85) ~[metrics-statsd-3.0.0-SNAPSHOT.jar!/:na]
at com.bealetech.metrics.reporting.StatsdReporter.report(StatsdReporter.java:162) ~[metrics-statsd-3.0.0-SNAPSHOT.jar!/:na]
at com.bealetech.metrics.reporting.StatsdScheduledReporter.report(StatsdScheduledReporter.java:130) [metrics-statsd-3.0.0-SNAPSHOT.jar!/:na]
at com.bealetech.metrics.reporting.StatsdScheduledReporter$1.run(StatsdScheduledReporter.java:100) [metrics-statsd-3.0.0-SNAPSHOT.jar!/:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_65]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) [na:1.7.0_65]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_65]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_65]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65] |
@ganga-aloori Have you tried lowering |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP.
Almost complete pull request to fix #7. Just need to write a test for it. Most of the groundwork to run the test is already done. It's simply a matter of writing one.
I do not intend to finish this pull request myself since I no longer intend to use metrics-statsd. However, I am willing to answer any questions you might have about this pull request.