Cloud Monitoring POC for hadoop operations metrics - #1658
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request establishes a foundational framework for enhanced observability by integrating Google Cloud Monitoring for Hadoop operations. It leverages OpenCensus to capture and push critical GCS operation duration metrics, enabling users to monitor connector performance more effectively. The newly introduced configurable export interval provides flexibility in how frequently these metrics are reported, allowing for tailored monitoring strategies. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
There was a problem hiding this comment.
Code Review
This pull request introduces a proof-of-concept for exporting Hadoop operation metrics to Google Cloud Monitoring using OpenCensus. The changes involve adding configuration for enabling metrics and setting the export interval, creating a CloudMonitoringMetricsRecorder to handle metric publishing, and instrumenting GhfsGlobalStorageStatistics to record operation durations.
My review focuses on improving the usability and cleanliness of the new metrics implementation. I've identified that the metric name is too specific to Spark and should be made more generic for broader Hadoop ecosystem use. I've also pointed out some dead code that can be removed. Overall, this is a great step towards better observability.
| public static final MeasureLong GCS_DURATION = | ||
| MeasureLong.create("spark/driver/connector/gcs/duration", "Duration of GCS operations", "ms"); |
There was a problem hiding this comment.
The metric name spark/driver/connector/gcs/duration is specific to Spark. Since this is a general Hadoop connector that can be used with other tools like MapReduce and Hive, a more generic metric name would be more appropriate and less confusing. Consider changing it to something like gcs/connector/duration.
| public static final MeasureLong GCS_DURATION = | |
| MeasureLong.create("spark/driver/connector/gcs/duration", "Duration of GCS operations", "ms"); | |
| public static final MeasureLong GCS_DURATION = | |
| MeasureLong.create("gcs/connector/duration", "Duration of GCS operations", "ms"); |
| COUNT, | ||
| TAG_KEYS), | ||
| View.create( | ||
| Name.create("spark/driver/connector/gcs/duration"), |
There was a problem hiding this comment.
| @VisibleForTesting static final Object monitor = new Object(); | ||
|
|
||
| private static final int EXPORT_INTERVAL = 5000; | ||
| private static final int EXPORT_INTERVAL = 60000; |



No description provided.