12月9日更新的TDW有个问题:tdw_meta_init.sql 和hive登陆

54 views
Skip to first unread message

Richard Chen

unread,
Dec 11, 2014, 2:51:55 AM12/11/14
to tdw-...@googlegroups.com
在执行tdw_meta_init.sql 报错:
psql -h 127.0.0.1 -p 5432 -U postgres postgres -f qe/script/tdw_meta_init.sql
SET
SET
CREATE ROLE
ALTER ROLE
CREATE ROLE
ALTER ROLE
CREATE ROLE
ALTER ROLE
CREATE DATABASE
CREATE DATABASE
CREATE DATABASE
CREATE DATABASE
psql:qe/script/tdw_meta_init.sql:34: invalid command \ir
psql:qe/script/tdw_meta_init.sql:36: invalid command \ir
psql:qe/script/tdw_meta_init.sql:38: invalid command \ir
psql:qe/script/tdw_meta_init.sql:40: invalid command \ir


另外在执行hive -u root -p tdwroot时:
hive -u root -p tdwroot
WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties files.
session : richard_201412111546_0.24904031041890262 start!
org.postgresql.util.PSQLException: ERROR: relation "router" does not exist
  Position: 74
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
at org.apache.hadoop.hive.metastore.SyncDBRouterThread.init(SyncDBRouterThread.java:121)
at org.apache.hadoop.hive.metastore.JDBCStore.initMetaSyncThread(JDBCStore.java:304)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.initSyncThread(HiveMetaStore.java:187)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:215)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.<init>(HiveMetaStore.java:153)
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:71)
at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:1548)
at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:1554)
at org.apache.hadoop.hive.ql.metadata.Hive.isAUser(Hive.java:3142)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:314)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
org.postgresql.util.PSQLException: ERROR: relation "router" does not exist
  Position: 74
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
at org.apache.hadoop.hive.metastore.SyncDBRouterThread.run(SyncDBRouterThread.java:64)
at java.lang.Thread.run(Thread.java:662)
org.postgresql.util.PSQLException: ERROR: relation "router" does not exist

.................



Jov

unread,
Dec 11, 2014, 3:04:18 AM12/11/14
to Richard Chen, tdw-...@googlegroups.com

2014-12-11 15:51 GMT+08:00 Richard Chen <whug...@gmail.com>:
psql:qe/script/tdw_meta_init.sql:34: invalid command \ir
psql:qe/script/tdw_meta_init.sql:36: invalid command \ir
psql:qe/script/tdw_meta_init.sql:38: invalid command \ir
psql:qe/script/tdw_meta_init.sql:40: invalid command \ir

你的psql版本不对,9.2的psql版本支持\ir。你是否没有完全卸载系统自带的PG?


Richard Chen

unread,
Dec 11, 2014, 4:53:56 AM12/11/14
to tdw-...@googlegroups.com, whug...@gmail.com
我的版本是 PosgresSQL 9.3的

Jov

unread,
Dec 11, 2014, 4:56:09 AM12/11/14
to Richard Chen, tdw-...@googlegroups.com
你确认?
下面命令结果贴一下:
type psql
psql --version
--
您收到此邮件是因为您订阅了Google网上论坛上的“TDW邮件列表”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到tdw-user+u...@googlegroups.com
要查看更多选项,请访问https://groups.google.com/d/optout

Richard Chen

unread,
Dec 11, 2014, 7:07:14 AM12/11/14
to tdw-...@googlegroups.com, whug...@gmail.com
我已经把9.3卸载了,安装9.2 的 ok了,现在又有新问题,貌似是建表的问题:

$ hive -u root -p tdwroot
WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties files.
session : richard_201412112003_0.8414151475046445 start!
Connect to TDW successfully!
hive> create table tdw_table(key int,value string);
org.postgresql.util.PSQLException: ERROR: column "sessionname" of relation "tdw_ddl_query_info" does not exist
  Position: 62
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334)
at org.apache.hadoop.hive.ql.metadata.BIStore.insertDDLInfo(BIStore.java:301)
at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1038)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:867)
at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:161)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:228)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:363)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
OK
Time taken: 0.348 seconds
您收到此邮件是因为您订阅了Google网上论坛上的“TDW邮件列表”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到tdw-user+unsubscribe@googlegroups.com
要查看更多选项,请访问https://groups.google.com/d/optout

Jov

unread,
Dec 12, 2014, 12:01:21 AM12/12/14
to Richard Chen, tdw-...@googlegroups.com
这是一个小bug,元数据初始化脚本没有更新导致。在腾讯,元数据是直接变更的,没有用这个初始化脚本,并且这个动作是一个旁路,不会导致回归测试失败,所以没有注意。

这个错误是元数据库缺少sessionname这列导致的,失败并不会影响hive sql的提交,并且这个错误只会在CLI模式下可以看到。你show table看一下表应该已经建ok。要消除错误,看一下pg的日志,在对应的表上加上这个字段即可。

--
您收到此邮件是因为您订阅了Google网上论坛上的“TDW邮件列表”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到tdw-user+u...@googlegroups.com
要查看更多选项,请访问https://groups.google.com/d/optout
Reply all
Reply to author
Forward
0 new messages