2 Replies Latest reply on Nov 11, 2014 8:19 PM by thanhncr

    How to configure modeshape using datasource hadoop?

    thanhncr

      Hi,

      I use the datasource in an Infinispan cache loader ( datasource is hadoop hive).

      My standalone.xml :

      <datasource jndi-name="java:/hive-datasource" pool-name="hive-ds" enabled="true" use-java-context="true">

                          <connection-url>jdbc:hive2://192.168.69.116:10000/default</connection-url>

                          <driver>hive</driver>

                          <security>

                              <user-name>hdfs</user-name>

                              <password>123456</password>

                          </security>

                      </datasource>

                      <datasource jndi-name="java:/HiveConnection" pool-name="HiveConnection" enabled="true">

                          <connection-url>jdbc:hive2://192.168.69.116:10000/default</connection-url>

                          <driver>hive</driver>

                          <security>

                              <user-name>hdfs</user-name>

                              <password>123456</password>

                          </security>

                      </datasource>

      INFINISPAN:

      <cache-container name="modeshapeCache" default-cache="test" module="org.modeshape">

                      <local-cache name="test">

                          <transaction mode="NON_XA"/>

                          <file-store relative-to="jboss.server.data.dir" path="modeshape/store/cloudbiz" passivation="false" purge="false"/>

                      </local-cache>

                  </cache-container>

                  <cache-container name="modeshapeBinaryCache">

                      <local-cache name="testRepository-binary-data">

                          <transaction mode="NON_XA"/>

                          <eviction strategy="LIRS" max-entries="5"/>

                          <string-keyed-jdbc-store datasource="/hive-datasource" passivation="false" purge="false">

                              <property name="databaseType">

                                  hive-server2

                              </property>

                              <property name="createTableOnStart">

                                  true

                              </property>

                              <string-keyed-table prefix="default1">

                                  <id-column name="id" type="VARCHAR(200)"/>

                                  <data-column name="datum" type="BYTEA"/>

                                  <timestamp-column name="version" type="BIGINT"/>

                              </string-keyed-table>

                          </string-keyed-jdbc-store>

                      </local-cache>

                      <local-cache name="testRepository-binary-metadata">

                          <transaction mode="NON_XA"/>

                          <eviction strategy="LIRS" max-entries="2000"/>

                          <string-keyed-jdbc-store datasource="/hive-datasource" passivation="false" purge="false">

                              <property name="databaseType">

                                  hive-server2

                              </property>

                              <property name="createTableOnStart">

                                  true

                              </property>

                              <string-keyed-table prefix="default1">

                                  <id-column name="id" type="VARCHAR(200)"/>

                                  <data-column name="datum" type="BYTEA"/>

                                  <timestamp-column name="version" type="BIGINT"/>

                              </string-keyed-table>

                          </string-keyed-jdbc-store>

                      </local-cache>

                  </cache-container>

       

      MODESHAPE:

      <repository name="test" cache-name="test" cache-container="modeshapeCache">

                      <cache-binary-storage data-cache-name="testRepository-binary-data" metadata-cache-name="testRepository-binary-metadata" cache-container="modeshapeBinaryCache"/>

                  </repository>

       

      But it is not work.!

       

      How to configure modeshape using datasource hadoop?

      Thank you so much!