Class RowMapper
- java.lang.Object
-
- io.debezium.connector.oracle.logminer.RowMapper
-
public class RowMapper extends Object
A utility class to map LogMiner content resultSet values. This class gracefully logs errors, loosing an entry is not critical. The loss will be logged
-
-
Field Summary
Fields Modifier and Type Field Description private static intCHANGE_TIMEstatic intCOMMITprivate static intCSFstatic intDDLstatic intDELETEstatic intINSERTprivate static org.slf4j.LoggerLOGGERstatic intMISSING_SCNprivate static intOPERATIONprivate static intOPERATION_CODEstatic intROLLBACKprivate static intSCNprivate static intSEG_OWNERprivate static intSQL_REDOprivate static intTABLE_NAMEprivate static intTX_IDstatic intUPDATEprivate static intUSERNAME
-
Constructor Summary
Constructors Constructor Description RowMapper()
-
Method Summary
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
INSERT
public static final int INSERT
- See Also:
- Constant Field Values
-
DELETE
public static final int DELETE
- See Also:
- Constant Field Values
-
UPDATE
public static final int UPDATE
- See Also:
- Constant Field Values
-
DDL
public static final int DDL
- See Also:
- Constant Field Values
-
COMMIT
public static final int COMMIT
- See Also:
- Constant Field Values
-
MISSING_SCN
public static final int MISSING_SCN
- See Also:
- Constant Field Values
-
ROLLBACK
public static final int ROLLBACK
- See Also:
- Constant Field Values
-
SCN
private static final int SCN
- See Also:
- Constant Field Values
-
SQL_REDO
private static final int SQL_REDO
- See Also:
- Constant Field Values
-
OPERATION_CODE
private static final int OPERATION_CODE
- See Also:
- Constant Field Values
-
CHANGE_TIME
private static final int CHANGE_TIME
- See Also:
- Constant Field Values
-
TX_ID
private static final int TX_ID
- See Also:
- Constant Field Values
-
CSF
private static final int CSF
- See Also:
- Constant Field Values
-
TABLE_NAME
private static final int TABLE_NAME
- See Also:
- Constant Field Values
-
SEG_OWNER
private static final int SEG_OWNER
- See Also:
- Constant Field Values
-
OPERATION
private static final int OPERATION
- See Also:
- Constant Field Values
-
USERNAME
private static final int USERNAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getOperation
public static String getOperation(OracleStreamingChangeEventSourceMetrics streamingMetrics, ResultSet rs)
-
getUsername
public static String getUsername(OracleStreamingChangeEventSourceMetrics streamingMetrics, ResultSet rs)
-
getOperationCode
public static int getOperationCode(OracleStreamingChangeEventSourceMetrics streamingMetrics, ResultSet rs)
-
getTableName
public static String getTableName(OracleStreamingChangeEventSourceMetrics streamingMetrics, ResultSet rs)
-
getSegOwner
public static String getSegOwner(OracleStreamingChangeEventSourceMetrics streamingMetrics, ResultSet rs)
-
getChangeTime
public static Timestamp getChangeTime(OracleStreamingChangeEventSourceMetrics streamingMetrics, ResultSet rs)
-
getScn
public static Scn getScn(OracleStreamingChangeEventSourceMetrics streamingMetrics, ResultSet rs)
-
getTransactionId
public static String getTransactionId(OracleStreamingChangeEventSourceMetrics streamingMetrics, ResultSet rs)
-
getSqlRedo
public static String getSqlRedo(OracleStreamingChangeEventSourceMetrics streaingMetrics, ResultSet rs, boolean isDml, HistoryRecorder historyRecorder, Scn scn, String tableName, String segOwner, int operationCode, Timestamp changeTime, String txId)
It constructs REDO_SQL. If REDO_SQL is in a few lines, it truncates after first 40_000 characters It also records LogMiner history info if isDml is true- Parameters:
streaingMetrics- the streaming metricsrs- result setisDml- flag indicating if operation code is a DMLhistoryRecorder- history recorderscn- scntableName- table namesegOwner- segment owneroperationCode- operation codechangeTime- time of changetxId- transaction ID- Returns:
- the redo SQL
-
logError
private static void logError(OracleStreamingChangeEventSourceMetrics streamingMetrics, SQLException e, String s)
-
-