Author: shawkins
Date: 2010-03-09 17:36:00 -0500 (Tue, 09 Mar 2010)
New Revision: 1953
Removed:
trunk/client/src/main/java/com/metamatrix/admin/objects/
trunk/client/src/main/java/com/metamatrix/dqp/embedded/
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/
trunk/engine/src/main/java/com/metamatrix/dqp/util/
trunk/engine/src/main/java/com/metamatrix/platform/security/
trunk/engine/src/main/java/com/metamatrix/query/util/LogConstants.java
trunk/engine/src/main/java/com/metamatrix/server/
trunk/runtime/src/main/java/com/metamatrix/platform/
trunk/runtime/src/test/java/com/metamatrix/dqp/embedded/
Modified:
branches/JCA/engine/src/main/java/com/metamatrix/common/buffer/TupleBuffer.java
trunk/build/kit-jboss-container/deploy/teiid/teiid-jboss-beans.xml
trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestEmbeddedProfile.java
trunk/documentation/server-extensions-guide/src/main/docbook/en-US/content/logging.xml
trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/BufferManagerImpl.java
trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/FileStorageManager.java
trunk/engine/src/main/java/com/metamatrix/common/queue/StatsCapturingWorkManager.java
trunk/engine/src/main/java/com/metamatrix/common/util/LogConstants.java
trunk/engine/src/main/java/com/metamatrix/query/function/FunctionTree.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/RelationalPlanner.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/NewCalculateCostUtil.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleChooseDependent.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleCopyCriteria.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/xml/XMLPlanner.java
trunk/engine/src/main/java/com/metamatrix/query/processor/QueryProcessor.java
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/AssignmentInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ErrorInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ExecDynamicSqlInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/IfInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ProcedurePlan.java
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/PlanExecutionNode.java
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalNode.java
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalPlan.java
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SortUtility.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AbortProcessingInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AddCommentInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AddNodeInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/EndBlockInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/EndDocumentInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/ExecSqlInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/ExecStagingTableInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/IfInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/InitializeDocumentInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/MoveCursorInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/MoveDocInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/RelationalPlanExecutor.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/SAXDocumentInProgress.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/WhileInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLPlan.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLProcessorEnvironment.java
trunk/engine/src/main/java/com/metamatrix/query/resolver/QueryResolver.java
trunk/engine/src/main/java/com/metamatrix/query/resolver/command/UpdateProcedureResolver.java
trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorWorkItem.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/SynchConnectorWorkItem.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/language/LanguageBridgeFactory.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/AbstractWorkItem.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/CodeTableCache.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/LobWorkItem.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/TestConnectorWorkItem.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedPlugin.java
trunk/runtime/src/main/java/org/teiid/logging/Log4JUtil.java
trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java
trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java
trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java
trunk/runtime/src/main/java/org/teiid/services/TeiidLoginContext.java
trunk/runtime/src/main/java/org/teiid/transport/LogonImpl.java
Log:
TEIID-1012 consolidating logging contexts and constants classes and updating the
documentation to include information from the wiki.
Modified: branches/JCA/engine/src/main/java/com/metamatrix/common/buffer/TupleBuffer.java
===================================================================
---
branches/JCA/engine/src/main/java/com/metamatrix/common/buffer/TupleBuffer.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
branches/JCA/engine/src/main/java/com/metamatrix/common/buffer/TupleBuffer.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -22,7 +22,6 @@
package com.metamatrix.common.buffer;
-import java.lang.ref.SoftReference;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -39,7 +38,6 @@
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.core.util.Assertion;
import com.metamatrix.dqp.DQPPlugin;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.sql.symbol.Expression;
public class TupleBuffer {
@@ -312,8 +310,8 @@
public void remove() {
if (!removed) {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR,
MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Removing
TupleBuffer:", this.tupleSourceID); //$NON-NLS-1$
+ if
(LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR,
MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR,
"Removing TupleBuffer:", this.tupleSourceID); //$NON-NLS-1$
}
this.batchBuffer = null;
purge();
Modified: trunk/build/kit-jboss-container/deploy/teiid/teiid-jboss-beans.xml
===================================================================
--- trunk/build/kit-jboss-container/deploy/teiid/teiid-jboss-beans.xml 2010-03-09 20:21:26
UTC (rev 1952)
+++ trunk/build/kit-jboss-container/deploy/teiid/teiid-jboss-beans.xml 2010-03-09 22:36:00
UTC (rev 1953)
@@ -61,7 +61,9 @@
-->
<property
name="maxProcessingBatchesColumns">128</property>
<!-- Max File size in MB (default 2GB)-->
- <property name="maxFileSize">2048</property>
+ <property name="maxFileSize">2048</property>
+ <!-- Max open buffer files (default 64) -->
+ <property name="maxOpenFiles">64</property>
</bean>
<bean name="RuntimeEngineDeployer"
class="org.teiid.jboss.deployers.RuntimeEngineDeployer">
Modified: trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestEmbeddedProfile.java
===================================================================
--- trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestEmbeddedProfile.java 2010-03-09
20:21:26 UTC (rev 1952)
+++ trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestEmbeddedProfile.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -21,10 +21,7 @@
*/
package org.teiid.jdbc;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
import java.sql.DriverManager;
import java.sql.SQLException;
@@ -32,7 +29,6 @@
import org.junit.Test;
-import com.metamatrix.dqp.embedded.DQPEmbeddedProperties;
import com.metamatrix.jdbc.BaseDataSource;
import com.metamatrix.jdbc.api.ExecutionProperties;
Modified:
trunk/documentation/server-extensions-guide/src/main/docbook/en-US/content/logging.xml
===================================================================
---
trunk/documentation/server-extensions-guide/src/main/docbook/en-US/content/logging.xml 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/documentation/server-extensions-guide/src/main/docbook/en-US/content/logging.xml 2010-03-09
22:36:00 UTC (rev 1953)
@@ -12,11 +12,159 @@
control logging level, contexts, and log locations, you should be
familiar with
<ulink
url="http://logging.apache.org/log4j/">log4j</ulink>
- and the container's jboss-log4j.xml configuration file. All the logs
- produced by Teiid are prefixed by org.teiid. This makes it extremely
- easy to control of of Teiid logging from a single context.
+ and the container's jboss-log4j.xml configuration file.
</para>
+ <para>
+ All the logs
+ produced by Teiid are prefixed by org.teiid. This
+ makes it extremely
+ easy to control of of Teiid logging from a single
+ context. Note however that changes to the log configuration file
+ require a restart to take affect.
+ </para>
<sect2>
+ <title>Logging Contexts</title>
+ <para>While all of Teiid's logs are prefixed with org.teiid, there
+ are more specific contexts depending on the functional area of the
+ system. Note that logs originating from third-party code, including
+ integrated org.jboss components, will be logged through their
+ respective contexts. See the table below for information on contexts
+ relevant to Teiid. See the container's jboss-log4j.xml for a more
+ complete listing of logging contexts used in the container.</para>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>Context</para>
+ </entry>
+ <entry>
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>com.arjuna</para>
+ </entry>
+ <entry>
+ <para>Third-party transaction manager. This will include
+ information about all transactions, not just those for Teiid.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid</para>
+ </entry>
+ <entry>
+ <para>Root context for all Teiid logs. Note: there are
+ potentially other contexts used under org.teiid than are shown
+ in this table.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.PROCESSOR</para>
+ </entry>
+ <entry>
+ <para>Query processing logs. See also org.teiid.PLANNER for
+ query planning logs.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.PLANNER</para>
+ </entry>
+ <entry>
+ <para>Query planning logs.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.SESSION</para>
+ </entry>
+ <entry>
+ <para>Session events logs.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.MEMBERSHIP</para>
+ </entry>
+ <entry>
+ <para>Authentication and group event logs.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.SERVER</para>
+ </entry>
+ <entry>
+ <para>Events related to socket transports, pooling, threading,
+ etc.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.CONNECTOR</para>
+ </entry>
+ <entry>
+ <para>Connector logs.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.BUFFER_MGR</para>
+ </entry>
+ <entry>
+ <para>Buffer and storage management logs.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.TXN_LOG</para>
+ </entry>
+ <entry>
+ <para>Detail log of all transaction operations.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.COMMAND_LOG</para>
+ </entry>
+ <entry>
+ <para>
+ See
+ <link linkend="command_logigng">command logging</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.AUDIT_LOG</para>
+ </entry>
+ <entry>
+ <para>
+ See
+ <link linkend="audit_logigng">audit logging</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.ADMIN_API</para>
+ </entry>
+ <entry>
+ <para>Admin API logs.</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </sect2>
+ <sect2>
<title>Command Logging API</title>
<para>
If the default log4j logging mechanisms are not sufficient for your
@@ -31,7 +179,7 @@
</para>
</sect2>
</sect1>
- <sect1>
+ <sect1 id="command_logging">
<title>Command Logging</title>
<para>Command logging captures executing commands in the
Teiid System.
@@ -45,10 +193,29 @@
<para>To enable command logging to the default log location, simply
enable the DETAIL level of logging for the org.teiid.COMMAND_LOG
context.</para>
- <para>To enable command logging to an alternative file location,
- configure a separate file appender for the DETAIL logging of the
- org.teiid.COMMAND_LOG context. An example of this is already in
- the log4j.xml distributed with Teiid.</para>
+ <para>
+ To enable command logging to an alternative file location,
+ configure a
+ separate file appender for the DETAIL logging of the
+ org.teiid.COMMAND_LOG context. An example of this is shown below and
+ can also be found in the jboss-log4j.xml distributed with Teiid.
+ <programlisting><![CDATA[
+ <appender name="COMMAND"
class="org.apache.log4j.RollingFileAppender">
+ <param name="File" value="log/command.log"/>
+ <param name="MaxFileSize" value="1000KB"/>
+ <param name="MaxBackupIndex" value="25"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %p [%t] %c -
%m%n"/>
+ </layout>
+ </appender>
+
+ <category name="org.teiid.COMMAND_LOG">
+ <priority value="INFO"/>
+ <appender-ref ref="COMMAND"/>
+ </category>
+ ]]>
+ </programlisting>
+ </para>
<sect2>
<title>Command Logging API</title>
<para>
@@ -59,7 +226,8 @@
custom appender will have access to log4j LoggingEvents to the
COMMAND_LOG context, which have a
message that is an instance of
- org.teiid.logging.api.CommandLogMessage (defined in the
teiid-connector-api-&versionNumber;.jar).
+ org.teiid.logging.api.CommandLogMessage defined in the
+ teiid-connector-api-&versionNumber;.jar.
</para>
<para>
See
@@ -68,7 +236,7 @@
</para>
</sect2>
</sect1>
- <sect1>
+ <sect1 id="audit_logging">
<title>Audit Logging</title>
<para>Audit logging captures important security events. This includes
the enforcement of permissions, authentication success/failures, etc.
@@ -88,11 +256,16 @@
your
audit logging needs, you may need a custom log4j appender.
The
- custom appender will have access to log4j LoggingEvents to the
- AUDIT_LOG context, which have a
+ custom
+ appender will have access to log4j LoggingEvents to the
+ AUDIT_LOG
+ context, which have a
message that is an instance of
- org.teiid.logging.api.AuditMessage (defined in the
teiid-connector-api-&versionNumber;.jar). AuditMessages include
- information about user, the action, and the target(s) of the action.
+ org.teiid.logging.api.AuditMessage defined in the
+ teiid-connector-api-&versionNumber;.jar.
+ AuditMessages include
+ information about user, the action, and the
+ target(s) of the action.
</para>
<para>
See
Modified:
trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/BufferManagerImpl.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/BufferManagerImpl.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/BufferManagerImpl.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -61,7 +61,6 @@
import com.metamatrix.core.MetaMatrixRuntimeException;
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.core.util.Assertion;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.execution.QueryExecPlugin;
import com.metamatrix.query.processor.xml.XMLUtil;
@@ -113,7 +112,7 @@
private int columnCount;
public ManagedBatchImpl(String id, FileStore store, TupleBatch batch) {
- LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Add batch to
BufferManager", batchAdded.incrementAndGet()); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR,
"Add batch to BufferManager", batchAdded.incrementAndGet()); //$NON-NLS-1$
this.id = id;
this.store = store;
this.activeBatch = batch;
@@ -150,7 +149,7 @@
@Override
public TupleBatch getBatch(boolean cache, String[] types) throws
MetaMatrixComponentException {
- LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Reading batch from disk",
readAttempts.incrementAndGet(), "reference hits", referenceHit.get());
//$NON-NLS-1$ //$NON-NLS-2$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR,
"Reading batch from disk", readAttempts.incrementAndGet(), "reference
hits", referenceHit.get()); //$NON-NLS-1$ //$NON-NLS-2$
synchronized (activeBatches) {
TupleBufferInfo tbi = activeBatches.remove(this.id);
if (tbi != null) {
@@ -186,7 +185,7 @@
return batch;
}
}
- LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Reading batch from disk",
readCount.incrementAndGet()); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR,
"Reading batch from disk", readCount.incrementAndGet()); //$NON-NLS-1$
try {
ObjectInputStream ois = new ObjectInputStream(new
BufferedInputStream(store.createInputStream(this.offset), IO_BUFFER_SIZE));
batch = new TupleBatch();
@@ -211,7 +210,7 @@
TupleBatch batch = activeBatch;
if (batch != null) {
if (!persistent) {
- LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Writing batch to disk",
writeCount.incrementAndGet()); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR,
"Writing batch to disk", writeCount.incrementAndGet()); //$NON-NLS-1$
synchronized (store) {
offset = store.getLength();
FileStoreOutputStream fsos = store.createOutputStream(IO_BUFFER_SIZE);
@@ -350,16 +349,16 @@
}
};
TupleBuffer tupleBuffer = new TupleBuffer(batchManager, newID, elements,
getProcessorBatchSize());
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR,
MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, new Object[]{"Creating
TupleBuffer:", newID, "of type "+tupleSourceType}); //$NON-NLS-1$
//$NON-NLS-2$
+ if
(LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR,
MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR,
new Object[]{"Creating TupleBuffer:", newID, "of type
"+tupleSourceType}); //$NON-NLS-1$ //$NON-NLS-2$
}
return tupleBuffer;
}
@Override
public FileStore createFileStore(String name) {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR,
MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Creating
FileStore:", name); //$NON-NLS-1$
+ if
(LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR,
MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR,
"Creating FileStore:", name); //$NON-NLS-1$
}
return this.diskMgr.createFileStore(name);
}
@@ -462,7 +461,7 @@
try {
mb.persist();
} catch (MetaMatrixComponentException e) {
- LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, e, "Error persisting batch,
attempts to read that batch later will result in an exception"); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR, e,
"Error persisting batch, attempts to read that batch later will result in an
exception"); //$NON-NLS-1$
}
}
}
Modified:
trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/FileStorageManager.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/FileStorageManager.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/FileStorageManager.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -37,7 +37,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.core.util.Assertion;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.execution.QueryExecPlugin;
/**
@@ -222,8 +221,8 @@
File createFile(String name, int fileNumber) throws MetaMatrixComponentException {
try {
File storageFile = File.createTempFile(FILE_PREFIX + name + "_" +
String.valueOf(fileNumber) + "_", null, this.dirFile); //$NON-NLS-1$
//$NON-NLS-2$
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_STORAGE_MGR,
MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_STORAGE_MGR, "Created
temporary storage area file " + storageFile.getAbsoluteFile()); //$NON-NLS-1$
+ if
(LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR,
MessageLevel.DETAIL)) {
+
LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR, "Created
temporary storage area file " + storageFile.getAbsoluteFile()); //$NON-NLS-1$
}
return storageFile;
} catch(IOException e) {
Modified:
trunk/engine/src/main/java/com/metamatrix/common/queue/StatsCapturingWorkManager.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/common/queue/StatsCapturingWorkManager.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/common/queue/StatsCapturingWorkManager.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -94,8 +94,8 @@
}
String name = t.getName();
t.setName(name + "_" + poolName + threadCounter.getAndIncrement());
//$NON-NLS-1$
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_POOLING, MessageLevel.TRACE)) {
- LogManager.logTrace(LogConstants.CTX_POOLING, "Beginning work with virtual
worker", t.getName()); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_SERVER, MessageLevel.TRACE)) {
+ LogManager.logTrace(LogConstants.CTX_SERVER, "Beginning work with virtual
worker", t.getName()); //$NON-NLS-1$
}
boolean success = false;
try {
@@ -139,8 +139,8 @@
private static void handleException(Work work, WorkException e) {
if (work instanceof WorkListener) {
((WorkListener)work).workRejected(new WorkEvent(work, WorkEvent.WORK_REJECTED, work,
new WorkRejectedException(e)));
- } else if (LogManager.isMessageToBeRecorded(LogConstants.CTX_POOLING,
MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_POOLING, e, "Exception adding work to the
WorkManager"); //$NON-NLS-1$
+ } else if (LogManager.isMessageToBeRecorded(LogConstants.CTX_SERVER,
MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_SERVER, e, "Exception adding work to the
WorkManager"); //$NON-NLS-1$
}
}
@@ -192,7 +192,7 @@
}
if (atMaxThreads) {
if (newMaxQueueSize && maximumPoolSize > 1) {
- LogManager.logWarning(LogConstants.CTX_POOLING,
QueryPlugin.Util.getString("WorkerPool.Max_thread", maximumPoolSize, poolName,
highestQueueSize)); //$NON-NLS-1$
+ LogManager.logWarning(LogConstants.CTX_SERVER,
QueryPlugin.Util.getString("WorkerPool.Max_thread", maximumPoolSize, poolName,
highestQueueSize)); //$NON-NLS-1$
}
return;
}
Modified: trunk/engine/src/main/java/com/metamatrix/common/util/LogConstants.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/common/util/LogConstants.java 2010-03-09
20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/common/util/LogConstants.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -22,15 +22,25 @@
package com.metamatrix.common.util;
+import org.teiid.connector.basic.DefaultConnectorLogger;
+
public interface LogConstants {
// add the new contexts to the Log4JUtil.java class, for configuration purpose
- public static final String CTX_CONFIG = "CONFIG"; //$NON-NLS-1$
- public static final String CTX_COMMUNICATION = "COMMUNICATION"; //$NON-NLS-1$
- public static final String CTX_POOLING = "RESOURCE_POOLING"; //$NON-NLS-1$
public static final String CTX_SESSION = "SESSION"; //$NON-NLS-1$
public static final String CTX_MEMBERSHIP = "MEMBERSHIP"; //$NON-NLS-1$
public static final String CTX_AUTHORIZATION = "AUTHORIZATION"; //$NON-NLS-1$
- public static final String CTX_AUTHORIZATION_ADMIN_API =
"AUTHORIZATION_ADMIN_API"; //$NON-NLS-1$
- public static final String CTX_SERVER= "Server"; //$NON-NLS-1$
- public static final String CTX_ADMIN = "ADMIN"; //$NON-NLS-1$
+ public static final String CTX_SERVER= "SERVER"; //$NON-NLS-1$
+ public static final String CTX_QUERY_PLANNER = "PLANNER"; //$NON-NLS-1$
+ public static final String CTX_DQP = "PROCESSOR"; //$NON-NLS-1$
+ public static final String CTX_CONNECTOR = DefaultConnectorLogger.CTX_CONNECTOR;
+ public static final String CTX_BUFFER_MGR = "BUFFER_MGR"; //$NON-NLS-1$
+ public static final String CTX_TXN_LOG = "TXN_LOG"; //$NON-NLS-1$
+ public static final String CTX_COMMANDLOGGING = "COMMAND_LOG"; //$NON-NLS-1$
+ public static final String CTX_AUDITLOGGING = "AUDIT_LOG"; //$NON-NLS-1$
+ public static final String CTX_ADMIN_API = "ADMIN_API"; //$NON-NLS-1$
+ // Query contexts
+ public static final String CTX_FUNCTION_TREE = CTX_QUERY_PLANNER +
".FUNCTION_TREE"; //$NON-NLS-1$
+ public static final String CTX_QUERY_RESOLVER = CTX_QUERY_PLANNER +
".RESOLVER"; //$NON-NLS-1$
+ public static final String CTX_XML_PLANNER = CTX_QUERY_PLANNER +
".XML_PLANNER"; //$NON-NLS-1$
+ public static final String CTX_XML_PLAN = CTX_DQP + ".XML_PLAN";
//$NON-NLS-1$
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/function/FunctionTree.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/function/FunctionTree.java 2010-03-09
20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/function/FunctionTree.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -37,6 +37,7 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.types.DataTypeManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.MetaMatrixRuntimeException;
import com.metamatrix.core.util.Assertion;
import com.metamatrix.core.util.ReflectionHelper;
@@ -46,7 +47,6 @@
import com.metamatrix.query.function.metadata.FunctionParameter;
import com.metamatrix.query.util.CommandContext;
import com.metamatrix.query.util.ErrorMessageKeys;
-import com.metamatrix.query.util.LogConstants;
/**
* Data structure used to store function signature information. There are multiple uses
Modified:
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/RelationalPlanner.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/RelationalPlanner.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/RelationalPlanner.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -40,6 +40,7 @@
import com.metamatrix.api.exception.query.QueryResolverException;
import com.metamatrix.api.exception.query.QueryValidatorException;
import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.id.IDGenerator;
import com.metamatrix.query.QueryPlugin;
import com.metamatrix.query.analysis.AnalysisRecord;
@@ -98,7 +99,6 @@
import com.metamatrix.query.sql.visitor.ValueIteratorProviderCollectorVisitor;
import com.metamatrix.query.util.CommandContext;
import com.metamatrix.query.util.ErrorMessageKeys;
-import com.metamatrix.query.util.LogConstants;
import com.metamatrix.query.validator.ValidationVisitor;
/**
Modified:
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/NewCalculateCostUtil.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/NewCalculateCostUtil.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/NewCalculateCostUtil.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -39,6 +39,7 @@
import com.metamatrix.common.buffer.BufferManager;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.types.DataTypeManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.query.QueryPlugin;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.metadata.SupportConstants;
@@ -69,7 +70,6 @@
import com.metamatrix.query.sql.visitor.EvaluatableVisitor;
import com.metamatrix.query.sql.visitor.GroupsUsedByElementsVisitor;
import com.metamatrix.query.util.CommandContext;
-import com.metamatrix.query.util.LogConstants;
/**
Modified:
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleChooseDependent.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleChooseDependent.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleChooseDependent.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -32,6 +32,7 @@
import com.metamatrix.api.exception.query.QueryMetadataException;
import com.metamatrix.api.exception.query.QueryPlannerException;
import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.query.analysis.AnalysisRecord;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder;
@@ -47,7 +48,6 @@
import com.metamatrix.query.sql.symbol.Expression;
import com.metamatrix.query.sql.util.SymbolMap;
import com.metamatrix.query.util.CommandContext;
-import com.metamatrix.query.util.LogConstants;
/**
* Finds nodes that can be turned into dependent joins
Modified:
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleCopyCriteria.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleCopyCriteria.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleCopyCriteria.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -35,6 +35,7 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.query.QueryPlannerException;
import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.query.analysis.AnalysisRecord;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder;
@@ -51,7 +52,6 @@
import com.metamatrix.query.sql.symbol.ElementSymbol;
import com.metamatrix.query.sql.visitor.GroupsUsedByElementsVisitor;
import com.metamatrix.query.util.CommandContext;
-import com.metamatrix.query.util.LogConstants;
/**
* For each join node this rule will find the set of criteria allowed to influence the
join (the join criteria, and inner
Modified: trunk/engine/src/main/java/com/metamatrix/query/optimizer/xml/XMLPlanner.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/optimizer/xml/XMLPlanner.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/optimizer/xml/XMLPlanner.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -32,6 +32,7 @@
import com.metamatrix.api.exception.query.QueryMetadataException;
import com.metamatrix.api.exception.query.QueryPlannerException;
import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.MetaMatrixRuntimeException;
import com.metamatrix.core.id.IDGenerator;
import com.metamatrix.query.analysis.AnalysisRecord;
@@ -63,7 +64,6 @@
import com.metamatrix.query.sql.visitor.ElementCollectorVisitor;
import com.metamatrix.query.sql.visitor.GroupCollectorVisitor;
import com.metamatrix.query.util.CommandContext;
-import com.metamatrix.query.util.LogConstants;
/**
* <p> This prepares an {@link com.metamatrix.query.processor.xml.XMLPlan XMLPlan}
from
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/QueryProcessor.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/QueryProcessor.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/QueryProcessor.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -33,10 +33,10 @@
import com.metamatrix.common.buffer.BufferManager.BufferReserveMode;
import com.metamatrix.common.buffer.BufferManager.TupleSourceType;
import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.MetaMatrixRuntimeException;
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.core.util.Assertion;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.execution.QueryExecPlugin;
import com.metamatrix.query.processor.BatchCollector.BatchProducer;
import com.metamatrix.query.util.CommandContext;
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/AssignmentInstruction.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/AssignmentInstruction.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/AssignmentInstruction.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -27,7 +27,6 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.sql.util.VariableContext;
/**
@@ -60,7 +59,7 @@
protected void processValue(Object value, VariableContext varContext) throws
MetaMatrixComponentException,
MetaMatrixProcessingException {
varContext.setValue(getVariable(), value);
- LogManager.logTrace(LogConstants.CTX_DQP,
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP,
new Object[] {this.toString() + " The variable "
//$NON-NLS-1$
+ getVariable() + " in the variablecontext
is updated with the value :", value}); //$NON-NLS-1$
}
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ErrorInstruction.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ErrorInstruction.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ErrorInstruction.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -28,7 +28,6 @@
import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.api.exception.query.ProcedureErrorInstructionException;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.sql.util.VariableContext;
/**
@@ -67,7 +66,7 @@
*/
protected void processValue(Object value, VariableContext varContext) throws
MetaMatrixComponentException,
MetaMatrixProcessingException {
- LogManager.logTrace(LogConstants.CTX_DQP,
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP,
new Object[] {"Processing RaiseErrorInstruction with the
value :", value}); //$NON-NLS-1$
throw new ProcedureErrorInstructionException(ERROR_PREFIX + (value != null ?
value.toString() : "")); //$NON-NLS-1$
}
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ExecDynamicSqlInstruction.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ExecDynamicSqlInstruction.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ExecDynamicSqlInstruction.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -39,7 +39,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.types.DataTypeManager;
import com.metamatrix.core.id.IDGenerator;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.analysis.AnalysisRecord;
import com.metamatrix.query.execution.QueryExecPlugin;
import com.metamatrix.query.metadata.QueryMetadataInterface;
@@ -146,7 +145,7 @@
.getString("ExecDynamicSqlInstruction.0")); //$NON-NLS-1$
}
- LogManager.logTrace(LogConstants.CTX_DQP,
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP,
new Object[] { "Executing dynamic sql ", value }); //$NON-NLS-1$
Command command = QueryParser.getQueryParser().parseCommand(value.toString());
@@ -236,7 +235,7 @@
for (SetClause setClause : dynamicCommand.getUsing().getClauses()) {
Object assignment = procEnv.evaluateExpression(setClause.getValue());
- LogManager.logTrace(LogConstants.CTX_DQP,
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP,
new Object[] { this, " The using variable ", //$NON-NLS-1$
setClause.getSymbol(), " has value :", assignment }); //$NON-NLS-1$
localContext.setValue(setClause.getSymbol(), assignment);
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/IfInstruction.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/IfInstruction.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/IfInstruction.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -32,7 +32,6 @@
import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.processor.program.Program;
import com.metamatrix.query.processor.program.ProgramInstruction;
import com.metamatrix.query.sql.lang.Criteria;
@@ -94,13 +93,13 @@
boolean evalValue = procEnv.evaluateCriteria(condition);
if(evalValue) {
- LogManager.logTrace(LogConstants.CTX_DQP, new Object[]{"IFInstruction:
"+ //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP, new
Object[]{"IFInstruction: "+ //$NON-NLS-1$
" The criteria on the if block evaluated to true, processing the if
block"}); //$NON-NLS-1$
//push the "if" Program onto the stack
procEnv.push(ifProgram);
} else if(elseProgram != null) {
- LogManager.logTrace(LogConstants.CTX_DQP, new Object[]{"IFInstruction:
"+ //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP, new
Object[]{"IFInstruction: "+ //$NON-NLS-1$
" The criteria on the if block evaluated to false, processing the else
block"}); //$NON-NLS-1$
//push the "else" Program onto the stack
procEnv.push(elseProgram);
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ProcedurePlan.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ProcedurePlan.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ProcedurePlan.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -43,7 +43,6 @@
import com.metamatrix.common.buffer.TupleBatch;
import com.metamatrix.common.buffer.TupleSource;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.execution.QueryExecPlugin;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.metadata.SupportConstants;
@@ -166,7 +165,7 @@
originalProgram.resetProgramCounter();
programs.clear();
programs.push(originalProgram);
- LogManager.logTrace(LogConstants.CTX_DQP, "ProcedurePlan reset");
//$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP,
"ProcedurePlan reset"); //$NON-NLS-1$
}
public ProcessorDataManager getDataManager() {
@@ -265,23 +264,23 @@
Program program = peek();
inst = program.getCurrentInstruction();
if (inst == null){
- LogManager.logTrace(LogConstants.CTX_DQP, "Finished program",
program); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP,
"Finished program", program); //$NON-NLS-1$
this.pop();
continue;
}
if (inst instanceof RepeatedInstruction) {
- LogManager.logTrace(LogConstants.CTX_DQP, "Executing repeated
instruction", inst); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP,
"Executing repeated instruction", inst); //$NON-NLS-1$
RepeatedInstruction loop = (RepeatedInstruction)inst;
if (loop.testCondition(this)) {
- LogManager.logTrace(LogConstants.CTX_DQP, "Passed condition,
executing program " + loop.getNestedProgram()); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP,
"Passed condition, executing program " + loop.getNestedProgram());
//$NON-NLS-1$
inst.process(this);
this.push(loop.getNestedProgram());
continue;
}
- LogManager.logTrace(LogConstants.CTX_DQP, "Exiting repeated
instruction", inst); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP,
"Exiting repeated instruction", inst); //$NON-NLS-1$
loop.postInstruction(this);
} else {
- LogManager.logTrace(LogConstants.CTX_DQP, "Executing instruction",
inst); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP,
"Executing instruction", inst); //$NON-NLS-1$
inst.process(this);
}
program.incrementProgramCounter();
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/PlanExecutionNode.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/PlanExecutionNode.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/PlanExecutionNode.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -31,7 +31,6 @@
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.buffer.TupleBatch;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.processor.ProcessorPlan;
import com.metamatrix.query.sql.util.VariableContext;
import com.metamatrix.query.util.CommandContext;
@@ -140,7 +139,7 @@
try {
plan.close();
} catch (MetaMatrixComponentException e1){
- LogManager.logDetail(LogConstants.CTX_DQP, e1, "Error closing processor");
//$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, e1, "Error
closing processor"); //$NON-NLS-1$
}
}
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalNode.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalNode.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalNode.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -38,7 +38,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.core.util.Assertion;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.processor.Describable;
import com.metamatrix.query.processor.DescribableUtil;
import com.metamatrix.query.processor.ProcessorDataManager;
@@ -389,7 +388,7 @@
* @param batch Batch being sent
*/
private void recordBatch(TupleBatch batch) {
- if (!this.context.getProcessDebug() ||
!LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
+ if (!this.context.getProcessDebug() ||
!LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP,
MessageLevel.DETAIL)) {
return;
}
// Print summary
@@ -405,7 +404,7 @@
for (int row = batch.getBeginRow(); row <= batch.getEndRow(); row++) {
str.append("\t").append(row).append(":
").append(batch.getTuple(row)).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
//$NON-NLS-3$
}
- LogManager.logDetail(LogConstants.CTX_DQP, str.toString());
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP,
str.toString());
}
// =========================================================================
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalPlan.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalPlan.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalPlan.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -39,7 +39,6 @@
import com.metamatrix.query.processor.ProcessorDataManager;
import com.metamatrix.query.processor.ProcessorPlan;
import com.metamatrix.query.util.CommandContext;
-import com.metamatrix.query.util.LogConstants;
/**
*/
@@ -122,7 +121,6 @@
super.reset();
this.root.reset();
- LogManager.logTrace(LogConstants.CTX_QUERY_PLANNER, "RelationalPlan
reset"); //$NON-NLS-1$
}
public String toString() {
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SortUtility.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SortUtility.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SortUtility.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -41,7 +41,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.core.util.Assertion;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.sql.lang.OrderBy;
import com.metamatrix.query.sql.symbol.SingleElementSymbol;
@@ -262,8 +261,8 @@
bufferManager.releaseBuffers(release);
reserved -= release;
try {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.TRACE))
{
- LogManager.logTrace(LogConstants.CTX_DQP, "Merging",
maxSortIndex, "sublists out of", activeTupleBuffers.size()); //$NON-NLS-1$
//$NON-NLS-2$
+ if
(LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP,
MessageLevel.TRACE)) {
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP,
"Merging", maxSortIndex, "sublists out of",
activeTupleBuffers.size()); //$NON-NLS-1$ //$NON-NLS-2$
}
// initialize the sublists with the min value
for(int i = 0; i<maxSortIndex; i++) {
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AbortProcessingInstruction.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AbortProcessingInstruction.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AbortProcessingInstruction.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -31,7 +31,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.query.execution.QueryExecPlugin;
import com.metamatrix.query.util.ErrorMessageKeys;
-import com.metamatrix.query.util.LogConstants;
/**
* This instruction, intended to be reached conditionally (only under certain
@@ -61,7 +60,7 @@
public XMLContext process(XMLProcessorEnvironment env, XMLContext context)
throws BlockedException, MetaMatrixComponentException,
MetaMatrixProcessingException{
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, "ABORT processing
now."); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN,
"ABORT processing now."); //$NON-NLS-1$
throw new MetaMatrixComponentException(DEFAULT_MESSAGE);
}
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AddCommentInstruction.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AddCommentInstruction.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AddCommentInstruction.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -29,7 +29,6 @@
import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.query.util.LogConstants;
/**
* Adds a comment to an element of the document in progress
@@ -57,7 +56,7 @@
DocumentInProgress doc = env.getDocumentInProgress();
doc.addComment(this.commentText);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, "COMMENT");
//$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN,
"COMMENT"); //$NON-NLS-1$
env.incrementCurrentProgramCounter();
return context;
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AddNodeInstruction.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AddNodeInstruction.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AddNodeInstruction.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -22,7 +22,12 @@
package com.metamatrix.query.processor.xml;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.MetaMatrixProcessingException;
@@ -30,7 +35,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.query.execution.QueryExecPlugin;
import com.metamatrix.query.sql.symbol.ElementSymbol;
-import com.metamatrix.query.util.LogConstants;
/**
*/
@@ -91,15 +95,15 @@
if (defaultValue != null){
if(isElement) {
success = doc.addElement(descriptor, defaultValue);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"TAG
elem",descriptor.getName(),"fixed value",defaultValue}); //$NON-NLS-1$
//$NON-NLS-2$
+
LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"TAG elem",descriptor.getName(),"fixed value",defaultValue});
//$NON-NLS-1$ //$NON-NLS-2$
} else {
success = doc.addAttribute(descriptor, defaultValue);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"TAG
attr",descriptor.getName(),"fixed value",defaultValue}); //$NON-NLS-1$
//$NON-NLS-2$
+
LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"TAG attr",descriptor.getName(),"fixed value",defaultValue});
//$NON-NLS-1$ //$NON-NLS-2$
}
} else {
if(isElement) {
success = doc.addElement(descriptor, nillableDescriptor);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"TAG
elem",descriptor.getName()}); //$NON-NLS-1$
+
LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"TAG elem",descriptor.getName()}); //$NON-NLS-1$
} //else nothing gets outputted for attribute with no content
}
} else {
@@ -109,24 +113,24 @@
if (valueStr != null){
if(isElement) {
success = doc.addElement(descriptor, valueStr);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"TAG
elem",descriptor.getName(),"value",valueStr}); //$NON-NLS-1$ //$NON-NLS-2$
+
LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"TAG elem",descriptor.getName(),"value",valueStr});
//$NON-NLS-1$ //$NON-NLS-2$
} else {
success = doc.addAttribute(descriptor, valueStr);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"TAG
attr",descriptor.getName(),"value",valueStr}); //$NON-NLS-1$ //$NON-NLS-2$
+
LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"TAG attr",descriptor.getName(),"value",valueStr});
//$NON-NLS-1$ //$NON-NLS-2$
}
} else {
if (defaultValue != null){
if(isElement) {
success = doc.addElement(descriptor, defaultValue);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new
Object[]{"TAG elem",descriptor.getName(),"default
value",defaultValue}); //$NON-NLS-1$ //$NON-NLS-2$
+
LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"TAG elem",descriptor.getName(),"default
value",defaultValue}); //$NON-NLS-1$ //$NON-NLS-2$
} else {
success = doc.addAttribute(descriptor, defaultValue);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new
Object[]{"TAG attr",descriptor.getName(),"default
value",defaultValue}); //$NON-NLS-1$ //$NON-NLS-2$
+
LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"TAG attr",descriptor.getName(),"default
value",defaultValue}); //$NON-NLS-1$ //$NON-NLS-2$
}
} else {
if(isElement) {
success = doc.addElement(descriptor, nillableDescriptor);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new
Object[]{"TAG elem",descriptor.getName(),"no value"}); //$NON-NLS-1$
//$NON-NLS-2$
+
LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"TAG elem",descriptor.getName(),"no value"}); //$NON-NLS-1$
//$NON-NLS-2$
} //else nothing gets outputted for attribute with no content
}
}
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/EndBlockInstruction.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/EndBlockInstruction.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/EndBlockInstruction.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -29,7 +29,6 @@
import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.query.util.LogConstants;
/**
* <p>This instruction closes a result set, which closes and removes the
TupleSource
@@ -66,7 +65,7 @@
context.removeResultSet(resultSetName);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new
Object[]{CLOSE_FINISHED,resultSetName});
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{CLOSE_FINISHED,resultSetName});
env.incrementCurrentProgramCounter();
return context;
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/EndDocumentInstruction.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/EndDocumentInstruction.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/EndDocumentInstruction.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -29,7 +29,6 @@
import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.query.util.LogConstants;
/**
* This instruction marks the current document in progress as
@@ -54,7 +53,7 @@
// program stack (don't want to start a new doc in the middle of
// recursive processing)
if (!env.isRecursiveProgramInStack()) {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, "ending document");
//$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN,
"ending document"); //$NON-NLS-1$
env.getDocumentInProgress().markAsFinished();
}
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/ExecSqlInstruction.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/ExecSqlInstruction.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/ExecSqlInstruction.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -30,7 +30,6 @@
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.query.mapping.xml.ResultSetInfo;
-import com.metamatrix.query.util.LogConstants;
/**
* Executes a SQL statement, defines a result set.
@@ -48,7 +47,7 @@
public XMLContext process(XMLProcessorEnvironment env, XMLContext context)
throws BlockedException, MetaMatrixComponentException,
MetaMatrixProcessingException{
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"SQL: Result set
DOESN'T exist:",resultSetName}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"SQL: Result set DOESN'T exist:",resultSetName}); //$NON-NLS-1$
PlanExecutor executor = context.getResultExecutor(resultSetName);
if (executor == null) {
executor = env.createResultExecutor(resultSetName, info);
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/ExecStagingTableInstruction.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/ExecStagingTableInstruction.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/ExecStagingTableInstruction.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -30,7 +30,6 @@
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.query.mapping.xml.ResultSetInfo;
-import com.metamatrix.query.util.LogConstants;
/**
@@ -59,7 +58,7 @@
throws BlockedException, MetaMatrixComponentException,
MetaMatrixProcessingException {
if (!env.isStagingTableLoaded(this.resultSetName)) {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"SQL: Result
set DOESN'T exist:",resultSetName}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"SQL: Result set DOESN'T exist:",resultSetName}); //$NON-NLS-1$
PlanExecutor executor = context.getResultExecutor(resultSetName);
if (executor == null) {
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/IfInstruction.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/IfInstruction.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/IfInstruction.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -32,7 +32,6 @@
import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.query.util.LogConstants;
/**
* <p>This instruction holds a List of Criteria, and for each Criteria there is a
@@ -196,7 +195,7 @@
Program thenProgram = condition.getThenProgram();
env.pushProgram(thenProgram, condition.isProgramRecursive());
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"IF: true
condition", condition, "- then program:", thenProgram}); //$NON-NLS-1$
//$NON-NLS-2$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"IF: true condition", condition, "- then program:",
thenProgram}); //$NON-NLS-1$ //$NON-NLS-2$
}
return context;
}
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/InitializeDocumentInstruction.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/InitializeDocumentInstruction.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/InitializeDocumentInstruction.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -30,7 +30,6 @@
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.query.mapping.xml.MappingNodeConstants;
-import com.metamatrix.query.util.LogConstants;
import com.metamatrix.query.util.XMLFormatConstants;
/**
@@ -78,7 +77,7 @@
public XMLContext process(XMLProcessorEnvironment env, XMLContext context)
throws BlockedException, MetaMatrixComponentException,
MetaMatrixProcessingException{
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, "DOC begin");
//$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN,
"DOC begin"); //$NON-NLS-1$
// Only process this instruction if there are no recursive programs in the
// program stack (don't want to start a new doc in the middle of
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/MoveCursorInstruction.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/MoveCursorInstruction.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/MoveCursorInstruction.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -29,7 +29,6 @@
import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.query.util.LogConstants;
/**
*/
@@ -52,7 +51,7 @@
public XMLContext process(XMLProcessorEnvironment env, XMLContext context)
throws BlockedException, MetaMatrixComponentException,
MetaMatrixProcessingException {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"NEXT",
resultSetName}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"NEXT", resultSetName}); //$NON-NLS-1$
context.getNextRow(resultSetName);
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/MoveDocInstruction.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/MoveDocInstruction.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/MoveDocInstruction.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -34,7 +34,6 @@
import com.metamatrix.core.util.Assertion;
import com.metamatrix.query.execution.QueryExecPlugin;
import com.metamatrix.query.util.ErrorMessageKeys;
-import com.metamatrix.query.util.LogConstants;
/**
*/
@@ -62,7 +61,7 @@
switch(this.direction) {
case UP:
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, "UP in
document"); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN,
"UP in document"); //$NON-NLS-1$
try {
doc.moveToParent();
} catch (SAXException err) {
@@ -70,7 +69,7 @@
}
break;
case DOWN:
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, "LAST child in
document"); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN,
"LAST child in document"); //$NON-NLS-1$
doc.moveToLastChild();
break;
default:
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/RelationalPlanExecutor.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/RelationalPlanExecutor.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/RelationalPlanExecutor.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -40,7 +40,6 @@
import com.metamatrix.query.sql.symbol.ElementSymbol;
import com.metamatrix.query.sql.util.VariableContext;
import com.metamatrix.query.util.CommandContext;
-import com.metamatrix.query.util.LogConstants;
/**
@@ -154,7 +153,7 @@
*/
public void close() throws MetaMatrixComponentException {
this.internalProcessor.closeProcessing();
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"closed
executor", resultInfo.getResultSetName()}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"closed executor", resultInfo.getResultSetName()}); //$NON-NLS-1$
}
}
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/SAXDocumentInProgress.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/SAXDocumentInProgress.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/SAXDocumentInProgress.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -39,7 +39,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.query.mapping.xml.MappingNodeConstants;
-import com.metamatrix.query.util.LogConstants;
/**
* This class is used to build XML document and stream the output as
@@ -154,7 +153,7 @@
return true;
}
} catch (SAXException e) {
- LogManager.logError(LogConstants.CTX_XML_PLAN, e, e.getMessage());
+ LogManager.logError(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, e,
e.getMessage());
return false;
}
showState( "addElement(2) - BOT" ); //$NON-NLS-1$
@@ -344,19 +343,19 @@
private void showState( String sOccasion ) {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_XML_PLAN,
MessageLevel.TRACE)) {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"\n
[showState] State Vars at: " + sOccasion} ); //$NON-NLS-1$
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"[showState]
currentParent: " + currentParent} ); //$NON-NLS-1$
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"[showState]
currentObject: " + currentObject} ); //$NON-NLS-1$
+ if
(LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN,
MessageLevel.TRACE)) {
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"\n [showState] State Vars at: " + sOccasion} ); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"[showState] currentParent: " + currentParent} ); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"[showState] currentObject: " + currentObject} ); //$NON-NLS-1$
if ( currentObject != null ) {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new
Object[]{"[showState] currentObject.getNillableDescriptor(): " +
currentObject.getNillableDescriptor()}); //$NON-NLS-1$
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new
Object[]{"[showState] workingElements: " + currentObject.getChildren()});
//$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN,
new Object[]{"[showState] currentObject.getNillableDescriptor(): " +
currentObject.getNillableDescriptor()}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN,
new Object[]{"[showState] workingElements: " + currentObject.getChildren()});
//$NON-NLS-1$
}
if ( currentParent != null ) {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new
Object[]{"[showState] currentParent.getParent(): " +
currentParent.getParent()}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN,
new Object[]{"[showState] currentParent.getParent(): " +
currentParent.getParent()}); //$NON-NLS-1$
} else {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new
Object[]{"[showState] currentParent.getParent(): is NULL "}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN,
new Object[]{"[showState] currentParent.getParent(): is NULL "}); //$NON-NLS-1$
}
}
}
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/WhileInstruction.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/WhileInstruction.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/WhileInstruction.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -32,7 +32,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.query.sql.symbol.ElementSymbol;
import com.metamatrix.query.sql.util.VariableContext;
-import com.metamatrix.query.util.LogConstants;
/**
* Loop instruction on the result set execute before this instruction.
@@ -70,7 +69,7 @@
setFirst(context.getVariableContext(), Boolean.TRUE);
}
else {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"WHILE
removed finished result set:",resultSetName}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"WHILE removed finished result set:",resultSetName}); //$NON-NLS-1$
//increment the current program counter, so this
//While instruction will not be executed again
@@ -98,7 +97,7 @@
protected void pushProgram(XMLProcessorEnvironment env,
XMLContext context,
List row) throws MetaMatrixComponentException {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"WHILE repeating
for result set:",resultSetName,", block program:", blockProgram});
//$NON-NLS-1$ //$NON-NLS-2$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"WHILE repeating for result set:",resultSetName,", block
program:", blockProgram}); //$NON-NLS-1$ //$NON-NLS-2$
context.setVariableValues(resultSetName, row);
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLPlan.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLPlan.java 2010-03-09
20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLPlan.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -85,7 +85,6 @@
import com.metamatrix.query.tempdata.TempTableStoreImpl;
import com.metamatrix.query.util.CommandContext;
import com.metamatrix.query.util.ErrorMessageKeys;
-import com.metamatrix.query.util.LogConstants;
import com.metamatrix.query.util.XMLFormatConstants;
/**
*
@@ -148,7 +147,7 @@
this.env = (XMLProcessorEnvironment)this.env.clone();
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, "XMLPlan reset");
//$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, "XMLPlan
reset"); //$NON-NLS-1$
}
public ProcessorDataManager getDataManager() {
@@ -273,7 +272,7 @@
// do the xml processing.
ProcessorInstruction inst = env.getCurrentInstruction();
while (inst != null){
- LogManager.logTrace(LogConstants.CTX_QUERY_PLANNER, "Executing
instruction", inst); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN,
"Executing instruction", inst); //$NON-NLS-1$
this.context = inst.process(this.env, this.context);
//code to check for end of document, set current doc
@@ -576,7 +575,7 @@
return "XMLPlan:\n" +
ProgramUtil.programToString(this.originalProgram); //$NON-NLS-1$
} catch (Exception e){
e.printStackTrace();
- LogManager.logWarning(LogConstants.CTX_XML_PLAN, e,
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN,
e,
QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0001));
}
return "XMLPlan"; //$NON-NLS-1$
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLProcessorEnvironment.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLProcessorEnvironment.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLProcessorEnvironment.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -38,7 +38,6 @@
import com.metamatrix.query.processor.ProcessorPlan;
import com.metamatrix.query.sql.symbol.GroupSymbol;
import com.metamatrix.query.util.CommandContext;
-import com.metamatrix.query.util.LogConstants;
public class XMLProcessorEnvironment {
@@ -139,8 +138,8 @@
while (this.programStack.size() > 1 &&
programState.programCounter >=
programState.program.getProcessorInstructions().size()) {
this.programStack.removeFirst();
- if(LogManager.isMessageToBeRecorded(LogConstants.CTX_XML_PLAN,
MessageLevel.TRACE)) {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new
Object[]{"Processor Environment popped program w/ recursion count " +
programState.recursionCount, "; " + this.programStack.size(), " programs
left."}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
if(LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN,
MessageLevel.TRACE)) {
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN,
new Object[]{"Processor Environment popped program w/ recursion count " +
programState.recursionCount, "; " + this.programStack.size(), " programs
left."}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
programState = (ProgramState)this.programStack.getFirst();
}
@@ -164,10 +163,10 @@
} else {
programState.recursionCount = ProgramState.NOT_RECURSIVE + 1;
}
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"Pushed
recursive program w/ recursion count " + programState.recursionCount});
//$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"Pushed recursive program w/ recursion count " +
programState.recursionCount}); //$NON-NLS-1$
} else {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"Pushed
non-recursive program w/ recursion count " + programState.recursionCount});
//$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new
Object[]{"Pushed non-recursive program w/ recursion count " +
programState.recursionCount}); //$NON-NLS-1$
}
this.programStack.addFirst(programState);
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/resolver/QueryResolver.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/resolver/QueryResolver.java 2010-03-09
20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/resolver/QueryResolver.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -61,7 +61,6 @@
import com.metamatrix.query.sql.lang.Query;
import com.metamatrix.query.sql.lang.UnaryFromClause;
import com.metamatrix.query.sql.symbol.GroupSymbol;
-import com.metamatrix.query.util.LogConstants;
/**
* <P>The QueryResolver is used between Parsing and QueryValidation. The SQL
queries,
@@ -132,7 +131,7 @@
AnalysisRecord analysis, boolean
resolveNullLiterals)
throws QueryResolverException, MetaMatrixComponentException {
- LogManager.logTrace(LogConstants.CTX_QUERY_RESOLVER, new Object[]{"Resolving
command", currentCommand}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_QUERY_RESOLVER, new
Object[]{"Resolving command", currentCommand}); //$NON-NLS-1$
TempMetadataAdapter resolverMetadata = null;
try {
Modified:
trunk/engine/src/main/java/com/metamatrix/query/resolver/command/UpdateProcedureResolver.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/resolver/command/UpdateProcedureResolver.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/com/metamatrix/query/resolver/command/UpdateProcedureResolver.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -73,7 +73,6 @@
import com.metamatrix.query.sql.util.SymbolMap;
import com.metamatrix.query.sql.visitor.ValueIteratorProviderCollectorVisitor;
import com.metamatrix.query.util.ErrorMessageKeys;
-import com.metamatrix.query.util.LogConstants;
/**
*/
@@ -171,7 +170,7 @@
private void resolveBlock(CreateUpdateProcedureCommand command, Block block,
GroupContext externalGroups,
TempMetadataAdapter metadata, boolean isUpdateProcedure,
AnalysisRecord analysis)
throws QueryResolverException, QueryMetadataException,
MetaMatrixComponentException {
- LogManager.logTrace(LogConstants.CTX_QUERY_RESOLVER, new Object[]{"Resolving
block", block}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_QUERY_RESOLVER,
new Object[]{"Resolving block", block}); //$NON-NLS-1$
//create a new variable and metadata context for this block so that discovered
metadata is not visible else where
TempMetadataStore store = new TempMetadataStore(new
HashMap(metadata.getMetadataStore().getData()));
@@ -189,7 +188,7 @@
private void resolveStatement(CreateUpdateProcedureCommand command, Statement statement,
GroupContext externalGroups, GroupSymbol variables, TempMetadataAdapter metadata, boolean
isUpdateProcedure, AnalysisRecord analysis)
throws QueryResolverException, QueryMetadataException,
MetaMatrixComponentException {
- LogManager.logTrace(LogConstants.CTX_QUERY_RESOLVER, new Object[]{"Resolving
statement", statement}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_QUERY_RESOLVER,
new Object[]{"Resolving statement", statement}); //$NON-NLS-1$
switch(statement.getType()) {
case Statement.TYPE_IF:
Deleted: trunk/engine/src/main/java/com/metamatrix/query/util/LogConstants.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/util/LogConstants.java 2010-03-09
20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/util/LogConstants.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.query.util;
-
-
-public interface LogConstants {
-
-//**********************************************************************
-//PLEASE NOTE:!!!!!!!!!!!!!!!!!
-//All constants defined here should also be defined in
-//com.metamatrix.common.util.LogContextsUtil
-//**********************************************************************
-
- // Query contexts
- public static final String CTX_FUNCTION_TREE = "FUNCTION_TREE";
//$NON-NLS-1$
- public static final String CTX_QUERY_PLANNER = "QUERY_PLANNER";
//$NON-NLS-1$
- public static final String CTX_QUERY_RESOLVER = "QUERY_RESOLVER";
//$NON-NLS-1$
- public static final String CTX_XML_PLANNER = "XML_QUERY_PLANNER";
//$NON-NLS-1$
- public static final String CTX_XML_PLAN = "XML_PLAN"; //$NON-NLS-1$
-
-}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java
===================================================================
---
trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -28,7 +28,6 @@
import com.metamatrix.cache.CacheFactory;
import com.metamatrix.cache.CacheConfiguration.Policy;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.dqp.util.LogConstants;
public class DQPContextCache implements Serializable{
private static final long serialVersionUID = 6958846566556640186L;
@@ -55,7 +54,7 @@
try {
this.cache.removeChild(this.processIdentifier);
} catch(IllegalStateException e) {
- LogManager.logWarning(LogConstants.CTX_DQP, e, e.getMessage());
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, e,
e.getMessage());
}
}
@@ -75,7 +74,7 @@
}
}
} catch(IllegalStateException e) {
- LogManager.logWarning(LogConstants.CTX_DQP, e, e.getMessage());
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, e,
e.getMessage());
}
}
@@ -95,7 +94,7 @@
}
}
} catch(IllegalStateException e) {
- LogManager.logWarning(LogConstants.CTX_DQP, e, e.getMessage());
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, e,
e.getMessage());
}
}
@@ -111,7 +110,7 @@
scopeNode.removeChild(session);
}
} catch(IllegalStateException e) {
- LogManager.logWarning(LogConstants.CTX_DQP, e, e.getMessage());
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, e,
e.getMessage());
}
}
@@ -129,7 +128,7 @@
scopeNode.removeChild(id.toUpperCase());
}
} catch(IllegalStateException e) {
- LogManager.logWarning(LogConstants.CTX_DQP, e, e.getMessage());
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, e,
e.getMessage());
}
}
}
Modified:
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
===================================================================
---
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -61,6 +61,7 @@
import com.metamatrix.common.comm.api.ResultsReceiver;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.queue.StatsCapturingWorkManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.core.util.Assertion;
import com.metamatrix.dqp.DQPPlugin;
@@ -68,7 +69,6 @@
import com.metamatrix.dqp.message.AtomicRequestMessage;
import com.metamatrix.dqp.message.AtomicResultsMessage;
import com.metamatrix.dqp.service.BufferService;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.optimizer.capabilities.BasicSourceCapabilities;
import com.metamatrix.query.optimizer.capabilities.SourceCapabilities;
import com.metamatrix.query.optimizer.capabilities.SourceCapabilities.Scope;
Modified:
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorWorkItem.java
===================================================================
---
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorWorkItem.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorWorkItem.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -46,7 +46,6 @@
import org.teiid.dqp.internal.datamgr.metadata.RuntimeMetadataImpl;
import org.teiid.dqp.internal.process.AbstractWorkItem;
import org.teiid.dqp.internal.process.DQPWorkContext;
-import org.teiid.logging.api.CommandLogMessage;
import org.teiid.logging.api.CommandLogMessage.Event;
import com.metamatrix.api.exception.MetaMatrixComponentException;
@@ -56,12 +55,12 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.types.DataTypeManager;
import com.metamatrix.common.types.TransformationException;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.util.Assertion;
import com.metamatrix.dqp.DQPPlugin;
import com.metamatrix.dqp.message.AtomicRequestID;
import com.metamatrix.dqp.message.AtomicRequestMessage;
import com.metamatrix.dqp.message.AtomicResultsMessage;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.metadata.TempMetadataAdapter;
import com.metamatrix.query.metadata.TempMetadataStore;
Modified:
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/SynchConnectorWorkItem.java
===================================================================
---
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/SynchConnectorWorkItem.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/SynchConnectorWorkItem.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -33,10 +33,10 @@
import com.metamatrix.common.comm.api.ResultsReceiver;
import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.dqp.message.AtomicRequestMessage;
import com.metamatrix.dqp.message.AtomicResultsMessage;
import com.metamatrix.dqp.service.TransactionContext;
-import com.metamatrix.dqp.util.LogConstants;
public class SynchConnectorWorkItem extends ConnectorWorkItem {
Modified:
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/language/LanguageBridgeFactory.java
===================================================================
---
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/language/LanguageBridgeFactory.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/language/LanguageBridgeFactory.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -63,10 +63,7 @@
import org.teiid.dqp.internal.datamgr.metadata.RuntimeMetadataImpl;
import com.metamatrix.api.exception.MetaMatrixComponentException;
-import com.metamatrix.common.log.LogManager;
-import com.metamatrix.dqp.DQPPlugin;
import com.metamatrix.dqp.message.ParameterInfo;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.metadata.TempMetadataID;
import com.metamatrix.query.sql.lang.BatchedUpdateCommand;
@@ -641,7 +638,6 @@
try {
group.setMetadataObject(metadataFactory.getGroup(symbol.getMetadataID()));
} catch(Exception e) {
- LogManager.logWarning(LogConstants.CTX_CONNECTOR, e,
DQPPlugin.Util.getString("LanguageBridgeFactory.Unable_to_set_the_metadata_ID_for_group_{0}._11",
symbol.getName())); //$NON-NLS-1$
throw new MetaMatrixComponentException(e);
}
return group;
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/AbstractWorkItem.java
===================================================================
---
trunk/engine/src/main/java/org/teiid/dqp/internal/process/AbstractWorkItem.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/org/teiid/dqp/internal/process/AbstractWorkItem.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -27,7 +27,6 @@
import javax.resource.spi.work.WorkListener;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.dqp.util.LogConstants;
/**
@@ -115,12 +114,12 @@
if (!ignoreDone) {
throw new IllegalStateException("More work is not valid once DONE");
//$NON-NLS-1$
}
- LogManager.logDetail(LogConstants.CTX_DQP, new Object[] {this, "ignoring more
work, since the work item is done"}); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, new Object[]
{this, "ignoring more work, since the work item is done"}); //$NON-NLS-1$
}
}
private void logTrace(String msg) {
- LogManager.logTrace(LogConstants.CTX_DQP, new Object[] {this, msg, this.threadState});
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP, new Object[]
{this, msg, this.threadState});
}
protected abstract void process();
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/CodeTableCache.java
===================================================================
---
trunk/engine/src/main/java/org/teiid/dqp/internal/process/CodeTableCache.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/org/teiid/dqp/internal/process/CodeTableCache.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -34,8 +34,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.core.util.HashCodeUtil;
import com.metamatrix.dqp.DQPPlugin;
-import com.metamatrix.dqp.embedded.DQPEmbeddedProperties;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.util.CommandContext;
import com.metamatrix.vdb.runtime.VDBKey;
@@ -151,11 +149,11 @@
// Depends on size of results and available memory and system parameters
int potentialSize = table.codeMap.size() + records.length;
if (potentialSize > maxCodeTableRecords) {
- throw new MetaMatrixProcessingException("ERR.018.005.0100",
DQPPlugin.Util.getString("ERR.018.005.0100",
DQPEmbeddedProperties.MAX_CODE_TABLE_RECORDS_PER_TABLE)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new MetaMatrixProcessingException("ERR.018.005.0100",
DQPPlugin.Util.getString("ERR.018.005.0100", "maxCodeTables"));
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
if (potentialSize + rowCount > maxCodeRecords) {
- throw new MetaMatrixProcessingException("ERR.018.005.0100",
DQPPlugin.Util.getString("ERR.018.005.0100",
DQPEmbeddedProperties.MAX_CODE_TABLE_RECORDS)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new MetaMatrixProcessingException("ERR.018.005.0100",
DQPPlugin.Util.getString("ERR.018.005.0100", "maxCodeTableRecords"));
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
// Add data: <List<List<keyValue, returnValue>> from results to
the code table cache
@@ -236,7 +234,7 @@
// Clear the cacheKeyDone
this.rowCount = 0;
// Log status
- LogManager.logInfo(LogConstants.CTX_DQP,
DQPPlugin.Util.getString("CodeTableCache.Cleared_code_tables", removedTables,
removedRecords)); //$NON-NLS-1$
+ LogManager.logInfo(com.metamatrix.common.util.LogConstants.CTX_DQP,
DQPPlugin.Util.getString("CodeTableCache.Cleared_code_tables", removedTables,
removedRecords)); //$NON-NLS-1$
}
/**
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2010-03-09
20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -79,7 +79,6 @@
import com.metamatrix.dqp.service.SessionService;
import com.metamatrix.dqp.service.TransactionContext;
import com.metamatrix.dqp.service.TransactionService;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.processor.ProcessorDataManager;
import com.metamatrix.query.tempdata.TempTableStoreImpl;
@@ -206,7 +205,7 @@
} catch (InterruptedException e) {
}
// TODO: Should we be doing more cleanup here??
- LogManager.logDetail(LogConstants.CTX_DQP, "Stopping the DQP");
//$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, "Stopping
the DQP"); //$NON-NLS-1$
}
/**
@@ -309,8 +308,8 @@
public ResultsFuture<ResultsMessage> processCursorRequest(long reqID,
int batchFirst, int fetchSize) throws MetaMatrixProcessingException {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL))
{
- LogManager.logDetail(LogConstants.CTX_DQP, "DQP process cursor request
from " + batchFirst); //$NON-NLS-1$
+ if
(LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP,
MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP,
"DQP process cursor request from " + batchFirst); //$NON-NLS-1$
}
DQPWorkContext workContext = DQPWorkContext.getWorkContext();
ResultsFuture<ResultsMessage> resultsFuture = new
ResultsFuture<ResultsMessage>();
@@ -357,8 +356,8 @@
public ResultsFuture<?> closeLobChunkStream(int lobRequestId,
long requestId, String streamId)
throws MetaMatrixProcessingException {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL))
{
- LogManager.logDetail(LogConstants.CTX_DQP, "Request to close the Lob
stream with Stream id="+streamId+" instance id="+lobRequestId);
//$NON-NLS-1$//$NON-NLS-2$
+ if
(LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP,
MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP,
"Request to close the Lob stream with Stream id="+streamId+" instance
id="+lobRequestId); //$NON-NLS-1$//$NON-NLS-2$
}
DQPWorkContext workContext = DQPWorkContext.getWorkContext();
RequestWorkItem workItem = safeGetWorkItem(workContext.getRequestID(requestId));
@@ -371,8 +370,8 @@
public ResultsFuture<LobChunk> requestNextLobChunk(int lobRequestId,
long requestId, String streamId)
throws MetaMatrixProcessingException {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL))
{
- LogManager.logDetail(LogConstants.CTX_DQP, "Request for next Lob chunk
with Stream id="+streamId+" instance id="+lobRequestId);
//$NON-NLS-1$//$NON-NLS-2$
+ if
(LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP,
MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP,
"Request for next Lob chunk with Stream id="+streamId+" instance
id="+lobRequestId); //$NON-NLS-1$//$NON-NLS-2$
}
RequestWorkItem workItem =
getRequestWorkItem(DQPWorkContext.getWorkContext().getRequestID(requestId));
ResultsFuture<LobChunk> resultsFuture = new
ResultsFuture<LobChunk>();
@@ -427,7 +426,7 @@
try {
cancelRequest(reqId);
} catch (MetaMatrixComponentException err) {
- LogManager.logWarning(LogConstants.CTX_DQP, err, "Failed to cancel
" + reqId); //$NON-NLS-1$
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP,
err, "Failed to cancel " + reqId); //$NON-NLS-1$
}
}
}
@@ -436,7 +435,7 @@
try {
transactionService.cancelTransactions(sessionId, false);
} catch (XATransactionException err) {
- LogManager.logWarning(LogConstants.CTX_DQP, "rollback failed for
requestID=" + sessionId); //$NON-NLS-1$
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP,
"rollback failed for requestID=" + sessionId); //$NON-NLS-1$
}
}
contextCache.removeSessionScopedCache(sessionId);
@@ -448,8 +447,8 @@
}
private boolean cancelRequest(RequestID requestID) throws
MetaMatrixComponentException {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL))
{
- LogManager.logDetail(LogConstants.CTX_DQP, "cancelQuery for
requestID=" + requestID); //$NON-NLS-1$
+ if
(LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP,
MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP,
"cancelQuery for requestID=" + requestID); //$NON-NLS-1$
}
boolean markCancelled = false;
@@ -461,7 +460,7 @@
if (markCancelled) {
logMMCommand(workItem, Event.CANCEL, null);
} else {
- LogManager.logDetail(LogConstants.CTX_DQP,
DQPPlugin.Util.getString("DQPCore.failed_to_cancel")); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP,
DQPPlugin.Util.getString("DQPCore.failed_to_cancel")); //$NON-NLS-1$
}
return markCancelled;
}
@@ -478,25 +477,25 @@
* @throws MetaMatrixComponentException
*/
void closeRequest(RequestID requestID) throws MetaMatrixComponentException {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL))
{
- LogManager.logDetail(LogConstants.CTX_DQP, "closeQuery for
requestID=" + requestID); //$NON-NLS-1$
+ if
(LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP,
MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP,
"closeQuery for requestID=" + requestID); //$NON-NLS-1$
}
RequestWorkItem workItem = safeGetWorkItem(requestID);
if (workItem != null) {
workItem.requestClose();
} else {
- LogManager.logDetail(LogConstants.CTX_DQP, requestID + " close call ignored
as the request has already been removed."); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, requestID
+ " close call ignored as the request has already been removed.");
//$NON-NLS-1$
}
}
private void clearPlanCache(){
- LogManager.logInfo(LogConstants.CTX_DQP,
DQPPlugin.Util.getString("DQPCore.Clearing_prepared_plan_cache"));
//$NON-NLS-1$
+ LogManager.logInfo(com.metamatrix.common.util.LogConstants.CTX_DQP,
DQPPlugin.Util.getString("DQPCore.Clearing_prepared_plan_cache"));
//$NON-NLS-1$
this.prepPlanCache.clearAll();
}
private void clearCodeTableCache(){
- LogManager.logInfo(LogConstants.CTX_DQP,
DQPPlugin.Util.getString("DQPCore.Clearing_code_table_cache")); //$NON-NLS-1$
+ LogManager.logInfo(com.metamatrix.common.util.LogConstants.CTX_DQP,
DQPPlugin.Util.getString("DQPCore.Clearing_code_table_cache")); //$NON-NLS-1$
this.dataTierMgr.clearCodeTables();
}
@@ -563,7 +562,7 @@
}
void logMMCommand(RequestWorkItem workItem, Event status, Integer rowCount) {
- if (!LogManager.isMessageToBeRecorded(LogConstants.CTX_COMMANDLOGGING,
MessageLevel.INFO)) {
+ if
(!LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_COMMANDLOGGING,
MessageLevel.INFO)) {
return;
}
@@ -583,7 +582,7 @@
} else {
message = new CommandLogMessage(System.currentTimeMillis(), rID.toString(),
txnID, workContext.getConnectionID(), workContext.getUserName(), workContext.getVdbName(),
workContext.getVdbVersion(), rowCount, status);
}
- LogManager.log(MessageLevel.DETAIL, LogConstants.CTX_COMMANDLOGGING, message);
+ LogManager.log(MessageLevel.DETAIL,
com.metamatrix.common.util.LogConstants.CTX_COMMANDLOGGING, message);
}
ProcessorDataManager getDataTierManager() {
@@ -639,7 +638,7 @@
prepPlanCache = new
SessionAwareCache<PreparedPlan>(config.getPreparedPlanCacheMaxCount());
// Processor debug flag
- LogManager.logInfo(LogConstants.CTX_DQP,
DQPPlugin.Util.getString("DQPCore.Processor_debug_allowed_{0}",
this.processorDebugAllowed)); //$NON-NLS-1$
+ LogManager.logInfo(com.metamatrix.common.util.LogConstants.CTX_DQP,
DQPPlugin.Util.getString("DQPCore.Processor_debug_allowed_{0}",
this.processorDebugAllowed)); //$NON-NLS-1$
//get buffer manager
this.bufferManager = bufferService.getBufferManager();
Modified:
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java
===================================================================
---
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -64,7 +64,6 @@
import com.metamatrix.core.CoreConstants;
import com.metamatrix.core.util.Assertion;
import com.metamatrix.dqp.DQPPlugin;
-import com.metamatrix.dqp.embedded.DQPEmbeddedProperties;
import com.metamatrix.dqp.message.AtomicRequestID;
import com.metamatrix.dqp.message.AtomicRequestMessage;
import com.metamatrix.dqp.message.AtomicResultsMessage;
@@ -409,7 +408,7 @@
case CACHE_EXISTS:
return this.codeTableCache.lookupValue(codeTableName, returnElementName,
keyElementName, keyValue, context);
case CACHE_OVERLOAD:
- throw new MetaMatrixProcessingException("ERR.018.005.0100",
DQPPlugin.Util.getString("ERR.018.005.0100",
DQPEmbeddedProperties.MAX_CODE_TABLES)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new MetaMatrixProcessingException("ERR.018.005.0100",
DQPPlugin.Util.getString("ERR.018.005.0100", "maxCodeTables"));
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
default:
throw BlockedException.INSTANCE;
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/LobWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/LobWorkItem.java 2010-03-09
20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/LobWorkItem.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -40,7 +40,6 @@
import com.metamatrix.common.types.XMLType;
import com.metamatrix.core.util.Assertion;
import com.metamatrix.dqp.DQPPlugin;
-import com.metamatrix.dqp.util.LogConstants;
public class LobWorkItem implements Work {
@@ -76,7 +75,7 @@
chunk = stream.getNextChunk();
shouldClose = chunk.isLast();
} catch (MetaMatrixComponentException e) {
- LogManager.logWarning(LogConstants.CTX_DQP, e,
DQPPlugin.Util.getString("ProcessWorker.LobError")); //$NON-NLS-1$
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, e,
DQPPlugin.Util.getString("ProcessWorker.LobError")); //$NON-NLS-1$
ex = e;
} catch (IOException e) {
ex = e;
@@ -98,7 +97,7 @@
stream.close();
}
} catch (IOException e) {
- LogManager.logWarning(LogConstants.CTX_DQP, e,
DQPPlugin.Util.getString("ProcessWorker.LobError")); //$NON-NLS-1$
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, e,
DQPPlugin.Util.getString("ProcessWorker.LobError")); //$NON-NLS-1$
}
parent.removeLobStream(streamRequestId);
}
Modified:
trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java
===================================================================
---
trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -38,7 +38,6 @@
import com.metamatrix.api.exception.query.QueryValidatorException;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.types.DataTypeManager;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.QueryPlugin;
import com.metamatrix.query.eval.Evaluator;
import com.metamatrix.query.metadata.QueryMetadataInterface;
@@ -137,7 +136,7 @@
if (prepPlan == null) {
//if prepared plan does not exist, create one
prepPlan = new PreparedPlan();
- LogManager.logTrace(LogConstants.CTX_DQP, new Object[] { "Query does not
exist in cache: ", sqlQuery}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP, new
Object[] { "Query does not exist in cache: ", sqlQuery}); //$NON-NLS-1$
}
ProcessorPlan cachedPlan = prepPlan.getPlan();
@@ -152,7 +151,7 @@
this.prepPlanCache.put(id, this.context.isSessionFunctionEvaluated(),
prepPlan);
}
} else {
- LogManager.logTrace(LogConstants.CTX_DQP, new Object[] { "Query exist in
cache: ", sqlQuery }); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP, new
Object[] { "Query exist in cache: ", sqlQuery }); //$NON-NLS-1$
processPlan = cachedPlan.clone();
//already in cache. obtain the values from cache
analysisRecord = prepPlan.getAnalysisRecord();
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java 2010-03-09
20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -56,7 +56,6 @@
import com.metamatrix.dqp.service.AuthorizationService;
import com.metamatrix.dqp.service.TransactionContext;
import com.metamatrix.dqp.service.TransactionService;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.jdbc.api.ExecutionProperties;
import com.metamatrix.query.analysis.AnalysisRecord;
import com.metamatrix.query.metadata.QueryMetadataInterface;
@@ -345,7 +344,7 @@
if
(ExecutionProperties.TXN_WRAP_AUTO.equals(requestMsg.getTxnAutoWrapMode())){
startAutoWrapTxn = true;
} else if
(ExecutionProperties.TXN_WRAP_OFF.equals(requestMsg.getTxnAutoWrapMode())) {
- LogManager.logDetail(LogConstants.CTX_DQP,
DQPPlugin.Util.getString("Request.potentially_unsafe")); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP,
DQPPlugin.Util.getString("Request.potentially_unsafe")); //$NON-NLS-1$
}
}
@@ -450,7 +449,7 @@
} finally {
String debugLog = analysisRecord.getDebugLog();
if(debugLog != null && debugLog.length() > 0) {
- LogManager.logInfo(LogConstants.CTX_DQP, debugLog);
+ LogManager.logInfo(com.metamatrix.common.util.LogConstants.CTX_DQP,
debugLog);
}
}
@@ -458,7 +457,7 @@
analysisRecord.setQueryPlan(processPlan.getDescriptionProperties());
}
- LogManager.logDetail(LogConstants.CTX_DQP, new Object[] {
DQPPlugin.Util.getString("BasicInterceptor.ProcessTree_for__4"), requestId,
processPlan }); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, new
Object[] { DQPPlugin.Util.getString("BasicInterceptor.ProcessTree_for__4"),
requestId, processPlan }); //$NON-NLS-1$
} catch (QueryMetadataException e) {
Object[] params = new Object[] { requestId};
String msg =
DQPPlugin.Util.getString("DQPCore.Unknown_query_metadata_exception_while_registering_query__{0}.",
params); //$NON-NLS-1$
@@ -528,7 +527,7 @@
public void processRequest()
throws QueryValidatorException, QueryParserException, QueryResolverException,
MetaMatrixComponentException, QueryPlannerException {
- LogManager.logDetail(LogConstants.CTX_DQP, this.requestId, "executing",
this.requestMsg.isPreparedStatement()?"prepared":"",
this.requestMsg.getCommandString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP,
this.requestId, "executing",
this.requestMsg.isPreparedStatement()?"prepared":"",
this.requestMsg.getCommandString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
initMetadata();
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
===================================================================
---
trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -58,7 +58,6 @@
import com.metamatrix.dqp.message.ResultsMessage;
import com.metamatrix.dqp.service.TransactionContext;
import com.metamatrix.dqp.service.TransactionService;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.analysis.AnalysisRecord;
import com.metamatrix.query.analysis.QueryAnnotation;
import com.metamatrix.query.execution.QueryExecPlugin;
@@ -166,7 +165,7 @@
protected void process() {
DQPWorkContext.setWorkContext(this.dqpWorkContext);
- LogManager.logDetail(LogConstants.CTX_DQP, "############# PW PROCESSING
on", requestID, "with state", state, "###########");
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP,
"############# PW PROCESSING on", requestID, "with state", state,
"###########"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
try {
if (this.state == ProcessingState.NEW) {
@@ -184,12 +183,12 @@
}
}
} catch (BlockedException e) {
- LogManager.logDetail(LogConstants.CTX_DQP, "############# PW EXITING
on", requestID, "- processor blocked ###########"); //$NON-NLS-1$
//$NON-NLS-2$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP,
"############# PW EXITING on", requestID, "- processor blocked
###########"); //$NON-NLS-1$ //$NON-NLS-2$
} catch (QueryProcessor.ExpiredTimeSliceException e) {
- LogManager.logDetail(LogConstants.CTX_DQP, "############# PW
reenqueueing ", requestID, "- time slice expired ###########");
//$NON-NLS-1$ //$NON-NLS-2$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP,
"############# PW reenqueueing ", requestID, "- time slice expired
###########"); //$NON-NLS-1$ //$NON-NLS-2$
this.moreWork();
} catch (Throwable e) {
- LogManager.logDetail(LogConstants.CTX_DQP, e, "############# PW EXITING
on", requestID, "- error occurred ###########"); //$NON-NLS-1$
//$NON-NLS-2$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, e,
"############# PW EXITING on", requestID, "- error occurred
###########"); //$NON-NLS-1$ //$NON-NLS-2$
if (!isCanceled()) {
dqpCore.logMMCommand(this, Event.CANCEL, null);
@@ -202,9 +201,9 @@
cause = cause.getCause();
}
StackTraceElement elem = cause.getStackTrace()[0];
- LogManager.logWarning(LogConstants.CTX_DQP,
DQPPlugin.Util.getString("ProcessWorker.processing_error", e.getMessage(),
requestID, e.getClass().getName(), elem)); //$NON-NLS-1$
+
LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP,
DQPPlugin.Util.getString("ProcessWorker.processing_error", e.getMessage(),
requestID, e.getClass().getName(), elem)); //$NON-NLS-1$
}else {
- LogManager.logError(LogConstants.CTX_DQP, e,
DQPPlugin.Util.getString("ProcessWorker.error", requestID)); //$NON-NLS-1$
+ LogManager.logError(com.metamatrix.common.util.LogConstants.CTX_DQP,
e, DQPPlugin.Util.getString("ProcessWorker.error", requestID)); //$NON-NLS-1$
}
}
@@ -261,8 +260,8 @@
sendResultsIfNeeded(null);
} else {
moreWork(false); // If the timeslice expired, then the processor can probably produce
more batches.
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_DQP, "############# PW EXITING on " +
requestID + " - reenqueueing for more processing ###########"); //$NON-NLS-1$
//$NON-NLS-2$
+ if (LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP,
MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP,
"############# PW EXITING on " + requestID + " - reenqueueing for more
processing ###########"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
@@ -278,8 +277,8 @@
this.processor.closeProcessing();
}
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_DQP, "Removing tuplesource for the
request " + requestID); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP,
MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP,
"Removing tuplesource for the request " + requestID); //$NON-NLS-1$
}
rowcount = resultsBuffer.getRowCount();
if (this.processor != null) {
@@ -315,7 +314,7 @@
try {
this.transactionService.rollback(transactionContext);
} catch (XATransactionException e1) {
- LogManager.logWarning(LogConstants.CTX_DQP, e1,
DQPPlugin.Util.getString("ProcessWorker.failed_rollback")); //$NON-NLS-1$
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP,
e1, DQPPlugin.Util.getString("ProcessWorker.failed_rollback")); //$NON-NLS-1$
}
}
@@ -391,8 +390,8 @@
return result;
}
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_DQP,
"[RequestWorkItem.sendResultsIfNeeded] requestID:", requestID,
"resultsID:", this.resultsBuffer, "done:", doneProducingBatches );
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP,
MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP,
"[RequestWorkItem.sendResultsIfNeeded] requestID:", requestID,
"resultsID:", this.resultsBuffer, "done:", doneProducingBatches );
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
//TODO: support fetching more than 1 batch
@@ -509,11 +508,11 @@
private void sendError() {
synchronized (this) {
if (this.resultsReceiver == null) {
- LogManager.logDetail(LogConstants.CTX_DQP, processingException, "Unable to
send error to client as results were already sent.", requestID); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP,
processingException, "Unable to send error to client as results were already
sent.", requestID); //$NON-NLS-1$
return;
}
}
- LogManager.logDetail(LogConstants.CTX_DQP, processingException, "Sending error to
client", requestID); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP,
processingException, "Sending error to client", requestID); //$NON-NLS-1$
ResultsMessage response = new ResultsMessage(requestMsg);
response.setException(processingException);
setAnalysisRecords(response, analysisRecord);
@@ -570,7 +569,7 @@
try {
transactionService.cancelTransactions(requestID.getConnectionID(),
true);
} catch (XATransactionException err) {
- LogManager.logWarning(LogConstants.CTX_DQP, "rollback failed
for requestID=" + requestID.getConnectionID()); //$NON-NLS-1$
+
LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, "rollback
failed for requestID=" + requestID.getConnectionID()); //$NON-NLS-1$
throw new MetaMatrixComponentException(err);
}
}
@@ -594,15 +593,15 @@
return true;
}
- LogManager.logDetail(LogConstants.CTX_DQP, "Connector request not found.
AtomicRequestID=", ari); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, "Connector
request not found. AtomicRequestID=", ari); //$NON-NLS-1$
return false;
}
public void requestClose() throws MetaMatrixComponentException {
synchronized (this) {
if (this.state == ProcessingState.CLOSE || this.closeRequested) {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP,
MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_DQP, "Request already closing"
+ requestID); //$NON-NLS-1$
+ if
(LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP,
MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP,
"Request already closing" + requestID); //$NON-NLS-1$
}
return;
}
@@ -619,7 +618,7 @@
public void closeAtomicRequest(AtomicRequestID atomicRequestId) {
connectorInfo.remove(atomicRequestId);
- LogManager.logTrace(LogConstants.CTX_DQP, new Object[] {"closed
atomic-request:", atomicRequestId}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP, new Object[]
{"closed atomic-request:", atomicRequestId}); //$NON-NLS-1$
}
public void addConnectorRequest(AtomicRequestID atomicRequestId, DataTierTupleSource
connInfo) {
Modified:
trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/TestConnectorWorkItem.java
===================================================================
---
trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/TestConnectorWorkItem.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/TestConnectorWorkItem.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -51,7 +51,6 @@
import com.metamatrix.dqp.message.RequestID;
import com.metamatrix.dqp.message.RequestMessage;
import com.metamatrix.dqp.service.TransactionContext;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.platform.security.api.SessionToken;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.parser.QueryParser;
@@ -381,7 +380,7 @@
synchConnectorWorkItem.run();
assertNotNull("Connection should not be null when IsImmutable is true",
synchConnectorWorkItem.connection); //$NON-NLS-1$
} catch ( Exception e ) {
- LogManager.logWarning(LogConstants.CTX_CONNECTOR, e.getMessage());
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_CONNECTOR,
e.getMessage());
}
}
@@ -417,7 +416,7 @@
synchConnectorWorkItem.run();
assertNull("Connection should be null when IsImmutable is false",
synchConnectorWorkItem.connection); //$NON-NLS-1$
} catch ( Exception e ) {
- LogManager.logWarning(LogConstants.CTX_CONNECTOR, e.getMessage());
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_CONNECTOR,
e.getMessage());
}
}
Modified:
trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
===================================================================
---
trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -80,7 +80,6 @@
import com.metamatrix.dqp.service.BufferService;
import com.metamatrix.dqp.service.SessionService;
import com.metamatrix.dqp.service.TransactionService;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.platform.security.api.ILogon;
import com.metamatrix.platform.security.api.SessionToken;
@@ -119,9 +118,9 @@
// create the necessary services
createClientServices();
- this.csr.registerClientService(ILogon.class, proxyService(ILogon.class, logon),
com.metamatrix.common.util.LogConstants.CTX_SERVER);
- this.csr.registerClientService(ClientSideDQP.class,
proxyService(ClientSideDQP.class, this.dqpCore), LogConstants.CTX_QUERY_SERVICE);
- this.csr.registerClientService(Admin.class, proxyService(Admin.class, admin),
LogConstants.CTX_ADMIN_API);
+ this.csr.registerClientService(ILogon.class, proxyService(ILogon.class, logon),
com.metamatrix.common.util.LogConstants.CTX_SESSION);
+ this.csr.registerClientService(ClientSideDQP.class,
proxyService(ClientSideDQP.class, this.dqpCore),
com.metamatrix.common.util.LogConstants.CTX_DQP);
+ this.csr.registerClientService(Admin.class, proxyService(Admin.class, admin),
com.metamatrix.common.util.LogConstants.CTX_ADMIN_API);
if (this.jdbcSocketConfiguration.isEnabled()) {
this.jdbcSocket = new SocketTransport(this.jdbcSocketConfiguration, csr);
@@ -180,7 +179,7 @@
txnService.setTransactionProvider(new ContainerTransactionProvider(terminator));
txnService.setProcessName(processName);
txnService.setXidFactory(new XidFactory());
- return (TransactionService)LogManager.createLoggingProxy(LogConstants.CTX_TXN_LOG,
txnService, new Class[] {TransactionService.class}, MessageLevel.DETAIL);
+ return
(TransactionService)LogManager.createLoggingProxy(com.metamatrix.common.util.LogConstants.CTX_TXN_LOG,
txnService, new Class[] {TransactionService.class}, MessageLevel.DETAIL);
}
private <T> T proxyService(final Class<T> iface, final T instance) {
Modified: trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedPlugin.java
===================================================================
---
trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedPlugin.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedPlugin.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -26,7 +26,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.core.BundleUtil;
-import com.metamatrix.dqp.util.LogConstants;
public class DQPEmbeddedPlugin {
@@ -39,35 +38,35 @@
public static void logError(Exception e, String msg, Object[] args) {
String actualMsg = Util.getString(msg, args);
if (e != null) {
- LogManager.logError(LogConstants.CTX_DQP, e, actualMsg);
+ LogManager.logError(com.metamatrix.common.util.LogConstants.CTX_DQP, e,
actualMsg);
}
else {
- LogManager.logError(LogConstants.CTX_DQP, actualMsg);
+ LogManager.logError(com.metamatrix.common.util.LogConstants.CTX_DQP,
actualMsg);
}
}
public static void logError(String msg, Object[] args) {
String actualMsg = Util.getString(msg,args);
- LogManager.logError(LogConstants.CTX_DQP, actualMsg);
+ LogManager.logError(com.metamatrix.common.util.LogConstants.CTX_DQP, actualMsg);
}
public static void logWarning(Exception e, String msg, Object[] args) {
String actualMsg = Util.getString(msg,args);
if (e != null) {
- LogManager.logWarning(LogConstants.CTX_DQP, e, actualMsg);
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, e,
actualMsg);
}
else {
- LogManager.logWarning(LogConstants.CTX_DQP, actualMsg);
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP,
actualMsg);
}
}
public static void logWarning(String msg, Object[] args) {
String actualMsg = Util.getString(msg,args);
- LogManager.logWarning(LogConstants.CTX_DQP, actualMsg);
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP,
actualMsg);
}
public static void logInfo(String msg, Object[] args) {
String actualMsg = Util.getString(msg,args);
- LogManager.logInfo(LogConstants.CTX_DQP, actualMsg);
+ LogManager.logInfo(com.metamatrix.common.util.LogConstants.CTX_DQP, actualMsg);
}
}
Modified: trunk/runtime/src/main/java/org/teiid/logging/Log4JUtil.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/logging/Log4JUtil.java 2010-03-09 20:21:26 UTC
(rev 1952)
+++ trunk/runtime/src/main/java/org/teiid/logging/Log4JUtil.java 2010-03-09 22:36:00 UTC
(rev 1953)
@@ -98,26 +98,18 @@
public static Set<String> getContexts(){
HashSet<String> contexts = new HashSet<String>();
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_DQP);
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_CONNECTOR);
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_BUFFER_MGR);
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_STORAGE_MGR);
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_TXN_LOG);
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_EXTENSION_SOURCE);
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_COMMANDLOGGING);
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_AUDITLOGGING);
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_QUERY_SERVICE);
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_PROCESS_INFO_LOG);
-
- contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_CONFIG);
- contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_COMMUNICATION);
- contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_POOLING);
+ contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_DQP);
+ contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_CONNECTOR);
+ contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR);
+ contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_TXN_LOG);
+ contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_COMMANDLOGGING);
+ contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_AUDITLOGGING);
contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_SESSION);
contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_AUTHORIZATION);
contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_MEMBERSHIP);
- contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_AUTHORIZATION_ADMIN_API);
contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_SERVER);
- contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_ADMIN);
+ contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_ADMIN_API);
+ contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_QUERY_PLANNER);
contexts.add("com.arjuna"); //$NON-NLS-1$
contexts.add("org.jboss"); //$NON-NLS-1$
Modified: trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java
===================================================================
---
trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java 2010-03-09
20:21:26 UTC (rev 1952)
+++
trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -62,7 +62,6 @@
import com.metamatrix.core.util.LRUCache;
import com.metamatrix.dqp.embedded.DQPEmbeddedPlugin;
import com.metamatrix.dqp.service.AuthorizationService;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.platform.security.api.MetaMatrixPrincipal;
import com.metamatrix.platform.security.api.MetaMatrixPrincipalName;
import com.metamatrix.platform.security.api.SessionToken;
@@ -149,7 +148,7 @@
// Audit - request
AuditMessage msg = new AuditMessage( contextName,
"getInaccessibleResources-request", caller.getUsername(), resources.toArray(new
String[resources.size()])); //$NON-NLS-1$
- LogManager.log(MessageLevel.INFO, LogConstants.CTX_AUDITLOGGING, msg);
+ LogManager.log(MessageLevel.INFO,
com.metamatrix.common.util.LogConstants.CTX_AUDITLOGGING, msg);
if (isEntitled()){
return Collections.EMPTY_LIST;
@@ -174,10 +173,10 @@
if (results.isEmpty()) {
msg = new AuditMessage( contextName, "getInaccessibleResources-granted
all", caller.getUsername(), resources.toArray(new String[resources.size()]));
//$NON-NLS-1$
- LogManager.log(MessageLevel.INFO, LogConstants.CTX_AUDITLOGGING, msg);
+ LogManager.log(MessageLevel.INFO,
com.metamatrix.common.util.LogConstants.CTX_AUDITLOGGING, msg);
} else {
msg = new AuditMessage( contextName,
"getInaccessibleResources-denied", caller.getUsername(), resources.toArray(new
String[resources.size()])); //$NON-NLS-1$
- LogManager.log(MessageLevel.INFO, LogConstants.CTX_AUDITLOGGING, msg);
+ LogManager.log(MessageLevel.INFO,
com.metamatrix.common.util.LogConstants.CTX_AUDITLOGGING, msg);
}
return results;
}
Modified: trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java 2010-03-09
20:21:26 UTC (rev 1952)
+++ trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -195,6 +195,11 @@
public long getMaxFileSize() {
return maxFileSize;
}
+
+ @ManagementProperty(description="Max open buffer files (default 64)")
+ public void setMaxOpenFiles(int maxOpenFiles) {
+ this.maxOpenFiles = maxOpenFiles;
+ }
@ManagementProperty(description="#The number of batch columns guarenteed to a
processing operation. Set this value lower if the workload typically" +
"processes larger numbers of concurrent queries with large intermediate
results from operations such as sorting, " +
Modified: trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java 2010-03-09
20:21:26 UTC (rev 1952)
+++ trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -208,7 +208,7 @@
newSession.addAttchment("SecurityContext", securityContext);
newSession.addAttchment(VDBMetaData.class, vdb);
newSession.addAttchment(SessionToken.class, new SessionToken(id, userName));
-
+ LogManager.logDetail(LogConstants.CTX_SESSION, new Object[] {"Logon
successful for \"", userName, "\" - created SessionID \"",
"" + id, "\"" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
//$NON-NLS-4$
this.sessionCache.put(newSession.getSessionId(), newSession);
return newSession;
}
Modified: trunk/runtime/src/main/java/org/teiid/services/TeiidLoginContext.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/TeiidLoginContext.java 2010-03-09
20:21:26 UTC (rev 1952)
+++ trunk/runtime/src/main/java/org/teiid/services/TeiidLoginContext.java 2010-03-09
22:36:00 UTC (rev 1953)
@@ -59,7 +59,7 @@
public void authenticateUser(String username, Credentials credential, String
applicationName, List<String> domains) throws LoginException {
- LogManager.logTrace(LogConstants.CTX_MEMBERSHIP, new Object[]
{"authenticateUser", username, applicationName}); //$NON-NLS-1$
+ LogManager.logDetail(LogConstants.CTX_MEMBERSHIP, new Object[]
{"authenticateUser", username, applicationName}); //$NON-NLS-1$
final String baseUsername = getBaseUsername(username);
final char[] password = credential.getCredentialsAsCharArray();
@@ -92,10 +92,10 @@
this.loginContext.login();
this.userName = baseUsername+AT+domain;
this.securitydomain = domain;
-
+ LogManager.logDetail(LogConstants.CTX_MEMBERSHIP, new Object[] {"Logon
successful for \"", username, "\""}); //$NON-NLS-1$
//$NON-NLS-2$
return;
} catch (LoginException e) {
- LogManager.logDetail(LogConstants.CTX_MEMBERSHIP,e.getMessage());
+ LogManager.logDetail(LogConstants.CTX_MEMBERSHIP,e, e.getMessage());
}
}
throw new
LoginException(DQPEmbeddedPlugin.Util.getString("SessionServiceImpl.The_username_0_and/or_password_are_incorrect",
username )); //$NON-NLS-1$
Modified: trunk/runtime/src/main/java/org/teiid/transport/LogonImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/LogonImpl.java 2010-03-09 20:21:26 UTC
(rev 1952)
+++ trunk/runtime/src/main/java/org/teiid/transport/LogonImpl.java 2010-03-09 22:36:00 UTC
(rev 1953)
@@ -39,8 +39,6 @@
import com.metamatrix.api.exception.security.SessionServiceException;
import com.metamatrix.common.api.MMURL;
import com.metamatrix.common.comm.api.ServerConnection;
-import com.metamatrix.common.log.LogManager;
-import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.CoreConstants;
import com.metamatrix.dqp.client.ResultsFuture;
import com.metamatrix.dqp.service.SessionService;
@@ -76,7 +74,6 @@
SessionMetadata sessionInfo = service.createSession(user,credential, applicationName,
connProps, adminConnection);
long sessionID = updateDQPContext(sessionInfo, adminConnection);
- LogManager.logDetail(LogConstants.CTX_SESSION, new Object[] {"Logon successful
for \"", user, "\" - created SessionID \"", "" +
sessionID, "\"" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
//$NON-NLS-4$
if (Boolean.parseBoolean(connProps.getProperty(ServerConnection.LOCAL_CONNECTION))) {
service.setLocalSession(sessionID);
}