<?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: newbie questions:: changing the thrift sever port ; difference between Hive and Thrift server ; connecting to data in HDP file system from my windows R session. in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/newbie-questions-changing-the-thrift-sever-port-difference/m-p/181319#M70748</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/20166/blsingh.html" nodeid="20166"&gt;@Balsher Singh&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The Easiest way will be to find the port using &lt;STRONG&gt;Ambari UI &lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;Login to Ambari UI --&amp;gt; Spark2 --&amp;gt; Configs (Tab) --&amp;gt; Advanced (Sub Tab) --&amp;gt; Advanced spark2-hive-site-override
(OR)
Login to Ambari UI --&amp;gt; Spark --&amp;gt; Configs (Tab) --&amp;gt; Advanced (Sub Tab) --&amp;gt; Advanced spark-hive-site-override
&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;The default Spark Thrift server port is 10015  (for Spark2 10016). To specify a different port, you can navigate to the hive.server2.thrift.port setting in the "Advanced spark-hive-site-override" category of the Spark configuration section and update the setting with your preferred port number. &lt;BR /&gt;&lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.2/bk_spark-component-guide/content/config-sts-port.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.2/bk_spark-component-guide/content/config-sts-port.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;You can also use &lt;STRONG&gt;Ambari API&lt;/STRONG&gt; to find the port using curl call as following: &lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin -i -H 'X-Requested-By: ambari' -X GET "http://localhost:8080/api/v1/clusters/Sandbox/configurations?type=spark2-hive-site-override"
(OR)
# curl -u admin:admin -i -H 'X-Requested-By: ambari' -X GET "http://localhost:8080/api/v1/clusters/Sandbox/configurations?type=spark-hive-site-override"&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Above command will list the various tags.  You need to use the latest Tag ID (like "tag=version1509830820763") and then run the command with that tag ID as following:&lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin -H 'X-Requested-By: ambari' -X GET "http://localhost:8080/api/v1/clusters/Sandbox/configurations?type=spark2-hive-site-override&amp;amp;tag=version1509830820763"
{
  "href" : "http://localhost:8080/api/v1/clusters/Sandbox/configurations?type=spark2-hive-site-override&amp;amp;tag=version1509830820763",
  "items" : [
    {
      "href" : "http://localhost:8080/api/v1/clusters/Sandbox/configurations?type=spark2-hive-site-override&amp;amp;tag=version1509830820763",
      "tag" : "version1509830820763",
      "type" : "spark2-hive-site-override",
      "version" : 2,
      "Config" : {
        "cluster_name" : "Sandbox",
        "stack_id" : "HDP-2.6"
      },
      "properties" : {
        "hive.metastore.client.connect.retry.delay" : "5",
        "hive.metastore.client.socket.timeout" : "1800",
        "hive.server2.enable.doAs" : "false",
        "hive.server2.thrift.port" : "10016",
        "hive.server2.transport.mode" : "binary"
      }
    }
  ]
}&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE: &lt;/STRONG&gt;Please make sure that you put the whole URL inside Quotation mark as it contains &amp;amp; symbol in it.&lt;/P&gt;&lt;P&gt;Another option will be to use the&lt;STRONG&gt;  config.sh&lt;/STRONG&gt; , you can find the port as following by running the below command from Ambari Server Host:&lt;/P&gt;&lt;P&gt;For Spark2&lt;/P&gt;&lt;PRE&gt;#  /var/lib/ambari-server/resources/scripts/configs.sh -u admin -p admin get localhost Sandbox spark2-hive-site-override

OUTPUT&lt;BR /&gt;--------
USERID=admin
PASSWORD=admin
########## Performing 'GET' on (Site:spark2-hive-site-override, Tag:version1509830820763)
"properties" : {
"hive.metastore.client.connect.retry.delay" : "5",
"hive.metastore.client.socket.timeout" : "1800",
"hive.server2.enable.doAs" : "false",
"hive.server2.thrift.port" : "10017",
"hive.server2.transport.mode" : "binary"
}&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;For Old Spark.&lt;/P&gt;&lt;PRE&gt;#  /var/lib/ambari-server/resources/scripts/configs.sh -u admin -p admin get localhost Sandbox spark-hive-site-override

OUTPUT
--------
USERID=admin
PASSWORD=admin
########## Performing 'GET' on (Site:spark-hive-site-override, Tag:INITIAL)
"properties" : {
"hive.metastore.client.connect.retry.delay" : "5",
"hive.metastore.client.socket.timeout" : "1800",
"hive.server2.enable.doAs" : "false",
"hive.server2.thrift.port" : "10015",
"hive.server2.transport.mode" : "binary"
}&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;NOTE: &lt;/STRONG&gt;In the above commands please replace "Sandbox" word with yoru HDP ClusterName.&lt;BR /&gt;"localhost"  with your ambari server hostname.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
    <pubDate>Sun, 05 Nov 2017 04:37:32 GMT</pubDate>
    <dc:creator>jsensharma</dc:creator>
    <dc:date>2017-11-05T04:37:32Z</dc:date>
    <item>
      <title>newbie questions:: changing the thrift sever port ; difference between Hive and Thrift server ; connecting to data in HDP file system from my windows R session.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/newbie-questions-changing-the-thrift-sever-port-difference/m-p/181318#M70747</link>
      <description>&lt;P&gt;
	I have many questions, as I have been fiddling with Sandbox as a Hadoop newbie starting with the more basic one first:&lt;/P&gt;&lt;P&gt;
	¶ I have seen in that from the CLI/shell one can go view `/usr/hdp/current/spark2-thriftserver/conf/hive-site.xml` or `/usr/hdp/current/spark2-client/conf/hive-site.xml` and under port property find the listed port (10016) for Thrift Server.  Is this the efficient/preferred way one does this.&lt;/P&gt;&lt;P&gt;
	Further I am trying doing this to try and use this for an ODBC Spark SQL connection to connect to visualization tool, Spotfire.&lt;/P&gt;&lt;P&gt;
	I have successfully connected to the hive datatables in Hive-Server2 from sporfire on my laptop at port 10000 by downloading the Apache Hive connector, now I am hoping to do the same with the Spark ODBC driver, any hints or advice.&lt;/P&gt;&lt;P&gt;
	¶ I am a newbie to HDP and just trying to learn to work with data in hadoop file system, but frankly I don't know what is the reason to want to use one connector over the other is? other than that I'd like to be able to connect with the different methods ( I am an R user and succeeded in getting the hive tables in R as well with OBDC connectors anything I can do in R running on my laptop I could use it with Spotfire which is what I am currently using for analytics), a discussion/answer to this point will be much appreciated.&lt;/P&gt;&lt;P&gt;
	• ¶ Then there are some more challenging things I'd like to do ( You see I understand that I can install R on HDP sandbox and carry out computations, I have seen the SparkR predicting airline delays tutorial; but if I can connect to the data in HDP HDFS outside of HDP sandbox I can start leveraging R's power with Spotfire client's in-built R engine with data from hadoop file system (apparently Spotfire Server has lot more data access/connectivity options but I don't have access to Spotfire Server , so with that in mind some of the things I am trying to get to are::)  &lt;/P&gt;&lt;OL&gt;
	
&lt;LI&gt;&lt;STRONG&gt; With SparkR from R session running in windows laptop how can I use (csv) files in HDFS in HDP to construst SparkDataFrame, either using Hive table in the Hive Server 2 or some other way?  I can only think of extracting the data that I am interested in from the HDP and then make it into a SparkDataFrame to carry out analysis with SparkR library in windows R session.  But is there such an option as connecting to a remote spark cluster in HDP sandbox.&lt;/STRONG&gt;  &lt;/LI&gt;	
&lt;LI&gt; And 'Livy for Spark2 Server' is this something I should be getting familiar with first for my purpose of accessing data outside of sandbox.  Here is a &lt;A href="https://spark.rstudio.com/deployment.html"&gt;https://spark.rstudio.com/deployment.html&lt;/A&gt; reference from sparklyr package that alludes to this possibility.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;
	Thanks, I don't know how naive my questions are but bare with me and any clarification or attempt there at will be really appreciated.&lt;/P&gt;&lt;P&gt;
	Best&lt;/P&gt;</description>
      <pubDate>Sun, 05 Nov 2017 04:05:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/newbie-questions-changing-the-thrift-sever-port-difference/m-p/181318#M70747</guid>
      <dc:creator>blsingh</dc:creator>
      <dc:date>2017-11-05T04:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: newbie questions:: changing the thrift sever port ; difference between Hive and Thrift server ; connecting to data in HDP file system from my windows R session.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/newbie-questions-changing-the-thrift-sever-port-difference/m-p/181319#M70748</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/20166/blsingh.html" nodeid="20166"&gt;@Balsher Singh&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The Easiest way will be to find the port using &lt;STRONG&gt;Ambari UI &lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;Login to Ambari UI --&amp;gt; Spark2 --&amp;gt; Configs (Tab) --&amp;gt; Advanced (Sub Tab) --&amp;gt; Advanced spark2-hive-site-override
(OR)
Login to Ambari UI --&amp;gt; Spark --&amp;gt; Configs (Tab) --&amp;gt; Advanced (Sub Tab) --&amp;gt; Advanced spark-hive-site-override
&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;The default Spark Thrift server port is 10015  (for Spark2 10016). To specify a different port, you can navigate to the hive.server2.thrift.port setting in the "Advanced spark-hive-site-override" category of the Spark configuration section and update the setting with your preferred port number. &lt;BR /&gt;&lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.2/bk_spark-component-guide/content/config-sts-port.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.2/bk_spark-component-guide/content/config-sts-port.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;You can also use &lt;STRONG&gt;Ambari API&lt;/STRONG&gt; to find the port using curl call as following: &lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin -i -H 'X-Requested-By: ambari' -X GET "http://localhost:8080/api/v1/clusters/Sandbox/configurations?type=spark2-hive-site-override"
(OR)
# curl -u admin:admin -i -H 'X-Requested-By: ambari' -X GET "http://localhost:8080/api/v1/clusters/Sandbox/configurations?type=spark-hive-site-override"&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Above command will list the various tags.  You need to use the latest Tag ID (like "tag=version1509830820763") and then run the command with that tag ID as following:&lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin -H 'X-Requested-By: ambari' -X GET "http://localhost:8080/api/v1/clusters/Sandbox/configurations?type=spark2-hive-site-override&amp;amp;tag=version1509830820763"
{
  "href" : "http://localhost:8080/api/v1/clusters/Sandbox/configurations?type=spark2-hive-site-override&amp;amp;tag=version1509830820763",
  "items" : [
    {
      "href" : "http://localhost:8080/api/v1/clusters/Sandbox/configurations?type=spark2-hive-site-override&amp;amp;tag=version1509830820763",
      "tag" : "version1509830820763",
      "type" : "spark2-hive-site-override",
      "version" : 2,
      "Config" : {
        "cluster_name" : "Sandbox",
        "stack_id" : "HDP-2.6"
      },
      "properties" : {
        "hive.metastore.client.connect.retry.delay" : "5",
        "hive.metastore.client.socket.timeout" : "1800",
        "hive.server2.enable.doAs" : "false",
        "hive.server2.thrift.port" : "10016",
        "hive.server2.transport.mode" : "binary"
      }
    }
  ]
}&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE: &lt;/STRONG&gt;Please make sure that you put the whole URL inside Quotation mark as it contains &amp;amp; symbol in it.&lt;/P&gt;&lt;P&gt;Another option will be to use the&lt;STRONG&gt;  config.sh&lt;/STRONG&gt; , you can find the port as following by running the below command from Ambari Server Host:&lt;/P&gt;&lt;P&gt;For Spark2&lt;/P&gt;&lt;PRE&gt;#  /var/lib/ambari-server/resources/scripts/configs.sh -u admin -p admin get localhost Sandbox spark2-hive-site-override

OUTPUT&lt;BR /&gt;--------
USERID=admin
PASSWORD=admin
########## Performing 'GET' on (Site:spark2-hive-site-override, Tag:version1509830820763)
"properties" : {
"hive.metastore.client.connect.retry.delay" : "5",
"hive.metastore.client.socket.timeout" : "1800",
"hive.server2.enable.doAs" : "false",
"hive.server2.thrift.port" : "10017",
"hive.server2.transport.mode" : "binary"
}&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;For Old Spark.&lt;/P&gt;&lt;PRE&gt;#  /var/lib/ambari-server/resources/scripts/configs.sh -u admin -p admin get localhost Sandbox spark-hive-site-override

OUTPUT
--------
USERID=admin
PASSWORD=admin
########## Performing 'GET' on (Site:spark-hive-site-override, Tag:INITIAL)
"properties" : {
"hive.metastore.client.connect.retry.delay" : "5",
"hive.metastore.client.socket.timeout" : "1800",
"hive.server2.enable.doAs" : "false",
"hive.server2.thrift.port" : "10015",
"hive.server2.transport.mode" : "binary"
}&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;NOTE: &lt;/STRONG&gt;In the above commands please replace "Sandbox" word with yoru HDP ClusterName.&lt;BR /&gt;"localhost"  with your ambari server hostname.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Nov 2017 04:37:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/newbie-questions-changing-the-thrift-sever-port-difference/m-p/181319#M70748</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-11-05T04:37:32Z</dc:date>
    </item>
  </channel>
</rss>

