1

我在这里很新,我正在尝试在我的 cloudera quickstart VM上运行以下代码。

CREATE TABLE apache_common_log (
  host STRING,
  identity STRING,
  user STRING,
  time STRING,
  request STRING,
  status STRING,
  size STRING
)
ROW FORMAT SERDE 'org.apache.hadoop.hive.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" ) STORED AS TEXTFILE;

但我遇到了一些错误:

failed: execution error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask, Cannot validate serde: org.apache.hadoop.hive.serde2.RegexSerde

我做了一些研究,所有领域都是 STRING,我已经添加了 jar /usr/lib/hive/lib/hive-contrib.jar /usr/lib/hive/lib/hive-serde.jar /usr/lib/hive/lib/hive-common.jar

它仍然没有工作。真的需要一些帮助!任何输入将不胜感激!!!

4

0 回答 0