You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "Veena Basavaraj (JIRA)" <ji...@apache.org> on 2014/09/26 01:18:33 UTC

[jira] [Comment Edited] (SQOOP-1498) Sqoop2: Sqoop2 Job Repository Object refactoring ( objects prefixed with M)

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

Veena Basavaraj edited comment on SQOOP-1498 at 9/25/14 11:17 PM:
------------------------------------------------------------------

The new model classes are
MJob
{code}
public class MJob extends MAccountableEntity implements MClonable {
  /**
   * Connector reference.
   * Job object do not immediately depend on connector as there is indirect
   * dependency through link object, but having this dependency explicitly
   * carried along helps with not having to make the DB call everytime
   */
  private final long fromConnectorId;
  private final long toConnectorId;
  private final long fromLinkId;
  private final long toLinkId;
  private final MFromConfig fromConfig;
  private final MToConfig toConfig;
  private final MDriverConfig driverConfig;

{code}

MConnector
{code}
public final class MConnector extends MPersistableEntity implements MClonable {

  private final String uniqueName;
  private final String className;
  private final String version;
  private final MLinkConfig linkConfig;
  private final MFromConfig fromConfig;
  private final MToConfig toConfig;
{code}

{code}

/**
 * Model describing the link object and its corresponding configs
 */
public class MLink extends MAccountableEntity implements MClonable {
  private long connectorId;
  // NOTE: we hold this in the model for easy access to the link config object, it might as well be retrieved on the fly using the connectorId
  private final MLinkConfig connectorLinkConfig;
{code}

{code}
 */
public class MDriverConfig extends MPersistableEntity implements MClonable {

  private final MConfigList driverConfig;
  private final String version;

{code}

{code}

/**
 * Config describing all required information to build up an link object
 * NOTE: It extends a config list since {@link MLink} could consist of a related config groups
 *       In future this could be simplified to hold a single list of all configs for the link object
 */
public class MLinkConfig extends MConfigList {

  public MLinkConfig(List<MConfig> configs) {
    super(configs);
  }

 
{code}

{code}

/**
 * Config describing all required information to build the FROM part of the job
 * NOTE: It extends a config list since {@link MFromConfig} could consist of a related config groups
 *       In future this could be simplified to hold a single list of all configs for the FROM object

 */
public class MFromConfig extends MConfigList {
  public MFromConfig(List<MConfig> configs) {
    super(configs);
  }


{code}

{code}
/**
 * Config describing all required information to build the TO part of the job
 * NOTE: It extends a config list since {@link MToConfig} could consist of a related config groups
 *       In future this could be simplified to hold a single list of all configs for the TO object

 */
public class MToConfig extends MConfigList {
  public MToConfig(List<MConfig> configs) {
    super(configs);
  }

{code}


was (Author: vybs):
The new model classes are

{code}
public class MJob extends MAccountableEntity implements MClonable {
  /**
   * Connector reference.
   *
   * Job object do not immediately depend on connector as there is indirect
   * dependency through link object, but having this dependency explicitly
   * carried along helps with not having to make the DB call everytime
   */
  private final long fromConnectorId;
  private final long toConnectorId;

  /**
   * Corresponding link objects for connector.
   */
  private final long fromLinkId;
  private final long toLinkId;

  private final MFromConfig fromConfig;
  private final MToConfig toConfig;
  private final MDriverConfig driverConfig;

{code}

> Sqoop2: Sqoop2 Job Repository Object refactoring ( objects prefixed with M)
> ---------------------------------------------------------------------------
>
>                 Key: SQOOP-1498
>                 URL: https://issues.apache.org/jira/browse/SQOOP-1498
>             Project: Sqoop
>          Issue Type: Improvement
>            Reporter: Veena Basavaraj
>            Assignee: Veena Basavaraj
>         Attachments: Sqoop2.pdf
>
>
> See the attached PDF.
> Currently there is a lot of overlap with the entity model classes. All the entity model classes in the code are are prefixed with "M" and are under the org.apache.sqoop.model package. 
> The proposed refactoring will do the following things.
> No more MConnectionForms and MJobForms 
> MConfig( abstract)
> FromConfig ( may or may not inherit MConfigList). Still debating if we need a conflg list. We can use a group attribute on the inputs if we need add hierarchy to the config inputs
> ToConfig
> DriverConfig
> FromConfig/ToConfig/DriverConfig entities belongs to a MJob
> MInput (MConfig has one or more MInputs)
> MConnector will be pretty dumb and will hold its 3 config objects, LinkConfig. FromConfig and ToConfig 
> MLink belongs to a MConnector
> MLink will have a reference to connector and the link config. There will be no connector/ framework part.
> MSubmisssion  belongs to a MJob 
> Lastly, the Repository schema will also be renamed to reflect the context/link/driver/jobrun changes
> End of Story!



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