tHiveRow and log.info error

Four Stars

tHiveRow and log.info error

Hi there!

 

I'm trying just to make a simple example to connect to Hive and make a simple query. However, I got an error, because generated source code for the tHiveRow component uses a variable (log) which is not declared..

 

The tHiveConnection component works fine, and connect properly...

 

Any thoughts?

 

Thanks in advance!

 

fig1.pngfig2.pngfig3.png

Seven Stars

Re: tHiveRow and log.info error

The "log" variable is internal to Talend. I don't think that's the problem (despite what the error message says): the problem is likely in your query, which is the line above the one throwing the error.

 

When I have a Talend job using a query that won't compile, it's inevitably because I forgot to enclose the query itself in double-quotes. Failing that, it is some similar error in the query that prevents it from compiling. You're best bet is to create a Hive query object in Metadata | DbConnections, which will let you test the query outside of the Talend job.

 

David

Four Stars

Re: tHiveRow and log.info error

I'll try your suggestion, but my query is alredy quoted in double ".

 

But, actually, it is too strange.. Currently I'm using 6.5.1 version. In the version 6.4.1, the component tHiveRow has not the "log.info("..")" line, so, doing the same process, there is not an error at all.

 

But, anyway, I'll try your solution to create a Hive query object in the metadata..

 

Thanks!

 

 

One Star

Re: tHiveRow and log.info error

Hi,

 

I'm facing the same issue with tHiveRow and log.info (6.5.1 version). I tried adding other components but it doesn't help. The syntax of my query is correct. To test tHiveRow I am using the same query than in tHiveLoad.  Did you find a solution?

Thanks in advance for the comments.

 

Five Stars

Re: tHiveRow and log.info error

I'm having the same issue.

Looks like a bug to me, not a query string problem.  Happens with default query "select id, name from employee".

 

Java code definitely has an undefined variable, log.

log.info("Query sent to HiveServer2 to be executed with [Application Name(MapReduce)/DAG Name(Tez): "
+ queryIdentifier + "]");

 

It's very easy to reproduce.  Just add a tHiveRow, look at the source.

 

Is there some logging option or component to cause the internal log variable to be created as a work around?

It looks like log4J code.  Maybe there is a runtime option to turn on log4j logging for the application so it gets generated. 

 

I'm kinda stuck as I have an issue with logging into hive from a trusted domain in 6.4.1 with cloudera 5.10.  Talend 6.5.1 works for the  connection, but then I have this problem.

 

Pete

 

Four Stars

Re: tHiveRow and log.info error

I honestly think it is a bug. It's looks like any programmer forgot to remove the log, testing the tHiveRow component. I did report it to the talend bug tracker..

 

The only solution I found was go back to the 6.4.1. The log.info is not added in the 6.4.1 version, so it is works perfectly.

 

Regards.

Moderator

Re: tHiveRow and log.info error

Hello,

Here exists a work item jira issue:https://jira.talendforge.org/browse/TDI-30117

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: tHiveRow and log.info error

This problem is present into Talend Open Source Big Data 7.0.1 for tHiveRow component:

org.talend.commons.exception.PersistenceException: org.talend.designer.runprocess.ProcessorException: Job compile errors
At least job "thive_test" has a compile errors, please fix and export again.
Error Line: 3194
Detail Message: log cannot be resolved
There may be some other errors caused by JVM compatibility. Make sure your JVM setup is similar to the studio. 

 

I'm unable to build the ETLs based on Hive tecnology developed or imported to 7.0.1.

 

The line of code is:

log.info("Query sent to HiveServer2 to be executed with [Application Name(MapReduce)/DAG Name(Tez): "
+ queryIdentifier + "]");

 

Is it a regression?

Moderator

Re: tHiveRow and log.info error

Hello,

Could you please give us your comments in this jira issue? In this way , we would increase the priority of it.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: tHiveRow and log.info error

Hi Sabrina,
I left a comment on
https://jira.talendforge.org/browse/TBD-6469
because I'm using the Big Data product, but I think this problem impact all products that use tHive components
Five Stars

Re: tHiveRow and log.info error

This should be a blocker to new release.  You cannot use hive until it's fixed.

Hive is a standard solution in all the hadoop platforms and is basic functionality.

I'm surprised it's even a discussion  as to what the priority should be or that it made it through testing.

Even the most basic connection test will fail.

 

Five Stars

Re: tHiveRow and log.info error

Quick Fix for  tHiveRow:

edit the following file
TOS_BD-20180411_1414-V7.0.1/plugins/org.talend.designer.components.localprovider_7.0.1.20180411_1414/components/tHiveRow/tHiveRow_main.javajet

comment the line number 229

log.info("Query sent to HiveServer2 to be executed with [Application Name(MapReduce)/DAG Name(Tez): " + queryIdentifier + "]");

 

Reload Talend Big Data 7.0.1

Moderator

Re: tHiveRow and log.info error

Hello,

After doing that, it would be great to delete the file <studio-install-dir>/configuration/ComponentCache.javacache and restart studio.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: tHiveRow and log.info error

Hi Users,

me too facing the same issue in Talend DI hive row. As per Jira comments, they not able to reproduce the error.  Has anyone tried this approach? I tired but got another error.

 

https://community.talend.com/t5/Design-and-Development/tHiveRow-cannot-resolve-any-fields/td-p/11414...

 

if some one has working hiverow code please share screen shot

Moderator

Re: tHiveRow and log.info error

Hello,

Are you still facing this error on the latest released version V 7.0.1?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.