You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "Jarek Jarcec Cecho (JIRA)" <ji...@apache.org> on 2014/11/26 20:44:13 UTC

[jira] [Updated] (SQOOP-1816) Sqoop2: Add logging to the test DerbyProvider implementation

     [ https://issues.apache.org/jira/browse/SQOOP-1816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jarek Jarcec Cecho updated SQOOP-1816:
--------------------------------------
    Attachment: SQOOP-1816.patch

> Sqoop2: Add logging to the test DerbyProvider implementation
> ------------------------------------------------------------
>
>                 Key: SQOOP-1816
>                 URL: https://issues.apache.org/jira/browse/SQOOP-1816
>             Project: Sqoop
>          Issue Type: Bug
>    Affects Versions: 1.99.4
>            Reporter: Jarek Jarcec Cecho
>            Assignee: Jarek Jarcec Cecho
>             Fix For: 1.99.5
>
>         Attachments: SQOOP-1816.patch
>
>
> I was recently investigating why integration tests are in infinite loop on my machine. I've seen only a lot of repeating messages from HDFS mini cluster talking about heartbeats and nothing else was happening. I originally though that something is going on in the Hadoop minicluster.
> Looking closer at {{jstack}} dump I've noticed that the main thread is stuck in {{[DriverManager.getConnection()|https://github.com/apache/sqoop/blob/sqoop2/common-test/src/main/java/org/apache/sqoop/common/test/db/DatabaseProvider.java#L131]}}, waiting on opening connection to testing Derby database. The Derby should have been [already started|https://github.com/apache/sqoop/blob/sqoop2/common-test/src/main/java/org/apache/sqoop/common/test/db/DerbyProvider.java#L39] at that point in execution, so the wait shouldn't be there. Sadly there weren't any logs from Derby, so It was hard to figure out what is happening.
> I've eventually triaged the issue to port 1527 being sort of used and hence Derby wasn't able to start properly on that port. This seems as expected behavior that is covered by DERBY-1465 - unsuccessful Derby start won't thrown an exception as anticipated, one needs to explicitly call method {{ping()}} to verify that the server is indeed up and running.
> Triaging this issue would be much simpler if we would be logging Derby output as I would get the exception that derby server can't start in the logs. Hence I would like to suggest to add that. It would be also helpful to explicitly call the {{ping()}} method to die fast rather then end up in infinite loop.



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