mirror of
https://github.com/hapifhir/hapi-fhir.git
synced 2025-02-20 11:55:17 +00:00
Bump core library
This commit is contained in:
parent
d60d07b697
commit
8aef580aed
@ -6,13 +6,11 @@ import ca.uhn.fhir.jpa.api.dao.IFhirSystemDao;
|
|||||||
import ca.uhn.fhir.jpa.config.TestR4Config;
|
import ca.uhn.fhir.jpa.config.TestR4Config;
|
||||||
import ca.uhn.fhir.jpa.config.TestR4WithLuceneDisabledConfig;
|
import ca.uhn.fhir.jpa.config.TestR4WithLuceneDisabledConfig;
|
||||||
import ca.uhn.fhir.jpa.dao.BaseJpaTest;
|
import ca.uhn.fhir.jpa.dao.BaseJpaTest;
|
||||||
import ca.uhn.fhir.jpa.dao.BaseTransactionProcessor;
|
|
||||||
import ca.uhn.fhir.jpa.model.entity.ResourceEncodingEnum;
|
import ca.uhn.fhir.jpa.model.entity.ResourceEncodingEnum;
|
||||||
import ca.uhn.fhir.jpa.partition.SystemRequestDetails;
|
|
||||||
import ca.uhn.fhir.jpa.search.reindex.BlockPolicy;
|
import ca.uhn.fhir.jpa.search.reindex.BlockPolicy;
|
||||||
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
|
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
|
||||||
|
import ca.uhn.fhir.util.FileUtil;
|
||||||
import ca.uhn.fhir.util.StopWatch;
|
import ca.uhn.fhir.util.StopWatch;
|
||||||
import org.apache.commons.compress.utils.Lists;
|
|
||||||
import org.apache.commons.lang3.Validate;
|
import org.apache.commons.lang3.Validate;
|
||||||
import org.hl7.fhir.r4.model.Bundle;
|
import org.hl7.fhir.r4.model.Bundle;
|
||||||
import org.hl7.fhir.r4.model.Meta;
|
import org.hl7.fhir.r4.model.Meta;
|
||||||
@ -179,7 +177,26 @@ public class SyntheaPerfTest extends BaseJpaTest {
|
|||||||
throw new InternalErrorException(e);
|
throw new InternalErrorException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
mySystemDao.transaction(new SystemRequestDetails(myInterceptorRegistry), bundle);
|
int resCount = 0;
|
||||||
|
int totalBytes = 0;
|
||||||
|
int maxBytes = 0;
|
||||||
|
int countOver5kb = 0;
|
||||||
|
for (Bundle.BundleEntryComponent nextEntry : bundle.getEntry()) {
|
||||||
|
int size = myCtx.newJsonParser().setPrettyPrint(false).encodeResourceToString(nextEntry.getResource()).length();
|
||||||
|
resCount++;
|
||||||
|
totalBytes += size;
|
||||||
|
if (size > maxBytes) {
|
||||||
|
maxBytes = size;
|
||||||
|
}
|
||||||
|
if (size > 5000) {
|
||||||
|
countOver5kb++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int avg = (int) ((double)totalBytes / (double) resCount);
|
||||||
|
ourLog.info("Resources {} Average {} Max {} CountOver5 {}", resCount, FileUtil.formatFileSize(avg), FileUtil.formatFileSize(maxBytes), countOver5kb);
|
||||||
|
|
||||||
|
|
||||||
|
// mySystemDao.transaction(new SystemRequestDetails(myInterceptorRegistry), bundle);
|
||||||
|
|
||||||
int fileCount = myFilesCounter.incrementAndGet();
|
int fileCount = myFilesCounter.incrementAndGet();
|
||||||
myResourcesCounter.addAndGet(bundle.getEntry().size());
|
myResourcesCounter.addAndGet(bundle.getEntry().size());
|
||||||
|
@ -20,9 +20,9 @@ package ca.uhn.fhir.jpa.model.entity;
|
|||||||
* #L%
|
* #L%
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
|
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
import ca.uhn.fhir.model.primitive.IdDt;
|
||||||
import ca.uhn.fhir.rest.api.Constants;
|
import ca.uhn.fhir.rest.api.Constants;
|
||||||
|
import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
|
||||||
import org.hibernate.annotations.OptimisticLock;
|
import org.hibernate.annotations.OptimisticLock;
|
||||||
|
|
||||||
import javax.persistence.CascadeType;
|
import javax.persistence.CascadeType;
|
||||||
@ -67,7 +67,7 @@ public class ResourceHistoryTable extends BaseHasResource implements Serializabl
|
|||||||
@SuppressWarnings("WeakerAccess")
|
@SuppressWarnings("WeakerAccess")
|
||||||
public static final int ENCODING_COL_LENGTH = 5;
|
public static final int ENCODING_COL_LENGTH = 5;
|
||||||
public static final String HFJ_RES_VER = "HFJ_RES_VER";
|
public static final String HFJ_RES_VER = "HFJ_RES_VER";
|
||||||
|
public static final int RES_TEXT_VC_MAX_LENGTH = 5000;
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@SequenceGenerator(name = "SEQ_RESOURCE_HISTORY_ID", sequenceName = "SEQ_RESOURCE_HISTORY_ID")
|
@SequenceGenerator(name = "SEQ_RESOURCE_HISTORY_ID", sequenceName = "SEQ_RESOURCE_HISTORY_ID")
|
||||||
@ -95,12 +95,13 @@ public class ResourceHistoryTable extends BaseHasResource implements Serializabl
|
|||||||
@Lob()
|
@Lob()
|
||||||
@OptimisticLock(excluded = true)
|
@OptimisticLock(excluded = true)
|
||||||
private byte[] myResource;
|
private byte[] myResource;
|
||||||
|
@Column(name = "RES_TEXT_VC", length = RES_TEXT_VC_MAX_LENGTH, nullable = true)
|
||||||
|
@OptimisticLock(excluded = true)
|
||||||
|
private String myResourceTextVc;
|
||||||
@Column(name = "RES_ENCODING", nullable = false, length = ENCODING_COL_LENGTH)
|
@Column(name = "RES_ENCODING", nullable = false, length = ENCODING_COL_LENGTH)
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
@OptimisticLock(excluded = true)
|
@OptimisticLock(excluded = true)
|
||||||
private ResourceEncodingEnum myEncoding;
|
private ResourceEncodingEnum myEncoding;
|
||||||
|
|
||||||
@OneToOne(mappedBy = "myResourceHistoryTable", cascade = {CascadeType.REMOVE})
|
@OneToOne(mappedBy = "myResourceHistoryTable", cascade = {CascadeType.REMOVE})
|
||||||
private ResourceHistoryProvenanceEntity myProvenance;
|
private ResourceHistoryProvenanceEntity myProvenance;
|
||||||
|
|
||||||
@ -108,6 +109,14 @@ public class ResourceHistoryTable extends BaseHasResource implements Serializabl
|
|||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getResourceTextVc() {
|
||||||
|
return myResourceTextVc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResourceTextVc(String theResourceTextVc) {
|
||||||
|
myResourceTextVc = theResourceTextVc;
|
||||||
|
}
|
||||||
|
|
||||||
public ResourceHistoryProvenanceEntity getProvenance() {
|
public ResourceHistoryProvenanceEntity getProvenance() {
|
||||||
return myProvenance;
|
return myProvenance;
|
||||||
}
|
}
|
||||||
|
@ -277,6 +277,14 @@ public class DaoConfig {
|
|||||||
* TODO mb test more with this true
|
* TODO mb test more with this true
|
||||||
*/
|
*/
|
||||||
private boolean myAdvancedLuceneIndexing = false;
|
private boolean myAdvancedLuceneIndexing = false;
|
||||||
|
/**
|
||||||
|
* If set to a positive number, any resources with a character length at or below the given number
|
||||||
|
* of characters will be stored inline in the <code>HFJ_RES_VER</code> table instead of using a
|
||||||
|
* separate LOB column.
|
||||||
|
*
|
||||||
|
* @since 7.0.0
|
||||||
|
*/
|
||||||
|
private int myInlineResourceTextBelowSize = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@ -300,6 +308,28 @@ public class DaoConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If set to a positive number, any resources with a character length at or below the given number
|
||||||
|
* of characters will be stored inline in the <code>HFJ_RES_VER</code> table instead of using a
|
||||||
|
* separate LOB column.
|
||||||
|
*
|
||||||
|
* @since 7.0.0
|
||||||
|
*/
|
||||||
|
public int getInlineResourceTextBelowSize() {
|
||||||
|
return myInlineResourceTextBelowSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If set to a positive number, any resources with a character length at or below the given number
|
||||||
|
* of characters will be stored inline in the <code>HFJ_RES_VER</code> table instead of using a
|
||||||
|
* separate LOB column.
|
||||||
|
*
|
||||||
|
* @since 7.0.0
|
||||||
|
*/
|
||||||
|
public void setInlineResourceTextBelowSize(int theInlineResourceTextBelowSize) {
|
||||||
|
myInlineResourceTextBelowSize = theInlineResourceTextBelowSize;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the tag storage mode for the server. Default is {@link TagStorageModeEnum#VERSIONED}.
|
* Sets the tag storage mode for the server. Default is {@link TagStorageModeEnum#VERSIONED}.
|
||||||
*
|
*
|
||||||
@ -2672,6 +2702,28 @@ public class DaoConfig {
|
|||||||
myElasicSearchIndexPrefix = thePrefix;
|
myElasicSearchIndexPrefix = thePrefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is lucene/hibernate indexing enabled beyond _contains or _text?
|
||||||
|
*
|
||||||
|
* @since 5.6.0
|
||||||
|
*/
|
||||||
|
public boolean isAdvancedLuceneIndexing() {
|
||||||
|
return myAdvancedLuceneIndexing;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable/disable lucene/hibernate indexing enabled beyond _contains or _text.
|
||||||
|
* <p>
|
||||||
|
* String, token, and reference parameters can be indexed in Lucene.
|
||||||
|
* This extends token search to support :text searches, as well as supporting
|
||||||
|
* :contains and :text on string parameters.
|
||||||
|
*
|
||||||
|
* @since 5.6.0
|
||||||
|
*/
|
||||||
|
public void setAdvancedLuceneIndexing(boolean theAdvancedLuceneIndexing) {
|
||||||
|
this.myAdvancedLuceneIndexing = theAdvancedLuceneIndexing;
|
||||||
|
}
|
||||||
|
|
||||||
public enum StoreMetaSourceInformationEnum {
|
public enum StoreMetaSourceInformationEnum {
|
||||||
NONE(false, false),
|
NONE(false, false),
|
||||||
SOURCE_URI(true, false),
|
SOURCE_URI(true, false),
|
||||||
@ -2695,28 +2747,6 @@ public class DaoConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Is lucene/hibernate indexing enabled beyond _contains or _text?
|
|
||||||
*
|
|
||||||
* @since 5.6.0
|
|
||||||
*/
|
|
||||||
public boolean isAdvancedLuceneIndexing() {
|
|
||||||
return myAdvancedLuceneIndexing;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Enable/disable lucene/hibernate indexing enabled beyond _contains or _text.
|
|
||||||
*
|
|
||||||
* String, token, and reference parameters can be indexed in Lucene.
|
|
||||||
* This extends token search to support :text searches, as well as supporting
|
|
||||||
* :contains and :text on string parameters.
|
|
||||||
*
|
|
||||||
* @since 5.6.0
|
|
||||||
*/
|
|
||||||
public void setAdvancedLuceneIndexing(boolean theAdvancedLuceneIndexing) {
|
|
||||||
this.myAdvancedLuceneIndexing = theAdvancedLuceneIndexing;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public enum IndexEnabledEnum {
|
public enum IndexEnabledEnum {
|
||||||
ENABLED,
|
ENABLED,
|
||||||
|
2
pom.xml
2
pom.xml
@ -766,7 +766,7 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|
||||||
<fhir_core_version>5.6.3</fhir_core_version>
|
<fhir_core_version>5.6.7</fhir_core_version>
|
||||||
<ucum_version>1.0.3</ucum_version>
|
<ucum_version>1.0.3</ucum_version>
|
||||||
|
|
||||||
<surefire_jvm_args>-Dfile.encoding=UTF-8 -Xmx2048m</surefire_jvm_args>
|
<surefire_jvm_args>-Dfile.encoding=UTF-8 -Xmx2048m</surefire_jvm_args>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user