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

Richard commented on SQOOP-2265:
--------------------------------

Since the following code:
{code}
  public MConfigList getJobConfig(Direction type) {
    switch(type) {
      case FROM:
        return fromConfig;

      case TO:
        return toConfig;

      default:
        throw new SqoopException(DirectionError.DIRECTION_0000, "Direction: " + 
type);
    }
  }

  public MFromConfig getFromJobConfig() {
    return fromConfig;
  }

  public MToConfig getToJobConfig() {
    return toConfig;
  }
{code}
If {{getJobConfig(Direction type)}} is used, down casting is a MUST for all 
usage, such as:
{code}
MToConfig toConfigList = (MToConfig) job.getJobConfig(Direction.To);
{code}
So we decide to use {{getFromLinkId}}/{{getToLinkId}} instead of 
{{getLinkId(Direction)}}.

> Sqoop2: Standardize on methods
> ------------------------------
>
>                 Key: SQOOP-2265
>                 URL: https://issues.apache.org/jira/browse/SQOOP-2265
>             Project: Sqoop
>          Issue Type: Bug
>    Affects Versions: 1.99.5
>            Reporter: Richard
>            Assignee: Richard
>             Fix For: 1.99.6
>
>
> Use getFromLinkId and getToLinkId, instead of getLinkId(Direction).
> Similar with {{Job}} and {{Connector}}



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

Reply via email to