[
https://issues.apache.org/jira/browse/SQOOP-2031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14306181#comment-14306181
]
Jonathan Seidman commented on SQOOP-2031:
-----------------------------------------
After going through the code, and reviewing with [~gwenshap], there does not
seem to be an elegant way to fix this within the current framework. Below are a
couple of options I've looked at and rejected, but definitely open to
suggestions. In the meantime I've opened SQOOP-2075 for re-factoring the code
to make this type of validation easier.
A couple of approaches I've looked at:
Add validation to ensure job name isn't empty, e.g. in JobRequestHandler along
with config validations, and set return status appropriately if it is empty.
This provides a way to signal an issue to the client, but doesn't seem to work
with the existing framework to report an appropriate message back to the user.
So it keeps the user from saving an invalid job, but doesn't let them know
what's wrong.
Since MJob extends from MValidatedElement, it seemed like that might provide a
mechanism to set a status and message on the job itself for an empty name.
Based on testing though, any status set here seems to get reset on return to
the client. This doesn't seem to fit the object model regardless, at least
based on my understanding.
Again, happy for input on anything I might be missing.
> Command line allows creating a job will null name
> -------------------------------------------------
>
> Key: SQOOP-2031
> URL: https://issues.apache.org/jira/browse/SQOOP-2031
> Project: Sqoop
> Issue Type: Bug
> Reporter: Veena Basavaraj
> Assignee: Jonathan Seidman
> Labels: newbie
> Fix For: 2.0.0
>
>
> {code}
> create job -f 1 -t 2
> {code}
> Enter no name for job, it allows it
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)