-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HADOOP-16612 Track Azure Blob File System client-perceived latency #1611
Conversation
🎊 +1 overall
This message was automatically generated. |
2854724
to
5c66984
Compare
...-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/LatencyTracker.java
Outdated
Show resolved
Hide resolved
...-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/LatencyTracker.java
Outdated
Show resolved
Hide resolved
...-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/LatencyTracker.java
Outdated
Show resolved
Hide resolved
...ls/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestLatencyTracker.java
Outdated
Show resolved
Hide resolved
...ls/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestLatencyTracker.java
Outdated
Show resolved
Hide resolved
...ls/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestLatencyTracker.java
Outdated
Show resolved
Hide resolved
...ls/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestLatencyTracker.java
Outdated
Show resolved
Hide resolved
...ls/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestLatencyTracker.java
Outdated
Show resolved
Hide resolved
...ls/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestLatencyTracker.java
Outdated
Show resolved
Hide resolved
...ls/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestLatencyTracker.java
Outdated
Show resolved
Hide resolved
...ls/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestLatencyTracker.java
Outdated
Show resolved
Hide resolved
...ls/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestLatencyTracker.java
Outdated
Show resolved
Hide resolved
...ls/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestLatencyTracker.java
Outdated
Show resolved
Hide resolved
Production codeThis is making code fairly verbose. I think you can do more here.
Without the documentation, features like this only get used by the few people that know about them. And more insidiously, the only get maintained by people that care about. Which of course they don't do unless they or somebody they know is using the feature. It is in your interests to make sure we all do use it. And if we can use it to debug things, very very useful. TestsI worry that this is going to be very very brittle towards latency, overloaded machines, network settings, etc. There's already an azure test which is pretty unreliable for this reason (ITestAzureFileSystemInstrumentation). I don't want to this to have the same problems. Have you run any tests against the long haul store, or using parallel test runs to slow down the test? |
...ols/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsHttpOperation.java
Outdated
Show resolved
Hide resolved
...-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/LatencyTracker.java
Outdated
Show resolved
Hide resolved
...-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/LatencyTracker.java
Outdated
Show resolved
Hide resolved
...tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Production code
This is making code fairly verbose. I think you can do more here.
* add some private methods to invoke the latency tracker * Maybe use try-with-resources to managed the life of a specific operation, as we do with DurationInfo * it be good to have some documentation including a reference to the "ABFS API logging service"
Without the documentation, features like this only get used by the few people that know about them. And more insidiously, the only get maintained by people that care about. Which of course they don't do unless they or somebody they know is using the feature. It is in your interests to make sure we all do use it. And if we can use it to debug things, very very useful.
Tests
I worry that this is going to be very very brittle towards latency, overloaded machines, network settings, etc. There's already an azure test which is pretty unreliable for this reason (ITestAzureFileSystemInstrumentation). I don't want to this to have the same problems. Have you run any tests against the long haul store, or using parallel test runs to slow down the test?
I am using try-with-resources now -- thanks for suggesting this. I never found this when I was searching for the C#
's using
equivalent in Java
.
I have also added some details on the ABFS logs, particularly how the logs look, how to enable and obtain them. Would you also want me to elaborate on the handling of these logs by the Azure's internal subsystems?
The tests here have no network IO -- all they are testing is correctness and performance of an isolated unit that uses a ConcurrentQueue at its core. Would you still consider them very very brittle? Passing of these tests also ensures that the addition of the tracking code doesn't add much cost to the existing ABFS code.
...s/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestAbfsPerfTracker.java
Outdated
Show resolved
Hide resolved
...p-azure/src/main/java/org/apache/hadoop/fs/azurebfs/contracts/services/AbfsPerfLoggable.java
Outdated
Show resolved
Hide resolved
...tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsPerfTracker.java
Outdated
Show resolved
Hide resolved
...tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsPerfTracker.java
Outdated
Show resolved
Hide resolved
...tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsPerfTracker.java
Outdated
Show resolved
Hide resolved
@steveloughran do you know how one can force @hadoop-yetus to run checkstyle scan/validation on these changes? |
ec4d391
to
3bcd936
Compare
@DadanielZ: I have fixed the format/checkstyle issues. Test results are mentioned in the JIRA here: https://issues.apache.org/jira/browse/HADOOP-16612 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM +1, I will wait for another +1 before committing it.
ok, it's good to merge -I'll let @DadanielZ do the work. One followup -should we add any policy doc on adding new rest calls -"tracks latency" should now be a checklist item, shouldn't it? For example #1711 needs it |
Da Zhou seems away right now, I'll have a go at merging. However before I Do that, I have just run a mvn javadoc:javadoc and it found a new error
Can you fix that? |
Thank you @steveloughran for your attention! I have fixed all the javadoc warnings arising out of this PR. The test results are mentioned in the JIRA here: https://issues.apache.org/jira/browse/HADOOP-16612 |
Hi @bgaborg, I see you self-requested a review and it is pending, if there are no other comments I will commit this PR. |
@DadanielZ sure, go ahead. I just wanted to add myself and have this in my github start page since I'm learning this module's codebase. |
@bgaborg thanks for the confirmation. |
Committed |
Add instrumentation code to measure the ADLS Gen 2 API performance
Add a feature switch to optionally enable this feature
Add unit tests for correctness and performance