hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramki Palle <ramki.pa...@gmail.com>
Subject Re: Rename external table, including HDFS directory
Date Sat, 09 Mar 2013 19:25:12 GMT
As you can run the hadoop dfs commands from inside Hive, you can put both
the commands in a script file and run the script file using hive. These are
still two different commands but are together at one place and can be
executed in the same environment in one go.

-Ramki.


On Fri, Mar 8, 2013 at 5:32 AM, Dean Wampler <
dean.wampler@thinkbiganalytics.com> wrote:

> You can rename the LOCATION with an ALTER TABLE command. I don't believe
> there's a single, "atomic" statement to rename both the table and the
> directory.
>
>
> On Thu, Mar 7, 2013 at 5:29 PM, Keith Wiley <kwiley@keithwiley.com> wrote:
>
>> My understanding is that renaming and external table doesn't rename the
>> corresponding HDFS directory to match.  I would like to do this; I want to
>> rename the table in Hive and also rename the HDFS directory so they match
>> (they already match with the old name).  I'm not sure how to do this.  I'm
>> worried that if I rename the HDFS directory through Hadoop, not Hive, that
>> Hive will lose track of the directory, regardless of whether I rename the
>> table in Hive as well.
>>
>> I also don't want to drop and recreate the table because I don't want to
>> notify Hive of all the partitions all over again.
>>
>> Thoughts?
>>
>>
>> ________________________________________________________________________________
>> Keith Wiley     kwiley@keithwiley.com     keithwiley.com
>> music.keithwiley.com
>>
>> "Luminous beings are we, not this crude matter."
>>                                            --  Yoda
>>
>> ________________________________________________________________________________
>>
>>
>
>
> --
> *Dean Wampler, Ph.D.*
> thinkbiganalytics.com
> +1-312-339-1330
>
>

Mime
View raw message