ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1069: Problem resolving class version numbers for class PIGUDF.PigFilter - apache-pig

I am getting this error while trying to apply an overridden filter function on a student marks text file using pig

Related

#Multivalue aggregation error in Webi- Business Objects

I have report in below format
Hierarchy_country|Account|Year
ABC|1001|#MultiValue
To resolve #Multivalue error, I have tried below variables to resolve the error but it doesn't get fixed
1:Last(Amt)ForEach(Period)
2: Sum(Amt)ForEach(Period)
Year is dynamic - YTD/MTD/QTD

Value of type 'Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer' cannot be converted to 'System.Type

I'm working on a custom TFS Build workflow based on the code found in two blogs:
http://www.theringworx.com/blog/?p=494
https://lajak.wordpress.com/2011/08/30/tfs2010-retrieve-associated-workitems-to-changesets-tfs-api/
When I implement the VB.Net code within my XAML workflow, I'm currently getting the following errors on build runtime:
The build process failed validation. Details:
Validation Error: The private implementation of activity '1:
DynamicActivity' has the following validation error: Compiler
error(s) encountered processing expression "TFSService".
Value of type
'Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer'
cannot be converted to 'System.Type'.
Validation Error: The private implementation of activity '1:
DynamicActivity' has the following validation error: Compiler
error(s) encountered processing expression "TFS.GetService(Of
VersionControlServer)();".
End of expression expected.
I've traced the error down to this section of code (Simplified from XAML):
TFS=Microsoft.TeamFoundation.Client.TfsTeamProjectCollectionFactory.GetTeamProjectCollectionFactory(New Uri("MyTeamsTFSServer"))
TFSService = TFS.GetService(Of VersionControlServer)()
I've tried changing the type of TFSService from both Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer and System.Type without success.
From what I can tell the error is occurring in the "Of VersionControlServer".
Has anyone ever encountered this? And if so how did you resolve it?
Turns out the issue was the URL I was using, I made a typo when I was entering it in. Yay for descriptive error messages...
I found this while I was checking my authentication using the two methods:
TFS.HasAuthenticated
TFS.Authenticate();
My code blew out when I was running the Authenticate() method.

Apache Pig: ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: can't look backwards more than one token in this stream

I wrote a UDF that returns a string and here is a sample code:
split data into purchased IF ((boolean) (myudf(param)), failed OTHERWISE;
As an example, here is the example of that my udf returns:
split data into purchased IF ((boolean) (retcode == 'SUCCESS')), failed OTHERWISE;
Unfortunately. I get the following error:
Apache Pig: ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: can't look backwards more than one token in this stream
I also tried this:
split data into purchased IF ((boolean) '(retcode == 'SUCCESS')'), failed OTHERWISE;
I get this error:
2015-06-19 10:10:48,330 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: <line 11, column 85> Syntax error, unexpected symbol at or near '250.00'
I also tried this:
split data into purchased IF ((boolean) '(retcode == \'SUCCESS\')'), failed OTHERWISE;
I don't get any error, but the I don't get the expected result back.
Any help with this would be great.
That error is thrown because ANTLR can't parse correctly that sentence. Pig should give you a different error showing what is the problem, like it generally does, but it seems the parsing rules for the SPLIT sentence don't take into account what happens when you try to cast the condition.
The problem here is solved simply by removing that cast to boolean:
split data into purchased IF (retcode == 'SUCCESS'), failed OTHERWISE;
That will work.
Why does the cast make it fail? That I don't know. I guess that casting the output of an expression counts as two different expressions, since it has to resolve the inner expression to apply the cast afterwards, and the syntax rule for the split operator does not allow this. 0% sure though.

Dbeaver Connecting to Hive - SQLException: Method not supported

I'm getting this error when trying to run a select after connecting to Hive.
Is this a bad jar file?
org.jkiss.dbeaver.model.impl.jdbc.JDBCException: SQL Error: Method not supported
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCConnectionImpl.prepareStatement(JDBCConnectionImpl.java:170)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCConnectionImpl.prepareStatement(JDBCConnectionImpl.java:1)
at org.jkiss.dbeaver.model.DBUtils.createStatement(DBUtils.java:985)
at org.jkiss.dbeaver.model.DBUtils.prepareStatement(DBUtils.java:963)
at org.jkiss.dbeaver.runtime.sql.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:313)
at org.jkiss.dbeaver.runtime.sql.SQLQueryJob.extractData(SQLQueryJob.java:633)
at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsProvider.readData(SQLEditor.java:1169)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetDataPumpJob.run(ResultSetDataPumpJob.java:132)
at org.jkiss.dbeaver.runtime.AbstractJob.run(AbstractJob.java:91)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.sql.SQLException: Method not supported
at org.apache.hadoop.hive.jdbc.HiveConnection.createStatement(HiveConnection.java:229)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCConnectionImpl.createStatement(JDBCConnectionImpl.java:350)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCConnectionImpl.prepareStatement(JDBCConnectionImpl.java:138)
... 9 more
There is a calls in hive jdbc jar called org.apache.hive.jdbc.HiveResultSetMetaData . This class contains a method isWritable which is not supported by hive yet. This is the reason why you get the error "Method not supported".
Take the source code of this class and update the above method. Then generate the class and replaced it in the jar. This worked for me.

T4MVCVB doesn't work on clean install?

I just installed T4MVCVB and it won't compile:
Error 1 Compiling transformation: Invalid token 'this' in class, struct, or interface member declaration c:\...\T4MVCVB.tt 1 1
Error 2 Compiling transformation: Method must have a return type c:\...\T4MVCVB.tt 1 6
Error 3 Compiling transformation: Type expected c:\...\T4MVCVB.tt 1 12
Note that the line number is 1 for each of these errors, so there's no way at all to see what line it doesn't like.
How can I figure out what the problem is so I can generate typed helpers for VB?
Edit: After some cleanup, now I get the following compiler error, and the line number of the problem:
Error 112 Running transformation: System.NotImplementedException: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
at EnvDTE80.CodeFunction2.get_Attributes()
at {long call stack}
The line it doesn't like is:
// Ignore methods that are marked as not being actions
if (GetAttribute(method.Attributes, "System.Web.Mvc.NonActionAttribute") != null)
continue;
Make sure you are using the latest version made for VB. Here is the T4MVCVB Nuget Package
If it's still breaking before generating the .vb files, I would uncomment these two lines near the top of T4MVCVB.tt and see if you can find the problem location.
//System.Diagnostics.Debugger.Launch();
//System.Diagnostics.Debugger.Break();