Author: jolee
Date: 2013-05-20 09:27:41 -0400 (Mon, 20 May 2013)
New Revision: 4569
Modified:
branches/7.7.x/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java
branches/7.7.x/engine/src/main/java/org/teiid/common/buffer/impl/SizeUtility.java
Log:
TEIID-2361: The current MAX String size is 4000, add the ability to configure when larger
sizes are used
Modified:
branches/7.7.x/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java
===================================================================
---
branches/7.7.x/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java 2013-05-16
04:35:10 UTC (rev 4568)
+++
branches/7.7.x/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java 2013-05-20
13:27:41 UTC (rev 4569)
@@ -173,7 +173,7 @@
}
};
- public static final int MAX_STRING_LENGTH = 4000;
+ public static final int MAX_STRING_LENGTH =
PropertiesUtils.getIntProperty(System.getProperties(),
"org.teiid.maxStringLength", 4000); //$NON-NLS-1$
public static final int MAX_LOB_MEMORY_BYTES = Math.max(nextPowOf2(2*MAX_STRING_LENGTH),
1<<13);
public static int nextPowOf2(int val) {
Modified:
branches/7.7.x/engine/src/main/java/org/teiid/common/buffer/impl/SizeUtility.java
===================================================================
---
branches/7.7.x/engine/src/main/java/org/teiid/common/buffer/impl/SizeUtility.java 2013-05-16
04:35:10 UTC (rev 4568)
+++
branches/7.7.x/engine/src/main/java/org/teiid/common/buffer/impl/SizeUtility.java 2013-05-20
13:27:41 UTC (rev 4569)
@@ -47,7 +47,7 @@
private static Map<Class<?>, int[]> SIZE_ESTIMATES = new
HashMap<Class<?>, int[]>(128);
private static Set<Class<?>> VARIABLE_SIZE_TYPES = new
HashSet<Class<?>>();
static {
- SIZE_ESTIMATES.put(DataTypeManager.DefaultDataClasses.STRING, new int[] {100,
Math.max(100, DataTypeManager.nextPowOf2(DataTypeManager.MAX_STRING_LENGTH/16))});
+ SIZE_ESTIMATES.put(DataTypeManager.DefaultDataClasses.STRING, new int[] {100,
DataTypeManager.nextPowOf2(DataTypeManager.MAX_STRING_LENGTH/16)});
SIZE_ESTIMATES.put(DataTypeManager.DefaultDataClasses.DATE, new int[] {20, 28});
SIZE_ESTIMATES.put(DataTypeManager.DefaultDataClasses.TIME, new int[] {20, 28});
SIZE_ESTIMATES.put(DataTypeManager.DefaultDataClasses.TIMESTAMP, new int[] {20, 28});
Show replies by date