<?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: Spark submit in local mode  against a kerberized cluster in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Spark-submit-in-local-mode-against-a-kerberized-cluster/m-p/346486#M234890</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/37475"&gt;@ajaybabum&lt;/a&gt;,&amp;nbsp;&lt;SPAN&gt;Yes we can able&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;run Spark in local mode against the Kerberized cluster. For a quick test, can you directly open spark-shell to try reading the CSV file from the HDFS location and show the output of the contents to verify whether do you have any issue in the Cluster / Spark configuration or if it's more on your application code?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Will it possible in local mode without run kinit command before spark-submit.&lt;/P&gt;&lt;P&gt;-- By passing --keytab&amp;nbsp;--principal details in your spark-submit, you don't need to run kinit command before spark-submit.&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jun 2022 23:58:30 GMT</pubDate>
    <dc:creator>jagadeesan</dc:creator>
    <dc:date>2022-06-28T23:58:30Z</dc:date>
    <item>
      <title>Spark submit in local mode  against a kerberized cluster</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Spark-submit-in-local-mode-against-a-kerberized-cluster/m-p/343548#M233954</link>
      <description>&lt;P&gt;Hello Cloudera Team,&lt;/P&gt;&lt;P&gt;I have a requirement read hdfs file from&amp;nbsp;kerberized cluster in spark local mode when i try this i am facing&amp;nbsp; Client cannot authenticate via:[TOKEN, KERBEROS]. This was the API i implemented ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;public static void main(String[] args) {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;SparkConf conf = new SparkConf().setAppName("spark-ml").setMaster("local[1]")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;.set("hadoop.security.authentication", "KERBEROS")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;.set("spark.hadoop.fs.defaultFS","hdfs://server35:8020")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;.set("hadoop.rpc.protection", "privacy")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;.set("hadoop.security.authorization", "true")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;.set("spark.history.kerberos.enabled", "true")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;.set("spark.kerberos.keytab", "D:\\resources\\ruleuser.keytab")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;.set("spar.kerberos.principal", "ruleuser/server35@HADOOP.COM")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;.set("principal", "ruleuser/server35@HADOOP.COM")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;.set("keytab","D:\\resources\\ruleuser.keytab")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;.set("spark.files", "D:\\resources\\core-site.xml,D:\\resources\\hdfs-site.xml")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;.set("class", "Main2");&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;SparkContext context = new SparkContext(conf);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;context.addFile("D:\\resources\\", true);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;SparkSession session = SparkSession.builder().sparkContext(context).getOrCreate();&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Dataset&amp;lt;Row&amp;gt; df = session.read().format("csv").option("header", true)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;.load("hdfs://server35:8020/user/ruleuser/seahoarse/file123.csv");&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;df.show(5);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will it possible in local mode without run kinit command before spark-submit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ajay Babu Maguluri.&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 18:40:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Spark-submit-in-local-mode-against-a-kerberized-cluster/m-p/343548#M233954</guid>
      <dc:creator>ajaybabum</dc:creator>
      <dc:date>2022-05-10T18:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: Spark submit in local mode  against a kerberized cluster</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Spark-submit-in-local-mode-against-a-kerberized-cluster/m-p/346486#M234890</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/37475"&gt;@ajaybabum&lt;/a&gt;,&amp;nbsp;&lt;SPAN&gt;Yes we can able&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;run Spark in local mode against the Kerberized cluster. For a quick test, can you directly open spark-shell to try reading the CSV file from the HDFS location and show the output of the contents to verify whether do you have any issue in the Cluster / Spark configuration or if it's more on your application code?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Will it possible in local mode without run kinit command before spark-submit.&lt;/P&gt;&lt;P&gt;-- By passing --keytab&amp;nbsp;--principal details in your spark-submit, you don't need to run kinit command before spark-submit.&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 23:58:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Spark-submit-in-local-mode-against-a-kerberized-cluster/m-p/346486#M234890</guid>
      <dc:creator>jagadeesan</dc:creator>
      <dc:date>2022-06-28T23:58:30Z</dc:date>
    </item>
  </channel>
</rss>

