Re: Alter table using Thrift client

2018-07-12 Thread Sylvester Steele
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/

Re: Alter table using Thrift client

2018-07-12 Thread Peter Vary
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 ru

Re: Alter table using Thrift client

2018-07-11 Thread Sylvester Steele
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 wrote: > Hi Sylvester, > > Pr

Re: Alter table using Thrift client

2018-07-11 Thread Peter Vary
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 > wrote: > > Hi Peter, > > I upgraded the metastore jar to 3.0.0 and when I do: > > T

Re: Alter table using Thrift client

2018-07-11 Thread Sylvester Steele
Hi Peter, I upgraded the metastore jar to 3.0.0 and when I do: ThriftHiveMetastore.Client client = new ThriftHiveMetastore.Client(protocol); client.setMetaConf("hive.metastore.disallow.incompatible.col.type.changes", "false"); I get: MetaException(message:Invalid configuration key hive.metastor

Re: Alter table using Thrift client

2018-07-11 Thread Peter Vary
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

Re: Alter table using Thrift client

2018-07-10 Thread Sylvester Steele
To add more information: I also tried: EnvironmentContext context = new EnvironmentContext(); context.setProperties(ImmutableMap.of("hive.metastore.disallow.incompatible.col.type.changes", "false")); client.alter_table_with_environment_context(hiveSchema, table.getTableName(), table, context); I