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

    https://github.com/apache/nifi/pull/3179#discussion_r235274647
  
    --- 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();
    +                if (errorCode >= 10000 && errorCode < 20000) {
    +                    return ErrorTypes.InvalidInput;
    +                } else if (errorCode >= 20000 && errorCode < 30000) {
    +                    return ErrorTypes.TemporalFailure;
    --- End diff --
    
    Based on Hive source code and the detail of these errors, I think we should 
map 2xxxx error code to InvalidInput as retrying will not succeed.
    > 20000 to 29999: Runtime errors where Hive believes that retries are 
unlikely to succeed.
    
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java#L48


---

Reply via email to