How to change sqoop metastore?

后端 未结 3 1927
甜味超标
甜味超标 2020-12-16 08:23

I am using sqoop 1.4.2 version. I am trying to change the sqoop metastore from default hsqldb to mysql.

I have configured following properties in sqoop-site.xml file

3条回答
  •  难免孤独
    2020-12-16 08:34

    The answer is Yes, in my case I am using PostgreSQL. I ran into this recently and I am using Version 1.4.4. I am not sure if what I did is the recommended way, but it works. Here are the steps I followed

    1. In sqoop-site.xml I configured it with, the connect string to my database, username and password.

    2. Created the following object in the database, as Sqoop was failing at it.

      CREATE TABLE SQOOP_ROOT ( version INT, propname VARCHAR(128) NOT NULL, propval VARCHAR(256), CONSTRAINT SQOOP_ROOT_unq UNIQUE (version, propname) );

    3. Inserted the following row (This seems to be the reason your script is failing)

      INSERT INTO SQOOP_ROOT VALUES( NULL, 'sqoop.hsqldb.job.storage.version', '0' );

    I think the correct way might be is to download the source, and extend org.apache.sqoop.metastore.JobStorage with you DB implementation.

提交回复
热议问题