ITPub博客

首页 > > > Hive报错之java.sql.SQLException: Field 'IS_STOREDASSU

Hive报错之java.sql.SQLException: Field 'IS_STOREDASSU

作者:longmanma 时间:2019-12-17 17:58:12 0 删除 编辑

在创建表的时候报出如下错误:

hive>createtableifnotexists testfile_table(

> site string,

> url string,

>pvbigint,

> label string)

> row format delimited

>fields terminatedby'\t'>storedas textfile;

FAILED: Error inmetadata: javax.jdo.JDODataStoreException:Insertofobject "org.apache.hadoop.hive.metastore.model.MStorageDescriptor@5a75b5" using statement "INSERTINTO`SDS` (`SD_ID`,`OUTPUT_FORMAT`,`INPUT_FORMAT`,`CD_ID`,`SERDE_ID`,`NUM_BUCKETS`,`IS_COMPRESSED`,`LOCATION`)VALUES(?,?,?,?,?,?,?,?)" failed : Field'IS_STOREDASSUBDIRECTORIES'doesn't have a default value

NestedThrowables:

java.sql.SQLException: Field 'IS_STOREDASSUBDIRECTORIES' doesn't have adefault value

FAILED: Execution Error, returncode1fromorg.apache.hadoop.hive.ql.exec.DDLTask

解决办法如下:

[root@node3 ~]# mysql-u root-p

Enter password:

Welcome tothe MySQL monitor. Commandsendwith;or \g.

Your MySQL connection id is17Server version: 5.5.22-log Source distribution

Copyright (c) 2000,2011, Oracleand/orits affiliates.All rights reserved.

Oracle isa registered trademarkofOracle Corporationand/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;'or'\h'forhelp. Type'\c'toclear thecurrent input statement.

mysql>altertableSDSaltercolumnIS_STOREDASSUBDIRECTORIESsetdefault0;

再次创建表成功:

hive>createtableifnotexists testfile_table(

> site string,

> url string,

>pvbigint,

> label string)

> row format delimited

>fields terminatedby'\t'>storedas textfile;

OK

Time taken: 0.173seconds

英文解释地址:http://mail-archives.apache.org/mod_mbox/hive-dev/201302.mbox/%3CJIRA.12631340.1360272250513.300651.1361168954618@arcas%3E

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2730/viewspace-3126215/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: keepalived-测试
请登录后发表评论 登录
全部评论

注册时间:2019-12-18

  • 博文量
    492
  • 访问量
    12002