Member since
06-25-2014
6
Posts
1
Kudos Received
0
Solutions
08-10-2016
02:48 PM
Hello Audi et al, I have seen the error below when the lock files in the Derby database directory are owned by a user other than Sqoop2. This can happen if you manually connect to the database using the Derby "ij" tool. Server startup failure
org.apache.sqoop.common.SqoopException: JDBCREPO_0007:Unable to lease link
at org.apache.sqoop.repository.JdbcRepositoryTransaction.begin(JdbcRepositoryTransaction.java:64)
<SNIP>
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Could not create a validated object, cause: A read-only user or a user in a read-only database is not permitted to disable read-only mode on a connection.
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:1Caused by: java.util.NoSuchElementException: Could not create a validated object, cause: A read-only user or a user in a read-only database is not permitted to disable read-only mode on a connection. # ls -l total 24 -rw-r--r-- 1 root root 4 Aug 10 11:28 dbex.lck <====== -rw-r--r-- 1 root root 38 Aug 10 11:28 db.lck <======= drwxr-xr-x 2 sqoop2 sqoop2 4096 Aug 10 10:15 log drwxr-xr-x 2 sqoop2 sqoop2 4096 Aug 10 10:15 seg0 -rw-r--r-- 1 sqoop2 sqoop2 853 Aug 10 10:15 service.properties drwxr-xr-x 2 sqoop2 sqoop2 4096 Aug 10 13:49 tmp To get past this issue do the following: Ensure that there are no connections to the database Address the lock files Option 1: chown sqoop2:sqoop2 *.lck Option 2: rm -rf *.lck Start Sqoop2 Hope this helps, Markus Kemper - Cloudera Support
... View more
07-04-2016
05:57 AM
1 Kudo
@yshi, re: Sqoop1 import + --incremental + --merge-key Although not documented, we can use "--merge-key" in Sqoop import command if "--incremental lastmodified" is used. If the target dir is not empty, the Sqoop import tool will automatically run a merge job after the import job is finished to merge the data Thank you for pointing this out, I will review further and create a Sqoop1 Doc Jira as necessary to properly address the command usage and expected behavior. @sim6, Let's follow @yshi's approach on debugging further for now while I review the documentation issue in the background.
... View more
07-04-2016
04:40 AM
Hello Sim6, My understanding (will confirm) is as follows: The --merge-key option is part of the Sqoop1 merge command and not available to be used with the Sqoop1 import command The Sqoop1 merge command is intented to run after (separate job) to flatten the two datasets that exist in HDFS as a result of multiple Sqoop1 import commands (commonly created with --incremental however not exclusively) If you remove "--merge-key id" from your command, does it work without error? Thank you, Markus Kemper
... View more