메뉴 건너뛰기

Bigdata, Semantic IoT, Hadoop, NoSQL

Bigdata, Hadoop ecosystem, Semantic IoT등의 프로젝트를 진행중에 습득한 내용을 정리하는 곳입니다.
필요한 분을 위해서 공개하고 있습니다. 문의사항은 gooper@gooper.com로 메일을 보내주세요.


 1. oozie-site.xml의 db관련부분을 아래와 같이 설정해준다.

 

------------------------------------------------------------------------------------------------------------------------

   <property>
        <name>oozie.db.schema.name</name>
        <value>oozie</value>
        <description>
            Oozie DataBase Name
        </description>
    </property>

    <property>
        <name>oozie.service.JPAService.create.db.schema</name>
        <!-- value>false</value -->
        <value>true</value>
        <description>
            Creates Oozie DB.

            If set to true, it creates the DB schema if it does not exist. If the DB schema exists is a NOP.
            If set to false, it does not create the DB schema. If the DB schema does not exist it fails start up.
        </description>
    </property>

    <property>
        <name>oozie.service.JPAService.jdbc.driver</name>
        <!-- value>org.apache.derby.jdbc.EmbeddedDriver</value -->
        <value>com.mysql.jdbc.Driver</value>
        <description>
            JDBC driver class.
        </description>
    </property>
    <property>
        <name>oozie.service.JPAService.jdbc.url</name>
        <!-- value>jdbc:derby:${oozie.data.dir}/${oozie.db.schema.name}-db;create=true</value -->
        <value>jdbc:mysql://localhost:3306/${oozie.db.schema.name}_db</value>
        <description>
            JDBC URL.
        </description>
    </property>

    <property>
        <name>oozie.service.JPAService.jdbc.username</name>
        <!-- value>sa</value -->
        <value>hadoop</value>
        <description>
            DB user name.
        </description>
    </property>

    <property>
        <name>oozie.service.JPAService.jdbc.password</name>
        <value>hadoop</value>
        <description>
            DB user password.

            IMPORTANT: if password is emtpy leave a 1 space string, the service trims the value,
                       if empty Configuration assumes it is NULL.
        </description>
    </property>
------------------------------------------------------------------------------------------------------

2. mysql에 oozie에서 사용할 db를 생성한다.

mysql> create database oozie_db;
Query OK, 1 row affected (0.00 sec)

3. hadoop에 권한을 부여한다.

mysql> grant all privileges on *.* to hadoop@localhost identified by 'hadoop' with grant option;
Query OK, 0 rows affected (0.00 sec)

mysql> flush;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

 

4. mysql jdbc driver를 lib폴더에 copy한다.(oozie/lib에 복사하면 인식 안됩니다)

cp /home/hadoop/hive/lib/mysql-connector-java-5.1.30-bin.jar  /home/hadoop/oozie/oozie-server/lib

 

5. oozie를 stop한다

  oozie-stop.sh

 

6. oozie를 start한다.

  oozie-start.sh

 

 

A personal place to organize information learned during the development of such Hadoop, Hive, Hbase, Semantic IoT, etc.
We are open to the required minutes. Please send inquiries to gooper@gooper.com.

위로