Skip to content

Instantly share code, notes, and snippets.

@yuj18
Last active August 9, 2016 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuj18/7a7af47e81ab3f90298daafbc4ae9e09 to your computer and use it in GitHub Desktop.
Save yuj18/7a7af47e81ab3f90298daafbc4ae9e09 to your computer and use it in GitHub Desktop.
The mapping between GPDB tables and GemFire regions need to be specified in a server-managed cache configuration xml file
...
<jndi-bindings>
<jndi-binding jndi-name="datasource" type="SimpleDataSource"
jdbc-driver-class="org.postgresql.Driver" user-name="dbuser"
password="dbpass" connection-url="jdbc:postgresql://10.64.20.1:5433/gemfire">
</jndi-binding>
</jndi-bindings>
<region name="SentimentScore">
<region-attributes refid="PARTITION">
<partition-attributes redundant-copies="1" />
</region-attributes>
<gpdb:store datasource="datasource">
<gpdb:synchronize mode="manual" persistent="false" />
<gpdb:types>
<gpdb:pdx name="io.pivotal.ds.gemfire.gpdb.entity.SentimentScore"
table="sentiment_score">
<gpdb:id>
<gpdb:field ref="phrase" />
</gpdb:id>
<gpdb:fields>
<gpdb:field name="phrase" column="phrase" />
<gpdb:field name="score" column="score" />
</gpdb:fields>
</gpdb:pdx>
</gpdb:types>
</gpdb:store>
</region>
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment