7.3. キャッシュストアマイグレーターの設定
migrator.properties ファイルを使用して、ソースおよびターゲットのキャッシュストアのプロパティーを設定します。
手順
-
migrator.propertiesファイルを作成します。 migrator.propertiesファイルを使用して、ソースおよびターゲットのキャッシュストアのプロパティーを設定します。source.接頭辞をソースキャッシュストアの全設定プロパティーに追加します。ソースキャッシュストアの例
source.type=SOFT_INDEX_FILE_STORE source.cache_name=myCache source.location=/path/to/source/sifs source.version=<version>
重要セグメント化されたキャッシュストアからデータを移行するには、
source.segment_countプロパティーを使用してセグメント数も設定する必要があります。セグメント数は、Data Grid 設定のclustering.hash.numSegmentsと一致する必要があります。キャッシュストアのセグメント数が対応するキャッシュのセグメント数と一致しない場合、Data Grid はキャッシュストアからデータを読み取ることができません。target.接頭辞をターゲットキャッシュストアの全設定プロパティーに追加します。ターゲットキャッシュストアの例
target.type=SINGLE_FILE_STORE target.cache_name=myCache target.location=/path/to/target/sfs.dat
7.3.1. キャッシュストアマイグレーターの設定プロパティー
ソースおよびターゲットのキャッシュストアを StoreMigrator プロパティーで設定します。
表7.1 キャッシュストアタイププロパティー
| プロパティー | 説明 | 必須/オプション |
|---|---|---|
|
| ソースまたはターゲットのキャッシュストアのタイプを指定します。
| 必須 |
表7.2 一般的なプロパティー
| プロパティー | 説明 | 値の例 | 必須/オプション |
|---|---|---|---|
|
| バックアップするキャッシュの名前。 |
| 必須 |
|
| セグメンテーションを使用できるターゲットキャッシュストアのセグメント数。
セグメント数は、Data Grid 設定の |
| Optional |
表7.3 JDBC プロパティー
| プロパティー | 説明 | 必須/オプション |
|---|---|---|
|
| 基礎となるデータベースのダイアレクトを指定します。 | 必須 |
|
|
ソースキャッシュストアのマーシャラーバージョンを指定します。
* Data Grid 7.2.x の場合は
* Data Grid 7.3.x の場合は
* Data Grid 8.0.x の場合は
* Data Grid 8.1.x の場合は
* Data Grid 8.2.x の場合は
* Data Grid 8.3.x の場合は | ソースストアにのみ必要です。 |
|
| カスタムマーシャラークラスを指定します。 | カスタムマーシャラーを使用する場合に必要です。 |
|
|
| Optional |
|
| JDBC 接続 URL を指定します。 | 必須 |
|
| JDBC ドライバーのクラスを指定します。 | 必須 |
|
| データベースユーザー名を指定します。 | 必須 |
|
| データベースユーザー名のパスワードを指定します。 | 必須 |
|
| データベース upsert を無効にします。 | Optional |
|
| テーブルインデックスが作成されるかどうかを指定します。 | Optional |
|
| テーブル名の追加接頭辞を指定します。 | Optional |
|
| 列名を指定します。 | 必須 |
|
| 列タイプを指定します。 | 必須 |
|
|
| Optional |
Binary キャッシュストアから古い Data Grid バージョンの移行には、以下のプロパティーで table.string.* を 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 to a JDBC String-Based cache store target.type=STRING target.cache_name=myCache target.dialect=POSTGRES target.marshaller.class=org.example.CustomMarshaller target.marshaller.externalizers=25:Externalizer1,org.example.Externalizer2 target.connection_pool.connection_url=jdbc:postgresql:postgres target.connection_pool.driver_class=org.postrgesql.Driver target.connection_pool.username=postgres target.connection_pool.password=redhat target.db.disable_upsert=false target.db.disable_indexing=false target.table.string.table_name_prefix=tablePrefix target.table.string.id.name=id_column target.table.string.data.name=datum_column target.table.string.timestamp.name=timestamp_column target.table.string.id.type=VARCHAR target.table.string.data.type=bytea target.table.string.timestamp.type=BIGINT target.key_to_string_mapper=org.infinispan.persistence.keymappers. DefaultTwoWayKey2StringMapper
表7.4 RocksDB プロパティー
| プロパティー | 説明 | 必須/オプション |
|---|---|---|
|
| データベースディレクトリーを設定します。 | 必須 |
|
| 使用する圧縮タイプを指定します。 | Optional |
# 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
表7.5 SingleFileStore プロパティー
| プロパティー | 説明 | 必須/オプション |
|---|---|---|
|
|
キャッシュストア | 必須 |
# 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
表7.6 SoftIndexFileStore プロパティー
| プロパティー | 説明 | 値 |
|---|---|---|
| 必須/オプション |
| データベースディレクトリーを設定します。 |
| 必須 |
| データベースインデックスディレクトリーを設定します。 |
# 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