2.3. ストア移行の設定
ソースおよびターゲットのキャッシュストアのプロパティーを migrator.properties
ファイルに設定します。
手順
-
migrator.properties
ファイルを作成します。 ソースキャッシュストアを
migrator.properties
に設定します。以下の例にあるように、すべての設定プロパティーの先頭に
source.
を追加します。source.type=SOFT_INDEX_FILE_STORE source.cache_name=myCache source.location=/path/to/source/sifs
migrator.properties
でターゲットキャッシュストアを設定します。以下の例のように、すべての設定プロパティーの先頭に
target.
を付けます。target.type=SINGLE_FILE_STORE target.cache_name=myCache target.location=/path/to/target/sfs.dat
2.3.1. 移行プロパティーの保存
ソースおよびターゲットのキャッシュストアを StoreMigrator
プロパティーで設定します。
表2.1 キャッシュストアタイププロパティー
プロパティー | 説明 | 必須/オプション |
---|---|---|
| ソースまたはターゲットのキャッシュストアタイプのタイプを指定します。
| 必須 |
表2.2 一般的なプロパティー
プロパティー | 説明 | 値の例 | 必須/オプション |
---|---|---|---|
| ストアがバックアップするキャッシュに名前を付けます。 |
| 必須 |
| セグメンテーションを使用できるターゲットキャッシュストアのセグメント数を指定します。
セグメント数は、Data Grid 設定の つまり、キャッシュストアのセグメント数は、対応するキャッシュのセグメント数と一致する必要があります。セグメントの数が同一でない場合、Data Grid はキャッシュストアからデータを読み込めません。 |
| 任意 |
表2.3 JDBC プロパティー
プロパティー | 説明 | 必須/オプション |
---|---|---|
| 基礎となるデータベースのダイアレクトを指定します。 | 必須 |
| ソースキャッシュストアのマーシャラーバージョンを指定します。以下のいずれかの値を設定します。
* Data Grid 7.2.x の場合は
* Data Grid 7.3.x の場合は
* Data Grid 8.x の場合は | ソースストアにのみ必要です。
例: |
| カスタムマーシャラークラスを指定します。 | カスタムマーシャラーを使用する場合に必要です。 |
|
| 任意 |
| JDBC 接続 URL を指定します。 | 必須 |
| JDBC ドライバーのクラスを指定します。 | 必須 |
| データベースユーザー名を指定します。 | 必須 |
| データベースユーザー名のパスワードを指定します。 | 必須 |
| データベースのメジャーバージョンを設定します。 | Optional |
| データベースのマイナーバージョンを設定します。 | Optional |
| データベース upsert を無効にします。 | 任意 |
| テーブルインデックスが作成されるかどうかを指定します。 | 任意 |
| テーブル名の追加接頭辞を指定します。 | 任意 |
| 列名を指定します。 | 必須 |
| 列タイプを指定します。 | 必須 |
|
| 任意 |
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.major_version=9 target.db.minor_version=5 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
表2.4 RocksDB プロパティー
プロパティー | 説明 | 必須/オプション |
---|---|---|
| データベースディレクトリーを設定します。 | 必須 |
| 使用する圧縮タイプを指定します。 | 任意 |
# 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
表2.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
表2.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