Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
build/kits/jboss-as7/docs/teiid/datasources/phoenix/create-phoenix-ds.cli
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# note that driver-name could be driver's module name if you went module approach. | ||
/subsystem=datasources/data-source=phoenixDS:add(jndi-name=java:/phoenixDS, driver-name=phoenix-[version].jar, driver-class=org.apache.phoenix.jdbc.PhoenixDriver, connection-url=jdbc:phoenix:{zookeeper quorum server},user-name={user}, password={password}) | ||
|
||
## If you are working in a clustered environment, prepend "/profile=ha" to all the above commands that start with "/subsystem=.." |
9 changes: 9 additions & 0 deletions
9
.../kits/jboss-as7/docs/teiid/datasources/phoenix/modules/org/apache/phoenix/main/module.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module xmlns="urn:jboss:module:1.0" name="org.apache.derby"> | ||
<resources> | ||
<resource-root path="phoenix-[version].jar"/> | ||
</resources> | ||
<dependencies> | ||
<module name="javax.api"/> | ||
</dependencies> | ||
</module> |
19 changes: 19 additions & 0 deletions
19
build/kits/jboss-as7/docs/teiid/datasources/phoenix/phoenix-ds.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!-- Add the below contents under "datasources" subsystem in the standalone-teiid.xml or deploy as -ds.xml file --> | ||
<subsystem xmlns="urn:jboss:domain:datasources:1.0"> | ||
<datasources> | ||
<datasource jndi-name="java:/derbyDS" pool-name="derbyDS"> | ||
<driver-class>org.apache.phoenix.jdbc.PhoenixDriver</driver-class> | ||
<connection-url>jdbc:phoenix:{zookeeper quorum server}</connection-url> | ||
<driver>phoenix-[version].jar</driver> | ||
<pool> | ||
<prefill>false</prefill> | ||
<use-strict-min>false</use-strict-min> | ||
<flush-strategy>FailingConnectionOnly</flush-strategy> | ||
</pool> | ||
<security> | ||
<user-name>{user}</user-name> | ||
<password>{password}</password> | ||
</security> | ||
</datasource> | ||
</datasources> | ||
</subsystem> |
29 changes: 29 additions & 0 deletions
29
build/kits/jboss-as7/docs/teiid/datasources/phoenix/readme.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
There are two parts to creating a datasource, depending upon whether this is the first time you are doing this, | ||
you can skip the deploying JDBC driver for the database, if you have previously already done this. | ||
|
||
Note that all instances of [version] should be replaced by the appropriate phoenix version. | ||
|
||
Step 1: Deploying the JDBC Driver | ||
|
||
Option 1: use the JBoss CLI tool, and deploy the phoenix client jar by issuing the command | ||
deploy phoenix-[version].jar | ||
|
||
Option 2: (recommended) | ||
1) Stop the server if it is running. | ||
|
||
2) Overlay the "modules" directory on the "<jboss-as>/modules" directory | ||
|
||
3) Then copy the phoenix database JDBC driver jar file into the | ||
"<jboss-as>/modules/org/apache/phoenix/main" directory. | ||
4) start server | ||
|
||
Step 2: Creating the datasource | ||
|
||
Option 1: Edit the standalone-teiid.xml or domain-teiid.xml file and add contents of the "phoenix-ds.xml" | ||
file under the "datasources" subsystem. You may have to edit contents according to where your Hbase server | ||
is located and credentials you need to use to access it. | ||
|
||
Option 2: Take a look at create-phoenix-ds.cli script, and modify and execute using JBoss CLI tool as below | ||
|
||
./Jboss-admin.sh --file create-phoenix-ds.cli | ||
|