hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Yang (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-1428) ALTER TABLE ADD PARTITION fails with a remote Thirft metastore
Date Thu, 01 Jul 2010 19:06:00 GMT

    [ https://issues.apache.org/jira/browse/HIVE-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884383#action_12884383

Paul Yang commented on HIVE-1428:

Can you try using a thread to create a HiveMetaStore instance?



  private static class RunMS implements Runnable {

    public void run() {
      System.out.println("Running metastore!");
      String [] args = new String [0];


  protected void setUp() throws Exception {

    Thread t = new Thread(new RunMS());

    // Wait a little bit for the metastore to start. Should probably have
    // a better way of detecting if the metastore has started?

    // Set conf to connect to the local metastore.
    HiveConf hiveConf = new HiveConf(this.getClass());
    // hive.metastore.local should be defined in HiveConf
    hiveConf.set("hive.metastore.local", "false");
    hiveConf.setVar(HiveConf.ConfVars.METASTOREURIS, "thrift://localhost:9083");
    // There's a bug in HiveConf that needs to be fixed before this next line 
    // will work
    // Change METATORETHRIFTRETRIES("hive.metastore.connect.retries", ""),
    // To METATORETHRIFTRETRIES("hive.metastore.connect.retries", 3),
    hiveConf.setIntVar(HiveConf.ConfVars.METATORETHRIFTRETRIES, 3);

    client = new HiveMetaStoreClient(hiveConf);
    // Now you have the client - run necessary tests.

> 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:
> [pradeepk@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
> [pradeepk@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.

View raw message