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: 

Spark eventlog for Cluster pools

Stephanraj
New Contributor III

Hi,

I would want to setup the cluster logging (to capture eventlogs to /dbfs/cluster-logs dir) in my cluster pool configuration? is it possible?

If I create cluster manually, I could able to setup the cluster logging as mentioned here: https://docs.microsoft.com/en-us/azure/databricks/clusters/configure#cluster-log-delivery

But I am using instance pool to create cluster automatically and run the workload, in that case I was not able to setup the logging and capture the eventlogs. Any help here is highly appreciated. Thanks in advance!!

Thanks,

Stephanraj

1 ACCEPTED SOLUTION

Accepted Solutions

Prabakar
Databricks Employee
Databricks Employee

If you are using API, you can set the logging using the below piece of information in your json body.

https://docs.microsoft.com/en-us/azure/databricks/dev-tools/api/latest/examples#cluster-log-example

"cluster_log_conf": {
        "dbfs": {
            "destination": "dbfs:/cluster-logs"
        }
    },

View solution in original post

7 REPLIES 7

Prabakar
Databricks Employee
Databricks Employee

Hi @Stephanraj C​ instance pool is to reduce cluster start and auto-scaling times for a cluster. Are you using any API to create clusters? If so could you please share the API request?

Prabakar
Databricks Employee
Databricks Employee

If you are using API, you can set the logging using the below piece of information in your json body.

https://docs.microsoft.com/en-us/azure/databricks/dev-tools/api/latest/examples#cluster-log-example

"cluster_log_conf": {
        "dbfs": {
            "destination": "dbfs:/cluster-logs"
        }
    },

Stephanraj
New Contributor III

Hi @Prabakar Ammeappin​ , Thank you so much for your input. Yes it worked well!!

Prabakar
Databricks Employee
Databricks Employee

Hi @Stephanraj C​ it's good to know that it worked. Please mark the best answer so this question can be closed and will help other members.

Stephanraj
New Contributor III

Hi @Prabakar Ammeappin​ Thanks. The logs are getting stored in folder with the spark-context-id, is it possible to save the logs with some specific tag names.

Prabakar
Databricks Employee
Databricks Employee

Hi @Stephanraj C​ I am not sure if that would be possible. Also, I haven't seen such configurations.

Stephanraj
New Contributor III

Hi @Prabakar Ammeappin​ Okay, I would write some custom script for that. Once again thanks for your support!!

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