YARN-11054. Alleviate LocalJobRunnerMetricName Conflicts #3834
+1
−1
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.
Description of PR
In some scenarios, Sqoop will use LocalJobRuner (YarnLocal mode) to run massive jobs, assuming 2 million jobs have been run. Considering LocalJobRunner MetricName generated by nextInt function is in the range of (0, 2147483647),
The conflict probability will be about 2000000/2147483647 = 1/1000, which means that an average of one fail task for every more 1000 jobs run.
If LocalJobRunner MetricName is generated by nextLong() whose range is (0, 9223372036854775807), considering that Long's range is 1 billion times that of Int, the conflict probability is also decreased by one trillionth times.
the conflict probability goes to 1/1000000000 from 1/1000, which alleviate LocalJobRunnerMetricName conflicts a lot.
How was this patch tested?
With long-time test, the conflict probability decreases a lot
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?