You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hcatalog-commits@incubator.apache.org by kh...@apache.org on 2012/09/06 07:36:02 UTC

svn commit: r1381491 - in /incubator/hcatalog/branches/branch-0.4: CHANGES.txt src/docs/src/documentation/content/xdocs/supportedformats.xml

Author: khorgath
Date: Thu Sep  6 07:36:01 2012
New Revision: 1381491

URL: http://svn.apache.org/viewvc?rev=1381491&view=rev
Log:
HCATALOG-492 Document CTAS workaround for Hive with JSON serde (lefty via khorgath)

Modified:
    incubator/hcatalog/branches/branch-0.4/CHANGES.txt
    incubator/hcatalog/branches/branch-0.4/src/docs/src/documentation/content/xdocs/supportedformats.xml

Modified: incubator/hcatalog/branches/branch-0.4/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hcatalog/branches/branch-0.4/CHANGES.txt?rev=1381491&r1=1381490&r2=1381491&view=diff
==============================================================================
--- incubator/hcatalog/branches/branch-0.4/CHANGES.txt (original)
+++ incubator/hcatalog/branches/branch-0.4/CHANGES.txt Thu Sep  6 07:36:01 2012
@@ -36,6 +36,8 @@ Trunk (unreleased changes)
   HCAT-427 Document storage-based authorization (lefty via gates)
 
   IMPROVEMENTS
+  HCAT-492 Document CTAS workaround for Hive with JSON serde (lefty via khorgath)
+
   HCAT-389 hcat_ping (script to check if HCatalog server is running/reachable) (mithun via khorgath)
 
   HCAT-432 Add findbugs to build (rohini via avandana)

Modified: incubator/hcatalog/branches/branch-0.4/src/docs/src/documentation/content/xdocs/supportedformats.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/branches/branch-0.4/src/docs/src/documentation/content/xdocs/supportedformats.xml?rev=1381491&r1=1381490&r2=1381491&view=diff
==============================================================================
--- incubator/hcatalog/branches/branch-0.4/src/docs/src/documentation/content/xdocs/supportedformats.xml (original)
+++ incubator/hcatalog/branches/branch-0.4/src/docs/src/documentation/content/xdocs/supportedformats.xml Thu Sep  6 07:36:01 2012
@@ -26,6 +26,26 @@
 
   <p>Users can write SerDes for custom formats using the instructions at <a href="https://cwiki.apache.org/confluence/display/Hive/SerDe/">https://cwiki.apache.org/confluence/display/Hive/SerDe</a>.</p>
 
+  <p><strong>Usage from Hive</strong></p>
+
+  <p> As of 0.4, Hive and HCatalog share the same storage abstractions, and thus, you can read from and write to HCatalog tables from within Hive, and vice versa.</p>
+
+  <p>However, Hive does not know where to find the HCatalog jar by default, so if you use any features that have been introduced by HCatalog, such as a table using the JSON SerDe, you might get a "class not found" exception.
+In this situation, before you run Hive, set environment variable <code>HIVE_AUX_JARS_PATH</code> to the directory with your HCatalog jar.
+(If the examples in the <a href="install.html">Installation</a> document were followed, that should be <code>/usr/local/hcat/share/hcatalog/</code>).</p>
+
+  <p><strong>CTAS Issue with JSON SerDe</strong></p>
+
+  <p>Using the Hive CREATE TABLE ... AS SELECT command with a JSON SerDe
+results in a table that has column headers such as "<code>_col0</code>",
+which can be read by HCatalog or Hive but cannot be easily read by external users.
+To avoid this issue, create the table in two steps instead of using CTAS:</p>
+  <ol>
+    <li>CREATE TABLE ...</li>
+    <li>INSERT OVERWRITE TABLE ... SELECT ...</li>
+  </ol>
+  
+  <p>See <a href="https://issues.apache.org/jira/browse/HCATALOG-436">HCATALOG-436</a> for details.</p>
 
  </body>
 </document>