You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Mohammad Islam <mi...@yahoo.com> on 2013/11/03 04:48:28 UTC

Hive compilation error

Hi,
I ran "mvn clean install -DskipTests; cd itests; mvn clean install 
-DskipTests" and got the following error.

Error
=======
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project hive-it-qfile: Compilation failure: Compilation failure:
[ERROR] /Users/mislam/apache/hive/itests/qtest/target/generated-test-sources/java/org/apache/hadoop/hive/cli/TestCliDriver.java:[7170,15] testCliDriver_mybucket_1() is already defined in org.apache.hadoop.hive.cli.TestCliDriver
[ERROR] /Users/mislam/apache/hive/itests/qtest/target/generated-test-sources/java/org/apache/hadoop/hive/cli/TestCliDriver.java:[7174,15] testCliDriver_mybucket_1() is already defined in org.apache.hadoop.hive.cli.TestCliDriver
[ERROR] /Users/mislam/apache/hive/itests/qtest/target/generated-test-sources/java/org/apache/hadoop/hive/cli/TestCliDriver.java:[7178,15] testCliDriver_mybucket_1() is already defined in org.apache.hadoop.hive.cli.TestCliDriver

My investigations:
================
I did some investigation and found the TestCliDriver.vm (Line 105) is looking for **first** instance of "." and used the first part as function name in something like this "testCliDriver_mybucket_1".

The problem is: there are three mybucket_1.*.q files (mybucket_1.5.q,mybucket_1.7.q, mybucket_1.8.q). Therefore, the above logic would create the **same** function name for three .q files causing
the compilation error.

Possible solutions:
==================
1. Change the code in TestCliDriver.vm to consider this use cases during source generation.
2. Let's not support the *.q file with multiple dots "." in the file name. So we can rename those three files into something else removing the second ".".

Next step:
============
If someone can confirm it, I can create a JIRA and provide a patch.

Regards,
Mohammad

Re: Hive compilation error

Posted by Mohammad Islam <mi...@yahoo.com>.
Thanks Carl for the reply.
Yes these were my own .q files.

Since there are no such current files, we can skip it for the time being. Need to make sure no future q filenames would contain multiple dots.
 
Regards,
Mohammad 



On Sunday, November 3, 2013 4:59 PM, Carl Steinbach <cw...@gmail.com> wrote:
 
Hi Mohammad,

I can't find the mybucket_*.q files on trunk. Are you using a different
branch?


1. Change the code in TestCliDriver.vm to consider this use cases during
> source generation.
>

I think replacing the call to indexOf() with one to lastIndexOf() will fix
the problem. If you want to submit a patch I'll review it.

Thanks.

Carl

Re: Hive compilation error

Posted by Mohammad Islam <mi...@yahoo.com>.
Thanks Carl for the reply.
Yes these were my own .q files.

Since there are no such current files, we can skip it for the time being. Need to make sure no future q filenames would contain multiple dots.
 
Regards,
Mohammad 



On Sunday, November 3, 2013 4:59 PM, Carl Steinbach <cw...@gmail.com> wrote:
 
Hi Mohammad,

I can't find the mybucket_*.q files on trunk. Are you using a different
branch?


1. Change the code in TestCliDriver.vm to consider this use cases during
> source generation.
>

I think replacing the call to indexOf() with one to lastIndexOf() will fix
the problem. If you want to submit a patch I'll review it.

Thanks.

Carl

Re: Hive compilation error

Posted by Carl Steinbach <cw...@gmail.com>.
Hi Mohammad,

I can't find the mybucket_*.q files on trunk. Are you using a different
branch?

1. Change the code in TestCliDriver.vm to consider this use cases during
> source generation.
>

I think replacing the call to indexOf() with one to lastIndexOf() will fix
the problem. If you want to submit a patch I'll review it.

Thanks.

Carl

Re: Hive compilation error

Posted by Carl Steinbach <cw...@gmail.com>.
Hi Mohammad,

I can't find the mybucket_*.q files on trunk. Are you using a different
branch?

1. Change the code in TestCliDriver.vm to consider this use cases during
> source generation.
>

I think replacing the call to indexOf() with one to lastIndexOf() will fix
the problem. If you want to submit a patch I'll review it.

Thanks.

Carl