Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
1. show config foo --type JOB --subType from --id 1 or show config 1  --type JOB --subType from --id 1 ( NOTE: we can use either id or name )
  //*. show config "foo" --type JOB --subType "from" --sid 1 ( SINCE we are not doing SQOOP-2025, this will not be in the current patch) 
 
2. show config foo --type JOB --subType to --id 1 
 
3. show config foo --type JOB --subType driver --id 1
 
4. show config foo --type LINK --subType link --id 1   
 
//  planned, SQOOP-2046 as a sub ticket of SQOOP-1516
5. show input "foo" --config bar --type LINK --id 1 // id here refers to the link id    


...

Code Block
1. edit config foo --type JOB --subType from --id 1 // id here refers to the job id 
 
// planned, SQOOP-2046 as a sub ticket of SQOOP-1516
2. edit input foo --config bar --type LINK --id 1 // id here refers to the link id
 

 

Rest API changes

ALTERNATIVELY, It was suggested that for command line it is NOT good not to introduce config as a top level ( It was a preference from Gwen Shapira and Qian Xu).  Hence the command are

Code Block
edit job --jid 1 --config foo --type from 
show job --jid 1 --config foo --type from 
edit job --jid 1 --config foo --type to
edit job --jid 1 --config foo --type driver
 
edit link --lid 1 --config foo --type link 



 

 

Rest API changes

The resource returned from the APIs is a config object  MConfig

Read Config By Type and Job or Submission

 

Code Block
1. GET v1/config/JOBjob?name=?&Id=?&subTypetype=   
 
or   
 
2. GET v1/config?type=JOB&name=?&Id=?&subType=

Edit Config By Type and Job


Code Block
1. POST v1/config/LINKlink?name=?&id=?&subTypetype=  
 
 or 
 
2. POST v1/config?type=LINK&name=?&id=?&subType=


 

We chose #1 in both the cases


Repository API changes

Add new API to get config inputs by jobId and type, name

...

Code Block
  public abstract MConfig findFromJobConfig(long jobId, String name);
  public abstract MConfig findToJobConfig(long jobId, String name);
  public abstract MConfig findDriverJobConfig(long jobId, String name);
  public abstract MConfig findLinkConfig(long linkId, String name);
  public abstract void updateFromJobConfig(long jobId, MConfig config);
  public abstract void updateDriverobConfig(long jobId, MConfig config); name);
// the type exists to check who is editing the configs, the connector code via upgrade or the user ( from rest / command line )
  public abstract void updateToJobConfigupdateJobConfig(long jobId, MConfig config, MConfigUpdateEntity type);
  public abstract void updateLinkConfig(long linkId, MConfig config, MConfigUpdateEntity type));

 

Testing

Unit test are almost non existent for the shell code. Hence we will rely on the basic manual testing

...