|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.util.CompoundClosableAllocation net.sf.farrago.util.FarragoCompoundAllocation net.sf.farrago.runtime.FarragoRuntimeContext com.lucidera.runtime.LucidDbRuntimeContext
public class LucidDbRuntimeContext
LucidDbRuntimeContext applies LucidDb semantics for query execution.
Nested Class Summary | |
---|---|
private class |
LucidDbRuntimeContext.DefaultErrorLogger
The default error logger writes records to a file |
private static interface |
LucidDbRuntimeContext.ErrorLogger
ErrorLogger processes error records |
private class |
LucidDbRuntimeContext.ErrorLoggerBase
Base class for error loggers |
private class |
LucidDbRuntimeContext.ErrorQuota
An error quota for a statement |
private class |
LucidDbRuntimeContext.ErrorQuotaLogger
Applies a quota to an error logger |
private class |
LucidDbRuntimeContext.SummaryLogEntry
SummaryLogEntry represents an entry in the summary log file. |
private class |
LucidDbRuntimeContext.SummaryLogger
SummaryLogger create a summary of all error logs |
private class |
LucidDbRuntimeContext.SummaryLoggerRef
|
Field Summary | |
---|---|
private String |
actionId
|
private static String |
CONDITION_FIELD_NAME
|
private static String |
ERRCODE_FIELD_NAME
|
private static String |
EXCEPTION_FIELD_NAME
|
private Map<String,RelDataType> |
iterCalcTypeMap
|
private static String |
LEVEL_ERROR
|
private static String |
LEVEL_FIELD_NAME
|
private static String |
LEVEL_WARNING
|
private static String |
LOG_FILE_FIELD_DELIMITER
|
private static String |
LOG_FILE_LINE_DELIMITER
|
private static String |
LOG_FILENAME_EXTENSION
|
private Map<String,LucidDbRuntimeContext.ErrorLogger> |
loggerMap
|
private static String |
POSITION_FIELD_NAME
|
private String |
processId
|
private LucidDbRuntimeContext.ErrorQuota |
quota
|
private static String |
SUMMARY_FILENAME
|
private static Map<String,LucidDbRuntimeContext.SummaryLoggerRef> |
summaryInstanceMap
|
private static String |
TIMESTAMP_FIELD_NAME
|
private static Logger |
tracer
|
private FarragoSessionVariables |
vars
|
Fields inherited from class net.sf.farrago.runtime.FarragoRuntimeContext |
---|
codeCache, cursorMonitor, dataWrapperCache, dynamicParamValues, isClosed, resultSetTypeMap, stmtId, streamGraph, streamOwner |
Fields inherited from class org.eigenbase.util.CompoundClosableAllocation |
---|
allocations |
Constructor Summary | |
---|---|
LucidDbRuntimeContext(FarragoSessionRuntimeParams params)
|
Method Summary | |
---|---|
void |
closeAllocation()
Closes this object. |
private String |
getFilename(String tag)
Builds a filename for a logger, based on system parameters. |
private LucidDbRuntimeContext.ErrorLogger |
getLogger(String tag)
Gets the logger for a given tag. |
private File |
getSummaryFile()
Builds a filename for the summary logger. |
private LucidDbRuntimeContext.SummaryLogger |
getSummaryInstance(String filename)
Gets a singleton summary logger, creating it as required |
int |
getTotalErrorCount()
|
int |
getTotalWarningCount()
|
Object |
handleRowError(String[] names,
Object[] values,
RuntimeException ex,
int columnIndex,
String tag,
boolean isWarning)
Handles a runtime exception based on an array of column values rather than on a SyntheticObject |
Object |
handleRowError(String[] names,
Object[] values,
RuntimeException ex,
int columnIndex,
String tag,
boolean isWarning,
String errorCode,
String columnName)
Handles runtime exception; if errorCode is non-null, exceptions are deferred until all errors on a row are processed; not currently implemented |
Object |
handleRowError(SyntheticObject row,
RuntimeException ex,
int columnIndex,
String tag,
boolean isWarning)
Handles a runtime exception, but allows warnings as well. |
void |
handleRowErrorCompletion(RuntimeException ex,
String tag)
Handles exception for row errors with deferred exceptions; not currently implemented |
private void |
releaseSummaryInstance(String filename)
Releases a singleton summary logger, possibly releasing its resources |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final String SUMMARY_FILENAME
private static final String LOG_FILENAME_EXTENSION
private static final String LOG_FILE_FIELD_DELIMITER
private static final String LOG_FILE_LINE_DELIMITER
private static final String TIMESTAMP_FIELD_NAME
private static final String EXCEPTION_FIELD_NAME
private static final String POSITION_FIELD_NAME
private static final String LEVEL_FIELD_NAME
private static final String LEVEL_WARNING
private static final String LEVEL_ERROR
private static final String CONDITION_FIELD_NAME
private static final String ERRCODE_FIELD_NAME
private static final Logger tracer
private static Map<String,LucidDbRuntimeContext.SummaryLoggerRef> summaryInstanceMap
private final Map<String,RelDataType> iterCalcTypeMap
private final FarragoSessionVariables vars
private final Map<String,LucidDbRuntimeContext.ErrorLogger> loggerMap
private final LucidDbRuntimeContext.ErrorQuota quota
private String processId
private String actionId
Constructor Detail |
---|
public LucidDbRuntimeContext(FarragoSessionRuntimeParams params)
Method Detail |
---|
public int getTotalErrorCount()
public int getTotalWarningCount()
public void closeAllocation()
ClosableAllocation
closeAllocation
in interface ClosableAllocation
closeAllocation
in class FarragoRuntimeContext
private LucidDbRuntimeContext.SummaryLogger getSummaryInstance(String filename)
private void releaseSummaryInstance(String filename)
public Object handleRowError(SyntheticObject row, RuntimeException ex, int columnIndex, String tag, boolean isWarning)
FarragoRuntimeContext
handleRowError
in class FarragoRuntimeContext
FarragoRuntimeContext.handleRowError(SyntheticObject, RuntimeException, int, String)
public Object handleRowError(String[] names, Object[] values, RuntimeException ex, int columnIndex, String tag, boolean isWarning)
FarragoRuntimeContext
handleRowError
in class FarragoRuntimeContext
public Object handleRowError(String[] names, Object[] values, RuntimeException ex, int columnIndex, String tag, boolean isWarning, String errorCode, String columnName)
FarragoRuntimeContext
handleRowError
in class FarragoRuntimeContext
public void handleRowErrorCompletion(RuntimeException ex, String tag)
FarragoRuntimeContext
handleRowErrorCompletion
in class FarragoRuntimeContext
private LucidDbRuntimeContext.ErrorLogger getLogger(String tag)
private String getFilename(String tag)
processId: defaults to identifier based on session id
actionId: defaults to identifier based on statement id
tag: often based on input/output filename, or a unique id
LOG_FILENAME_EXTENSION: such as ".log"
For example: "1201_LoadAccount_LOCALDB.ACME.ACCOUNT_STG.log"
private File getSummaryFile()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |