That's true, it might be broken now.  I think now most people to debug
their code will build assembly using -Phadoop-2,dist, and then go to
packaging/target/... and run bin/hive from there.

You can debug changes by setting bin/hive --debug, or alternatively by setting
HADOOP_OPTS to include your own java debug flags.

Hope that helps,
Szehon

On Mon, Dec 22, 2014 at 12:41 AM, vic0777 <vic0...@163.com> wrote:

>
> Hi Szehon,
>
> Thanks for your reply. I do not want to run bin/hive.
>
> I need to debug my changes to Hive code in Eclipse. For Hive0.11, I could
> build and import it into eclipse, then execute the main method in
> CliDriver. The hive prompt would appear in the Eclipse console, then I can
> type HQL statement into it. But for Hive0.14, the shims-common project
> always depends on hadoop-core-0.20.2.jar even with "-Phadoop-2" when
> building the code. My question is how I can generate an eclipse project
> with hadoop 2.5 in the classpath instead of hadoop0.20?
>
> Wantao
>
>
>
>
> 在 2014-12-22 15:18:30,"Szehon Ho" <sze...@cloudera.com> 写道:
>
> I dont know how to run it through eclipse, do you mean run the hiveCLI
> command line (/bin/hive)?  If so, then you have to make sure HADOOP_HOME is
> set to include the hadoop 2.5.0 jars.  There should not be 0.20.2 jars in
> the classpath.
>
> Thanks
> Szehon
>
>
>
> On Sun, Dec 21, 2014 at 2:12 AM, vic0777 <vic0...@163.com> wrote:
>
>> Hi,
>>
>> I have imported Hive0.14 into Eclipse following instructions in "Hive
>> Developer FAQ". My hadoop version is 2.5.0, so I specified "-Phadoop-2"
>> in the commands.
>>
>>  When I run it through CliDriver, Hive throws an exception "Exception in
>> thread "main" java.lang.NoSuchMethodError:
>> org.apache.hadoop.security.UserGroupInformation.getCurrentUser()Lorg/apache/hadoop/security/UserGroupInformation;".
>> Since Hive loads class UserGroupInformation from hadoop-core-0.20.2.jar, it
>> cannot find the method getCurrentUser.  How can I get rid of this error?
>> Any help is appreciated.
>>
>> Wantao
>>
>>
>>
>>
>
>
>

Reply via email to