<?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: How to append or overwrite the existin partition in Hive using HCatStorer. in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-append-or-overwrite-the-existin-partition-in-Hive/m-p/161947#M36692</link>
    <description>&lt;P&gt;Thanks Michael Young , i am not able to overwrite into a Hive table using HCatstorer from Pig.&lt;/P&gt;&lt;P&gt;However i learned that there HCatalog cant overwrite into hive's existing partition&lt;/P&gt;&lt;P&gt;Its nice to have pig directly write into hive's existing partition.&lt;/P&gt;&lt;P&gt;Is there any patch ,,, or i&lt;/P&gt;</description>
    <pubDate>Wed, 03 Aug 2016 14:13:44 GMT</pubDate>
    <dc:creator>prklearning</dc:creator>
    <dc:date>2016-08-03T14:13:44Z</dc:date>
    <item>
      <title>How to append or overwrite the existin partition in Hive using HCatStorer.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-append-or-overwrite-the-existin-partition-in-Hive/m-p/161945#M36690</link>
      <description>&lt;P&gt;Hi I have a requirement where i need to overwrite (or append )the data to existing partition in hive from Pig .&lt;/P&gt;&lt;P&gt;However  while storing using HCatStore , the job failed with the error .&lt;/P&gt;&lt;P&gt;ob commit failed: java.io.IOException: java.lang.reflect.InvocationTargetException
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputCommitter.commitJob(PigOutputCommitter.java:264)
at org.apache.hadoop.mapreduce.v2.app.commit.CommitterEventHandler$EventProcessor.handleJobCommit(CommitterEventHandler.java:285)
at org.apache.hadoop.mapreduce.v2.app.commit.CommitterEventHandler$EventProcessor.run(CommitterEventHandler.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputCommitter.commitJob(PigOutputCommitter.java:262)
... 5 more
Caused by: org.apache.hive.hcatalog.common.HCatException : 2002 : Partition already present with given partition key values : Data already exists in hdfs://sandbox.hortonworks.com:8020/input/externalHiveData/part=1990, duplicate publish not possible.
at org.apache.hive.hcatalog.mapreduce.FileOutputCommitterContainer.moveTaskOutputs(FileOutputCommitterContainer.java:609)
at org.apache.hive.hcatalog.mapreduce.FileOutputCommitterContainer.moveTaskOutputs(FileOutputCommitterContainer.java:565)
at org.apache.hive.hcatalog.mapreduce.FileOutputCommitterContainer.registerPartitions(FileOutputCommitterContainer.java:928)
at org.apache.hive.hcatalog.mapreduce.FileOutputCommitterContainer.commitJob(FileOutputCommitterContainer.java:249)
... 10 more&lt;/P&gt;&lt;P&gt;CREATE TABLE testing.emp_tab_int(
empid string,
name string,
year int)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
STORED AS textfile&lt;/P&gt;&lt;P&gt;load data local inpath '/somepath' overwrite into table testing.emp_tab_int ;&lt;/P&gt;&lt;P&gt;CREATE TABLE testing.emp_tab_part_int(
empid string,
name string,
year int)
PARTITIONED BY (part int)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
STORED AS textfile&lt;/P&gt;&lt;P&gt;INSERT OVERWRITE TABLE testing.emp_tab_part_int PARTITION(part) SELECT empid,name,year,year from  testing.emp_tab_int;&lt;/P&gt;
&lt;P&gt;A = load '/input/incr_dat' USING PigStorage(',') as (empid: chararray, name: chararray ,year : int); &lt;/P&gt;&lt;P&gt;B =foreach A generate $0..,$2 as part; &lt;/P&gt;&lt;P&gt;Store B into 'testing.emp_tab_part_int' using org.apache.hive.hcatalog.pig.HCatStorer();  // error is thrown here&lt;/P&gt;&lt;P&gt;hadoop fs -cat /input/incr_dat &lt;/P&gt;&lt;P&gt;em204,ajay,2005 &lt;/P&gt;&lt;P&gt;em205,sikha,1990&lt;/P&gt;&lt;P&gt;
em206,satya,1991 &lt;/P&gt;&lt;P&gt;em207,krishna,1991 &lt;/P&gt;&lt;P&gt;em2000,hello am new data,1990 &lt;/P&gt;&lt;P&gt;em2001,hello am too new data ,1990
em20080,hello this is new data,2050&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 00:56:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-append-or-overwrite-the-existin-partition-in-Hive/m-p/161945#M36690</guid>
      <dc:creator>prklearning</dc:creator>
      <dc:date>2016-08-03T00:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to append or overwrite the existin partition in Hive using HCatStorer.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-append-or-overwrite-the-existin-partition-in-Hive/m-p/161946#M36691</link>
      <description>&lt;P&gt;According to the documentation, you can't update partitioned or bucketed columns.&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-Update"&gt;https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-Update&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;Partitioning columns cannot be updated.
Bucketing columns cannot be updated.&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Aug 2016 01:05:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-append-or-overwrite-the-existin-partition-in-Hive/m-p/161946#M36691</guid>
      <dc:creator>myoung</dc:creator>
      <dc:date>2016-08-03T01:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to append or overwrite the existin partition in Hive using HCatStorer.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-append-or-overwrite-the-existin-partition-in-Hive/m-p/161947#M36692</link>
      <description>&lt;P&gt;Thanks Michael Young , i am not able to overwrite into a Hive table using HCatstorer from Pig.&lt;/P&gt;&lt;P&gt;However i learned that there HCatalog cant overwrite into hive's existing partition&lt;/P&gt;&lt;P&gt;Its nice to have pig directly write into hive's existing partition.&lt;/P&gt;&lt;P&gt;Is there any patch ,,, or i&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 14:13:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-append-or-overwrite-the-existin-partition-in-Hive/m-p/161947#M36692</guid>
      <dc:creator>prklearning</dc:creator>
      <dc:date>2016-08-03T14:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to append or overwrite the existin partition in Hive using HCatStorer.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-append-or-overwrite-the-existin-partition-in-Hive/m-p/161948#M36693</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/10491/lidongdai.html" nodeid="10491"&gt;@david dai&lt;/A&gt;</description>
      <pubDate>Thu, 04 Aug 2016 01:31:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-append-or-overwrite-the-existin-partition-in-Hive/m-p/161948#M36693</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-08-04T01:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to append or overwrite the existin partition in Hive using HCatStorer.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-append-or-overwrite-the-existin-partition-in-Hive/m-p/161949#M36694</link>
      <description>&lt;P&gt;the limitation of HCatStorer is that table must be HCatalog managed table, it cannot be a regular Hive table. Also, datatypes must be supported by HCatalog, any other datatypes will cause problems. &lt;A href="https://cwiki.apache.org/confluence/display/Hive/HCatalog+LoadStore" target="_blank"&gt;https://cwiki.apache.org/confluence/display/Hive/HCatalog+LoadStore&lt;/A&gt; &lt;A rel="user" href="https://community.cloudera.com/users/3479/prklearning.html" nodeid="3479"&gt;@Prasanna Kulkarni&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 01:38:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-append-or-overwrite-the-existin-partition-in-Hive/m-p/161949#M36694</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-08-04T01:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to append or overwrite the existin partition in Hive using HCatStorer.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-append-or-overwrite-the-existin-partition-in-Hive/m-p/161950#M36695</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3479/prklearning.html" nodeid="3479"&gt;@Prasanna Kulkarni&lt;/A&gt; It looks like there is are JIRAs for this.  They are not resolved and there hasn't been any recent activity:&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="https://issues.apache.org/jira/browse/HIVE-6897"&gt;https://issues.apache.org/jira/browse/HIVE-6897&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="https://issues.apache.org/jira/browse/HCATALOG-551"&gt;https://issues.apache.org/jira/browse/HCATALOG-551&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 20:51:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-append-or-overwrite-the-existin-partition-in-Hive/m-p/161950#M36695</guid>
      <dc:creator>myoung</dc:creator>
      <dc:date>2016-08-04T20:51:46Z</dc:date>
    </item>
  </channel>
</rss>

