Thanks a lot Hari,

I ran the below command from hive-project root:

*mvn -Dmaven.surefire.debug="-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent
-Djava.compiler=NONE" test
-Dtest=org.apache.hive.hcatalog.pig.TestHCatLoader -Phadoop-2*

and connected from eclipse via remote debugging option successfully. This
solved the problem of debugging.

Now am facing one more issue. There were some test failures. Am looking at
it, however, I will paste the error below if it is common issue(so I don't
reinvent the wheel again):

Listening for transport dt_socket at address: 8000
Running org.apache.hive.hcatalog.pig.TestHCatLoader
Tests run: 60, Failures: 9, Errors: 22, Skipped: 3, Time elapsed: 1,428.185
sec <<< FAILURE! - in org.apache.hive.hcatalog.pig.TestHCatLoader
testProjectionsBasic[0](org.apache.hive.hcatalog.pig.TestHCatLoader)  Time
elapsed: 8.82 sec  <<< ERROR!
org.apache.pig.impl.logicalLayer.FrontendException: Unable to open iterator
for alias Y2
at org.apache.pig.PigServer.openIterator(PigServer.java:872)
at
org.apache.hive.hcatalog.pig.TestHCatLoader.testProjectionsBasic(TestHCatLoader.java:462)

testConvertBooleanToInt[0](org.apache.hive.hcatalog.pig.TestHCatLoader)
 Time elapsed: 4.926 sec  <<< ERROR!
org.apache.pig.impl.logicalLayer.FrontendException: Unable to open iterator
for alias data
at org.apache.pig.PigServer.openIterator(PigServer.java:872)
at
org.apache.hive.hcatalog.pig.TestHCatLoader.testConvertBooleanToInt(TestHCatLoader.java:571)

testReadDataBasic[0](org.apache.hive.hcatalog.pig.TestHCatLoader)  Time
elapsed: 22.188 sec  <<< ERROR!
org.apache.pig.impl.logicalLayer.FrontendException: Unable to open iterator
for alias X
at org.apache.pig.PigServer.openIterator(PigServer.java:872)
at
org.apache.hive.hcatalog.pig.TestHCatLoader.testReadDataBasic(TestHCatLoader.java:294)

testColumnarStorePushdown[0](org.apache.hive.hcatalog.pig.TestHCatLoader)
 Time elapsed: 3.953 sec  <<< FAILURE!
java.lang.AssertionError: null
at org.junit.Assert.fail(Assert.java:86)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertTrue(Assert.java:52)
at
org.apache.hive.hcatalog.pig.TestHCatLoader.testColumnarStorePushdown(TestHCatLoader.java:504)

Thanks!

On Fri, May 8, 2015 at 12:40 PM, Hari Subramaniyan <
hsubramani...@hortonworks.com> wrote:

>  Use ​-Dmaven.surefire.debug option and attach to port 5005 (default),
>  more info can be found here :
>
>
> http://maven.apache.org/surefire/maven-surefire-plugin/examples/debugging.html
> ​
>
>
>  Thanks
>
> Hari
>  ------------------------------
> *From:* Suraj Nayak <snay...@gmail.com>
> *Sent:* Friday, May 08, 2015 12:35 PM
> *To:* user@hive.apache.org
> *Subject:* Help needed in debugging HCatLoader for Pig
>
>  Hi All,
>
>  I have set up hive source code as per
> HiveDeveloperFAQ#HiveDeveloperFAQ-HowdoIimportintoEclipse
> <https://cwiki.apache.org/confluence/display/Hive/HiveDeveloperFAQ#HiveDeveloperFAQ-HowdoIimportintoEclipse?>
>  documentation
> and successfully imported the project into Eclipse.
>
>  Now,If I want to debug the hive-hcatalog-pig-adapter/
> *org.apache.hive.hcatalog.pig.HCatLoader* class, I tried to
> run /hive-hcatalog-pig-adapter/
> *org.apache.hive.hcatalog.pig.TestHCatLoader* by enabling few debug
> points.
>
>  Am getting following error when I Right-Click on *TestHCatLoader* and
> Select *JUnit Test:*
>
>  FAILED: NullPointerException Non-local session path expected to be
> non-null
> 15/05/08 12:24:37 ERROR ql.Driver: FAILED: NullPointerException Non-local
> session path expected to be non-null
> java.lang.NullPointerException: Non-local session path expected to be
> non-null
>
>  While being in eclipse am able to run the goal "*test
> -Dtest=org.apache.hive.hcatalog.pig.TestHCatLoader -Phadoop-2*" from
> itests directory successfully. But the debug point is never caught during
> the testing. How can I line by line debug any class such as this HCatLoader
> loader class from eclipse?
>
> Any help is appreciated!
>
>  --
>  Thanks
> Suraj Nayak M
>
>
>


-- 
Thanks
Suraj Nayak M

Reply via email to