diff --git a/jboss-integration/src/main/java/org/teiid/jboss/Element.java b/jboss-integration/src/main/java/org/teiid/jboss/Element.java index 065a1e2677..dbc132d860 100644 --- a/jboss-integration/src/main/java/org/teiid/jboss/Element.java +++ b/jboss-integration/src/main/java/org/teiid/jboss/Element.java @@ -51,18 +51,31 @@ enum Element { PREPARSER_MODULE_ELEMENT("preparser-module", "preparser-module"), // buffer manager + @Deprecated BUFFER_SERVICE_ELEMENT("buffer-service"), + @Deprecated USE_DISK_ATTRIBUTE("use-disk", "buffer-service-use-disk"), + @Deprecated PROCESSOR_BATCH_SIZE_ATTRIBUTE("processor-batch-size", "buffer-service-processor-batch-size"), + @Deprecated MAX_PROCESSING_KB_ATTRIBUTE("max-processing-kb", "buffer-service-max-processing-kb"), + @Deprecated MAX_RESERVED_KB_ATTRIBUTE("max-reserve-kb", "buffer-service-max-reserve-kb"), + @Deprecated MAX_FILE_SIZE_ATTRIBUTE("max-file-size", "buffer-service-max-file-size"), + @Deprecated MAX_BUFFER_SPACE_ATTRIBUTE("max-buffer-space", "buffer-service-max-buffer-space"), + @Deprecated MAX_OPEN_FILES_ATTRIBUTE("max-open-files", "buffer-service-max-open-files"), + @Deprecated MEMORY_BUFFER_SPACE_ATTRIBUTE("memory-buffer-space", "buffer-service-memory-buffer-space"), + @Deprecated MEMORY_BUFFER_OFFHEAP_ATTRIBUTE("memory-buffer-off-heap", "buffer-service-memory-buffer-off-heap"), + @Deprecated MAX_STORAGE_OBJECT_SIZE_ATTRIBUTE("max-storage-object-size", "buffer-service-max-storage-object-size"), + @Deprecated INLINE_LOBS("inline-lobs", "buffer-service-inline-lobs"), + @Deprecated ENCRYPT_FILES_ATTRIBUTE("encrypt-files", "buffer-service-encrypt-files"), BUFFER_MANAGER_ELEMENT("buffer-manager"), diff --git a/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java b/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java index d416f4a854..046996e7ed 100644 --- a/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java +++ b/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java @@ -145,6 +145,20 @@ class TeiidAdd extends AbstractAddStepHandler { // object replicator TeiidConstants.DC_STACK_ATTRIBUTE, + + // Buffer Service + TeiidConstants.USE_DISK_ATTRIBUTE, + TeiidConstants.INLINE_LOBS, + TeiidConstants.PROCESSOR_BATCH_SIZE_ATTRIBUTE, + TeiidConstants.MAX_PROCESSING_KB_ATTRIBUTE, + TeiidConstants.MAX_RESERVED_KB_ATTRIBUTE, + TeiidConstants.MAX_FILE_SIZE_ATTRIBUTE, + TeiidConstants.MAX_BUFFER_SPACE_ATTRIBUTE, + TeiidConstants.MAX_OPEN_FILES_ATTRIBUTE, + TeiidConstants.MEMORY_BUFFER_SPACE_ATTRIBUTE, + TeiidConstants.MEMORY_BUFFER_OFFHEAP_ATTRIBUTE, + TeiidConstants.MAX_STORAGE_OBJECT_SIZE_ATTRIBUTE, + TeiidConstants.ENCRYPT_FILES_ATTRIBUTE, // Buffer Manager TeiidConstants.BUFFER_MANAGER_USE_DISK_ATTRIBUTE, @@ -698,39 +712,63 @@ private BufferManagerService buildBufferManager(final OperationContext context, if (isDefined(BUFFER_MANAGER_USE_DISK_ATTRIBUTE, node, context)) { bufferManger.setUseDisk(asBoolean(BUFFER_MANAGER_USE_DISK_ATTRIBUTE, node, context)); + } else if (isDefined(USE_DISK_ATTRIBUTE, node, context)) { + bufferManger.setUseDisk(asBoolean(USE_DISK_ATTRIBUTE, node, context)); } if (isDefined(BUFFER_MANAGER_PROCESSOR_BATCH_SIZE_ATTRIBUTE, node, context)) { bufferManger.setProcessorBatchSize(asInt(BUFFER_MANAGER_PROCESSOR_BATCH_SIZE_ATTRIBUTE, node, context)); + } else if (isDefined(PROCESSOR_BATCH_SIZE_ATTRIBUTE, node, context)) { + bufferManger.setProcessorBatchSize(asInt(PROCESSOR_BATCH_SIZE_ATTRIBUTE, node, context)); } if (isDefined(BUFFER_MANAGER_MAX_PROCESSING_KB_ATTRIBUTE, node, context)) { bufferManger.setMaxProcessingKb(asInt(BUFFER_MANAGER_MAX_PROCESSING_KB_ATTRIBUTE, node, context)); + } else if (isDefined(MAX_PROCESSING_KB_ATTRIBUTE, node, context)) { + bufferManger.setMaxProcessingKb(asInt(MAX_PROCESSING_KB_ATTRIBUTE, node, context)); } if (isDefined(BUFFER_MANAGER_MAX_RESERVED_MB_ATTRIBUTE, node, context)) { bufferManger.setMaxReservedHeapMb(asInt(BUFFER_MANAGER_MAX_RESERVED_MB_ATTRIBUTE, node, context)); + } else if (isDefined(MAX_RESERVED_KB_ATTRIBUTE, node, context)) { + bufferManger.setMaxReserveKb(asInt(MAX_RESERVED_KB_ATTRIBUTE, node, context)); } if (isDefined(BUFFER_MANAGER_MAX_FILE_SIZE_ATTRIBUTE, node, context)) { bufferManger.setMaxFileSize(asLong(BUFFER_MANAGER_MAX_FILE_SIZE_ATTRIBUTE, node, context)); + } else if (isDefined(MAX_FILE_SIZE_ATTRIBUTE, node, context)) { + bufferManger.setMaxFileSize(asLong(MAX_FILE_SIZE_ATTRIBUTE, node, context)); } if (isDefined(BUFFER_MANAGER_MAX_BUFFER_SPACE_ATTRIBUTE, node, context)) { bufferManger.setMaxDiskBufferSpaceMb(asLong(BUFFER_MANAGER_MAX_BUFFER_SPACE_ATTRIBUTE, node, context)); + } else if (isDefined(MAX_BUFFER_SPACE_ATTRIBUTE, node, context)) { + bufferManger.setMaxDiskBufferSpaceMb(asLong(MAX_BUFFER_SPACE_ATTRIBUTE, node, context)); } if (isDefined(BUFFER_MANAGER_MAX_OPEN_FILES_ATTRIBUTE, node, context)) { bufferManger.setMaxOpenFiles(asInt(BUFFER_MANAGER_MAX_OPEN_FILES_ATTRIBUTE, node, context)); + } else if (isDefined(MAX_OPEN_FILES_ATTRIBUTE, node, context)) { + bufferManger.setMaxOpenFiles(asInt(MAX_OPEN_FILES_ATTRIBUTE, node, context)); } if (isDefined(BUFFER_MANAGER_MEMORY_BUFFER_SPACE_ATTRIBUTE, node, context)) { bufferManger.setFixedMemoryBufferSpaceMb(asInt(BUFFER_MANAGER_MEMORY_BUFFER_SPACE_ATTRIBUTE, node, context)); + } else if (isDefined(MEMORY_BUFFER_SPACE_ATTRIBUTE, node, context)) { + bufferManger.setFixedMemoryBufferSpaceMb(asInt(MEMORY_BUFFER_SPACE_ATTRIBUTE, node, context)); } if (isDefined(BUFFER_MANAGER_MEMORY_BUFFER_OFFHEAP_ATTRIBUTE, node, context)) { bufferManger.setFixedMemoryBufferOffHeap(asBoolean(BUFFER_MANAGER_MEMORY_BUFFER_OFFHEAP_ATTRIBUTE, node, context)); + } else if (isDefined(MEMORY_BUFFER_OFFHEAP_ATTRIBUTE, node, context)) { + bufferManger.setFixedMemoryBufferOffHeap(asBoolean(MEMORY_BUFFER_OFFHEAP_ATTRIBUTE, node, context)); } if (isDefined(BUFFER_MANAGER_MAX_STORAGE_OBJECT_SIZE_ATTRIBUTE, node, context)) { bufferManger.setMaxStorageObjectSizeKb(asInt(BUFFER_MANAGER_MAX_STORAGE_OBJECT_SIZE_ATTRIBUTE, node, context)); + } else if (isDefined(MAX_STORAGE_OBJECT_SIZE_ATTRIBUTE, node, context)) { + bufferManger.setMaxStorageObjectSize(asInt(MAX_STORAGE_OBJECT_SIZE_ATTRIBUTE, node, context)); } if (isDefined(BUFFER_MANAGER_INLINE_LOBS, node, context)) { bufferManger.setInlineLobs(asBoolean(BUFFER_MANAGER_INLINE_LOBS, node, context)); + } else if (isDefined(INLINE_LOBS, node, context)) { + bufferManger.setInlineLobs(asBoolean(INLINE_LOBS, node, context)); } if (isDefined(BUFFER_MANAGER_ENCRYPT_FILES_ATTRIBUTE, node, context)) { bufferManger.setEncryptFiles(asBoolean(BUFFER_MANAGER_ENCRYPT_FILES_ATTRIBUTE, node, context)); + } else if (isDefined(ENCRYPT_FILES_ATTRIBUTE, node, context)) { + bufferManger.setEncryptFiles(asBoolean(ENCRYPT_FILES_ATTRIBUTE, node, context)); } return bufferManger; } diff --git a/jboss-integration/src/main/java/org/teiid/jboss/TeiidConstants.java b/jboss-integration/src/main/java/org/teiid/jboss/TeiidConstants.java index bcdd626008..49150e6abf 100644 --- a/jboss-integration/src/main/java/org/teiid/jboss/TeiidConstants.java +++ b/jboss-integration/src/main/java/org/teiid/jboss/TeiidConstants.java @@ -17,6 +17,7 @@ */ package org.teiid.jboss; +import org.jboss.as.controller.ModelVersion; import org.jboss.as.controller.OperationContext; import org.jboss.as.controller.OperationFailedException; import org.jboss.as.controller.SimpleAttributeDefinition; @@ -32,6 +33,8 @@ @SuppressWarnings("nls") public class TeiidConstants { + private static final ModelVersion BUFFER_SERVICE_VERSION = ModelVersion.create(1, 2); + // Non persistent attributes public static SimpleAttributeDefinition ACTIVE_SESSION_COUNT = new SimpleAttributeDefinitionBuilder("active-session-count", ModelType.INT) .setXmlName("active-session-count") @@ -176,6 +179,111 @@ public class TeiidConstants { .setAllowExpression(false) .build(); + /* + * Deprecated buffer-service attributes + */ + @Deprecated + public static SimpleAttributeDefinition USE_DISK_ATTRIBUTE = new SimpleAttributeDefinitionBuilder(Element.USE_DISK_ATTRIBUTE.getModelName(), ModelType.BOOLEAN) + .setXmlName(Element.BUFFER_MANAGER_USE_DISK_ATTRIBUTE.getXMLName()) + .setRequired(false) + .setAllowExpression(false) + .setDeprecated(BUFFER_SERVICE_VERSION) + .build(); + + @Deprecated + public static SimpleAttributeDefinition PROCESSOR_BATCH_SIZE_ATTRIBUTE = new SimpleAttributeDefinitionBuilder(Element.PROCESSOR_BATCH_SIZE_ATTRIBUTE.getModelName(), ModelType.INT) + .setXmlName(Element.BUFFER_MANAGER_PROCESSOR_BATCH_SIZE_ATTRIBUTE.getXMLName()) + .setRequired(false) + .setAllowExpression(false) + .setDeprecated(BUFFER_SERVICE_VERSION) + .build(); + + @Deprecated + public static SimpleAttributeDefinition MAX_PROCESSING_KB_ATTRIBUTE = new SimpleAttributeDefinitionBuilder(Element.MAX_PROCESSING_KB_ATTRIBUTE.getModelName(), ModelType.INT) + .setXmlName(Element.BUFFER_MANAGER_MAX_PROCESSING_KB_ATTRIBUTE.getXMLName()) + .setRequired(false) + .setAllowExpression(false) + .setMeasurementUnit(MeasurementUnit.KILOBYTES) + .setDeprecated(BUFFER_SERVICE_VERSION) + .build(); + + @Deprecated + public static SimpleAttributeDefinition MAX_RESERVED_KB_ATTRIBUTE = new SimpleAttributeDefinitionBuilder(Element.MAX_RESERVED_KB_ATTRIBUTE.getModelName(), ModelType.INT) + .setXmlName(Element.BUFFER_MANAGER_MAX_RESERVED_MB_ATTRIBUTE.getXMLName()) + .setRequired(false) + .setAllowExpression(false) + .setMeasurementUnit(MeasurementUnit.KILOBYTES) + .setDeprecated(BUFFER_SERVICE_VERSION) + .build(); + + @Deprecated + public static SimpleAttributeDefinition MAX_FILE_SIZE_ATTRIBUTE = new SimpleAttributeDefinitionBuilder(Element.MAX_FILE_SIZE_ATTRIBUTE.getModelName(), ModelType.LONG) + .setXmlName(Element.BUFFER_MANAGER_MAX_FILE_SIZE_ATTRIBUTE.getXMLName()) + .setRequired(false) + .setAllowExpression(false) + .setDeprecated(BUFFER_SERVICE_VERSION) + .build(); + + @Deprecated + public static SimpleAttributeDefinition MAX_BUFFER_SPACE_ATTRIBUTE = new SimpleAttributeDefinitionBuilder(Element.MAX_BUFFER_SPACE_ATTRIBUTE.getModelName(), ModelType.LONG) + .setXmlName(Element.BUFFER_MANAGER_MAX_BUFFER_SPACE_ATTRIBUTE.getXMLName()) + .setRequired(false) + .setAllowExpression(false) + .setMeasurementUnit(MeasurementUnit.MEGABYTES) + .setDeprecated(BUFFER_SERVICE_VERSION) + .build(); + + @Deprecated + public static SimpleAttributeDefinition MAX_OPEN_FILES_ATTRIBUTE = new SimpleAttributeDefinitionBuilder(Element.MAX_OPEN_FILES_ATTRIBUTE.getModelName(), ModelType.INT) + .setXmlName(Element.BUFFER_MANAGER_MAX_OPEN_FILES_ATTRIBUTE.getXMLName()) + .setRequired(false) + .setAllowExpression(false) + .setDeprecated(BUFFER_SERVICE_VERSION) + .build(); + + @Deprecated + public static SimpleAttributeDefinition MEMORY_BUFFER_SPACE_ATTRIBUTE = new SimpleAttributeDefinitionBuilder(Element.MEMORY_BUFFER_SPACE_ATTRIBUTE.getModelName(), ModelType.INT) + .setXmlName(Element.BUFFER_MANAGER_MEMORY_BUFFER_SPACE_ATTRIBUTE.getXMLName()) + .setRequired(false) + .setAllowExpression(false) + .setMeasurementUnit(MeasurementUnit.MEGABYTES) + .setDeprecated(BUFFER_SERVICE_VERSION) + .build(); + + @Deprecated + public static SimpleAttributeDefinition MEMORY_BUFFER_OFFHEAP_ATTRIBUTE = new SimpleAttributeDefinitionBuilder(Element.MEMORY_BUFFER_OFFHEAP_ATTRIBUTE.getModelName(), ModelType.BOOLEAN) + .setXmlName(Element.BUFFER_MANAGER_MEMORY_BUFFER_OFFHEAP_ATTRIBUTE.getXMLName()) + .setRequired(false) + .setAllowExpression(false) + .setDefaultValue(new ModelNode(false)) + .setDeprecated(BUFFER_SERVICE_VERSION) + .build(); + + @Deprecated + public static SimpleAttributeDefinition MAX_STORAGE_OBJECT_SIZE_ATTRIBUTE = new SimpleAttributeDefinitionBuilder(Element.MAX_STORAGE_OBJECT_SIZE_ATTRIBUTE.getModelName(), ModelType.INT) + .setXmlName(Element.BUFFER_MANAGER_MAX_STORAGE_OBJECT_SIZE_ATTRIBUTE.getXMLName()) + .setRequired(false) + .setAllowExpression(false) + .setMeasurementUnit(MeasurementUnit.BYTES) + .setDeprecated(BUFFER_SERVICE_VERSION) + .build(); + + @Deprecated + public static SimpleAttributeDefinition INLINE_LOBS = new SimpleAttributeDefinitionBuilder(Element.INLINE_LOBS.getModelName(), ModelType.BOOLEAN) + .setXmlName(Element.BUFFER_MANAGER_INLINE_LOBS.getXMLName()) + .setRequired(false) + .setAllowExpression(false) + .setDeprecated(BUFFER_SERVICE_VERSION) + .build(); + + @Deprecated + public static SimpleAttributeDefinition ENCRYPT_FILES_ATTRIBUTE = new SimpleAttributeDefinitionBuilder(Element.ENCRYPT_FILES_ATTRIBUTE.getModelName(), ModelType.BOOLEAN) + .setXmlName(Element.BUFFER_MANAGER_ENCRYPT_FILES_ATTRIBUTE.getXMLName()) + .setRequired(false) + .setAllowExpression(false) + .setDeprecated(BUFFER_SERVICE_VERSION) + .build(); + // buffer manager public static SimpleAttributeDefinition BUFFER_MANAGER_USE_DISK_ATTRIBUTE = new SimpleAttributeDefinitionBuilder(Element.BUFFER_MANAGER_USE_DISK_ATTRIBUTE.getModelName(), ModelType.BOOLEAN) .setXmlName(Element.BUFFER_MANAGER_USE_DISK_ATTRIBUTE.getXMLName()) diff --git a/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java b/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java index bdee028b6c..5a682f829d 100644 --- a/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java +++ b/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java @@ -40,6 +40,8 @@ import org.jboss.as.controller.OperationFailedException; import org.jboss.as.controller.PathAddress; import org.jboss.as.controller.SimpleOperationDefinitionBuilder; +import org.jboss.as.controller.descriptions.ModelDescriptionConstants; +import org.jboss.as.controller.operations.common.Util; import org.jboss.as.server.deployment.DeploymentUnit; import org.jboss.dmr.ModelNode; import org.jboss.dmr.ModelType; @@ -276,6 +278,37 @@ class AttributeWrite extends AbstractWriteAttributeHandler { public AttributeWrite(AttributeDefinition... attr) { super(attr); } + + @Override + public void execute(OperationContext context, ModelNode operation) + throws OperationFailedException { + final String attributeName = operation.require(NAME).asString(); + System.out.println(attributeName); + if (attributeName.startsWith("buffer-service")) { //$NON-NLS-1$ + final AttributeDefinition attributeDefinition = getAttributeDefinition(attributeName); + String newAttribute = "buffer-manager-" + attributeDefinition.getXmlName(); //$NON-NLS-1$ + boolean defined = operation.hasDefined(VALUE); + ModelNode newValue = defined ? operation.get(VALUE) : new ModelNode(); + + if (defined && + (newAttribute.equals(Element.BUFFER_MANAGER_MAX_STORAGE_OBJECT_SIZE_ATTRIBUTE.getModelName()) + || newAttribute.equals(Element.BUFFER_MANAGER_MAX_RESERVED_MB_ATTRIBUTE.getModelName()))) { + int value = newValue.asInt(); + if (value > 0) { + value = value/1024; + } + newValue = new ModelNode(value); + } + + PathAddress currentAddress = context.getCurrentAddress(); + operation = Util.createOperation(ModelDescriptionConstants.WRITE_ATTRIBUTE_OPERATION, currentAddress); + operation.get(ModelDescriptionConstants.NAME).set(newAttribute); + operation.get(ModelDescriptionConstants.VALUE).set(newValue); + super.execute(context, operation); + return; + } + super.execute(context, operation); + } @Override protected boolean applyUpdateToRuntime(OperationContext context,ModelNode operation,String attributeName,ModelNode resolvedValue, diff --git a/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java b/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java index cbaff58e1b..2cd5f93c59 100644 --- a/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java +++ b/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java @@ -28,6 +28,7 @@ import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; +import org.jboss.as.controller.SimpleAttributeDefinition; import org.jboss.as.controller.parsing.ParseUtils; import org.jboss.as.controller.persistence.SubsystemMarshallingContext; import org.jboss.dmr.ModelNode; @@ -55,7 +56,7 @@ public void writeContent(final XMLExtendedStreamWriter writer, final SubsystemMa writer.writeEndElement(); } - if (like(node, Element.BUFFER_MANAGER_ELEMENT)){ + if (like(node, Element.BUFFER_MANAGER_ELEMENT) || like(node, Element.BUFFER_SERVICE_ELEMENT)){ writer.writeStartElement(Element.BUFFER_MANAGER_ELEMENT.getLocalName()); writeBufferManager(writer, node); writer.writeEndElement(); @@ -196,6 +197,21 @@ private void writeTransportConfiguration( XMLExtendedStreamWriter writer, ModelN } private void writeBufferManager(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException { + //if using a cli add, we end up here - the xml name has already been changed + USE_DISK_ATTRIBUTE.marshallAsAttribute(node, false, writer); + INLINE_LOBS.marshallAsAttribute(node, false, writer); + PROCESSOR_BATCH_SIZE_ATTRIBUTE.marshallAsAttribute(node, false, writer); + MAX_PROCESSING_KB_ATTRIBUTE.marshallAsAttribute(node, false, writer); + MAX_FILE_SIZE_ATTRIBUTE.marshallAsAttribute(node, false, writer); + MAX_BUFFER_SPACE_ATTRIBUTE.marshallAsAttribute(node, false, writer); + MAX_OPEN_FILES_ATTRIBUTE.marshallAsAttribute(node, false, writer); + MEMORY_BUFFER_SPACE_ATTRIBUTE.marshallAsAttribute(node, false, writer); + MEMORY_BUFFER_OFFHEAP_ATTRIBUTE.marshallAsAttribute(node, false, writer); + ENCRYPT_FILES_ATTRIBUTE.marshallAsAttribute(node, false, writer); + //values need adjusted + writeAdjustedValue(writer, node, MAX_RESERVED_KB_ATTRIBUTE); + writeAdjustedValue(writer, node, MAX_STORAGE_OBJECT_SIZE_ATTRIBUTE); + BUFFER_MANAGER_USE_DISK_ATTRIBUTE.marshallAsAttribute(node, false, writer); BUFFER_MANAGER_INLINE_LOBS.marshallAsAttribute(node, false, writer); BUFFER_MANAGER_PROCESSOR_BATCH_SIZE_ATTRIBUTE.marshallAsAttribute(node, false, writer); @@ -210,6 +226,18 @@ private void writeBufferManager(XMLExtendedStreamWriter writer, ModelNode node) BUFFER_MANAGER_ENCRYPT_FILES_ATTRIBUTE.marshallAsAttribute(node, false, writer); } + private void writeAdjustedValue(XMLExtendedStreamWriter writer, + ModelNode node, SimpleAttributeDefinition element) throws XMLStreamException { + String name = element.getName(); + if (node.hasDefined(name)) { + int value = node.get(name).asInt(); + if (value > 0) { + value = value/1024; + } + writer.writeAttribute(element.getXmlName(), String.valueOf(value)); + } + } + private void writeResultsetCacheConfiguration(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException { RSC_NAME_ATTRIBUTE.marshallAsAttribute(node, false, writer); RSC_CONTAINER_NAME_ATTRIBUTE.marshallAsAttribute(node, false, writer); diff --git a/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties b/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties index 2278e951af..c93e911c97 100644 --- a/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties +++ b/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties @@ -122,6 +122,19 @@ teiid.buffer-service-max-storage-object-size=The maximum size of a buffer manage teiid.buffer-service-inline-lobs=Set to true to allow inlining of memory based and small lobs into results. However inline lob values are not supported by pre-7.6 clients, so disable this property if using older clients utilizing lobs. (default true) teiid.buffer-service-encrypt-files=Set to true to encrypt temporary data files with 128-bit AES. (default false) +teiid.buffer-service-use-disk.deprecated=Use buffer-manager-storage-enabled instead +teiid.buffer-service-processor-batch-size.deprecated=Use buffer-manager-processor-batch-size instead +teiid.buffer-service-max-file-size.deprecated=Use buffer-manager-disk-max-file-size-mb instead +teiid.buffer-service-max-buffer-space.deprecated=Use buffer-manager-disk-max-space-mb instead +teiid.buffer-service-max-open-files.deprecated=Use buffer-manager-disk-max-open-files instead +teiid.buffer-service-max-processing-kb.deprecated=Use buffer-manager-heap-max-processing-kb instead +teiid.buffer-service-max-reserve-kb.deprecated=Use buffer-manager-heap-max-reserve-mb instead - note the unit change from kilobytes to megabytes +teiid.buffer-service-memory-buffer-space.deprecated=Use buffer-manager-fixed-memory-space-mb instead +teiid.buffer-service-memory-buffer-off-heap.deprecated=Use buffer-manager-fixed-memory-off-heap instead +teiid.buffer-service-max-storage-object-size.deprecated=Use buffer-manager-storage-max-object-size-kb instead - note the units changed from bytes to kilobytes +teiid.buffer-service-inline-lobs.deprecated=Use buffer-manager-inline-lobs instead +teiid.buffer-service-encrypt-files.deprecated=Use buffer-manager-disk-encrypt-files instead + teiid.buffer-manager-processor-batch-size=The nominal row count of a batch sent internally within the query processor. The actual batch size used will depend upon the data width as well. (default 256) teiid.buffer-manager-inline-lobs=Set to true to allow inlining of memory based and small lobs into results. However inline lob values are not supported by pre-7.6 clients, so disable this property if using older clients utilizing lobs. (default true) teiid.buffer-manager-storage-enabled=Use storage (disk and fixed memory) for buffer management diff --git a/runtime/src/main/java/org/teiid/runtime/EmbeddedConfiguration.java b/runtime/src/main/java/org/teiid/runtime/EmbeddedConfiguration.java index ebbabc22af..3c2fc2d09c 100644 --- a/runtime/src/main/java/org/teiid/runtime/EmbeddedConfiguration.java +++ b/runtime/src/main/java/org/teiid/runtime/EmbeddedConfiguration.java @@ -24,8 +24,8 @@ import javax.transaction.TransactionManager; +import org.infinispan.commons.tx.lookup.TransactionManagerLookup; import org.infinispan.manager.DefaultCacheManager; -import org.infinispan.transaction.lookup.TransactionManagerLookup; import org.teiid.cache.CacheFactory; import org.teiid.cache.infinispan.InfinispanCacheFactory; import org.teiid.core.TeiidRuntimeException; @@ -55,33 +55,25 @@ public class EmbeddedConfiguration extends DQPConfiguration { private boolean allowEnvFunction; - private int processorBatchSize ; - private int maxReserveKb ; - private int maxProcessingKb ; + //buffer manager properties + private int processorBatchSize = -1 ; + private int maxReserveKb = -1; + private int maxProcessingKb = -1; private boolean inlineLobs = true; - private int maxOpenFiles ; - - private long maxBufferSpace ; - private long maxFileSize ; + private int maxOpenFiles = -1; + private long maxBufferSpace = -1; + private long maxFileSize = -1; private boolean encryptFiles = false; - private int maxStorageObjectSize ; + private int maxStorageObjectSize = -1; private boolean memoryBufferOffHeap = false; - private int memoryBufferSpace ; + private int memoryBufferSpace = -1; + private String nodeName; private DefaultCacheManager cacheManager; private AuthenticationType authenticationType; public EmbeddedConfiguration() { - processorBatchSize = -1; - maxReserveKb = -1; - maxProcessingKb = -1; - maxOpenFiles = -1; - maxBufferSpace = -1; - maxFileSize = -1; - maxStorageObjectSize = -1; - memoryBufferSpace = -1; - DefaultAuthorizationValidator authorizationValidator = new DefaultAuthorizationValidator(); authorizationValidator.setPolicyDecider(new DataRolePolicyDecider()); this.setAuthorizationValidator(authorizationValidator); @@ -233,26 +225,32 @@ public void setMaxReserveKb(int maxReserveKb) { this.maxReserveKb = maxReserveKb; } + @Deprecated public int getMaxProcessingKb() { return maxProcessingKb; } + @Deprecated public void setMaxProcessingKb(int maxProcessingKb) { this.maxProcessingKb = maxProcessingKb; } + @Deprecated public boolean isInlineLobs() { return inlineLobs; } + @Deprecated public void setInlineLobs(boolean inlineLobs) { this.inlineLobs = inlineLobs; } + @Deprecated public int getMaxOpenFiles() { return maxOpenFiles; } + @Deprecated public void setMaxOpenFiles(int maxOpenFiles) { this.maxOpenFiles = maxOpenFiles; } @@ -267,18 +265,22 @@ public void setMaxBufferSpace(long maxBufferSpace) { this.maxBufferSpace = maxBufferSpace; } + @Deprecated public long getMaxFileSize() { return maxFileSize; } + @Deprecated public void setMaxFileSize(long maxFileSize) { this.maxFileSize = maxFileSize; } + @Deprecated public boolean isEncryptFiles() { return encryptFiles; } + @Deprecated public void setEncryptFiles(boolean encryptFiles) { this.encryptFiles = encryptFiles; } diff --git a/teiid-feature-pack/wildfly-integration-feature-pack/teiid-releasenotes.html b/teiid-feature-pack/wildfly-integration-feature-pack/teiid-releasenotes.html index 65355d875a..5886bcbba9 100644 --- a/teiid-feature-pack/wildfly-integration-feature-pack/teiid-releasenotes.html +++ b/teiid-feature-pack/wildfly-integration-feature-pack/teiid-releasenotes.html @@ -27,7 +27,7 @@

Highlights

  • TEIID-5351 Updated to the WildFly 14.0.1 server.
  • TEIID-5524 JMX support for Teiid standalone (Thorntail, Spring Boot, embedded)
  • TEIID-4498 Additional subquery optimization to prevent per-row evaluation.
  • -
  • TEIID-5563 Refactoring to remove JEE dependencies from core Teiid.
  • +
  • TEIID-5563 Refactoring to remove JEE dependencies from core Teiid - please consult the migration guide if you are doing custom Teiid development.
  • Compatibility Issues

    @@ -213,11 +213,12 @@

    from 8.x

    Configuration Issues

    -See the Admin Guide for more on configuration and installation. +See the Admin Guide for more on configuration and installation.

    from 11.2

    from 10.3