Renames PDX types in an offline disk store.

Any PDX types that are renamed will be listed in the output. If no renames are done or the disk-store is online, then this command will fail.

Availability: Offline.

Syntax:

pdx rename --old=value --new=value --disk-store=value --disk-dirs=value(,value)*
Name Description
‑‑old Required. If a PDX type’s fully qualified class name has a word that matches this text then it will be renamed. Words are delimited by ‘.’ and ‘$’.
‑‑new Required. The text to replace the word that matched old.
‑‑disk‑store Required. Name of the disk store to operate on.
‑‑disk-dirs Required. Directories which contain the disk store files.

Example Commands:

Change all packages that start with “com.gemstone” to “com.pivotal”:

gfsh>pdx rename --old=com.gemstone --new=com.pivotal --disk-store=ds1 --disk-dirs=/diskDir1

Change a class named “MyClassName” to “YourClassName”:

gfsh>pdx rename --old=MyClassName --new=YourClassName --disk-store=ds1 --disk-dirs=/diskDir1

Change the FQCN “com.target.app1.OldClass” to “com.target.app2.NewClass”:

gfsh>pdx rename --old=com.target.app1.OldClass --new=com.target.app2.NewClass --disk-store=ds1 --disk-dirs=/diskDir1

Sample Output:

gfsh>pdx rename --old=PortfolioPdx --new=StockPdx --disk-store=DiskStore1 --disk-dirs=/DiskDir1
Successfully renamed pdx types:
  com.app.data.StockPdx: id=2
  com.app.data.StockPdx$Day.Monday

Error Messages:

If no types match, you may receive the following error message:

gfsh>pdx rename --old=gemstone --new=pivotal --disk-store=DiskStore1 --disk-dirs=/DiskDir1
Could not process command due to GemFire error. No Pdx types found to rename.

If the disk-store where the PDX types are stored is online, you will receive the following error message:

gfsh>pdx rename --old=StockPdx --new=PortfolioPdx --disk-store=DiskStore1 --disk-dirs=/DiskDir1
Could not process command due to GemFire error. Error renaming pdx types :
GemFireCache[id = 484629896; isClosing = false; isShutDownAll = false;
closingGatewayHubsByShutdownAll = false; created = Wed Jan 07 10:29:45 PST 2015;
server = false; copyOnRead = false; lockLease = 120; lockTimeout = 60]: An open cache
already exists.
check-circle-line exclamation-circle-line close-line
Scroll to top icon