cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to Get spark history server logs using python REST API

parimalpatil28
New Contributor III

Hello,

I am trying to load logs from spark job in remote location using Python Rest API.

I want to collect those logs for particular job runs using runID field, that log should contain Errors, Exceptions, and print details.

I have tried "/api/2.1/jobs/runs/get" and "/api/2.1/jobs/runs/get-output" but didnt get desired output logs.

basically I want logs from spark history server.

Let me know what method or call I can use in such case

Thanks in Advance 

Parimal

1 ACCEPTED SOLUTION

Accepted Solutions

Kaniz_Fatma
Community Manager
Community Manager

Hi @parimalpatil28To get the logs from the Spark history server, you can use the Spark REST API. The Spark REST API provides a programmatic interface to access the Spark job, stage, and task information. The API is available at /api/v1/applications/{application_id} endpoint, where {application_id} is the ID of your Spark application.

View solution in original post

3 REPLIES 3

Kaniz_Fatma
Community Manager
Community Manager

Hi @parimalpatil28To get the logs from the Spark history server, you can use the Spark REST API. The Spark REST API provides a programmatic interface to access the Spark job, stage, and task information. The API is available at /api/v1/applications/{application_id} endpoint, where {application_id} is the ID of your Spark application.

parimalpatil28
New Contributor III

Hello,

How can I access endpoint (http URL) of spark history server for a particular cluster?

 

 

Thanks,

Parimal  

Hi @parimalpatil28To access the endpoint (HTTP URL) of the Spark history server for a particular cluster, you need to identify the cluster-ID first. The cluster ID can be found in the Spark UI URL as mentioned in the provided information.

https://docs.databricks.com/en/clusters/clusters-manage.html

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group