Skip to content

Conversation

yanivkrol
Copy link

@yanivkrol yanivkrol commented Aug 10, 2025

🔄 Pull Request

📝 Description

users will now be able to specify EMR cluster name/id/arn dynamically in the query. to enable this, set dyanmic_emr_cluster_mode in config.yaml to true. for usage with name, the cluster must be active (since cluster name can be resued)

added "dyanmic_emr_cluster_mode" boolean in config this mode can't be used together with static servers specification

all tool calls now require "server_spec" parameter

servers_spec = {
"static_server_spec": {
"server_name": str,
"default_client": bool
},
"dynamic_emr_server_spec": {
"emr_cluster_arn": str,
"emr_cluster_id": str,
"emr_cluster_arn": str
}
}

in static mode, the static_server_spec is used.
in dyanmic mode the dynamic_emr_server_spec is used.

dynamically created spark clients are cached:

by arn: lifetime
by id: lifetime
by name: for the session
created EMRclient to find the relevant cluster when needed

🎯 Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 📖 Documentation update
  • 🧪 Test improvement
  • 🔧 Refactoring (no functional changes)

🧪 Testing

  • ✅ All existing tests pass (task test)
  • 🔬 Tested with MCP Inspector
  • 📊 Tested with sample Spark data
  • 🚀 Tested with real Spark History Server (if applicable)

🔬 Test Commands Run

# Example:
# task test
# npx @modelcontextprotocol/inspector uv run -m spark_history_mcp.core.main

🛠️ New Tools Added (if applicable)

  • Tool Name: new_tool_name
  • Purpose: What it does
  • Usage: Example parameters

📸 Screenshots (if applicable)

✅ Checklist

  • 🔍 Code follows project style guidelines
  • 🧪 Added tests for new functionality
  • 📖 Updated documentation (README, TESTING.md, etc.)
  • 🔧 Pre-commit hooks pass
  • 📝 Added entry to CHANGELOG.md (if significant change)

📚 Related Issues

Fixes #86
Related to #(issue number)

🤔 Additional Context


🎉 Thank you for contributing! Your effort helps make Spark monitoring more intelligent.

@yanivkrol yanivkrol force-pushed the yanivkrol-dynamic-emr-clusters-mode branch 2 times, most recently from 2cd7de0 to 0cd1df5 Compare August 10, 2025 09:49
@yanivkrol yanivkrol marked this pull request as ready for review August 10, 2025 09:49
@yanivkrol yanivkrol force-pushed the yanivkrol-dynamic-emr-clusters-mode branch 3 times, most recently from edeff23 to 616d8a3 Compare August 13, 2025 07:45
@yanivkrol yanivkrol closed this Aug 14, 2025
@yanivkrol
Copy link
Author

Closed since company doesn't allow public repos. replacement:
#92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Dynamic EMR clusters

1 participant