Skip to content

Commit

Permalink
Document missing property type-name for GenericMapStore/Loader [SUP-4…
Browse files Browse the repository at this point in the history
…79] (#1185)

Fixes #1184
  • Loading branch information
frant-hartm authored Sep 17, 2024
1 parent c3bee3f commit 767458f
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 7 deletions.
66 changes: 61 additions & 5 deletions docs/modules/mapstore/pages/configuring-a-generic-maploader.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,65 @@ mapConfig.setMapStoreConfig(mapStoreConfig);
--
====

|[[columns]]`type-name`
|The type name of the compact GenericRecord. Use this property to map your record to an existing domain class.

|
The name of the map.
|

[tabs]
====
XML::
+
--
[source,xml]
----
<hazelcast>
<map name="myMapName">
<map-store enabled="true">
<class-name>com.hazelcast.mapstore.GenericMapStore</class-name>
<properties>
<property name="data-connection-ref">my-mysql-database</property>
<property name="type-name">org.example.Person</property>
</properties>
</map-store>
</hazelcast>
----
--
YAML::
+
--
[source,yaml]
----
hazelcast:
map:
mymapname:
map-store:
enabled: true
class-name: com.hazelcast.mapstore.GenericMapStore
properties:
data-connection-ref: my-mysql-database
type-name: org.example.Person
----
--
Java::
+
--
[source,java]
----
MapConfig mapConfig = new MapConfig("myMapName");
MapStoreConfig mapStoreConfig = new MapStoreConfig();
mapStoreConfig.setClassName("com.hazelcast.mapstore.GenericMapStore");
mapStoreConfig.setProperty("data-connection-ref", "my-mysql-database");
mapStoreConfig.setProperty("type-name", "org.example.Person");
mapConfig.setMapStoreConfig(mapStoreConfig);
----
--
====

|===

== Supported backends
Expand All @@ -381,11 +440,8 @@ GenericMapStore needs a SQL Connector that supports `SELECT`, `UPDATE`, `SINK IN

Officially supported connectors:

- JDBC Connector
* supports MySQL, PostgreSQL.
* requires JDBC driver on the classpath
- MongoDB Connector
* make sure you have `hazelcast-jet-mongodb` artifact included on the classpath.
- MySQL, PostgreSQL, Microsoft SQL Server, Oracle (it uses JDBC SQL Connector).
- MongoDB (make sure you have `hazelcast-jet-mongodb` artifact included on the classpath).

== Related Resources

Expand Down
63 changes: 61 additions & 2 deletions docs/modules/mapstore/pages/configuring-a-generic-mapstore.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -373,13 +373,72 @@ mapConfig.setMapStoreConfig(mapStoreConfig);
--
====

|[[columns]]`type-name`
|The type name of the compact GenericRecord. Use this property to map your record to an existing domain class.

|
The name of the map.
|

[tabs]
====
XML::
+
--
[source,xml]
----
<hazelcast>
<map name="myMapName">
<map-store enabled="true">
<class-name>com.hazelcast.mapstore.GenericMapStore</class-name>
<properties>
<property name="data-connection-ref">my-mysql-database</property>
<property name="type-name">org.example.Person</property>
</properties>
</map-store>
</hazelcast>
----
--
YAML::
+
--
[source,yaml]
----
hazelcast:
map:
mymapname:
map-store:
enabled: true
class-name: com.hazelcast.mapstore.GenericMapStore
properties:
data-connection-ref: my-mysql-database
type-name: org.example.Person
----
--
Java::
+
--
[source,java]
----
MapConfig mapConfig = new MapConfig("myMapName");
MapStoreConfig mapStoreConfig = new MapStoreConfig();
mapStoreConfig.setClassName("com.hazelcast.mapstore.GenericMapStore");
mapStoreConfig.setProperty("data-connection-ref", "my-mysql-database");
mapStoreConfig.setProperty("type-name", "org.example.Person");
mapConfig.setMapStoreConfig(mapStoreConfig);
----
--
====

|===

== Supported backends

You can use any database as the MapStore backend as long as you have its Hazelcast SQL Connector on the classpath.
GenericMapStore needs a SQL Connector that supports `SELECT`, `UPDATE`, `SINK INTO` and `DELETE` statements.

Officially supported backend databases:
Officially supported connectors:

- MySQL, PostgreSQL, Microsoft SQL Server, Oracle (it uses JDBC SQL Connector).
- MongoDB (make sure you have `hazelcast-jet-mongodb` artifact included on the classpath).
Expand Down

0 comments on commit 767458f

Please sign in to comment.