Hi
Windsor,
Re:
I am interested in changing the storage profile (i.e. sts/mts/lts) for a specific single PV
I assume you want to do this after the PV has been added to the archiver. If so, modifyStoreURLForPV
is what I would use. Here's some python to do the same
import requests
import json
typeinfo = requests.get("http://localhost:17665/mgmt/bpl/getPVTypeInfo", params={"pv": "mshankar:arch:sine"}).json()
print(json.dumps(typeinfo["dataStores"], indent=4))
requests.get("http://localhost:17665/mgmt/bpl/pauseArchivingPV", params={"pv": "mshankar:arch:sine"})
requests.get("http://localhost:17665/mgmt/bpl/modifyStoreURLForPV", params={"pv": "mshankar:arch:sine", "storage":
"MTS", "plugin_url": "pb://localhost?name=MTS&rootFolder=${ARCHAPPL_MEDIUM_TERM_FOLDER}&partitionGranularity=PARTITION_DAY&hold=14&gather=7"})
typeinfo = requests.get("http://localhost:17665/mgmt/bpl/getPVTypeInfo", params={"pv": "mshankar:arch:sine"}).json()
print(json.dumps(typeinfo["dataStores"], indent=4))
requests.get("http://localhost:17665/mgmt/bpl/resumeArchivingPV", params={"pv": "mshankar:arch:sine"})
For more complex changes; there is the jackhammer BPL of /putPVTypeInfo but plz do be
careful when using this.
Changing the data store parameters in the typeinfo does not really modify the underlying
data for the PV; that is, if you want to change the partition granularity etc, you'll need to use consolidateDataForPV ( immediately after the
pauseArchivingPV )
to empty out the STS/MTS etc into the LTS and then make your changes. Hope that makes sense.
Please do reach out if you have more complex requirements.
Regards,
Murali
|