Hi
You can configure a template as follows:
<bean id="myCacheTemplate"
class="org.apache.ignite.configuration.CacheConfiguration"> <!-- not sure id
attribute is of any value but it's good for readability anyway -->
<property name="name" value="myCache*"/> <!-- * indicates it's a
template -->
<property name="cacheMode" value="PARTITIONED" />
<property name="backups" value="1" />
</bean>
Then you can do
CREATE TABLE IF NOT EXISTS MyTable
(
id bigint,
myValue VARCHAR,
PRIMARY KEY (id)
)
WITH "template=myCache, cache_name=whateverYouWant";
If you don't set "cache_name" your cache will be called "SQL_PUBLIC_MYCACHE"
./t
-----Original Message-----
From: gene [mailto:[email protected]]
Sent: tirsdag 16. januar 2018 04.31
To: [email protected]
Subject: Re: IgniteDataStreamer
I saw that method. But the 2.3 for CREATE TABLE indicates you can passing by
WITH for the template.
WITH - accepts additional parameters not defined by ANSI-99 SQL:
TEMPLATE=<cache's template name> - case-sensitive name of a cache template
registered in Ignite to use as a configuration for the distributed cache that
is deployed by the CREATE TABLE command. A template is an instance of the
CacheConfiguration class registered with Ignite.addCacheConfiguration in the
cluster. Use predefined TEMPLATE=PARTITIONED or TEMPLATE=REPLICATED templates
to create the cache with the corresponding replication mode. The rest of the
parameters will be those that are defined in the CacheConfiguration object. By
default, TEMPLATE=PARTITIONED is used if the template is not specified
explicitly
-g
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/