<?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: 2.4.2 spark-submit got Invalid ContainerId in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/2-4-2-spark-submit-got-Invalid-ContainerId/m-p/134305#M96967</link>
    <description>&lt;P&gt;Just checked the pom.xml file for phoenix 4.7 ,it's based on hadoop 2.5.1 which the container id should looks like container_1465095377475_0007_02_000001, while in hadoop 2.7.1 the container id should looks like container_&lt;STRONG&gt;e03&lt;/STRONG&gt;_1465095377475_0007_02_000001. So the old version of class org.apache.hadoop.yarn.util.ConverterUtils.toContainerId couldn't handle the new version's container . I should address this problem in phoenix comminity either.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jun 2016 01:43:22 GMT</pubDate>
    <dc:creator>dblive</dc:creator>
    <dc:date>2016-06-13T01:43:22Z</dc:date>
    <item>
      <title>2.4.2 spark-submit got Invalid ContainerId</title>
      <link>https://community.cloudera.com/t5/Support-Questions/2-4-2-spark-submit-got-Invalid-ContainerId/m-p/134299#M96961</link>
      <description>&lt;P&gt;when I  execute&lt;STRONG&gt; spark-submit --master yarn /usr/hdp/current/spark-client/examples/src/main/python/pi.py &lt;/STRONG&gt;on hdp2.4.2 ,I got the error below (which doesn't cause any error on hdp2.4.0),according to the following job log ,sounds we got &lt;STRONG&gt;container_e03_1465095377475_0007_02_000001 &lt;/STRONG&gt;which don't recognized by spark and caused&lt;STRONG&gt; &lt;/STRONG&gt;&lt;B&gt;java.lang.NumberFormatException: For input string: "e03"  error&lt;/B&gt;&lt;/P&gt;&lt;PRE&gt;SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/hadoop/yarn/local/filecache/11/spark-hdp-assembly.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.4.2.0-258/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See &lt;A href="http://www.slf4j.org/codes.html#multiple_bindings" target="_blank"&gt;http://www.slf4j.org/codes.html#multiple_bindings&lt;/A&gt; for an explanation.
16/06/11 16:30:39 INFO ApplicationMaster: Registered signal handlers for [TERM, HUP, INT]
16/06/11 16:30:39 ERROR ApplicationMaster: Uncaught exception: 
java.lang.IllegalArgumentException: Invalid ContainerId: container_e03_1465095377475_0007_02_000001
	at org.apache.hadoop.yarn.util.ConverterUtils.toContainerId(ConverterUtils.java:182)
	at org.apache.spark.deploy.yarn.YarnSparkHadoopUtil.getContainerId(YarnSparkHadoopUtil.scala:192)
	at org.apache.spark.deploy.yarn.YarnRMClient.getAttemptId(YarnRMClient.scala:92)
	at org.apache.spark.deploy.yarn.ApplicationMaster.run(ApplicationMaster.scala:142)
	at org.apache.spark.deploy.yarn.ApplicationMaster$anonfun$main$1.apply$mcV$sp(ApplicationMaster.scala:672)
	at org.apache.spark.deploy.SparkHadoopUtil$anon$1.run(SparkHadoopUtil.scala:69)
	at org.apache.spark.deploy.SparkHadoopUtil$anon$1.run(SparkHadoopUtil.scala:68)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:422)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1614)
	at org.apache.spark.deploy.SparkHadoopUtil.runAsSparkUser(SparkHadoopUtil.scala:68)
	at org.apache.spark.deploy.yarn.ApplicationMaster$.main(ApplicationMaster.scala:670)
	at org.apache.spark.deploy.yarn.ExecutorLauncher$.main(ApplicationMaster.scala:697)
	at org.apache.spark.deploy.yarn.ExecutorLauncher.main(ApplicationMaster.scala)
Caused by: java.lang.NumberFormatException: For input string: "e03"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Long.parseLong(Long.java:589)
	at java.lang.Long.parseLong(Long.java:631)
	at org.apache.hadoop.yarn.util.ConverterUtils.toApplicationAttemptId(ConverterUtils.java:137)
	at org.apache.hadoop.yarn.util.ConverterUtils.toContainerId(ConverterUtils.java:177)
	... 13 more
16/06/11 16:30:39 INFO ApplicationMaster: Final app status: FAILED, exitCode: 10, (reason: Uncaught exception: java.lang.IllegalArgumentException: Invalid ContainerId: container_e03_1465095377475_0007_02_000001)
16/06/11 16:30:39 INFO ShutdownHookManager: Shutdown hook called
&lt;/PRE&gt;</description>
      <pubDate>Sun, 12 Jun 2016 04:08:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/2-4-2-spark-submit-got-Invalid-ContainerId/m-p/134299#M96961</guid>
      <dc:creator>dblive</dc:creator>
      <dc:date>2016-06-12T04:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: 2.4.2 spark-submit got Invalid ContainerId</title>
      <link>https://community.cloudera.com/t5/Support-Questions/2-4-2-spark-submit-got-Invalid-ContainerId/m-p/134300#M96962</link>
      <description>&lt;P&gt;seems there is  difference in versions of hadoop jars(hdp) and  Spark running on the cluster. are you running vanilla spark on cluster?&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jun 2016 11:55:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/2-4-2-spark-submit-got-Invalid-ContainerId/m-p/134300#M96962</guid>
      <dc:creator>rajkumar_singh</dc:creator>
      <dc:date>2016-06-12T11:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: 2.4.2 spark-submit got Invalid ContainerId</title>
      <link>https://community.cloudera.com/t5/Support-Questions/2-4-2-spark-submit-got-Invalid-ContainerId/m-p/134301#M96963</link>
      <description>&lt;P&gt;Hi Raj,&lt;/P&gt;&lt;P&gt;thank you for the response . turns out it's caused by phoenix : I added  phoenix-4.7.0-HBase-1.1-client-spark.jar to both &lt;STRONG&gt;spark.executor.extraClassPath &lt;/STRONG&gt;and &lt;STRONG&gt;spark.driver.extraClassPath . &lt;/STRONG&gt;Now I'm using HDP2.4.2 default jar&lt;STRONG&gt; &lt;/STRONG&gt;&lt;STRONG&gt;phoenix-spark-4.4.0.2.4.2.0-258.jar&lt;/STRONG&gt; the problem disappeared .&lt;/P&gt;&lt;P&gt;However with the default jar , there is no jdbc support  to execute statement like below , HDP's phoenix version is too old ! I'm kindly of hoping that HDP could provide a update for phoenix to support JDBC !&lt;/P&gt;&lt;PRE&gt;df =sqlContext.read.format("org.apache.phoenix.spark").option("table","TABLE1").option("zkUrl","namenode.localdomain:2181:/hbase-unsecure").load()&lt;/PRE&gt;&lt;P&gt;the error rasied by the upper command :  java.lang.NoClassDefFoundError: org/apache/phoenix/jdbc/PhoenixDriver&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2016 00:15:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/2-4-2-spark-submit-got-Invalid-ContainerId/m-p/134301#M96963</guid>
      <dc:creator>dblive</dc:creator>
      <dc:date>2016-06-13T00:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: 2.4.2 spark-submit got Invalid ContainerId</title>
      <link>https://community.cloudera.com/t5/Support-Questions/2-4-2-spark-submit-got-Invalid-ContainerId/m-p/134302#M96964</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10779/dalinqin.html" nodeid="10779"&gt;@dalin qin&lt;/A&gt; it looks that phoenix-client jar is missing here, could you please try adding it with your submit options like this&lt;/P&gt;&lt;P&gt;spark-shell --master yarn-client --jars /usr/hdp/current/phoenix-client/phoenix-client.jar,/usr/hdp/current/phoenix-client/lib/phoenix-spark-4.4.0.2.4.0.0-169.jar&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2016 00:27:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/2-4-2-spark-submit-got-Invalid-ContainerId/m-p/134302#M96964</guid>
      <dc:creator>rajkumar_singh</dc:creator>
      <dc:date>2016-06-13T00:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: 2.4.2 spark-submit got Invalid ContainerId</title>
      <link>https://community.cloudera.com/t5/Support-Questions/2-4-2-spark-submit-got-Invalid-ContainerId/m-p/134303#M96965</link>
      <description>&lt;P&gt;I further checked , the error was actually caused by ConverterUtils.class in phoenix-4.7.0-HBase-1.1-client-spark.jar , which I think it's supporting hadoop 2.7.2 while HDP2.4.2 is still using 2.7.1 , the container id format has been changed .&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2016 00:43:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/2-4-2-spark-submit-got-Invalid-ContainerId/m-p/134303#M96965</guid>
      <dc:creator>dblive</dc:creator>
      <dc:date>2016-06-13T00:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: 2.4.2 spark-submit got Invalid ContainerId</title>
      <link>https://community.cloudera.com/t5/Support-Questions/2-4-2-spark-submit-got-Invalid-ContainerId/m-p/134304#M96966</link>
      <description>&lt;P&gt;Hi Raj, I already tried that ,I'm using pyspark , added those jars you mentioned in both &lt;STRONG&gt;spark.executor.extraClassPath &lt;/STRONG&gt;and &lt;STRONG&gt;spark.driver.extraClassPath&lt;/STRONG&gt; and removed phoenix4.7 ,now my spark-submit is working fine ,only the dataframe by specify classname&lt;STRONG&gt; &lt;/STRONG&gt;"org.apache.phoenix.spark" is not working . following is I did just now:&lt;/P&gt;&lt;PRE&gt;spark-shell --master yarn-client --jars /usr/hdp/current/phoenix-client/phoenix-client.jar,/usr/hdp/current/phoenix-client/lib/phoenix-spark-4.4.0.2.4.2.0-258.jar

scala&amp;gt; val df = sqlContext.load(  "org.apache.phoenix.spark",  Map("table" -&amp;gt; "TABLE1", "zkUrl" -&amp;gt; "namenode:2181:/hbase-unsecure"))
warning: there were 1 deprecation warning(s); re-run with -deprecation for details
java.lang.NoClassDefFoundError: org/apache/phoenix/jdbc/PhoenixDriver
        at org.apache.phoenix.spark.PhoenixRDD.&amp;lt;init&amp;gt;(PhoenixRDD.scala:40)
        at org.apache.phoenix.spark.PhoenixRelation.schema(PhoenixRelation.scala:50)
        at org.apache.spark.sql.execution.datasources.LogicalRelation.&amp;lt;init&amp;gt;(LogicalRelation.scala:37)
        at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:125)
        at org.apache.spark.sql.SQLContext.load(SQLContext.scala:1153)
        at $iwC$iwC$iwC$iwC$iwC$iwC$iwC$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:25)
        at $iwC$iwC$iwC$iwC$iwC$iwC$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:30)
        at $iwC$iwC$iwC$iwC$iwC$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:32)
        at $iwC$iwC$iwC$iwC$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:34)
        at $iwC$iwC$iwC$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:36)
        at $iwC$iwC$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:38)
        at $iwC$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:40)
        at $iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:42)
        at &amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:44)
        at .&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:48)
        at .&amp;lt;clinit&amp;gt;(&amp;lt;console&amp;gt;)
        at .&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:7)
        at .&amp;lt;clinit&amp;gt;(&amp;lt;console&amp;gt;)
        at $print(&amp;lt;console&amp;gt;)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.spark.repl.SparkIMain$ReadEvalPrint.call(SparkIMain.scala:1065)
        at org.apache.spark.repl.SparkIMain$Request.loadAndRun(SparkIMain.scala:1346)
        at org.apache.spark.repl.SparkIMain.loadAndRunReq$1(SparkIMain.scala:840)
        at org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:871)
        at org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:819)
        at org.apache.spark.repl.SparkILoop.reallyInterpret$1(SparkILoop.scala:857)
        at org.apache.spark.repl.SparkILoop.interpretStartingWith(SparkILoop.scala:902)
        at org.apache.spark.repl.SparkILoop.command(SparkILoop.scala:814)
        at org.apache.spark.repl.SparkILoop.processLine$1(SparkILoop.scala:657)
        at org.apache.spark.repl.SparkILoop.innerLoop$1(SparkILoop.scala:665)
        at org.apache.spark.repl.SparkILoop.org$apache$spark$repl$SparkILoop$loop(SparkILoop.scala:670)
        at org.apache.spark.repl.SparkILoop$anonfun$org$apache$spark$repl$SparkILoop$process$1.apply$mcZ$sp(SparkILoop.scala:997)
        at org.apache.spark.repl.SparkILoop$anonfun$org$apache$spark$repl$SparkILoop$process$1.apply(SparkILoop.scala:945)
        at org.apache.spark.repl.SparkILoop$anonfun$org$apache$spark$repl$SparkILoop$process$1.apply(SparkILoop.scala:945)
        at scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:135)
        at org.apache.spark.repl.SparkILoop.org$apache$spark$repl$SparkILoop$process(SparkILoop.scala:945)
        at org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:1059)
        at org.apache.spark.repl.Main$.main(Main.scala:31)
        at org.apache.spark.repl.Main.main(Main.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$runMain(SparkSubmit.scala:731)
        at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:181)
        at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:206)
        at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:121)
        at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.lang.ClassNotFoundException: org.apache.phoenix.jdbc.PhoenixDriver
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 51 more&lt;/PRE&gt;&lt;P&gt;if you open the jar file like phoenix-spark-4.4.0.2.4.2.0-258.jar ,you will find there is no jdbc exists ,that's the root reason . if you open the jar for phoenix4.7 ,you will jdbc support classes for spark.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2016 00:57:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/2-4-2-spark-submit-got-Invalid-ContainerId/m-p/134304#M96966</guid>
      <dc:creator>dblive</dc:creator>
      <dc:date>2016-06-13T00:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: 2.4.2 spark-submit got Invalid ContainerId</title>
      <link>https://community.cloudera.com/t5/Support-Questions/2-4-2-spark-submit-got-Invalid-ContainerId/m-p/134305#M96967</link>
      <description>&lt;P&gt;Just checked the pom.xml file for phoenix 4.7 ,it's based on hadoop 2.5.1 which the container id should looks like container_1465095377475_0007_02_000001, while in hadoop 2.7.1 the container id should looks like container_&lt;STRONG&gt;e03&lt;/STRONG&gt;_1465095377475_0007_02_000001. So the old version of class org.apache.hadoop.yarn.util.ConverterUtils.toContainerId couldn't handle the new version's container . I should address this problem in phoenix comminity either.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2016 01:43:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/2-4-2-spark-submit-got-Invalid-ContainerId/m-p/134305#M96967</guid>
      <dc:creator>dblive</dc:creator>
      <dc:date>2016-06-13T01:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: 2.4.2 spark-submit got Invalid ContainerId</title>
      <link>https://community.cloudera.com/t5/Support-Questions/2-4-2-spark-submit-got-Invalid-ContainerId/m-p/134306#M96968</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10779/dalinqin.html" nodeid="10779"&gt;@dalin qin&lt;/A&gt; yes, you are right here as I told you earlier in the thread that there is difference in versions of hadoop jars(hdp) and Spark running on the cluster. the phoenix jar issue is a different issue which can be addressed in phoenix community.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2016 13:00:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/2-4-2-spark-submit-got-Invalid-ContainerId/m-p/134306#M96968</guid>
      <dc:creator>rajkumar_singh</dc:creator>
      <dc:date>2016-06-13T13:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: 2.4.2 spark-submit got Invalid ContainerId</title>
      <link>https://community.cloudera.com/t5/Support-Questions/2-4-2-spark-submit-got-Invalid-ContainerId/m-p/134307#M96969</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10779/dalinqin.html" nodeid="10779"&gt;@dalin qin&lt;/A&gt; seems your original issue has been resolved, could you please select the best answer among the thread so that other user get benefit while referrring this thread.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2016 20:18:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/2-4-2-spark-submit-got-Invalid-ContainerId/m-p/134307#M96969</guid>
      <dc:creator>rajkumar_singh</dc:creator>
      <dc:date>2016-06-13T20:18:44Z</dc:date>
    </item>
  </channel>
</rss>

