Hi Peter,

Here is what I see:

 mvn dependency:build-classpath | tr : "\n" | grep hive

/some-path/.m2/repository/org/apache/hive/hive-metastore/3.0.0/hive-metastore-3.0.0.jar
/some-path/.m2/repository/org/apache/hive/hive-serde/3.0.0/hive-serde-3.0.0.jar
/some-path/.m2/repository/org/apache/hive/hive-common/3.0.0/hive-common-3.0.0.jar
/some-path/.m2/repository/org/apache/hive/hive-classification/3.0.0/hive-classification-3.0.0.jar
/some-path/.m2/repository/org/apache/hive/hive-service-rpc/3.0.0/hive-service-rpc-3.0.0.jar
/some-path/.m2/repository/org/apache/hive/hive-shims/3.0.0/hive-shims-3.0.0.jar
/some-path/.m2/repository/org/apache/hive/shims/hive-shims-common/3.0.0/hive-shims-common-3.0.0.jar
/some-path/.m2/repository/org/apache/hive/shims/hive-shims-0.23/3.0.0/hive-shims-0.23-3.0.0.jar
/some-path/.m2/repository/org/apache/hive/shims/hive-shims-scheduler/3.0.0/hive-shims-scheduler-3.0.0.jar
/some-path/.m2/repository/org/apache/hive/hive-standalone-metastore/3.0.0/hive-standalone-metastore-3.0.0.jar
/some-path/.m2/repository/org/apache/hive/hive-storage-api/2.6.1/hive-storage-api-2.6.1.jar

which doesn't show any duplicates. Earlier it was picking up
hive-storage-api-2.2.1.jar so I added a dependency for 2.6.1. Neither
worked.

I tried setting it in the hive-site.xml and that works. So, I'm going to go
with that.

Thanks!


On Thu, Jul 12, 2018 at 3:01 AM, Peter Vary <pv...@cloudera.com> wrote:

> Hi Sylvester,
>
> I modified a random unit test (TestHiveMetaStoreTimeout.java)  with
> client, and added these lines:
>
> client.setMetaConf("metastore.disallow.incompatible.col.type.changes", 
> "false");
> client.setMetaConf("hive.metastore.disallow.incompatible.col.type.changes", 
> "false");
>
> The unit test run successfully on master, and on 3.0.0 too. So no
> exception here.
>
> My guess this could be a problem with multiple versions of hive on
> classpath.
>
> Peter
>
>
> On Jul 11, 2018, at 19:21, Sylvester Steele <sylvesterstee...@gmail.com>
> wrote:
>
> Hi Peter,
>
> client.setMetaConf("metastore.disallow.incompatible.col.type.changes",
> "false") gets me the same error:
>
> MetaException(message:Invalid configuration key metastore.disallow.
> incompatible.col.type.changes)
>
> Thanks
>
> On Wed, Jul 11, 2018 at 12:56 PM, Peter Vary <pv...@cloudera.com> wrote:
>
>> Hi Sylvester,
>>
>> Probably the deprecated configurations are not handled here. Could you
>> please try metastore.disallow.incompatible.col.type.changes?
>> Thanks,
>> Peter
>>
>>
>> On Jul 11, 2018, at 15:20, Sylvester Steele <sylvesterstee...@gmail.com>
>> wrote:
>>
>> Hi Peter,
>>
>> I upgraded the metastore jar to 3.0.0 and when I do:
>>
>> ThriftHiveMetastore.Client client = new ThriftHiveMetastore.Client(pro
>> tocol);
>> client.setMetaConf("hive.metastore.disallow.incompatible.col.type.changes",
>> "false");
>>
>> I get:
>>
>> MetaException(message:Invalid configuration key
>> hive.metastore.disallow.incompatible.col.type.changes)
>>
>> Am I not setting the property correctly, or will I have to upgrade the
>> hive server to version 2.4/3.0 as well?
>>
>> Thanks!
>>
>> On Wed, Jul 11, 2018 at 4:56 AM, Peter Vary <pv...@cloudera.com> wrote:
>>
>>> Hi Sylvester,
>>>
>>> You can set this specific configuration value per session since
>>> HIVE-17832 - Fixed in: Hive 3.0.0, Hive 2.4.0
>>>
>>> So you can do this change this value through thrift if your metastore
>>> version is higher or equal than 2.4.0, or 3.0.0, but not with 1.2.1
>>>
>>> If you want to use 1.2.1 version you can change the configuration in the
>>> hive-site.xml which is used by the metastore service.
>>>
>>> Hope this helps,
>>> Peter
>>>
>>> On Jul 10, 2018, at 22:09, Sylvester Steele <sylvesterstee...@gmail.com>
>>> wrote:
>>>
>>> Hello,
>>>
>>> I am using hive-metastore jar version 1.2.1 and Hive version 2.3.2. I'd
>>> like to make incompatible schema changes to my Hive tables.
>>>
>>> The change I'm trying to make is to drop a column, which I am doing like
>>> so: table.getSd().setCols(remaining_cols). I'm dropping an int column.
>>> The column following it is a struct column, so my understanding is that it
>>> assumes I'm trying to convert an int column to a struct column.
>>>
>>> The error I get is:
>>>
>>> InvalidOperationException(message:The following columns have types
>>> incompatible with the existing columns in their respective positions...
>>>
>>> Doing
>>>
>>> ThriftHiveMetastore.Client client = new ThriftHiveMetastore.Client(pro
>>> tocol);
>>> client.get_config_value("hive.metastore.disallow.incompatible.col.type.changes",
>>> "default_value");
>>>
>>> gives me a true, which explains the failure earlier. How do I override
>>> this value to false? Also, AFAICT the default value is supposed to be
>>> false, so I'm not sure why this is returning true. I checked the
>>> hive-site.xml file and it doesn't have this set.
>>>
>>> Thanks for your help!
>>>
>>>
>>>
>>
>>
>
>

Reply via email to