[ 
https://issues.apache.org/jira/browse/OOZIE-2446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15143180#comment-15143180
 ] 

Purshotam Shah edited comment on OOZIE-2446 at 2/12/16 4:47 AM:
----------------------------------------------------------------

{code}
+                    validCredential = true;


+            if (!validCredential && credName != null) {
+                throw new 
ActionExecutorException(ActionExecutorException.ErrorType.ERROR, "JA020",
+                        "Could not load credentials with name [{0}]].", 
credName);
+            }
{code}
You don't need validCredential, if credProp is null than there is no valid cred.


{code}
+        catch (Exception e) {
+            assertTrue(true);
+        }
{code}
It always good to assert on errorcode. Exception can be thrown for multiple 
reasons.


was (Author: puru):
{code}
+                    validCredential = true;


+            if (!validCredential && credName != null) {
+                throw new 
ActionExecutorException(ActionExecutorException.ErrorType.ERROR, "JA020",
+                        "Could not load credentials with name [{0}]].", 
credName);
+            }
{code}
You need to use validCredential, if credProp is null than there is no valid 
cred.


{code}
+        catch (Exception e) {
+            assertTrue(true);
+        }
{code}
It always good to assert on errorcode. Exception can be thrown for multiple 
reasons.

> Job does not fail during submission if non existent credential is specified
> ---------------------------------------------------------------------------
>
>                 Key: OOZIE-2446
>                 URL: https://issues.apache.org/jira/browse/OOZIE-2446
>             Project: Oozie
>          Issue Type: Bug
>            Reporter: Satish Subhashrao Saley
>            Assignee: Satish Subhashrao Saley
>            Priority: Minor
>         Attachments: OOZIE-2446-1.patch, OOZIE-2446-2.patch, 
> OOZIE-2446-3.patch
>
>
> {noformat}
> <credentials>
>         <credential name="hcatauth" type="hcat">
>             ......
>     <action name="execute_search_remarketing_report" cred="howlauth">
> {noformat}
> User had specified howlauth instead of hcatauth. Job was launched and failed 
> because it could not connect to hcat. It should have failed in the server 
> itself when no definition for howlauth credential was found.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to