spark_plugin.py
def _get_yarn_apps(self):
        """
        Retrieve all applications corresponding to Spark mesos cluster
        from yarn
        """
        resp = self.spark_agent.request_metrics(self.master, YARN_MASTER_APP_PATH)
        apps = {}

        for app in resp.get("apps", {}).get("app", []):
            if app.get("applicationType", "").upper() == "SPARK" and app.get("state", "").upper() == "RUNNING":
                app_id = app.get("id")
                app_name = app.get("name")
                app_user = app.get("user")
                tracking_url = app.get("trackingUrl")

                if app_id and app_name and app_user and tracking_url:
                    apps[app_id] = (app_name, app_user, tracking_url)
                    self.metrics[(app_name, app_user)] = {}
        return apps

        Retrieve all applications corresponding to Spark mesos cluster
        from yarn
        
Retrieve all applications corresponding to Spark mesos cluster
from yarn
Retrieve all applications corresponding to Spark mesos cluster from yarn
def _get_yarn_apps(self):
        resp = self.spark_agent.request_metrics(self.master, YARN_MASTER_APP_PATH)
        apps = {}
        for app in resp.get("apps", {}).get("app", []):
            if app.get("applicationType", "").upper() == "SPARK" and app.get("state", "").upper() == "RUNNING":
                app_id = app.get("id")
                app_name = app.get("name")
                app_user = app.get("user")
                tracking_url = app.get("trackingUrl")
                if app_id and app_name and app_user and tracking_url:
                    apps[app_id] = (app_name, app_user, tracking_url)
                    self.metrics[(app_name, app_user)] = {}
        return apps
def _get_yarn_apps ( self ) : resp = self . spark_agent . request_metrics ( self . master , YARN_MASTER_APP_PATH ) apps = { } for app in resp . get ( "apps" , { } ) . get ( "app" , [ ] ) : if app . get ( "applicationType" , "" ) . upper ( ) == "SPARK" and app . get ( "state" , "" ) . upper ( ) == "RUNNING" : app_id = app . get ( "id" ) app_name = app . get ( "name" ) app_user = app . get ( "user" ) tracking_url = app . get ( "trackingUrl" ) if app_id and app_name and app_user and tracking_url : apps [ app_id ] = ( app_name , app_user , tracking_url ) self . metrics [ ( app_name , app_user ) ] = { } return apps
Retrieve all applications corresponding to Spark mesos cluster
from yarn
Retrieve all applications corresponding to Spark mesos cluster from yarn
"""
        Retrieve all applications corresponding to Spark mesos cluster
        from yarn
        """
self