THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
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 |
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
...