Search in sources :

Example 6 with TdchProcessResult

use of com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.base.TdchProcessResult in project kylo by Teradata.

the class TdchUtilsTest method getTdchProcessResultWithShortInvalidExitCode.

private static TdchProcessResult getTdchProcessResultWithShortInvalidExitCode() {
    int exitValue = 0;
    TdchOperationType tdchOperationType = TdchOperationType.TDCH_EXPORT;
    String[] logLines = new String[4];
    logLines[0] = "     Map input records=6";
    logLines[1] = "     Map output records=5";
    logLines[2] = "Not valid exit code";
    logLines[3] = "18/03/21 05:43:24 INFO tool.ConnectorExportTool: ConnectorExportTool time is 33s";
    return new TdchProcessResult(exitValue, logLines, tdchOperationType);
}
Also used : TdchProcessResult(com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.base.TdchProcessResult) TdchOperationType(com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.base.TdchOperationType)

Example 7 with TdchProcessResult

use of com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.base.TdchProcessResult in project kylo by Teradata.

the class TdchUtilsTest method getTdchProcessResultWithNoExitCode.

private static TdchProcessResult getTdchProcessResultWithNoExitCode() {
    int exitValue = 0;
    TdchOperationType tdchOperationType = TdchOperationType.TDCH_EXPORT;
    String[] logLines = new String[4];
    logLines[0] = "     Map input records=6";
    logLines[1] = "     Map output records=5";
    logLines[2] = null;
    logLines[3] = "18/03/21 05:43:24 INFO tool.ConnectorExportTool: ConnectorExportTool time is 33s";
    return new TdchProcessResult(exitValue, logLines, tdchOperationType);
}
Also used : TdchProcessResult(com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.base.TdchProcessResult) TdchOperationType(com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.base.TdchOperationType)

Example 8 with TdchProcessResult

use of com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.base.TdchProcessResult in project kylo by Teradata.

the class TdchUtilsTest method getTdchProcessResultWithLongInvalidExitCode.

private static TdchProcessResult getTdchProcessResultWithLongInvalidExitCode() {
    int exitValue = 0;
    TdchOperationType tdchOperationType = TdchOperationType.TDCH_EXPORT;
    String[] logLines = new String[4];
    logLines[0] = "     Map input records=6";
    logLines[1] = "     Map output records=5";
    logLines[2] = "This log line does not contain a valid exit code from the run of the TDCH job";
    logLines[3] = "18/03/21 05:43:24 INFO tool.ConnectorExportTool: ConnectorExportTool time is 33s";
    return new TdchProcessResult(exitValue, logLines, tdchOperationType);
}
Also used : TdchProcessResult(com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.base.TdchProcessResult) TdchOperationType(com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.base.TdchOperationType)

Example 9 with TdchProcessResult

use of com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.base.TdchProcessResult in project kylo by Teradata.

the class TdchUtilsTest method getTdchProcessResultWithEmptyOutputRecordCountInfo.

private static TdchProcessResult getTdchProcessResultWithEmptyOutputRecordCountInfo() {
    int exitValue = 0;
    TdchOperationType tdchOperationType = TdchOperationType.TDCH_EXPORT;
    String[] logLines = new String[4];
    logLines[0] = "     Map input records=6";
    logLines[1] = "";
    logLines[2] = "18/03/21 05:43:24 INFO tool.ConnectorExportTool: job completed with exit code 0";
    logLines[3] = "18/03/21 05:43:24 INFO tool.ConnectorExportTool: ConnectorExportTool time is 33s";
    return new TdchProcessResult(exitValue, logLines, tdchOperationType);
}
Also used : TdchProcessResult(com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.base.TdchProcessResult) TdchOperationType(com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.base.TdchOperationType)

Example 10 with TdchProcessResult

use of com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.base.TdchProcessResult in project kylo by Teradata.

the class TdchUtilsTest method getTdchProcessResultWithInvalidInputRecordCountShortLineInfo.

private static TdchProcessResult getTdchProcessResultWithInvalidInputRecordCountShortLineInfo() {
    int exitValue = 0;
    TdchOperationType tdchOperationType = TdchOperationType.TDCH_EXPORT;
    String[] logLines = new String[4];
    logLines[0] = "No input rec";
    logLines[1] = "     Map output records=5";
    logLines[2] = "18/03/21 05:43:24 INFO tool.ConnectorExportTool: job completed with exit code 0";
    logLines[3] = "18/03/21 05:43:24 INFO tool.ConnectorExportTool: ConnectorExportTool time is 33s";
    return new TdchProcessResult(exitValue, logLines, tdchOperationType);
}
Also used : TdchProcessResult(com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.base.TdchProcessResult) TdchOperationType(com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.base.TdchOperationType)

Aggregations

TdchProcessResult (com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.base.TdchProcessResult)19 TdchOperationType (com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.base.TdchOperationType)18 TdchConnectionService (com.thinkbiganalytics.kylo.nifi.teradata.tdch.api.TdchConnectionService)1 KerberosConfig (com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.common.KerberosConfig)1 TdchProcessRunner (com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.base.TdchProcessRunner)1 TdchBuilder (com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.export.utils.TdchBuilder)1 TdchUtils (com.thinkbiganalytics.kylo.nifi.teradata.tdch.core.processor.export.utils.TdchUtils)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 FlowFile (org.apache.nifi.flowfile.FlowFile)1 ComponentLog (org.apache.nifi.logging.ComponentLog)1 StopWatch (org.apache.nifi.util.StopWatch)1