You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Cam Bazz <ca...@gmail.com> on 2011/02/12 23:17:02 UTC

how to delete data for a partition

Hello,

Is it possible to delete rows belonging to a partition? or is it
undeletable like a table's data?

best regards,
-c.b.

Re: how to delete data for a partition

Posted by Cam Bazz <ca...@gmail.com>.
well, i decided to programmatically intervene, when something goes wrong.

I am doing:

load data local inpath '/var/mylog/daily/log.PROD.20110213' into table
item_raw partition(date_hour=20110213)

and when that partition file exists, I will get

Exception in thread "main" java.sql.SQLException: Query returned
non-zero code: 9, cause: FAILED: Execution Error, return code 1 from
org.apache.hadoop.hive.ql.exec.MoveTask
	at org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:197)
	at hivecommander.Main.loadAndProcess(Main.java:167)
	at hivecommander.Main.main(Main.java:124)


how can i know, this is due to some partition preexisting, and not
some other error?

Best regards,
-c.b.

On Sun, Feb 13, 2011 at 12:36 AM, Edward Capriolo <ed...@gmail.com> wrote:
> On Sat, Feb 12, 2011 at 5:30 PM, Cam Bazz <ca...@gmail.com> wrote:
>> ok, is there a way to do it from the
>> http://localhost:50075/browseDirectory.jsp interface?
>>
>> On Sun, Feb 13, 2011 at 12:19 AM, Edward Capriolo <ed...@gmail.com> wrote:
>>> On Sat, Feb 12, 2011 at 5:17 PM, Cam Bazz <ca...@gmail.com> wrote:
>>>> Hello,
>>>>
>>>> Is it possible to delete rows belonging to a partition? or is it
>>>> undeletable like a table's data?
>>>>
>>>> best regards,
>>>> -c.b.
>>>>
>>>
>>> Remove the files inside the partition.
>>>
>>
> If you enable the configuration property webinterface.private.actions
> you should be able to delete files from the NN webinterface (for job
> tracker it allows you to kill jobs.
>

Re: how to delete data for a partition

Posted by Edward Capriolo <ed...@gmail.com>.
On Sat, Feb 12, 2011 at 5:30 PM, Cam Bazz <ca...@gmail.com> wrote:
> ok, is there a way to do it from the
> http://localhost:50075/browseDirectory.jsp interface?
>
> On Sun, Feb 13, 2011 at 12:19 AM, Edward Capriolo <ed...@gmail.com> wrote:
>> On Sat, Feb 12, 2011 at 5:17 PM, Cam Bazz <ca...@gmail.com> wrote:
>>> Hello,
>>>
>>> Is it possible to delete rows belonging to a partition? or is it
>>> undeletable like a table's data?
>>>
>>> best regards,
>>> -c.b.
>>>
>>
>> Remove the files inside the partition.
>>
>
If you enable the configuration property webinterface.private.actions
you should be able to delete files from the NN webinterface (for job
tracker it allows you to kill jobs.

Re: how to delete data for a partition

Posted by Cam Bazz <ca...@gmail.com>.
ok, is there a way to do it from the
http://localhost:50075/browseDirectory.jsp interface?

On Sun, Feb 13, 2011 at 12:19 AM, Edward Capriolo <ed...@gmail.com> wrote:
> On Sat, Feb 12, 2011 at 5:17 PM, Cam Bazz <ca...@gmail.com> wrote:
>> Hello,
>>
>> Is it possible to delete rows belonging to a partition? or is it
>> undeletable like a table's data?
>>
>> best regards,
>> -c.b.
>>
>
> Remove the files inside the partition.
>

Re: how to delete data for a partition

Posted by Edward Capriolo <ed...@gmail.com>.
On Sat, Feb 12, 2011 at 5:17 PM, Cam Bazz <ca...@gmail.com> wrote:
> Hello,
>
> Is it possible to delete rows belonging to a partition? or is it
> undeletable like a table's data?
>
> best regards,
> -c.b.
>

Remove the files inside the partition.