7.2. キャッシュストアマイグレーターの設定
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.2.1. キャッシュストアマイグレーターの設定プロパティー リンクのコピーリンクがクリップボードにコピーされました!
ソースおよびターゲットのキャッシュストアを StoreMigrator プロパティーで設定します。
| プロパティー | 説明 | 必須/オプション |
|---|---|---|
|
| ソースまたはターゲットのキャッシュストアのタイプを指定します。
| 必須 |
| プロパティー | 説明 | 値の例 | 必須/オプション |
|---|---|---|---|
|
| バックアップするキャッシュの名前。 |
| 必須 |
|
| セグメンテーションを使用できるターゲットキャッシュストアのセグメント数。
セグメント数は、Data Grid 設定の |
| 任意 |
| プロパティー | 説明 | 必須/オプション |
|---|---|---|
|
| 基礎となるデータベースのダイアレクトを指定します。 | 必須 |
|
|
ソースキャッシュストアのマーシャラーバージョンを指定します。
* 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 の場合は | ソースストアにのみ必要です。 |
|
| カスタムマーシャラークラスを指定します。 | カスタムマーシャラーを使用する場合に必要です。 |
|
|
| 任意 |
|
| JDBC 接続 URL を指定します。 | 必須 |
|
| JDBC ドライバーのクラスを指定します。 | 必須 |
|
| データベースユーザー名を指定します。 | 必須 |
|
| データベースユーザー名のパスワードを指定します。 | 必須 |
|
| データベース 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.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
| プロパティー | 説明 | 必須/オプション |
|---|---|---|
|
| データベースディレクトリーを設定します。 | 必須 |
|
| 使用する圧縮タイプを指定します。 | 任意 |
# 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.
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.
target.type=SOFT_INDEX_FILE_STORE
target.cache_name=myCache
target.location=path/to/sifs/database
target.location=path/to/sifs/index