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

  1. hive> create table if not exists testfile_table(
  2. > site string,
  3. > url string,
  4. > pv bigint,
  5. > label string)
  6. > row format delimited
  7. > fields terminated by '\t'
  8. > stored as textfile;
  9. FAILED: Error in metadata: javax.jdo.JDODataStoreException: Insert of object "org.apache.hadoop.hive.metastore.model.MStorageDescriptor@5a75b5" using statement "INSERT INTO `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
  10. NestedThrowables:
  11. java.sql.SQLException: Field 'IS_STOREDASSUBDIRECTORIES' doesn't have a default value
  12. FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

解决办法如下:

  1. [root@node3 ~]# mysql -u root -p
  2. Enter password:
  3. Welcome to the MySQL monitor. Commands end with ; or \g.
  4. Your MySQL connection id is 17
  5. Server version: 5.5.22-log Source distribution
  6.  
  7. Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  8.  
  9. Oracle is a registered trademark of Oracle Corporation and/or its
  10. affiliates. Other names may be trademarks of their respective
  11. owners.
  12.  
  13. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  14.  
  15. mysql> alter table SDS alter column IS_STOREDASSUBDIRECTORIES set default 0;

再次创建表成功:

  1. hive> create table if not exists testfile_table(
  2. > site string,
  3. > url string,
  4. > pv bigint,
  5. > label string)
  6. > row format delimited
  7. > fields terminated by '\t'
  8. > stored as textfile;
  9. OK
  10. Time taken: 0.173 seconds

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

Hive报错之java.sql.SQLException: Field 'IS_STOREDASSUBDIRECTORIES' doesn't have a default value的更多相关文章

  1. java.sql.SQLException: Field 'id' doesn't have a default value解决方案

    转自:https://blog.csdn.net/xinghuo0007/article/details/51810867 自增长:java.sql.SQLException: Field 'id' ...

  2. Hibernate报错:Caused by: java.sql.SQLException: Field 'ID' doesn't have a default value

    问题一: 报错如下: org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assig ...

  3. 启动Spring boot报错:nested exception is java.sql.SQLException: Field 'id' doesn't have a default value

    先看具体日志: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with n ...

  4. mysql插入报错:java.sql.SQLException: Incorrect string value: '\xE6\x9D\xAD\xE5\xB7\x9E...' for column 'address' at row 1

    界面报错: 日志报错: java.sql.SQLException: Incorrect at com.mysql.cj.jdbc.exceptions.SQLError.createSQLExcep ...

  5. JavaWeb报错:java.sql.SQLException: Invalid value for getInt()

    1.错误描述:在对数据库进行操作时,控制台报错:java.sql.SQLException: Invalid value for getInt() :2.错误原因:数据库中表的字段的类型与实体类中属性 ...

  6. mysql报错:java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.

    mybatis链接mysql,启动服务报错: java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecogni ...

  7. Caused by: java.sql.SQLException: Field 'category_id' doesn't have a default value

    ### The error may involve com.qingmu.core.dao.ad.ContentDao.insertSelective-Inline ### The error occ ...

  8. java.sql.SQLException: Field 'id' doesn't have a default value异常

    在做mybatis插入的时候报了这个错误,百度了下,貌似是因为这个健没有设置值且不是自增类型的. java.sql.SQLException: Field 'id' doesn't have a de ...

  9. Caused by: java.sql.SQLException: Field 'id' doesn't have a default value

    1.错误描述 org.hibernate.exception.GenericJDBCException: error executing work at org.hibernate.exception ...

随机推荐

  1. Power-BI 零售连锁行业解决方案

    引入:一方面消费需求日益增长,另一方面市场竞争日趋激烈,电商对传统实体店的冲击越来越大,再加上各项成本费用高涨,利润走低.数字化决策可帮助企业增强运营能力.提升单店产出,必将成为企业面对激烈竞争.快速 ...

  2. iOS截图

    1.普通的截图办法,在View上面截图 /** * 截图代码 * * @param view 需要截图的view * @param rect 需要截取的区域 * * @return 返回截取的对象 * ...

  3. mysql explain输出中type的取值说明

    原文: http://www.cnitblog.com/aliyiyi08/archive/2008/09/09/48878.html 这列很重要,显示了连接使用了哪种连接类别,有无使用索引. 从最好 ...

  4. Tomcat 部署:工程下 META-INF 目录下的 Context.xml

    tomcat 在META-INF 文件夹中添加context.xml,使项目自动应用更新文件 Meta-inf文件夹下新建context.xml. <Context path="/FU ...

  5. OLTP与OLAP的差异

    OLTP与OLAP的差异 系统类型 OLTP(在线交易系统) OLAP(联机分析系统),DW(数据仓库) 数据来源 操作数据,OLTP通常是原始性数据源 联合型数据:OLAP数据来源于其他OLTP系统 ...

  6. 如何使用Jlink

    下载程序: 1. 连上Jlink的USB到PC上.连接JTAG到GT2440开发板上,选择从Nor Flash 启动. 2. 板子上电后,启动J-Flash ARM .File -> New P ...

  7. JS语法部分-数组

    数组的长度是动态变化的,里面可以防止任意类型的元素 var a=new Array() 数组元素的复制:a[0]=123        a[2]=456 数组的取值:a[i] 数组的属性:  a.le ...

  8. JS不兼容减号,css属性转驼峰写法

    <script> function changeFormat(str) { return str.replace(/-(\w)/g, function(k, r) { return r.t ...

  9. Extjs treePanel 后台Json的两种构建方法

    public string json = ""; public string QueryMenuTreeJson(string ParentID, string userId) { ...

  10. C++之路进阶——bzoj1030(文本生成器)

    F.A.Qs Home Discuss ProblemSet Status Ranklist Contest ModifyUser  hyxzc Logout 捐赠本站 Notice:由于本OJ建立在 ...