incubator-hcatalog-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1381489 - in /incubator/hcatalog/trunk: CHANGES.txt src/docs/src/documentation/content/xdocs/supportedformats.xml
Date Thu, 06 Sep 2012 07:31:48 GMT
Author: khorgath
Date: Thu Sep  6 07:31:48 2012
New Revision: 1381489

HCATALOG-492 Document CTAS workaround for Hive with JSON serde (lefty via khorgath)


Modified: incubator/hcatalog/trunk/CHANGES.txt
--- incubator/hcatalog/trunk/CHANGES.txt (original)
+++ incubator/hcatalog/trunk/CHANGES.txt Thu Sep  6 07:31:48 2012
@@ -38,6 +38,8 @@ Trunk (unreleased changes)
   HCAT-427 Document storage-based authorization (lefty via gates)
+  HCAT-492 Document CTAS workaround for Hive with JSON serde (lefty via khorgath)
   HCAT-487 HCatalog should tolerate a user-defined amount of bad records (traviscrawford)
   HCAT-488 TestHCatStorer should extend HCatBaseTest so it uses junit4 and runs inside an
IDE (traviscrawford)

Modified: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/supportedformats.xml
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/supportedformats.xml
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/supportedformats.xml
Thu Sep  6 07:31:48 2012
@@ -26,6 +26,26 @@
   <p>Users can write SerDes for custom formats using the instructions at <a href=""></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>
+  </ol>
+  <p>See <a href="">HCATALOG-436</a>
for details.</p>

View raw message