[ https://issues.apache.org/jira/browse/HIVE-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pradeep Kamath updated HIVE-1428: --------------------------------- Attachment: TestHiveMetaStoreRemote.java I have tried writing a unit test based on the existing one in TestHiveMetastore which starts off a thrift server. Unfortunately I have hit issues since some if the ant properties like build.dir do not get expanded in the conf seen by the server leading to error. I am attaching the Test file - can someone suggest how I can resolve this and if there is any other test which has attempted something similar. Here is the exception I see: {noformat} 2Codec, fs.checkpoint.size=67108864} [junit] MetaException(message:Got exception: java.io.FileNotFoundException File file:/test/data/warehouse/compdb.db does not exist.) [junit] at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$create_database_result.read(ThriftHiveMetastore.java:2751) [junit] at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_create_database(ThriftHiveMetastore.java:127) [junit] at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.create_database(ThriftHiveMetastore.java:104) [junit] at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createDatabase(HiveMetaStoreClient.java:270) {noformat} Here is the value in the conf as seen by the server: hive.metastore.warehouse.dir=file://${build.dir}/test/data/warehouse/ > ALTER TABLE ADD PARTITION fails with a remote Thirft metastore > -------------------------------------------------------------- > > Key: HIVE-1428 > URL: https://issues.apache.org/jira/browse/HIVE-1428 > Project: Hadoop Hive > Issue Type: Bug > Components: Metastore > Affects Versions: 0.6.0, 0.7.0 > Reporter: Paul Yang > Attachments: HIVE-1428.patch, TestHiveMetaStoreRemote.java > > > If the hive cli is configured to use a remote metastore, ALTER TABLE ... ADD > PARTITION commands will fail with an error similar to the following: > [prade...@chargesize:~/dev/howl]hive --auxpath ult-serde.jar -e "ALTER TABLE > mytable add partition(datestamp = '20091101', srcid = '10',action) location > '/user/pradeepk/mytable/20091101/10';" > 10/06/16 17:08:59 WARN conf.Configuration: DEPRECATED: hadoop-site.xml found > in the classpath. Usage of hadoop-site.xml is deprecated. Instead use > core-site.xml, mapred-site.xml and hdfs-site.xml to override properties of > core-default.xml, mapred-default.xml and hdfs-default.xml respectively > Hive history > file=/tmp/pradeepk/hive_job_log_pradeepk_201006161709_1934304805.txt > FAILED: Error in metadata: org.apache.thrift.TApplicationException: > get_partition failed: unknown result > FAILED: Execution Error, return code 1 from > org.apache.hadoop.hive.ql.exec.DDLTask > [prade...@chargesize:~/dev/howl] > This is due to a check that tries to retrieve the partition to see if it > exists. If it does not, an attempt is made to pass a null value from the > metastore. Since thrift does not support null return values, an exception is > thrown. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.