简体   繁体   English

iReport Designer 4.5.1 /4.6.0无法与Hive进行交互

[英]iReport designer 4.5.1 /4.6.0 cannot interact with Hive

I have followed the instructions from here and installed the updated plugin. 我已按照此处的说明进行操作,并安装了更新的插件。 The error has become: 该错误已成为:

Query error

Message: net.sf.jasperreports.engine.JRException: 
Error executing SQL statement for : null Level: SEVERE Stack Trace: 
Error executing SQL statement for : null com.jaspersoft.hadoop.hive.HiveFieldsProvider.getFields(HiveFieldsProvider.java:113)
com.jaspersoft.ireport.hadoop.hive.designer.HiveFieldsProvider.getFields(HiveFieldsProvider.java:32)
com.jaspersoft.ireport.hadoop.hive.connection.HiveConnection.readFields(HiveConnection.java:154)
com.jaspersoft.ireport.designer.wizards.ConnectionSelectionWizardPanel.validate(ConnectionSelectionWizardPanel.java:146)
org.openide.WizardDescriptor$7.run(WizardDescriptor.java:1357)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)

After downgrading to 4.5.0 the error has become (the connection is verified and I am able to query the table from hive): 降级到4.5.0后,错误变成了(连接已验证,我能够从配置单元中查询表):

Query error

Message: net.sf.jasperreports.engine.JRException: Query returned non-zero code: 10, cause: 
FAILED: Error in semantic analysis: Line 1:14 Table not found 'panstats' Level: 
SEVERE Stack Trace: Query returned non-zero code: 10, cause: 
FAILED: Error in semantic analysis: Line 1:14 Table not found 'panstats'
com.jaspersoft.hadoop.hive.HiveFieldsProvider.getFields(HiveFieldsProvider.java:260)
com.jaspersoft.ireport.hadoop.hive.designer.HiveFieldsProvider.getFields(HiveFieldsProvider.java:32)
com.jaspersoft.ireport.hadoop.hive.connection.HiveConnection.readFields(HiveConnection.java:146)
com.jaspersoft.ireport.designer.wizards.ConnectionSelectionWizardPanel.validate(ConnectionSelectionWizardPanel.java:146)
org.openide.WizardDescriptor$7.run(WizardDescriptor.java:1357)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)

I am using Hive 0.8.1 on OS X Lion 10.7.4. 我在OS X Lion 10.7.4上使用Hive 0.8.1

Is your query as simple as select * from panstats ? 您的查询是否像select * from panstats一样简单? I suspect that the query is not the problem, but you'll want to confirm that first. 我怀疑查询不是问题,但您首先要确认这一点。

You could try querying that table from a tool like SQuirreL SQL. 您可以尝试使用SQuirreL SQL之类的工具查询该表。 If that tool also cannot get the data, then it's probably a Hive issue. 如果该工具也无法获取数据,则可能是Hive的问题。 If it can... then it's probably an issue with iReport or the Hive plugin. 如果可以...则可能是iReport或Hive插件存在问题。

It sounds like Hive is not configured to share metadata. 听起来好像Hive没有配置为共享元数据。 It uses the annoying default configuration with Derby, so outside connections don't get access to your panstats table. 它与Derby一起使用令人讨厌的默认配置,因此外部连接无法访问您的panstats表。 I came across this article about configuring Hive earlier this year. 我在今年初遇到了有关配置Hive的文章 It documents using MySQL instead of derby. 它记录使用的,而不是德比的MySQL。 If that's indeed the problem, then it's just a Hive configuration issue. 如果确实是问题所在,那么这仅仅是Hive配置问题。 Following that article would solve things both for SQuirreL and for iReport. 紧随其后的文章将解决SQuirreL和iReport的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM