Track Glue API calls that were untracked#11059
Conversation
findepi
left a comment
There was a problem hiding this comment.
are you positive this is the only untracked one?
There was a problem hiding this comment.
the stats should be called "updateTable"
I looked through other usages of glueClient and didn't spot anything else. |
|
What about |
Regarding the one you pointed out, maybe I am wrong but I thought there is no good way to measure this as this is an async call so we pretty much will measure only the time of the invocation of async which is not very informative |
ff65249 to
72d5f58
Compare
|
|
losipiuk
left a comment
There was a problem hiding this comment.
LGTM - commit message may be a bit more accurate as you are also changing counter name
You may want to add a callback on the returned future to bump statistic. |
c2cf1ca to
e739f6b
Compare
e739f6b to
a1aa458
Compare
|
Not strictly necessary but a possible improvement from what we have. Would it be better if Seems like that might be a more helpful way of tracking those stats to me. |
There was a problem hiding this comment.
there is more *async calls than just this one. We should address all together.
There was a problem hiding this comment.
replace with single method
void recordCall(executionTime, boolean failure)
Agreed. Currently lots of calls is still untracked. |
a1aa458 to
1fc15e3
Compare
There was a problem hiding this comment.
If you retained the variable, the diff would be readable.
(btw the IDE asks me to inline such variables, but i acutally find it useful during debugging)
There was a problem hiding this comment.
You should use different GlueMetastoreApiStats instance for different places when you use StatsRecordingAsyncHandler. Not stats.getBatchUpdatePartition() all the time.
Change parametrization of StatsRecordingAsyncHandler to use GlueMetastoreApiStats instead of GlueMetastoreStats
There was a problem hiding this comment.
yes definitely, I forgot to change that, thanks for catching this
edafa22 to
61df66b
Compare
There was a problem hiding this comment.
use List
And keep variable name
There was a problem hiding this comment.
Also add a followup commit which just gets rid of variables.
There was a problem hiding this comment.
I think we should merge stats couneters for getting views and tables.
There was a problem hiding this comment.
Can you also rename dropDatabase stats counter tdeleteDatabase.
(you can put all the renames in single commit)
There was a problem hiding this comment.
Same for renameDatabase -> updateDatabase
There was a problem hiding this comment.
batchGetPartitionAsync is not covered with stats from what I see.
There was a problem hiding this comment.
dropPartition -> deletePartition
61df66b to
fabf601
Compare
fabf601 to
442a800
Compare
There was a problem hiding this comment.
This belongs to previous commit, where the last usage was removed.
442a800 to
017d982
Compare
| return ImmutableSet.of(); | ||
| } | ||
|
|
||
| static class StatsRecordingAsyncHandler<Request extends AmazonWebServiceRequest, Result> |
There was a problem hiding this comment.
Seems like this belongs in GlueMetastoreApiStats
There was a problem hiding this comment.
Let's change it as a followup :)
Description
One call to Glue was not being tracked.
Rename GlueMetastoreStats.renameTable to GlueMetastoreStats.updateTable.
General information
a fix
a connector
It will allow to more precisely track calls to external api - Glue
Related issues, pull requests, and links
Documentation
(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
(x) No release notes entries required.
( ) Release notes entries required with the following suggested text: