What version of Hive are you using? I am actually surprised that set
metaconf:fs.s3a.access.key=xxxxxx; works from beeline. Based on my
knowledge this config is not settable in metastore which is why I had
created this JIRA HIVE-16913
<https://issues.apache.org/jira/browse/HIVE-16913> some time back.


On Wed, Mar 21, 2018 at 12:05 AM, Venkata ramana gollamudi <
[email protected]> wrote:

> Hi,
>
> when i run following commands from beeline
>
> set metaconf:fs.s3a.access.key=xxxxxx;
> set metaconf:fs.s3a.secret.key=xxxxxx;
>
> create table t1(a string) location "s3a://bucket1/loc1";
>
> all these commands are being executed by same thread in hivemetastore
> service.
> so HiveMetaStore.setmetaconf updates conf in thread local
> and HiveMetaStore.createTable  create table using that conf from
> threadlocal.
>
> But when I write my custom application in which I am creating Hive.class
> and calling
> client = Hive.get(conf)
> client.setMetaConf("fs.s3a.access.key","xxxxxx")
> client.setMetaConf("fs.s3a.access.key","xxxxxx")
>
> client.createTable(...)
>
> each command setMetaConf and createTable going to different thread in
> HiveMetaStore
> so configuration is set in different threadlocal while createTable
> referring different threadlocal configuration and createtable on S3 fails.
>
> so I wanted to know how all calls from beeline client going to same thread
> in HiveMetaStore service. what am missing?
>
> Regards,
> Venkata Ramana Gollamudi
>

Reply via email to