【问题标题】:Hive error: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. stringTypeInfoHive 错误:失败:执行错误,从 org.apache.hadoop.hive.ql.exec.DDLTask 返回代码 1。字符串类型信息
【发布时间】:2017-11-25 15:56:26
【问题描述】:

您好,我正要创建一个表,但出现错误。

我的代码:

CREATE TABLE weblogs(
   host STRING,
   identity STRING,
   customer STRING,
   time STRING,
   request STRING,
   status STRING,
   size STRING,
   referer STRING,
   agent STRING)
   ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'
   WITH SERDEPROPERTIES (
 "input.regex" = "([^ ]*) ([^ ]*) ([^ ]*) (-|\\[[^\\]]*\\]) ([^ \"]*|\"[^\"]*\") (-|[0-9]*) (-|[0-9]*)(?: ([^ \"]*|\".*\") ([^ \"]*|\".*\"))?",
 "output.format.string" = "%1$s %2$s %3$s %4$s %5$s %6$s %7$s %8$s %9$s"
)
STORED AS TEXTFILE;

我的错误:

失败:执行错误,从 org.apache.hadoop.hive.ql.exec.DDLTask 返回代码 1。字符串类型信息

我正在使用 apache-hive-1.2.2-bin,德比模式。 enter image description here

请帮助我。 谢谢。

【问题讨论】:

  • ddl 工作正常.. 已执行.. 请再次检查..

标签: hive hiveql


【解决方案1】:

这可能是因为您确实想要一个外部表而忘记指定“外部”。请尝试以下方法:

创建外部表博客( 主机 STRING, 身份字符串, 客户字符串, 时间字符串, 请求字符串, 状态字符串, 大小字符串, 推荐人字符串, 代理字符串) 行格式 SERDE 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe' 具有SERDE属性( "input.regex" = "([^ ]) ([^ ]) ([^ ]) (-|\[[^\]]\]) ( [^ \"]|\"[^\"]\") (-|[0-9]) (-|[0-9])(? : ([^ \"]|\".\") ([^ \"]|\".\"))?", "output.format.string" = "%1$s %2$s %3$s %4$s %5$s %6$s %7$s %8$s %9$s" ) 存储为文本文件;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-02
    • 1970-01-01
    • 2014-05-23
    • 2017-02-01
    相关资源
    最近更新 更多