3.3. 配置 Store Migrator
在 migrator.properties 文件中为源和目标缓存存储设置属性。
流程
-
创建
migrator.properties文件。 在
migrator.properties中配置源缓存存储。使用
source预先填充所有配置属性,如下例所示:source.type=SOFT_INDEX_FILE_STORE source.cache_name=myCache source.location=/path/to/source/sifs
source.type=SOFT_INDEX_FILE_STORE source.cache_name=myCache source.location=/path/to/source/sifsCopy to Clipboard Copied! Toggle word wrap Toggle overflow
在
migrator.properties中配置目标缓存存储。使用
target预先填充所有配置属性,如下例所示:target.type=SINGLE_FILE_STORE target.cache_name=myCache target.location=/path/to/target/sfs.dat
target.type=SINGLE_FILE_STORE target.cache_name=myCache target.location=/path/to/target/sfs.datCopy to Clipboard Copied! Toggle word wrap Toggle overflow
3.3.1. 存储 Migrator 属性 复制链接链接已复制到粘贴板!
在 StoreMigrator 属性中配置源和目标缓存存储。
| 属性 | 描述 | 必填/选填 |
|---|---|---|
|
| 指定源或目标的缓存存储类型类型。
| 必填 |
| 属性 | 描述 | 值示例 | 必填/选填 |
|---|---|---|---|
|
| 命名存储后端的缓存。 |
| 必填 |
|
| 指定可以使用分段的目标缓存存储的片段数量。
片段数量必须与 Data Grid 配置中的 换句话说,缓存存储的片段数量必须与对应缓存的片段数匹配。如果片段数量不相同,则数据网格无法从缓存存储中读取数据。 |
| 选填 |
| 属性 | 描述 | 必填/选填 |
|---|---|---|
|
| 指定底层数据库的 dialect。 | 必填 |
|
| 指定源缓存存储的 marshaller 版本。设置以下值之一:
*
*
* | 仅用于源存储。
例如: |
|
| 指定自定义 marshaller 类。 | 使用自定义 marshallers 时需要此项。 |
|
|
指定以逗号分隔的自定义 | 选填 |
|
| 指定 JDBC 连接 URL。 | 必填 |
|
| 指定 JDBC 驱动程序的类。 | 必填 |
|
| 指定数据库用户名。 | 必填 |
|
| 指定数据库用户名的密码。 | 必填 |
|
| 设置数据库主版本。 | 选填 |
|
| 设置数据库次版本。 | 选填 |
|
| 禁用数据库 upsert。 | 选填 |
|
| 指定是否创建表索引。 | 选填 |
|
| 指定表名称的额外前缀。 | 选填 |
|
| 指定列名称。 | 必填 |
|
| 指定列类型。 | 必填 |
|
|
指定 | 选填 |
要从旧的 Data Grid 版本中迁移 Binary 缓存存储,请在以下属性中将 table.string view 改为 table.binary.\* :
-
source.table.binary.table_name_prefix -
source.table.binary.<id\|data\|timestamp>.name -
source.table.binary.<id\|data\|timestamp>.type
| 属性 | 描述 | 必填/选填 |
|---|---|---|
|
| 设置数据库目录。 | 必填 |
|
| 指定要使用的压缩类型。 | 选填 |
Example configuration for migrating from a RocksDB cache store.
# Example configuration for migrating from a RocksDB cache store.
source.type=ROCKSDB
source.cache_name=myCache
source.location=/path/to/rocksdb/database
source.compression=SNAPPY
| 属性 | 描述 | 必填/选填 |
|---|---|---|
|
|
设置包含缓存存储 | 必填 |
Example configuration for migrating to a Single File cache store.
# Example configuration for migrating to a Single File cache store.
target.type=SINGLE_FILE_STORE
target.cache_name=myCache
target.location=/path/to/sfs.dat
| 属性 | 描述 | 值 |
|---|---|---|
| 必填/选填 |
| 设置数据库目录。 |
| 必填 |
| 设置数据库索引目录。 |
Example configuration for migrating to a Soft-Index File cache store.
# Example configuration for migrating to a Soft-Index File cache store.
target.type=SOFT_INDEX_FILE_STORE
target.cache_name=myCache
target.location=path/to/sifs/database
target.location=path/to/sifs/index