<?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>question Re: how to delete all application logs from spark history + not by rotation !! in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204339#M166328</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;&lt;P&gt;Run this command as is. No need to append headers and password. In above command you were using curl twice.&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;curl &lt;A href="http://master02:18081/api/v1/applications" target="_blank"&gt;http://master02:18081/api/v1/applications&lt;/A&gt; &lt;/STRONG&gt;&lt;STRONG&gt;| grep "\"id\"" &amp;gt; a.txt&lt;/STRONG&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 30 Nov 2017 04:03:39 GMT</pubDate>
    <dc:creator>asirna</dc:creator>
    <dc:date>2017-11-30T04:03:39Z</dc:date>
    <item>
      <title>how to delete all application logs from spark history + not by rotation !!</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204326#M166315</link>
      <description>&lt;P&gt;from&lt;/P&gt;&lt;P&gt; hdfs dfs -du -h / &lt;/P&gt;&lt;P&gt;we see that spark history take a lot space from HDFS&lt;/P&gt;&lt;P&gt;from ambari GUI &lt;/P&gt;&lt;P&gt;I choose spark&lt;/P&gt;&lt;P&gt;and then quick links&lt;/P&gt;&lt;P&gt;and then I get the history server page with all applications&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="42812-capture.png" style="width: 1021px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17220iD3E4EBD73B2F1DAE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="42812-capture.png" alt="42812-capture.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I want to delete all applications from the page &lt;/P&gt;&lt;P&gt;how to do it because I not see the delete button ?&lt;/P&gt;&lt;P&gt;second&lt;/P&gt;&lt;P&gt;is it possible to delete the application that use hdfs by API or CLI ?&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 05:05:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204326#M166315</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2019-08-18T05:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete all application logs from spark history + not by rotation !!</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204327#M166316</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Spark has a bunch of parameter to deal with job history rotation. &lt;BR /&gt;In particular : &lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;spark.history.fs.cleaner.enabled true
spark.history.fs.cleaner.maxAge  12h
spark.history.fs.cleaner.interval 1h&lt;/PRE&gt;&lt;P&gt;Source : &lt;A href="https://spark.apache.org/docs/latest/monitoring.html"&gt;https://spark.apache.org/docs/latest/monitoring.html &lt;/A&gt;&lt;/P&gt;&lt;P&gt;In the example above : &lt;BR /&gt;- Rotation is active&lt;BR /&gt;- All Jobs &amp;gt; than 12 hours will be deleted &lt;BR /&gt;- Deletion happens at 1 hour intervals &lt;/P&gt;&lt;P&gt;Note these parameters need to be implemented on a environnement level ( not on a job level ). &lt;BR /&gt;They are usually placed in spark-default file. &lt;/P&gt;&lt;P&gt;Matthieu &lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 02:35:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204327#M166316</guid>
      <dc:creator>mlamairesse</dc:creator>
      <dc:date>2017-11-30T02:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete all application logs from spark history + not by rotation !!</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204328#M166317</link>
      <description>&lt;DIV&gt;but I want to delete all application now ! not to wait for the retention &lt;/DIV&gt;</description>
      <pubDate>Thu, 30 Nov 2017 02:36:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204328#M166317</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2017-11-30T02:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete all application logs from spark history + not by rotation !!</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204329#M166318</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;If you want to delete applications in spark2 &lt;/P&gt;&lt;PRE&gt;hdfs dfs -rm -R /spark2-history/{app-id}&lt;/PRE&gt;&lt;P&gt;If you want to delete applications in spark1&lt;/P&gt;&lt;PRE&gt;hdfs dfs -rm -R /spark-history/{app-id}&lt;/PRE&gt;&lt;P&gt;Restart history servers after running the commands.  &lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 02:41:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204329#M166318</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2017-11-30T02:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete all application logs from spark history + not by rotation !!</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204330#M166319</link>
      <description>&lt;P&gt;@Aditya thank you -&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;but how to delete all application that use HDFS , because in the page I see a lot of application around 1000 , so I cant delete one by one &lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 02:44:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204330#M166319</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2017-11-30T02:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete all application logs from spark history + not by rotation !!</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204331#M166320</link>
      <description>&lt;P&gt;hdfs dfs -rm -R /spark2-history/* will remove all applications&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 02:45:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204331#M166320</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2017-11-30T02:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete all application logs from spark history + not by rotation !!</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204332#M166321</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="42813-capture.png" style="width: 1492px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17219iCCA8A3261A1580D1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="42813-capture.png" alt="42813-capture.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;ok , so if I want to remove it from the ambari GUI then , how to do it ( I ask because from the page I not see any delete option ) &lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 05:04:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204332#M166321</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2019-08-18T05:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete all application logs from spark history + not by rotation !!</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204333#M166322</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;&lt;P&gt;You can use files view if you want to delete from GUI. I'm not sure if there is delete option in Spark history server.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 02:52:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204333#M166322</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2017-11-30T02:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete all application logs from spark history + not by rotation !!</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204334#M166323</link>
      <description>&lt;P&gt;is it possible to print by CLI all application list so I will by grep capture the hdfs and appliaction ID and then remove it by hdfs dfs -rm -R /spark2-history//{app-id}&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 02:55:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204334#M166323</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2017-11-30T02:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete all application logs from spark history + not by rotation !!</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204335#M166324</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;If you want to list all and delete all applications. You can simply do &lt;/P&gt;&lt;PRE&gt;hdfs dfs -rm -R /spark2-history/*&lt;/PRE&gt;&lt;P&gt;This folder will have only spark2 app logs and no other files. Hope this helps&lt;/P&gt;&lt;P&gt;(Or)&lt;/P&gt;&lt;P&gt;You can do the below. This should print all application IDs&lt;/P&gt;&lt;PRE&gt;curl &lt;A href="http://{spark2history" target="_blank"&gt;http://{spark2history&lt;/A&gt; server url}:18080/api/v1/applications | grep "\"id\"" &amp;gt; a.txt
cut -d':' -f2 a.txt  | cut -d "\"" -f 2&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Nov 2017 03:07:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204335#M166324</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2017-11-30T03:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete all application logs from spark history + not by rotation !!</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204336#M166325</link>
      <description>&lt;P&gt;I try this but get errors ( what is wrong in my syntax ? ) , ( master02 is the name of park-history server )&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;curl -sH "X-Requested-By: ambari" -u admin:admin -i curl &lt;A href="http://master02:8080/api/v1/applications" target="_blank"&gt;http://master02:8080/api/v1/applications&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;
HTTP/1.1 404 Not Found&lt;/P&gt;&lt;P&gt;
X-Frame-Options: DENY&lt;/P&gt;&lt;P&gt;
X-XSS-Protection: 1; mode=block &lt;/P&gt;&lt;P&gt;X-Content-Type-Options: nosniff&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 03:34:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204336#M166325</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2017-11-30T03:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete all application logs from spark history + not by rotation !!</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204337#M166326</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;I see that you are using port 8080. &lt;/P&gt;&lt;P&gt;For spark history server port is 18080 by default&lt;/P&gt;&lt;P&gt;for spark2 history server port is 18081 by default. You can check the port in UI where you saw the applications&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 03:45:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204337#M166326</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2017-11-30T03:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete all application logs from spark history + not by rotation !!</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204338#M166327</link>
      <description>&lt;P&gt;ok , now I am using this:&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;curl -sH "X-Requested-By: ambari" -u "$API_USER"":""$API_PASSWORD" -i curl &lt;A href="http://master02:18081/api/v1/applications" target="_blank"&gt;http://master02:18081/api/v1/applications&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;but no any output from command &lt;/P&gt;&lt;P&gt;what its wrong ? &lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 03:57:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204338#M166327</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2017-11-30T03:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete all application logs from spark history + not by rotation !!</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204339#M166328</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;&lt;P&gt;Run this command as is. No need to append headers and password. In above command you were using curl twice.&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;curl &lt;A href="http://master02:18081/api/v1/applications" target="_blank"&gt;http://master02:18081/api/v1/applications&lt;/A&gt; &lt;/STRONG&gt;&lt;STRONG&gt;| grep "\"id\"" &amp;gt; a.txt&lt;/STRONG&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Nov 2017 04:03:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/204339#M166328</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2017-11-30T04:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete all application logs from spark history + not by rotation !!</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/286858#M212707</link>
      <description>Hi, if there are more no of files are present in spark history Server, then FS would not be working as expected. In that case, We may need to write a script to delete the old files that are more then 7 days ( or as per your requirement) from the Spark history server location . Thanks Arun</description>
      <pubDate>Sun, 05 Jan 2020 13:39:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-delete-all-application-logs-from-spark-history-not-by/m-p/286858#M212707</guid>
      <dc:creator>AKR</dc:creator>
      <dc:date>2020-01-05T13:39:27Z</dc:date>
    </item>
  </channel>
</rss>

