<?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 Save Ambary setting in Docker container (Spark version) after restart in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Save-Ambary-setting-in-Docker-container-Spark-version-after/m-p/169702#M49973</link>
    <description>&lt;P&gt;Hi all! I am new in all this stuff. I am using the latest Sandbox.&lt;/P&gt;&lt;P&gt;I need to start Spark2 service by default. I stopped Spark 1.6 in Ambari (via web interface) and started Spark2 instead.&lt;/P&gt;&lt;P&gt;After that I commit changes to Docker container.&lt;/P&gt;&lt;P&gt;But after restarting - I have Spark 1.6 started again &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; The same things with my CPU and memory settings.&lt;/P&gt;&lt;P&gt;Could you please guide me to point where I can find settings for Ambari in some configuration file (or something like that).&lt;/P&gt;&lt;P&gt;Thanks a lot in advance!&lt;/P&gt;</description>
    <pubDate>Fri, 23 Dec 2016 17:28:08 GMT</pubDate>
    <dc:creator>tyura1</dc:creator>
    <dc:date>2016-12-23T17:28:08Z</dc:date>
    <item>
      <title>Save Ambary setting in Docker container (Spark version) after restart</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Save-Ambary-setting-in-Docker-container-Spark-version-after/m-p/169702#M49973</link>
      <description>&lt;P&gt;Hi all! I am new in all this stuff. I am using the latest Sandbox.&lt;/P&gt;&lt;P&gt;I need to start Spark2 service by default. I stopped Spark 1.6 in Ambari (via web interface) and started Spark2 instead.&lt;/P&gt;&lt;P&gt;After that I commit changes to Docker container.&lt;/P&gt;&lt;P&gt;But after restarting - I have Spark 1.6 started again &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; The same things with my CPU and memory settings.&lt;/P&gt;&lt;P&gt;Could you please guide me to point where I can find settings for Ambari in some configuration file (or something like that).&lt;/P&gt;&lt;P&gt;Thanks a lot in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2016 17:28:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Save-Ambary-setting-in-Docker-container-Spark-version-after/m-p/169702#M49973</guid>
      <dc:creator>tyura1</dc:creator>
      <dc:date>2016-12-23T17:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Save Ambary setting in Docker container (Spark version) after restart</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Save-Ambary-setting-in-Docker-container-Spark-version-after/m-p/169703#M49974</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15075/tyura1.html" nodeid="15075"&gt;@Yurii Tymchii&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The issue you are seeing is the sandbox uses a start script (/etc/init.d/startup_script) to start the services, but it really just calls a chain of other scripts.  Even though you have stopped Spark 1.6, when the sandbox starts up again it makes the call to start Spark 1.6 automatically.&lt;/P&gt;&lt;P&gt;I haven't yet found exactly where Spark is starting.  As I said, the chain of script calling is a little more complex than I expected.&lt;/P&gt;&lt;P&gt;What I do in my sandboxes is to create a couple of scripts that use the Ambari REST API to start/stop extra services.&lt;/P&gt;&lt;P&gt;I'm not using Flume, so I created a script called "stop_flume.sh" on my sandbox.  After I run the startup_script, I then run the stop_flume.sh script.&lt;/P&gt;&lt;P&gt;Here is my script:&lt;/P&gt;&lt;PRE&gt;USERNAME=admin
PASSWORD=admin
CLUSTER=Sandbox

echo "Stopping FLUME"

# Turn off maintenance mode
curl -u $USERNAME:$PASSWORD -i -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo": {"context" :"Turn OFF Maintenance Mode for FLUME via REST"}, "Body": {"ServiceInfo": {"maintenance_state": "OFF"}}}' &lt;A href="http://`hostname" target="_blank"&gt;http://`hostname&lt;/A&gt; -f`:8080/api/v1/clusters/$CLUSTER/services/FLUME

sleep 5

# Stopping a service is actually setting the state to INSTALLED
curl -u $USERNAME:$PASSWORD -i -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo": {"context" :"Start FLUME via REST"}, "Body": {"ServiceInfo": {"state": "INSTALLED"}}}' &lt;A href="http://`hostname" target="_blank"&gt;http://`hostname&lt;/A&gt; -f`:8080/api/v1/clusters/$CLUSTER/services/FLUME

sleep 5

# Turn on maintenance mode
curl -u $USERNAME:$PASSWORD -i -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo": {"context" :"Turn OFF Maintenance Mode for FLUME via REST"}, "Body": {"ServiceInfo": {"maintenance_state": "ON"}}}' &lt;A href="http://`hostname" target="_blank"&gt;http://`hostname&lt;/A&gt; -f`:8080/api/v1/clusters/$CLUSTER/services/FLUME

&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Dec 2016 02:23:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Save-Ambary-setting-in-Docker-container-Spark-version-after/m-p/169703#M49974</guid>
      <dc:creator>myoung</dc:creator>
      <dc:date>2016-12-24T02:23:03Z</dc:date>
    </item>
  </channel>
</rss>

