<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Orphan (?) files on Databricks S3 bucket in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/orphan-files-on-databricks-s3-bucket/m-p/29295#M21039</link>
    <description>&lt;P&gt;Hi! I didn't know that, Purging right now, is there a way to schedule that so logs are retained for less time? Maybe I want to maintain the last 7 days for everything?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 13 Oct 2022 21:51:01 GMT</pubDate>
    <dc:creator>alejandrofm</dc:creator>
    <dc:date>2022-10-13T21:51:01Z</dc:date>
    <item>
      <title>Orphan (?) files on Databricks S3 bucket</title>
      <link>https://community.databricks.com/t5/data-engineering/orphan-files-on-databricks-s3-bucket/m-p/29293#M21037</link>
      <description>&lt;P&gt;Hi, I'm seeing a lot of empty (and not) directories on routes like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;xxxxxx.jobs/FileStore/job-actionstats/&lt;/P&gt;&lt;P&gt;xxxxxx.jobs/FileStore/job-result/&lt;/P&gt;&lt;P&gt;xxxxxx.jobs/command-results/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I create a lifecycle to delete old objects (files/directories)? how many days? what is the best practice for this case?&lt;/P&gt;&lt;P&gt;Are there other directories that need a lifecycle configuration?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 18:27:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/orphan-files-on-databricks-s3-bucket/m-p/29293#M21037</guid>
      <dc:creator>alejandrofm</dc:creator>
      <dc:date>2022-10-04T18:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Orphan (?) files on Databricks S3 bucket</title>
      <link>https://community.databricks.com/t5/data-engineering/orphan-files-on-databricks-s3-bucket/m-p/29294#M21038</link>
      <description>&lt;P&gt;In the Admin console, there are options to clean storage that you can use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For everything configurable (DB locations, checkpoints), please use your storage control to control it.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1404i042978883342CB05/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 15:16:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/orphan-files-on-databricks-s3-bucket/m-p/29294#M21038</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-10-13T15:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: Orphan (?) files on Databricks S3 bucket</title>
      <link>https://community.databricks.com/t5/data-engineering/orphan-files-on-databricks-s3-bucket/m-p/29295#M21039</link>
      <description>&lt;P&gt;Hi! I didn't know that, Purging right now, is there a way to schedule that so logs are retained for less time? Maybe I want to maintain the last 7 days for everything?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 21:51:01 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/orphan-files-on-databricks-s3-bucket/m-p/29295#M21039</guid>
      <dc:creator>alejandrofm</dc:creator>
      <dc:date>2022-10-13T21:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: Orphan (?) files on Databricks S3 bucket</title>
      <link>https://community.databricks.com/t5/data-engineering/orphan-files-on-databricks-s3-bucket/m-p/29296#M21040</link>
      <description>&lt;P&gt;During office hours, I asked one year ago to add purge cluster logs to API, and it was not even considered. I thought to set selenium to do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can limit logging for the cluster by playing with log4j, for example, to put something like .sh script below on dbfs as the start script for the cluster (you need additionally specify log properties to be adjusted for drivers and executors):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;#!/bin/bash
echo "Executing on Driver: $DB_IS_DRIVER"
if [[ $DB_IS_DRIVER = "TRUE" ]]; then
LOG4J_PATH="/home/ubuntu/databricks/spark/dbconf/log4j/driver/log4j.properties"
else
LOG4J_PATH="/home/ubuntu/databricks/spark/dbconf/log4j/executor/log4j.properties"
fi
echo "Adjusting log4j.properties here: ${LOG4J_PATH}"
echo "log4j.&amp;lt;custom-prop&amp;gt;=&amp;lt;value&amp;gt;" &amp;gt;&amp;gt; ${LOG4J_PATH}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In the notebook, you can disable logging by using:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;sc.setLogLevel("OFF");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Additionally, for cluster config, you can set for delta files:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;spark.databricks.delta.logRetentionDuration 3 days
spark.databricks.delta.deletedFileRetentionDuration 3 days&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 14:10:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/orphan-files-on-databricks-s3-bucket/m-p/29296#M21040</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-10-18T14:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Orphan (?) files on Databricks S3 bucket</title>
      <link>https://community.databricks.com/t5/data-engineering/orphan-files-on-databricks-s3-bucket/m-p/29297#M21041</link>
      <description>&lt;P&gt;Not the best solution, will not implement something like this on prod, but it's the best answer, thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 29 Oct 2022 03:38:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/orphan-files-on-databricks-s3-bucket/m-p/29297#M21041</guid>
      <dc:creator>alejandrofm</dc:creator>
      <dc:date>2022-10-29T03:38:26Z</dc:date>
    </item>
  </channel>
</rss>

