You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Alok Kumar <al...@gmail.com> on 2012/08/24 10:00:36 UTC
alter external table location with new namenode address
Hello,
We have hive external table mapped to hbase, now moving
from pseudo distributed to fully distributed hadoop cluster.
found that hive queries are still pointing to older namenode address
ie: hdfs://localhost:9000/user/hive/warehouse/<table-name> as it stores
full uri in its derby metastore.
Q . what would be the best way to set new namenode address?
Alter table command on hive shell to set hdfs location is only
possible for native tables!!
should i update derby "DB_LOCATION_URI" column directly?
Your help/suggestion is highly appreciated
Thanks,
Alok
Re: alter external table location with new namenode address
Posted by Alok Kumar <al...@gmail.com>.
Carl,
I tried and found ALTER TABLE SET LOCATION command can't be used
to set location for non-native tables. In my case, where all hive tables are
mapped with tables in hbase, ALTER TABLE SET LOCATION was not possible!!
I agree it wasn't a good idea though but only option i believe
or is it available with any newer hive release?
Thanks,
Alok
On Sat, Aug 25, 2012 at 1:22 AM, Carl Steinbach <ca...@cloudera.com> wrote:
> Directly accessing the metastore schema is generally not a good idea.
> Instead I recommend using the ALTER TABLE SET LOCATION command:
>
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterTable%2FPartitionLocation
>
> Thanks.
>
> Carl
>
> On Fri, Aug 24, 2012 at 10:56 AM, Alok Kumar <al...@gmail.com> wrote:
>>
>> Bejoy,
>>
>> Thank you for your help.
>> updated metastore n its working fine.
>>
>> Regards
>> -Alok
>>
>> On Fri, Aug 24, 2012 at 5:40 PM, Bejoy KS <be...@yahoo.com> wrote:
>> > Yes you need to update the metastore db directly for this to be in
>> > effect.
>> >
>> > Regards
>> > Bejoy KS
>> >
>> > Sent from handheld, please excuse typos.
>> >
>> > -----Original Message-----
>> > From: Alok Kumar <al...@gmail.com>
>> > Date: Fri, 24 Aug 2012 13:30:36
>> > To: <us...@hbase.apache.org>; <us...@hive.apache.org>
>> > Reply-To: user@hive.apache.org
>> > Subject: alter external table location with new namenode address
>> >
>> > Hello,
>> >
>> > We have hive external table mapped to hbase, now moving
>> > from pseudo distributed to fully distributed hadoop cluster.
>> >
>> > found that hive queries are still pointing to older namenode address
>> > ie: hdfs://localhost:9000/user/hive/warehouse/<table-name> as it stores
>> > full uri in its derby metastore.
>> >
>> > Q . what would be the best way to set new namenode address?
>> >
>> > Alter table command on hive shell to set hdfs location is only
>> > possible for native tables!!
>> > should i update derby "DB_LOCATION_URI" column directly?
>> >
>> > Your help/suggestion is highly appreciated
>> >
>> > Thanks,
>> > Alok
>> >
>> >
>
>
--
Alok Kumar
Re: alter external table location with new namenode address
Posted by Carl Steinbach <ca...@cloudera.com>.
Directly accessing the metastore schema is generally not a good idea.
Instead I recommend using the ALTER TABLE SET LOCATION command:
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterTable%2FPartitionLocation
Thanks.
Carl
On Fri, Aug 24, 2012 at 10:56 AM, Alok Kumar <al...@gmail.com> wrote:
> Bejoy,
>
> Thank you for your help.
> updated metastore n its working fine.
>
> Regards
> -Alok
>
> On Fri, Aug 24, 2012 at 5:40 PM, Bejoy KS <be...@yahoo.com> wrote:
> > Yes you need to update the metastore db directly for this to be in
> effect.
> >
> > Regards
> > Bejoy KS
> >
> > Sent from handheld, please excuse typos.
> >
> > -----Original Message-----
> > From: Alok Kumar <al...@gmail.com>
> > Date: Fri, 24 Aug 2012 13:30:36
> > To: <us...@hbase.apache.org>; <us...@hive.apache.org>
> > Reply-To: user@hive.apache.org
> > Subject: alter external table location with new namenode address
> >
> > Hello,
> >
> > We have hive external table mapped to hbase, now moving
> > from pseudo distributed to fully distributed hadoop cluster.
> >
> > found that hive queries are still pointing to older namenode address
> > ie: hdfs://localhost:9000/user/hive/warehouse/<table-name> as it stores
> > full uri in its derby metastore.
> >
> > Q . what would be the best way to set new namenode address?
> >
> > Alter table command on hive shell to set hdfs location is only
> > possible for native tables!!
> > should i update derby "DB_LOCATION_URI" column directly?
> >
> > Your help/suggestion is highly appreciated
> >
> > Thanks,
> > Alok
> >
> >
>
Re: alter external table location with new namenode address
Posted by Carl Steinbach <ca...@cloudera.com>.
Directly accessing the metastore schema is generally not a good idea.
Instead I recommend using the ALTER TABLE SET LOCATION command:
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterTable%2FPartitionLocation
Thanks.
Carl
On Fri, Aug 24, 2012 at 10:56 AM, Alok Kumar <al...@gmail.com> wrote:
> Bejoy,
>
> Thank you for your help.
> updated metastore n its working fine.
>
> Regards
> -Alok
>
> On Fri, Aug 24, 2012 at 5:40 PM, Bejoy KS <be...@yahoo.com> wrote:
> > Yes you need to update the metastore db directly for this to be in
> effect.
> >
> > Regards
> > Bejoy KS
> >
> > Sent from handheld, please excuse typos.
> >
> > -----Original Message-----
> > From: Alok Kumar <al...@gmail.com>
> > Date: Fri, 24 Aug 2012 13:30:36
> > To: <us...@hbase.apache.org>; <us...@hive.apache.org>
> > Reply-To: user@hive.apache.org
> > Subject: alter external table location with new namenode address
> >
> > Hello,
> >
> > We have hive external table mapped to hbase, now moving
> > from pseudo distributed to fully distributed hadoop cluster.
> >
> > found that hive queries are still pointing to older namenode address
> > ie: hdfs://localhost:9000/user/hive/warehouse/<table-name> as it stores
> > full uri in its derby metastore.
> >
> > Q . what would be the best way to set new namenode address?
> >
> > Alter table command on hive shell to set hdfs location is only
> > possible for native tables!!
> > should i update derby "DB_LOCATION_URI" column directly?
> >
> > Your help/suggestion is highly appreciated
> >
> > Thanks,
> > Alok
> >
> >
>
Re: alter external table location with new namenode address
Posted by Alok Kumar <al...@gmail.com>.
Bejoy,
Thank you for your help.
updated metastore n its working fine.
Regards
-Alok
On Fri, Aug 24, 2012 at 5:40 PM, Bejoy KS <be...@yahoo.com> wrote:
> Yes you need to update the metastore db directly for this to be in effect.
>
> Regards
> Bejoy KS
>
> Sent from handheld, please excuse typos.
>
> -----Original Message-----
> From: Alok Kumar <al...@gmail.com>
> Date: Fri, 24 Aug 2012 13:30:36
> To: <us...@hbase.apache.org>; <us...@hive.apache.org>
> Reply-To: user@hive.apache.org
> Subject: alter external table location with new namenode address
>
> Hello,
>
> We have hive external table mapped to hbase, now moving
> from pseudo distributed to fully distributed hadoop cluster.
>
> found that hive queries are still pointing to older namenode address
> ie: hdfs://localhost:9000/user/hive/warehouse/<table-name> as it stores
> full uri in its derby metastore.
>
> Q . what would be the best way to set new namenode address?
>
> Alter table command on hive shell to set hdfs location is only
> possible for native tables!!
> should i update derby "DB_LOCATION_URI" column directly?
>
> Your help/suggestion is highly appreciated
>
> Thanks,
> Alok
>
>
Re: alter external table location with new namenode address
Posted by Alok Kumar <al...@gmail.com>.
Bejoy,
Thank you for your help.
updated metastore n its working fine.
Regards
-Alok
On Fri, Aug 24, 2012 at 5:40 PM, Bejoy KS <be...@yahoo.com> wrote:
> Yes you need to update the metastore db directly for this to be in effect.
>
> Regards
> Bejoy KS
>
> Sent from handheld, please excuse typos.
>
> -----Original Message-----
> From: Alok Kumar <al...@gmail.com>
> Date: Fri, 24 Aug 2012 13:30:36
> To: <us...@hbase.apache.org>; <us...@hive.apache.org>
> Reply-To: user@hive.apache.org
> Subject: alter external table location with new namenode address
>
> Hello,
>
> We have hive external table mapped to hbase, now moving
> from pseudo distributed to fully distributed hadoop cluster.
>
> found that hive queries are still pointing to older namenode address
> ie: hdfs://localhost:9000/user/hive/warehouse/<table-name> as it stores
> full uri in its derby metastore.
>
> Q . what would be the best way to set new namenode address?
>
> Alter table command on hive shell to set hdfs location is only
> possible for native tables!!
> should i update derby "DB_LOCATION_URI" column directly?
>
> Your help/suggestion is highly appreciated
>
> Thanks,
> Alok
>
>
Re: alter external table location with new namenode address
Posted by Bejoy KS <be...@yahoo.com>.
Yes you need to update the metastore db directly for this to be in effect.
Regards
Bejoy KS
Sent from handheld, please excuse typos.
-----Original Message-----
From: Alok Kumar <al...@gmail.com>
Date: Fri, 24 Aug 2012 13:30:36
To: <us...@hbase.apache.org>; <us...@hive.apache.org>
Reply-To: user@hive.apache.org
Subject: alter external table location with new namenode address
Hello,
We have hive external table mapped to hbase, now moving
from pseudo distributed to fully distributed hadoop cluster.
found that hive queries are still pointing to older namenode address
ie: hdfs://localhost:9000/user/hive/warehouse/<table-name> as it stores
full uri in its derby metastore.
Q . what would be the best way to set new namenode address?
Alter table command on hive shell to set hdfs location is only
possible for native tables!!
should i update derby "DB_LOCATION_URI" column directly?
Your help/suggestion is highly appreciated
Thanks,
Alok
Re: alter external table location with new namenode address
Posted by Bejoy KS <be...@yahoo.com>.
Yes you need to update the metastore db directly for this to be in effect.
Regards
Bejoy KS
Sent from handheld, please excuse typos.
-----Original Message-----
From: Alok Kumar <al...@gmail.com>
Date: Fri, 24 Aug 2012 13:30:36
To: <us...@hbase.apache.org>; <us...@hive.apache.org>
Reply-To: user@hive.apache.org
Subject: alter external table location with new namenode address
Hello,
We have hive external table mapped to hbase, now moving
from pseudo distributed to fully distributed hadoop cluster.
found that hive queries are still pointing to older namenode address
ie: hdfs://localhost:9000/user/hive/warehouse/<table-name> as it stores
full uri in its derby metastore.
Q . what would be the best way to set new namenode address?
Alter table command on hive shell to set hdfs location is only
possible for native tables!!
should i update derby "DB_LOCATION_URI" column directly?
Your help/suggestion is highly appreciated
Thanks,
Alok