sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dapeng Sun (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (SENTRY-525) [Unit Test]org.apache.sentry.tests.e2e.hdfs.TestHDFSIntegrationtestEnd2End test fails
Date Mon, 17 Nov 2014 09:34:33 GMT

    [ https://issues.apache.org/jira/browse/SENTRY-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14214428#comment-14214428
] 

Dapeng Sun edited comment on SENTRY-525 at 11/17/14 9:33 AM:
-------------------------------------------------------------

Hi [~asuresh], Thank you for your patch.
Two minor suggestions, feel free to fix or drop :
* We may better to use {{Log4j}} instead of "System.out.println()"
* I think it's better to add some Log when {{hiveServer2}} is not ready and going to retry.
For example:
{code:java}
    try {
      hiveServer2 = new InternalHiveServer(hiveConf);
      ...
      conn = hiveServer2.createConnection("hive", "hive");
    } catch (Exception ex) {
      if (retries > 0) {
        try {
          keepRunning.set(false);
          hiveServer2.shutdown();
        } catch (Exception e) {
          // Ignore // TODO it's better to add some log
        }
        startHiveServer2(retries - 1, hiveConf);
      }
      // TODO it's better to add some log and throw the exception
    }
{code}


was (Author: dapengsun):
Hi [~asuresh], Thank you for your patch.
Two minor suggestions, feel free to fix or drop :
* We may better to use {{Log4j}} instead of "System.out.println()"
* I think it's better to add some Log when {{hiveServer2}} is not ready and going to retry.
For example:
{code:java}
    try {
      hiveServer2 = new InternalHiveServer(hiveConf);
      ...
      conn = hiveServer2.createConnection("hive", "hive");
    } catch (Exception ex) {
      if (retries > 0) {
        try {
          keepRunning.set(false);
          hiveServer2.shutdown();
        } catch (Exception e) {
          // Ignore // TODO it's better to add some log
        }
        startHiveServer2(retries - 1, hiveConf);
      }
      // TODO it's better to add some log
    }
{code}

> [Unit Test]org.apache.sentry.tests.e2e.hdfs.TestHDFSIntegrationtestEnd2End test fails
> -------------------------------------------------------------------------------------
>
>                 Key: SENTRY-525
>                 URL: https://issues.apache.org/jira/browse/SENTRY-525
>             Project: Sentry
>          Issue Type: Bug
>    Affects Versions: 1.5.0
>            Reporter: Dapeng Sun
>            Assignee: Arun Suresh
>            Priority: Blocker
>             Fix For: 1.5.0
>
>         Attachments: SENTRY-525.1.patch
>
>
> There is the log in my local environment
> {code}
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running org.apache.sentry.tests.e2e.hdfs.TestHDFSIntegration
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 33.572 sec <<<
FAILURE! - in org.apache.sentry.tests.e2e.hdfs.TestHDFSIntegration
> testEnd2End(org.apache.sentry.tests.e2e.hdfs.TestHDFSIntegration)  Time elapsed: 33.503
sec  <<< ERROR!
> java.sql.SQLException: Could not open connection to jdbc:hive2://localhost:10000/default:
java.net.ConnectException: Connection refused
> 	at java.net.PlainSocketImpl.socketConnect(Native Method)
> 	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
> 	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
> 	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
> 	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
> 	at java.net.Socket.connect(Socket.java:579)
> 	at org.apache.thrift.transport.TSocket.open(TSocket.java:180)
> 	at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:248)
> 	at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:1)
> 	at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:200)
> 	at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:177)
> 	at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:571)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:215)
> 	at org.apache.sentry.tests.e2e.hive.hiveserver.AbstractHiveServer.createConnection(AbstractHiveServer.java:63)
> 	at org.apache.sentry.tests.e2e.hdfs.TestHDFSIntegration.testEnd2End(TestHDFSIntegration.java:441)
> Results :
> Tests in error: 
>   TestHDFSIntegration.testEnd2End:441 ?SQL Could not open connection to jdbc:hi...
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
> {code}
> Marked as blocker since this is a unit test failure.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message