Github user ijokarumawak commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/3179#discussion_r235277747
  
    --- Diff: 
nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/nifi/processors/hive/PutHive3QL.java
 ---
    @@ -148,7 +148,23 @@ public void constructProcess() {
                 if (e instanceof SQLNonTransientException) {
                     return ErrorTypes.InvalidInput;
                 } else if (e instanceof SQLException) {
    -                return ErrorTypes.TemporalFailure;
    +                // Use the SQLException's vendor code for guidance -- see 
Hive's ErrorMsg class for details on error codes
    +                int errorCode = ((SQLException) e).getErrorCode();
    --- End diff --
    
    When a SQLException is thrown, NiFi logs don't show what the SQLException 
error code is. I suggest adding a debug log to write errorCode here. 
Alternatively we can update `PutHive3QL.onFlowFileError` method to add 
errorCode in case the exception is SQLException.
    
    Being able to know the actual error code will make investigation process 
easier in the future.


---

Reply via email to