<?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 is not able to load Phoenix Tables.,Not able to load Phoenix table in spark in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Spark-is-not-able-to-load-Phoenix-Tables-Not-able-to-load/m-p/163343#M125717</link>
    <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/9304/tspann.html" nodeid="9304"&gt;@Timothy Spann&lt;/A&gt; and &lt;A rel="user" href="https://community.cloudera.com/users/12513/jknulst.html" nodeid="12513"&gt;@Jasper&lt;/A&gt; , I found the cause of issue now. &lt;/P&gt;&lt;P&gt;The issue was I was not putting colon (: ) between port(2181) and hbase tablespace(&lt;STRONG&gt;&lt;EM&gt;hbase-unsecure&lt;/EM&gt;&lt;/STRONG&gt;) in spark-shell properly while loading the table.&lt;/P&gt;&lt;P&gt;- E&lt;STRONG&gt;arlier I was loading the table in spark-shell as below, which was giving me no Table found error.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;val jdbcDF = sqlContext.read.format("jdbc").options(&lt;/P&gt;&lt;P&gt;Map(&lt;/P&gt;&lt;P&gt;"driver" -&amp;gt; "org.apache.phoenix.jdbc.PhoenixDriver",&lt;/P&gt;&lt;P&gt;"url" -&amp;gt; "jdbc:phoenix:&lt;A href="http://lxhdpmastdev001.lowes.com/"&gt;&amp;lt;&lt;/A&gt;host&amp;gt;:&lt;STRONG&gt;2181/hbase-unsecure&lt;/STRONG&gt;",&lt;/P&gt;&lt;P&gt;"dbtable" -&amp;gt; "TEST_TABLE2")&lt;/P&gt;&lt;P&gt;).load()&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- But now after putting colon ( : ) &lt;/STRONG&gt;between&lt;STRONG&gt; port(2181) number &lt;/STRONG&gt;and&lt;STRONG&gt;hbase tablespace &lt;/STRONG&gt;(&lt;EM&gt;hbase&lt;STRONG&gt;-&lt;/STRONG&gt;unsecure&lt;/EM&gt;). I am able to load table.&lt;/P&gt;&lt;P&gt;val jdbcDF = sqlContext.read.format("jdbc").options(&lt;/P&gt;&lt;P&gt;Map(&lt;/P&gt;&lt;P&gt;"driver" -&amp;gt; "org.apache.phoenix.jdbc.PhoenixDriver",&lt;/P&gt;&lt;P&gt;"url" -&amp;gt; "jdbc:phoenix:&lt;A href="http://lxhdpmastdev001.lowes.com/"&gt;&amp;lt;&lt;/A&gt;host&amp;gt;:&lt;STRONG&gt;2181:/hbase-unsecure&lt;/STRONG&gt;",&lt;/P&gt;&lt;P&gt;"dbtable" -&amp;gt; "TEST_TABLE2")&lt;/P&gt;&lt;P&gt;).load()&lt;/P&gt;</description>
    <pubDate>Thu, 22 Sep 2016 16:45:08 GMT</pubDate>
    <dc:creator>anjultiwari</dc:creator>
    <dc:date>2016-09-22T16:45:08Z</dc:date>
    <item>
      <title>Spark is not able to load Phoenix Tables.,Not able to load Phoenix table in spark</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Spark-is-not-able-to-load-Phoenix-Tables-Not-able-to-load/m-p/163337#M125711</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/238/gbraccialli.html"&gt;Guilherme Braccialli&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have created a table in phoenix and tried to load it using dataframe api in spark-shell.&lt;/P&gt;&lt;P&gt;I am getting error as  " org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table undefined. tableName=TEST" &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/7836-phoenixtable.png"&gt;phoenixtable.png&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/7837-spark-phoenix-tableread2.png"&gt;spark-phoenix-tableread2.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Note : &lt;/P&gt;&lt;P&gt;1. I checked in Hbase shell, and table which I created using Phoenix shell exists in Hbase too.&lt;/P&gt;&lt;P&gt;2. I am launching the spark shell as below :&lt;/P&gt;&lt;P&gt;spark-shell --master yarn-client \
--jars /usr/hdp/current/phoenix-client/phoenix-4.4.0.2.3.4.0-3485-client.jar,/usr/hdp/current/phoenix-client/lib/phoenix-spark-4.4.0.2.3.4.0-3485.jar \
--conf "spark.executor.extraClassPath=/usr/hdp/current/phoenix-client/phoenix-4.4.0.2.3.4.0-3485-client.jar"&lt;/P&gt;&lt;P&gt;- Attached the snapshots.&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://community.cloudera.com/t5/image/serverpage/image-id/6410i1C916096FE8AB0CB/image-size/large?v=1.0&amp;amp;px=999" border="0" alt="spark-phoenix-tableread2.png" title="spark-phoenix-tableread2.png" /&gt;&lt;IMG src="https://community.cloudera.com/t5/image/serverpage/image-id/6411iFE2AC2866AE32782/image-size/large?v=1.0&amp;amp;px=999" border="0" alt="phoenixtable.png" title="phoenixtable.png" /&gt;</description>
      <pubDate>Wed, 21 Sep 2016 18:46:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Spark-is-not-able-to-load-Phoenix-Tables-Not-able-to-load/m-p/163337#M125711</guid>
      <dc:creator>anjultiwari</dc:creator>
      <dc:date>2016-09-21T18:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Spark is not able to load Phoenix Tables.,Not able to load Phoenix table in spark</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Spark-is-not-able-to-load-Phoenix-Tables-Not-able-to-load/m-p/163338#M125712</link>
      <description>&lt;P&gt;It is actually weird, if table is not found in MeteData cache , it should catch the exception and try to update the cache with the server. Not sure, why the exception is propagated out so early. &lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 22:28:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Spark-is-not-able-to-load-Phoenix-Tables-Not-able-to-load/m-p/163338#M125712</guid>
      <dc:creator>asinghal</dc:creator>
      <dc:date>2016-09-21T22:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Spark is not able to load Phoenix Tables.,Not able to load Phoenix table in spark</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Spark-is-not-able-to-load-Phoenix-Tables-Not-able-to-load/m-p/163339#M125713</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/13228/anjultiwari.html" nodeid="13228"&gt;@anjul tiwari&lt;/A&gt; &lt;/P&gt;&lt;P&gt;have you tried changing the hbase tablespace into '&amp;lt;host&amp;gt;:2181/&lt;STRONG&gt;&lt;EM&gt;hbase-unsecure&lt;/EM&gt;&lt;/STRONG&gt;' in stead of &lt;STRONG&gt;&lt;EM&gt;/hbase&lt;/EM&gt;&lt;/STRONG&gt; ?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 23:12:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Spark-is-not-able-to-load-Phoenix-Tables-Not-able-to-load/m-p/163339#M125713</guid>
      <dc:creator>jknulst</dc:creator>
      <dc:date>2016-09-21T23:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Spark is not able to load Phoenix Tables.,Not able to load Phoenix table in spark</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Spark-is-not-able-to-load-Phoenix-Tables-Not-able-to-load/m-p/163340#M125714</link>
      <description>&lt;P&gt;try &lt;/P&gt;&lt;P&gt;/usr/hdp/current/phoenix-client/bin/sqlline.py myserver:2181:/hbase-unsecure&lt;/P&gt;&lt;P&gt;check your table and table space.&lt;/P&gt;&lt;P&gt;make sure the table is there.   is there a schema?&lt;/P&gt;&lt;P&gt;and try the same query&lt;/P&gt;&lt;PRE&gt;0: jdbc:phoenix:coolserverhortonworks&amp;gt; !tables
+------------+--------------+--------------+---------------+----------+------------+----------------------------+-----------------+--------------+-----------------+---------------+---+
| TABLE_CAT  | TABLE_SCHEM  |  TABLE_NAME  |  TABLE_TYPE   | REMARKS  | TYPE_NAME  | SELF_REFERENCING_COL_NAME  | REF_GENERATION  | INDEX_STATE  | IMMUTABLE_ROWS  | SALT_BUCKETS  | M |
+------------+--------------+--------------+---------------+----------+------------+----------------------------+-----------------+--------------+-----------------+---------------+---+
|            | SYSTEM       | CATALOG      | SYSTEM TABLE  |          |            |                            |                 |              | false           | null          | f |
|            | SYSTEM       | FUNCTION     | SYSTEM TABLE  |          |            |                            |                 |              | false           | null          | f |
|            | SYSTEM       | SEQUENCE     | SYSTEM TABLE  |          |            |                            |                 |              | false           | null          | f |
|            | SYSTEM       | STATS        | SYSTEM TABLE  |          |            |                            |                 |              | false           | null          | f |
|            |              | PHILLYCRIME  | TABLE         |          |            |                            |                 |              | false           | null          | f |
|            |              | PRICES       | TABLE         |          |            |                            |                 |              | false           | null          | f |
|            |              | TABLE1       | TABLE         |          |            |                            |                 |              | false           | null          | f |
+------------+--------------+--------------+---------------+----------+------------+----------------------------+-----------------+--------------+-----------------+---------------+---+
0: jdbc:phoenix:coolhortonworks&amp;gt;
&lt;/PRE&gt;&lt;P&gt;&lt;A href="https://phoenix.apache.org/phoenix_spark.html" target="_blank"&gt;https://phoenix.apache.org/phoenix_spark.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 23:25:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Spark-is-not-able-to-load-Phoenix-Tables-Not-able-to-load/m-p/163340#M125714</guid>
      <dc:creator>TimothySpann</dc:creator>
      <dc:date>2016-09-21T23:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: Spark is not able to load Phoenix Tables.,Not able to load Phoenix table in spark</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Spark-is-not-able-to-load-Phoenix-Tables-Not-able-to-load/m-p/163341#M125715</link>
      <description>&lt;P&gt;I tried with &amp;lt;host&amp;gt;:2181/&lt;STRONG&gt;&lt;EM&gt;hbase-unsecure, but still same issue.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="7896-screen-shot-2016-09-22-at-15904-pm.png" style="width: 1864px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20520i5ACF95F511E3A717/image-size/medium?v=v2&amp;amp;px=400" role="button" title="7896-screen-shot-2016-09-22-at-15904-pm.png" alt="7896-screen-shot-2016-09-22-at-15904-pm.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="7897-screen-shot-2016-09-22-at-15404-pm.png" style="width: 2268px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20521iBCEEB5F989ED0DAD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="7897-screen-shot-2016-09-22-at-15404-pm.png" alt="7897-screen-shot-2016-09-22-at-15404-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 11:35:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Spark-is-not-able-to-load-Phoenix-Tables-Not-able-to-load/m-p/163341#M125715</guid>
      <dc:creator>anjultiwari</dc:creator>
      <dc:date>2019-08-18T11:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Spark is not able to load Phoenix Tables.,Not able to load Phoenix table in spark</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Spark-is-not-able-to-load-Phoenix-Tables-Not-able-to-load/m-p/163342#M125716</link>
      <description>&lt;P&gt;Thanks a lot &lt;A rel="user" href="https://community.cloudera.com/users/9304/tspann.html" nodeid="9304"&gt;@Timothy Spann&lt;/A&gt; for your help. Now I am able to load the phoenix table in spark. I was missing a &lt;STRONG&gt;colon ( : ) &lt;/STRONG&gt;between&lt;STRONG&gt; port(2181) number &lt;/STRONG&gt;and &lt;STRONG&gt;hbase tablespace &lt;/STRONG&gt;(&lt;EM&gt;hbase&lt;STRONG&gt;-&lt;/STRONG&gt;unsecure&lt;/EM&gt;) while loading the table in spark.&lt;/P&gt;&lt;P&gt;Now after correcting the issue, spark is loading the phoenix table.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2016 16:42:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Spark-is-not-able-to-load-Phoenix-Tables-Not-able-to-load/m-p/163342#M125716</guid>
      <dc:creator>anjultiwari</dc:creator>
      <dc:date>2016-09-22T16:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Spark is not able to load Phoenix Tables.,Not able to load Phoenix table in spark</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Spark-is-not-able-to-load-Phoenix-Tables-Not-able-to-load/m-p/163343#M125717</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/9304/tspann.html" nodeid="9304"&gt;@Timothy Spann&lt;/A&gt; and &lt;A rel="user" href="https://community.cloudera.com/users/12513/jknulst.html" nodeid="12513"&gt;@Jasper&lt;/A&gt; , I found the cause of issue now. &lt;/P&gt;&lt;P&gt;The issue was I was not putting colon (: ) between port(2181) and hbase tablespace(&lt;STRONG&gt;&lt;EM&gt;hbase-unsecure&lt;/EM&gt;&lt;/STRONG&gt;) in spark-shell properly while loading the table.&lt;/P&gt;&lt;P&gt;- E&lt;STRONG&gt;arlier I was loading the table in spark-shell as below, which was giving me no Table found error.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;val jdbcDF = sqlContext.read.format("jdbc").options(&lt;/P&gt;&lt;P&gt;Map(&lt;/P&gt;&lt;P&gt;"driver" -&amp;gt; "org.apache.phoenix.jdbc.PhoenixDriver",&lt;/P&gt;&lt;P&gt;"url" -&amp;gt; "jdbc:phoenix:&lt;A href="http://lxhdpmastdev001.lowes.com/"&gt;&amp;lt;&lt;/A&gt;host&amp;gt;:&lt;STRONG&gt;2181/hbase-unsecure&lt;/STRONG&gt;",&lt;/P&gt;&lt;P&gt;"dbtable" -&amp;gt; "TEST_TABLE2")&lt;/P&gt;&lt;P&gt;).load()&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- But now after putting colon ( : ) &lt;/STRONG&gt;between&lt;STRONG&gt; port(2181) number &lt;/STRONG&gt;and&lt;STRONG&gt;hbase tablespace &lt;/STRONG&gt;(&lt;EM&gt;hbase&lt;STRONG&gt;-&lt;/STRONG&gt;unsecure&lt;/EM&gt;). I am able to load table.&lt;/P&gt;&lt;P&gt;val jdbcDF = sqlContext.read.format("jdbc").options(&lt;/P&gt;&lt;P&gt;Map(&lt;/P&gt;&lt;P&gt;"driver" -&amp;gt; "org.apache.phoenix.jdbc.PhoenixDriver",&lt;/P&gt;&lt;P&gt;"url" -&amp;gt; "jdbc:phoenix:&lt;A href="http://lxhdpmastdev001.lowes.com/"&gt;&amp;lt;&lt;/A&gt;host&amp;gt;:&lt;STRONG&gt;2181:/hbase-unsecure&lt;/STRONG&gt;",&lt;/P&gt;&lt;P&gt;"dbtable" -&amp;gt; "TEST_TABLE2")&lt;/P&gt;&lt;P&gt;).load()&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2016 16:45:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Spark-is-not-able-to-load-Phoenix-Tables-Not-able-to-load/m-p/163343#M125717</guid>
      <dc:creator>anjultiwari</dc:creator>
      <dc:date>2016-09-22T16:45:08Z</dc:date>
    </item>
  </channel>
</rss>

