Author: van.halbert
Date: 2012-02-23 16:04:48 -0500 (Thu, 23 Feb 2012)
New Revision: 3894
Modified:
branches/7.7.x/api/src/main/java/org/teiid/logging/CommandLogMessage.java
Log:
TEIID-1951 changed reference to connectorBindingName to translatorName, and added new
getTranslatorName method and deprecated the getConnectorBindingName. The admin guide in
confluence has been updated to an example of command logging using translatorName, instead
of connectorBindingName, in the log
Modified: branches/7.7.x/api/src/main/java/org/teiid/logging/CommandLogMessage.java
===================================================================
--- branches/7.7.x/api/src/main/java/org/teiid/logging/CommandLogMessage.java 2012-02-22
02:54:36 UTC (rev 3893)
+++ branches/7.7.x/api/src/main/java/org/teiid/logging/CommandLogMessage.java 2012-02-23
21:04:48 UTC (rev 3894)
@@ -58,7 +58,7 @@
private String sql;
private Integer rowCount;
private String modelName;
- private String connectorBindingName;
+ private String translatorName;
private ExecutionContext executionContext;
public CommandLogMessage(long timestamp,
@@ -100,13 +100,13 @@
long sourceCommandID,
String transactionID,
String modelName,
- String connectorBindingName,
+ String translatorName,
String sessionID,
String principal,
String sql,
ExecutionContext context) {
// dataSourceCommandStart
- this(timestamp, requestID, sourceCommandID, transactionID, modelName,
connectorBindingName, sessionID, principal, null, Event.NEW, context);
+ this(timestamp, requestID, sourceCommandID, transactionID, modelName,
translatorName, sessionID, principal, null, Event.NEW, context);
this.sql = sql;
}
public CommandLogMessage(long timestamp,
@@ -114,7 +114,7 @@
long sourceCommandID,
String transactionID,
String modelName,
- String connectorBindingName,
+ String translatorName,
String sessionID,
String principal,
Integer finalRowCount,
@@ -128,7 +128,7 @@
this.sourceCommandID = sourceCommandID;
this.transactionID = transactionID;
this.modelName = modelName;
- this.connectorBindingName = connectorBindingName;
+ this.translatorName = translatorName;
this.sessionID = sessionID;
this.principal = principal;
this.rowCount = finalRowCount;
@@ -143,9 +143,9 @@
return "\t"+ event +" USER COMMAND:\tendTime=" + new
Timestamp(timestamp) + "\trequestID=" + requestID + "\ttxID=" +
transactionID + "\tsessionID=" + sessionID + "\tprincipal=" +
principal + "\tvdbName=" + vdbName + "\tvdbVersion=" + vdbVersion +
"\tfinalRowCount=" + rowCount; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
//$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
}
if (event == Event.NEW) {
- return "\tSTART DATA SRC COMMAND:\tstartTime=" + new Timestamp(timestamp)
+ "\trequestID=" + requestID + "\tsourceCommandID="+ sourceCommandID +
"\ttxID=" + transactionID + "\tmodelName="+ modelName +
"\tconnectorBindingName=" + connectorBindingName + "\tsessionID=" +
sessionID + "\tprincipal=" + principal + "\tsql=" + sql;
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$
//$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ return "\tSTART DATA SRC COMMAND:\tstartTime=" + new Timestamp(timestamp)
+ "\trequestID=" + requestID + "\tsourceCommandID="+ sourceCommandID +
"\ttxID=" + transactionID + "\tmodelName="+ modelName +
"\ttranslatorName=" + translatorName + "\tsessionID=" + sessionID +
"\tprincipal=" + principal + "\tsql=" + sql; //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
//$NON-NLS-8$ //$NON-NLS-9$
}
- return "\t"+ event +" SRC COMMAND:\tendTime=" + new
Timestamp(timestamp) + "\trequestID=" + requestID +
"\tsourceCommandID="+ sourceCommandID + "\ttxID=" + transactionID +
"\tmodelName="+ modelName + "\tconnectorBindingName=" +
connectorBindingName + "\tsessionID=" + sessionID + "\tprincipal=" +
principal + "\tfinalRowCount=" + rowCount; //$NON-NLS-1$ //$NON-NLS-2$
//$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
//$NON-NLS-9$ //$NON-NLS-10$
+ return "\t"+ event +" SRC COMMAND:\tendTime=" + new
Timestamp(timestamp) + "\trequestID=" + requestID +
"\tsourceCommandID="+ sourceCommandID + "\ttxID=" + transactionID +
"\tmodelName="+ modelName + "\ttranslatorName=" + translatorName +
"\tsessionID=" + sessionID + "\tprincipal=" + principal +
"\tfinalRowCount=" + rowCount; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
//$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
//$NON-NLS-10$
}
public long getTimestamp() {
@@ -192,9 +192,18 @@
public String getModelName() {
return modelName;
}
+
+ /**
+ * @deprecated in 7.7 see {@link #getTranslatorName()}
+ */
public String getConnectorBindingName() {
- return connectorBindingName;
+ return translatorName;
}
+
+ public String getTranslatorName() {
+ return translatorName;
+ }
+
public Event getStatus() {
return event;
}