<?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: No spark2 service in Ambari2.6.0.0 with HDP2.6.3.0 in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/No-spark2-service-in-Ambari2-6-0-0-with-HDP2-6-3-0/m-p/206887#M71529</link>
    <description>&lt;P&gt;Additional progress:&lt;/P&gt;&lt;P&gt;    I use &lt;A href="https://github.com/apache/ambari/blob/trunk/ambari-server/docs/api/v1/index.md"&gt;ambari rest api&lt;/A&gt;  to add spark2 service. The http request return 200 and I can figure it out  spark2 by get method.  But after I restart ambari-server, it failed to startup.The log:&lt;/P&gt;&lt;PRE&gt;22 Nov 2017 14:57:25,693 ERROR [main] ClusterImpl:431 - Can not get service info: stackName=HDP, stackVersion=2.4, serviceName=SPARK2
...
org.apache.ambari.server.ServiceNotFoundException: Service not found, clusterName=solar, serviceName=SPARK2
        at org.apache.ambari.server.state.cluster.ClusterImpl.getService(ClusterImpl.java:864)       
        at org.apache.ambari.server.api.services.AmbariMetaInfo.reconcileAlertDefinitions(AmbariMetaInfo.java:1240)
        at org.apache.ambari.server.controller.AmbariServer.run(AmbariServer.java:532)              
        at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:1067)     &lt;/PRE&gt;&lt;P&gt;    The log show the HDP stackVersion=2.4, But I am sure that I install HDP2.6  in all nodes and hdp-select prove it. Maybe I can modify this HDP version check mistake?&lt;/P&gt;</description>
    <pubDate>Wed, 22 Nov 2017 15:11:54 GMT</pubDate>
    <dc:creator>wanhaoran</dc:creator>
    <dc:date>2017-11-22T15:11:54Z</dc:date>
    <item>
      <title>No spark2 service in Ambari2.6.0.0 with HDP2.6.3.0</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/No-spark2-service-in-Ambari2-6-0-0-with-HDP2-6-3-0/m-p/206886#M71528</link>
      <description>&lt;P&gt;After upgrading Ambari  from 2.2.2 to 2.6.0.0 and HDP from 2.4.3 to 2.6.3.0, I tried adding service spark2. I followed this &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.3/bk_spark-component-guide/content/install-spark-over-ambari.html" rel="nofollow noopener noreferrer" target="_blank"&gt;guide&lt;/A&gt; , tried to add new service but could not find spark2. I checked the services in Admin -&amp;gt; Stack and Version and No spark2 there but I found Spark2 in Admin -&amp;gt; Manage Ambari -&amp;gt; Versions -&amp;gt; HDP2.6.3.0. And hdp-select also shows spark2 is in hdp repo&lt;/P&gt;&lt;P&gt;   By the way, I also tried install spark2 through yum install spark2-master spark2-python( I use python as main develop lang). But pyspark shows:&lt;/P&gt;&lt;PRE&gt;File "/usr/hdp/current/spark2-client/python/pyspark/shell.py", line 33, in &amp;lt;module&amp;gt;       
    from pyspark.sql import SparkSession, SQLContext                                          
ImportError: cannot import name SparkSession   
&lt;/PRE&gt;&lt;P&gt;  If I can not install spark2 in Ambari, I want to use spark2-client at lest.&lt;/P&gt;&lt;P&gt;    The screenshots following:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="43654-addservice.png" style="width: 855px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17001iF1F38AC141F0466A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="43654-addservice.png" alt="43654-addservice.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="43657-hdpselect.jpg" style="width: 342px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17002i1E9003D5ABB10A30/image-size/medium?v=v2&amp;amp;px=400" role="button" title="43657-hdpselect.jpg" alt="43657-hdpselect.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="43656-hdp263.png" style="width: 848px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17003i183C1694A01A7DBA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="43656-hdp263.png" alt="43656-hdp263.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="43655-stackandversions.png" style="width: 1050px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17004i40AD404DC5A8D848/image-size/medium?v=v2&amp;amp;px=400" role="button" title="43655-stackandversions.png" alt="43655-stackandversions.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 04:39:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/No-spark2-service-in-Ambari2-6-0-0-with-HDP2-6-3-0/m-p/206886#M71528</guid>
      <dc:creator>wanhaoran</dc:creator>
      <dc:date>2019-08-18T04:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: No spark2 service in Ambari2.6.0.0 with HDP2.6.3.0</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/No-spark2-service-in-Ambari2-6-0-0-with-HDP2-6-3-0/m-p/206887#M71529</link>
      <description>&lt;P&gt;Additional progress:&lt;/P&gt;&lt;P&gt;    I use &lt;A href="https://github.com/apache/ambari/blob/trunk/ambari-server/docs/api/v1/index.md"&gt;ambari rest api&lt;/A&gt;  to add spark2 service. The http request return 200 and I can figure it out  spark2 by get method.  But after I restart ambari-server, it failed to startup.The log:&lt;/P&gt;&lt;PRE&gt;22 Nov 2017 14:57:25,693 ERROR [main] ClusterImpl:431 - Can not get service info: stackName=HDP, stackVersion=2.4, serviceName=SPARK2
...
org.apache.ambari.server.ServiceNotFoundException: Service not found, clusterName=solar, serviceName=SPARK2
        at org.apache.ambari.server.state.cluster.ClusterImpl.getService(ClusterImpl.java:864)       
        at org.apache.ambari.server.api.services.AmbariMetaInfo.reconcileAlertDefinitions(AmbariMetaInfo.java:1240)
        at org.apache.ambari.server.controller.AmbariServer.run(AmbariServer.java:532)              
        at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:1067)     &lt;/PRE&gt;&lt;P&gt;    The log show the HDP stackVersion=2.4, But I am sure that I install HDP2.6  in all nodes and hdp-select prove it. Maybe I can modify this HDP version check mistake?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 15:11:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/No-spark2-service-in-Ambari2-6-0-0-with-HDP2-6-3-0/m-p/206887#M71529</guid>
      <dc:creator>wanhaoran</dc:creator>
      <dc:date>2017-11-22T15:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: No spark2 service in Ambari2.6.0.0 with HDP2.6.3.0</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/No-spark2-service-in-Ambari2-6-0-0-with-HDP2-6-3-0/m-p/206888#M71530</link>
      <description>&lt;P&gt;At last, I solved this problem:&lt;/P&gt;&lt;P&gt;     I suspected the HDP version stored in postgres is wrong. So I modified these items:&lt;/P&gt;&lt;PRE&gt;delete from servicedesiredstate where service_name='SPARK2';
delete from clusterservices where service_name='SPARK2';
delete from alert_grouping where definition_id = 201;
delete from alert_grouping where definition_id = 202;
delete from alert_grouping where definition_id = 203;
delete from alert_definition where service_name = 'SPARK2';
select * from stack;
 stack_id | stack_name  |  stack_version  
----------+-------------+-----------------
        1 | HDP         | 2.0.6.GlusterFS
        2 | HDP         | 2.5
        3 | HDP         | 2.4
        4 | HDP         | 2.3.ECS
        5 | HDP         | 2.0.6
        6 | HDP         | 2.1.GlusterFS
        7 | HDP         | 2.3
        8 | HDP         | 2.3.GlusterFS
        9 | HDP         | 2.2
       10 | HDP         | 2.1
       11 | HDP         | 2.0
       51 | HDP         | 2.6
      101 | BigInsights | 4.2.5
      102 | BigInsights | 4.1
      103 | BigInsights | 4.0
      104 | BigInsights | 4.2
update clusters set desired_stack_id = 51 where cluster_id = 2;&lt;/PRE&gt;&lt;P&gt;    Note that the digits above are referred to table alert_grouping and stack. So in my case, the desired_stack_id in table clusters was 3 (means HDP2.4). I updated it to 51(means HDP2.6) and corrected the undefined alert definition. At last the ambari server startup and recognize service Spark2 in HDP2.6.&lt;/P&gt;&lt;P&gt;    If someone can offer more details in ambari-server metadata in database, it will be easier to locate a problem like this.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2017 10:30:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/No-spark2-service-in-Ambari2-6-0-0-with-HDP2-6-3-0/m-p/206888#M71530</guid>
      <dc:creator>wanhaoran</dc:creator>
      <dc:date>2017-11-23T10:30:45Z</dc:date>
    </item>
  </channel>
</rss>

