Skip to content

Commit

Permalink
Replace UPS Processors for eager calculation of study size and study/…
Browse files Browse the repository at this point in the history
…series query attributes by scheduler #282
  • Loading branch information
gunterze committed Oct 16, 2020
1 parent c39725f commit e1c9b92
Show file tree
Hide file tree
Showing 15 changed files with 103 additions and 116 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Apache Directory Studio on October 14, 2020, 10:25:23 AM
# Generated by Apache Directory Studio on October 16, 2020, 10:16:07 AM

# SCHEMA "DCM4CHEE-ARCHIVE"
dn: cn=dcm4chee-archive, ou=schema
Expand Down Expand Up @@ -5164,13 +5164,12 @@ objectclass: metaAttributeType
objectclass: metaTop
objectclass: top
m-oid: 1.2.40.0.13.1.15.110.3.390
m-name: dcmCalculateQueryAttributesViewID
m-description: Indicates to eager calculate Query Attributes for specified Query
/Retrieve Views according configured Calculate Study Size Delay and Calculate S
tudy Size Polling Interval.
m-equality: caseExactMatch
m-substr: caseExactSubstringsMatch
m-syntax: 1.3.6.1.4.1.1466.115.121.1.15
m-name: dcmCalculateQueryAttributes
m-description: Indicates to eager calculate Query Attributes according configure
d Calculate Study Size Delay and Calculate Study Size Polling Interval.
m-equality: booleanMatch
m-syntax: 1.3.6.1.4.1.1466.115.121.1.7
m-singleValue: TRUE

dn: ou=comparators, cn=dcm4chee-archive, ou=schema
objectclass: organizationalUnit
Expand Down Expand Up @@ -5823,7 +5822,7 @@ m-may: dcmBulkDataDescriptorID
m-may: dcmCalculateStudySizeDelay
m-may: dcmCalculateStudySizePollingInterval
m-may: dcmCalculateStudySizeFetchSize
m-may: dcmCalculateQueryAttributesViewID
m-may: dcmCalculateQueryAttributes
m-may: dcmQueryRetrieveViewID
m-may: dcmRetrieveAET
m-may: dcmReturnRetrieveAET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ dcmExportTaskPollingInterval: PT1M
dcmKeyStoreType: PKCS12
dcmTrustStoreURL: ${jboss.server.config.url}/keystores/cacerts.p12
dcmRejectExpiredStudiesAETitle: DCM4CHEE
dcmCalculateQueryAttributesViewID: hideRejected
dcmCalculateStudySizePollingInterval: PT5M
dcmCalculateStudySizeDelay: PT5M
dcmKeyStoreURL: ${jboss.server.config.url}/keystores/key.p12
Expand Down Expand Up @@ -85,6 +84,7 @@ dcmPurgeStgCmtPollingInterval: PT1H
dcmRejectExpiredStudiesFetchSize: 10
dicomPrimaryDeviceType: ARCHIVE
hl7ImportReportTemplateURI: ${jboss.server.temp.url}/dcm4chee-arc/hl7-oru2dsr.xsl
dcmCalculateQueryAttributes: TRUE
dcmPurgeStgCmtCompletedDelay: P1D
dicomManufacturer: dcm4che.org
dcmExternalRetrieveAEDestination: DCM4CHEE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1899,11 +1899,11 @@ attributeTypes: ( 1.2.40.0.13.1.15.110.3.389 NAME 'dcmCalculateStudySizeFetchSiz
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
SINGLE-VALUE )
attributeTypes: ( 1.2.40.0.13.1.15.110.3.390 NAME 'dcmCalculateQueryAttributesViewID'
DESC 'Indicates to eager calculate Query Attributes for specified Query/Retrieve Views according configured Calculate Study Size Delay and Calculate Study Size Polling Interval.'
EQUALITY caseExactMatch
SUBSTR caseExactSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
attributeTypes: ( 1.2.40.0.13.1.15.110.3.390 NAME 'dcmCalculateQueryAttributes'
DESC 'Indicates to eager calculate Query Attributes according configured Calculate Study Size Delay and Calculate Study Size Polling Interval.'
EQUALITY booleanMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
SINGLE-VALUE )
objectClasses: ( 1.2.40.0.13.1.15.110.4.4 NAME 'dcmArchiveDevice'
DESC 'DICOM Archive Device related information'
SUP top AUXILIARY
Expand All @@ -1915,7 +1915,7 @@ objectClasses: ( 1.2.40.0.13.1.15.110.4.4 NAME 'dcmArchiveDevice'
dcmCalculateStudySizeDelay $
dcmCalculateStudySizePollingInterval $
dcmCalculateStudySizeFetchSize $
dcmCalculateQueryAttributesViewID $
dcmCalculateQueryAttributes $
dcmQueryRetrieveViewID $
dcmRetrieveAET $
dcmReturnRetrieveAET $
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ dcmExportTaskPollingInterval: PT1M
dcmKeyStoreType: PKCS12
dcmTrustStoreURL: ${jboss.server.config.url}/keystores/cacerts.p12
dcmRejectExpiredStudiesAETitle: DCM4CHEE
dcmCalculateQueryAttributesViewID: hideRejected
dcmCalculateStudySizePollingInterval: PT5M
dcmCalculateStudySizeDelay: PT5M
dcmKeyStoreURL: ${jboss.server.config.url}/keystores/key.p12
Expand Down Expand Up @@ -185,6 +184,7 @@ dcmPurgeStgCmtPollingInterval: PT1H
dcmRejectExpiredStudiesFetchSize: 10
dicomPrimaryDeviceType: ARCHIVE
hl7ImportReportTemplateURI: ${jboss.server.temp.url}/dcm4chee-arc/hl7-oru2dsr.xsl
dcmCalculateQueryAttributes: TRUE
dcmPurgeStgCmtCompletedDelay: P1D
dicomManufacturer: dcm4che.org
dcmExternalRetrieveAEDestination: DCM4CHEE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2278,11 +2278,11 @@ attributetype ( 1.2.40.0.13.1.15.110.3.389 NAME 'dcmCalculateStudySizeFetchSize'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
SINGLE-VALUE )

attributetype ( 1.2.40.0.13.1.15.110.3.390 NAME 'dcmCalculateQueryAttributesViewID'
DESC 'Indicates to eager calculate Query Attributes for specified Query/Retrieve Views according configured Calculate Study Size Delay and Calculate Study Size Polling Interval.'
EQUALITY caseExactMatch
SUBSTR caseExactSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
attributetype ( 1.2.40.0.13.1.15.110.3.390 NAME 'dcmCalculateQueryAttributes'
DESC 'Indicates to eager calculate Query Attributes according configured Calculate Study Size Delay and Calculate Study Size Polling Interval.'
EQUALITY booleanMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
SINGLE-VALUE )

objectclass ( 1.2.40.0.13.1.15.110.4.4 NAME 'dcmArchiveDevice'
DESC 'DICOM Archive Device related information'
Expand All @@ -2295,7 +2295,7 @@ objectclass ( 1.2.40.0.13.1.15.110.4.4 NAME 'dcmArchiveDevice'
dcmCalculateStudySizeDelay $
dcmCalculateStudySizePollingInterval $
dcmCalculateStudySizeFetchSize $
dcmCalculateQueryAttributesViewID $
dcmCalculateQueryAttributes $
dcmQueryRetrieveViewID $
dcmRetrieveAET $
dcmReturnRetrieveAET $
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1899,11 +1899,11 @@ olcAttributeTypes: ( 1.2.40.0.13.1.15.110.3.389 NAME 'dcmCalculateStudySizeFetch
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
SINGLE-VALUE )
olcAttributeTypes: ( 1.2.40.0.13.1.15.110.3.390 NAME 'dcmCalculateQueryAttributesViewID'
DESC 'Indicates to eager calculate Query Attributes for specified Query/Retrieve Views according configured Calculate Study Size Delay and Calculate Study Size Polling Interval.'
EQUALITY caseExactMatch
SUBSTR caseExactSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
olcAttributeTypes: ( 1.2.40.0.13.1.15.110.3.390 NAME 'dcmCalculateQueryAttributes'
DESC 'Indicates to eager calculate Query Attributes according configured Calculate Study Size Delay and Calculate Study Size Polling Interval.'
EQUALITY booleanMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
SINGLE-VALUE )
-
replace: olcObjectClasses
olcObjectClasses: ( 1.2.40.0.13.1.15.110.4.4 NAME 'dcmArchiveDevice'
Expand All @@ -1917,7 +1917,7 @@ olcObjectClasses: ( 1.2.40.0.13.1.15.110.4.4 NAME 'dcmArchiveDevice'
dcmCalculateStudySizeDelay $
dcmCalculateStudySizePollingInterval $
dcmCalculateStudySizeFetchSize $
dcmCalculateQueryAttributesViewID $
dcmCalculateQueryAttributes $
dcmQueryRetrieveViewID $
dcmRetrieveAET $
dcmReturnRetrieveAET $
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1898,11 +1898,11 @@ olcAttributeTypes: ( 1.2.40.0.13.1.15.110.3.389 NAME 'dcmCalculateStudySizeFetch
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
SINGLE-VALUE )
olcAttributeTypes: ( 1.2.40.0.13.1.15.110.3.390 NAME 'dcmCalculateQueryAttributesViewID'
DESC 'Indicates to eager calculate Query Attributes for specified Query/Retrieve Views according configured Calculate Study Size Delay and Calculate Study Size Polling Interval.'
EQUALITY caseExactMatch
SUBSTR caseExactSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
olcAttributeTypes: ( 1.2.40.0.13.1.15.110.3.390 NAME 'dcmCalculateQueryAttributes'
DESC 'Indicates to eager calculate Query Attributes according configured Calculate Study Size Delay and Calculate Study Size Polling Interval.'
EQUALITY booleanMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
SINGLE-VALUE )
olcObjectClasses: ( 1.2.40.0.13.1.15.110.4.4 NAME 'dcmArchiveDevice'
DESC 'DICOM Archive Device related information'
SUP top AUXILIARY
Expand All @@ -1914,7 +1914,7 @@ olcObjectClasses: ( 1.2.40.0.13.1.15.110.4.4 NAME 'dcmArchiveDevice'
dcmCalculateStudySizeDelay $
dcmCalculateStudySizePollingInterval $
dcmCalculateStudySizeFetchSize $
dcmCalculateQueryAttributesViewID $
dcmCalculateQueryAttributes $
dcmQueryRetrieveViewID $
dcmRetrieveAET $
dcmReturnRetrieveAET $
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,15 @@ dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc
changetype: modify
replace: dicomVendorData
dicomVendorData:< file:vendor-data.zip

dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
changetype: modify
add: dcmCalculateQueryAttributesViewID
dcmCalculateQueryAttributesViewID: hideRejected

dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
changetype: modify
add: dcmCalculateStudySizePollingInterval
-
replace: dcmCalculateStudySizePollingInterval
dcmCalculateStudySizePollingInterval: PT5M

dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
changetype: modify
add: dcmCalculateStudySizeDelay
-
replace: dcmCalculateStudySizeDelay
dcmCalculateStudySizeDelay: PT5M
-
replace: dcmCalculateQueryAttributes
dcmCalculateQueryAttributes: true

dn: dcmQueueName=Export4,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
changetype: modify
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,9 @@ protected void storeTo(Device device, JsonWriter writer) {
arcDev.getUserIdentityNegotiationKeycloakClientID(), null);
writer.writeNotNullOrDef("dcmCalculateStudySizeDelay", arcDev.getStudySizeDelay(), null);
writer.writeNotNullOrDef("dcmCalculateStudySizePollingInterval",
arcDev.getStudySizePollingInterval(), null);
writer.writeNotDef("dcmCalculateStudySizeFetchSize", arcDev.getStudySizeFetchSize(), 100);
writer.writeNotEmpty("dcmCalculateQueryAttributesViewID", arcDev.getQueryAttrsViewIDs());
arcDev.getCalculateStudySizePollingInterval(), null);
writer.writeNotDef("dcmCalculateStudySizeFetchSize", arcDev.getCalculateStudySizeFetchSize(), 100);
writer.writeNotDef("dcmCalculateQueryAttributes", arcDev.isCalculateQueryAttributes(), false);
writeAttributeFilters(writer, arcDev);
writeStorageDescriptor(writer, arcDev.getStorageDescriptors());
writeQueryRetrieveView(writer, arcDev.getQueryRetrieveViews());
Expand Down Expand Up @@ -1891,13 +1891,13 @@ private void loadFrom(ArchiveDeviceExtension arcDev, JsonReader reader, Configur
arcDev.setStudySizeDelay(Duration.valueOf(reader.stringValue()));
break;
case "dcmCalculateStudySizePollingInterval":
arcDev.setStudySizePollingInterval(Duration.valueOf(reader.stringValue()));
arcDev.setCalculateStudySizePollingInterval(Duration.valueOf(reader.stringValue()));
break;
case "dcmCalculateStudySizeFetchSize":
arcDev.setStudySizeFetchSize(reader.intValue());
arcDev.setCalculateStudySizeFetchSize(reader.intValue());
break;
case "dcmCalculateQueryAttributesViewID":
arcDev.setQueryAttrsViewIDs(reader.stringArray());
case "dcmCalculateQueryAttributes":
arcDev.setCalculateQueryAttributes(reader.booleanValue());
break;
case "dcmAttributeFilter":
loadAttributeFilterListFrom(arcDev, reader);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,10 +470,10 @@ protected void storeTo(ConfigurationChanges.ModifiedObject ldapObj, Device devic
LdapUtils.storeNotNullOrDef(ldapObj, attrs, "dcmCalculateStudySizeDelay",
ext.getStudySizeDelay(), null);
LdapUtils.storeNotNullOrDef(ldapObj, attrs, "dcmCalculateStudySizePollingInterval",
ext.getStudySizePollingInterval(), null);
ext.getCalculateStudySizePollingInterval(), null);
LdapUtils.storeNotDef(ldapObj, attrs, "dcmCalculateStudySizeFetchSize",
ext.getStudySizeFetchSize(), 100);
LdapUtils.storeNotEmpty(ldapObj, attrs, "dcmCalculateQueryAttributesViewID", ext.getQueryAttrsViewIDs());
ext.getCalculateStudySizeFetchSize(), 100);
LdapUtils.storeNotDef(ldapObj, attrs, "dcmCalculateQueryAttributes", ext.isCalculateQueryAttributes(), false);
}

@Override
Expand Down Expand Up @@ -762,9 +762,9 @@ protected void loadFrom(Device device, Attributes attrs) throws NamingException
ext.setUserIdentityNegotiationKeycloakClientID(LdapUtils.stringValue(
attrs.get("dcmUserIdentityNegotiationKeycloakClientID"), null));
ext.setStudySizeDelay(toDuration(attrs.get("dcmCalculateStudySizeDelay"), null));
ext.setStudySizePollingInterval(toDuration(attrs.get("dcmCalculateStudySizePollingInterval"), null));
ext.setStudySizeFetchSize(LdapUtils.intValue(attrs.get("dcmCalculateStudySizeFetchSize"), 100));
ext.setQueryAttrsViewIDs(LdapUtils.stringArray(attrs.get("dcmCalculateQueryAttributesViewID")));
ext.setCalculateStudySizePollingInterval(toDuration(attrs.get("dcmCalculateStudySizePollingInterval"), null));
ext.setCalculateStudySizeFetchSize(LdapUtils.intValue(attrs.get("dcmCalculateStudySizeFetchSize"), 100));
ext.setCalculateQueryAttributes(LdapUtils.booleanValue(attrs.get("dcmCalculateQueryAttributes"), false));
}

@Override
Expand Down Expand Up @@ -1312,11 +1312,11 @@ protected void storeDiffs(ConfigurationChanges.ModifiedObject ldapObj, Device pr
LdapUtils.storeDiffObject(ldapObj, mods, "dcmCalculateStudySizeDelay",
aa.getStudySizeDelay(), bb.getStudySizeDelay(), null);
LdapUtils.storeDiffObject(ldapObj, mods, "dcmCalculateStudySizePollingInterval",
aa.getStudySizePollingInterval(), bb.getStudySizePollingInterval(), null);
aa.getCalculateStudySizePollingInterval(), bb.getCalculateStudySizePollingInterval(), null);
LdapUtils.storeDiff(ldapObj, mods, "dcmCalculateStudySizeFetchSize",
aa.getStudySizeFetchSize(), bb.getStudySizeFetchSize(), 100);
LdapUtils.storeDiff(ldapObj, mods, "dcmCalculateQueryAttributesViewID",
aa.getQueryAttrsViewIDs(), bb.getQueryAttrsViewIDs());
aa.getCalculateStudySizeFetchSize(), bb.getCalculateStudySizeFetchSize(), 100);
LdapUtils.storeDiff(ldapObj, mods, "dcmCalculateQueryAttributes",
aa.isCalculateQueryAttributes(), bb.isCalculateQueryAttributes(), false);
if (remove)
mods.add(new ModificationItem(DirContext.REMOVE_ATTRIBUTE,
LdapUtils.attr("objectClass", "dcmArchiveDevice")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,6 @@ private static AuditSuppressCriteria suppressAuditQueryFromArchive() {
static final Duration PURGE_QUEUE_MSG_POLLING_INTERVAL = Duration.valueOf("PT1H");
static final Duration CALCULATE_STUDY_SIZE_DELAY = Duration.valueOf("PT5M");
static final Duration CALCULATE_STUDY_SIZE_POLLING_INTERVAL = Duration.valueOf("PT5M");
static final String[] CALCULATE_QUERY_ATTRS_VIEW_ID = new String[] { HIDE_REJECTED_VIEW.getViewID() };

static final String NEARLINE_STORAGE_EXPORTER_ID = "CopyToNearlineStorage";
static final String NEARLINE_STORAGE_EXPORTER_DESC = "Copy to NEARLINE Storage";
Expand Down Expand Up @@ -1741,8 +1740,8 @@ private static void addArchiveDeviceExtension(Device device, ConfigType configTy
ext.setStorageVerificationAETitle(AE_TITLE);
ext.setCompressionAETitle(AE_TITLE);
ext.setStudySizeDelay(CALCULATE_STUDY_SIZE_DELAY);
ext.setStudySizePollingInterval(CALCULATE_STUDY_SIZE_POLLING_INTERVAL);
ext.setQueryAttrsViewIDs(CALCULATE_QUERY_ATTRS_VIEW_ID);
ext.setCalculateStudySizePollingInterval(CALCULATE_STUDY_SIZE_POLLING_INTERVAL);
ext.setCalculateQueryAttributes(true);

ext.setUPSProcessingPollingInterval(UPS_PROCESSING_POLLING_INTERVAL);
ext.setDeleteUPSPollingInterval(DELETE_UPS_POLLING_INTERVAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,9 @@ public class ArchiveDeviceExtension extends DeviceExtension {
private volatile boolean stowQuicktime2MP4;
private volatile MultipleStoreAssociations[] multipleStoreAssociations = {};
private volatile Duration studySizeDelay;
private volatile Duration studySizePollingInterval;
private volatile int studySizeFetchSize = 100;
private volatile String[] queryAttrsViewIDs = {};
private volatile Duration calculateStudySizePollingInterval;
private volatile int calculateStudySizeFetchSize = 100;
private volatile boolean calculateQueryAttributes;

private final HashSet<String> wadoSupportedSRClasses = new HashSet<>();
private final HashSet<String> wadoSupportedPRClasses = new HashSet<>();
Expand Down Expand Up @@ -2914,28 +2914,28 @@ public void setStudySizeDelay(Duration studySizeDelay) {
this.studySizeDelay = studySizeDelay;
}

public Duration getStudySizePollingInterval() {
return studySizePollingInterval;
public Duration getCalculateStudySizePollingInterval() {
return calculateStudySizePollingInterval;
}

public void setStudySizePollingInterval(Duration studySizePollingInterval) {
this.studySizePollingInterval = studySizePollingInterval;
public void setCalculateStudySizePollingInterval(Duration calculateStudySizePollingInterval) {
this.calculateStudySizePollingInterval = calculateStudySizePollingInterval;
}

public int getStudySizeFetchSize() {
return studySizeFetchSize;
public int getCalculateStudySizeFetchSize() {
return calculateStudySizeFetchSize;
}

public void setStudySizeFetchSize(int studySizeFetchSize) {
this.studySizeFetchSize = studySizeFetchSize;
public void setCalculateStudySizeFetchSize(int calculateStudySizeFetchSize) {
this.calculateStudySizeFetchSize = calculateStudySizeFetchSize;
}

public String[] getQueryAttrsViewIDs() {
return queryAttrsViewIDs;
public boolean isCalculateQueryAttributes() {
return calculateQueryAttributes;
}

public void setQueryAttrsViewIDs(String[] queryAttrsViewIDs) {
this.queryAttrsViewIDs = queryAttrsViewIDs;
public void setCalculateQueryAttributes(boolean calculateQueryAttributes) {
this.calculateQueryAttributes = calculateQueryAttributes;
}

@Override
Expand Down Expand Up @@ -3155,9 +3155,9 @@ public void reconfigure(DeviceExtension from) {
mwlFetchSize = arcdev.mwlFetchSize;
deleteMWLDelay = arcdev.deleteMWLDelay;
studySizeDelay = arcdev.studySizeDelay;
studySizePollingInterval = arcdev.studySizePollingInterval;
studySizeFetchSize = arcdev.studySizeFetchSize;
queryAttrsViewIDs = arcdev.queryAttrsViewIDs;
calculateStudySizePollingInterval = arcdev.calculateStudySizePollingInterval;
calculateStudySizeFetchSize = arcdev.calculateStudySizeFetchSize;
calculateQueryAttributes = arcdev.calculateQueryAttributes;
attributeFilters.clear();
attributeFilters.putAll(arcdev.attributeFilters);
attributeSet.clear();
Expand Down

0 comments on commit e1c9b92

Please sign in to comment.