You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Madhan Neethiraj <ma...@apache.org> on 2020/03/31 08:13:04 UTC

Review Request 72288: ATLAS-3700: updated attribute-def with an option to append value (instead of overwrite) during partial-updates

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72288/
-----------------------------------------------------------

Review request for atlas, Ashutosh Mestry, Na Li, Mandar Ambawane, mayank, Nikhil Bonte, Nixon Rodrigues, Pinal Shah, Sarath Subramanian, and Sidharth Mishra.


Bugs: ATLAS-3700
    https://issues.apache.org/jira/browse/ATLAS-3700


Repository: atlas


Description
-------

Added 'isAppendOnPartialUpdate' option in attribute-def, to enable appending of values to array/map type attributes during partial-update operation. Example:

  {
    "name":        "metadata",
    "typeName":    "map<string,string>",
    "isIndexable": false,
    "isOptional":  true,
    "isUnique":    false,
    "options": {
      "isAppendOnPartialUpdate": "true"
    }
  }

The value specified for this attribute in partial-update API calls will be appended to existing value - if present. Full-update API calls will overwrite the value of the attribute, as it does currently; there is no change in full-update behavior.


Diffs
-----

  intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java 1434a2459 
  intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java 1d4e37b05 
  intg/src/test/java/org/apache/atlas/TestUtilsV2.java 7ec2b87e3 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java 75b016cca 
  repository/src/test/java/org/apache/atlas/repository/store/graph/v2/AtlasComplexAttributesTest.java b682e8673 


Diff: https://reviews.apache.org/r/72288/diff/1/


Testing
-------

- added tests to cover the new scenarios introduced by the new option:
- pre-commit tests run: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1779/


Thanks,

Madhan Neethiraj


Re: Review Request 72288: ATLAS-3700: updated attribute-def with an option to append value (instead of overwrite) during partial-updates

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72288/#review220157
-----------------------------------------------------------


Ship it!




Ship It!

- Sarath Subramanian


On March 31, 2020, 1:13 a.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72288/
> -----------------------------------------------------------
> 
> (Updated March 31, 2020, 1:13 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Na Li, Mandar Ambawane, mayank, Nikhil Bonte, Nixon Rodrigues, Pinal Shah, Sarath Subramanian, and Sidharth Mishra.
> 
> 
> Bugs: ATLAS-3700
>     https://issues.apache.org/jira/browse/ATLAS-3700
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Added 'isAppendOnPartialUpdate' option in attribute-def, to enable appending of values to array/map type attributes during partial-update operation. Example:
> 
>   {
>     "name":        "metadata",
>     "typeName":    "map<string,string>",
>     "isIndexable": false,
>     "isOptional":  true,
>     "isUnique":    false,
>     "options": {
>       "isAppendOnPartialUpdate": "true"
>     }
>   }
> 
> The value specified for this attribute in partial-update API calls will be appended to existing value - if present. Full-update API calls will overwrite the value of the attribute, as it does currently; there is no change in full-update behavior.
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java 1434a2459 
>   intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java 1d4e37b05 
>   intg/src/test/java/org/apache/atlas/TestUtilsV2.java 7ec2b87e3 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java 75b016cca 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v2/AtlasComplexAttributesTest.java b682e8673 
> 
> 
> Diff: https://reviews.apache.org/r/72288/diff/1/
> 
> 
> Testing
> -------
> 
> - added tests to cover the new scenarios introduced by the new option:
> - pre-commit tests run: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1779/
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>


Re: Review Request 72288: ATLAS-3700: updated attribute-def with an option to append value (instead of overwrite) during partial-updates

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72288/#review220155
-----------------------------------------------------------




repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
Lines 1357 (patched)
<https://reviews.apache.org/r/72288/#comment308479>

    Duplicates will be removed if 'cardinality' is SET -  see below line #1369.


- Madhan Neethiraj


On March 31, 2020, 8:13 a.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72288/
> -----------------------------------------------------------
> 
> (Updated March 31, 2020, 8:13 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Na Li, Mandar Ambawane, mayank, Nikhil Bonte, Nixon Rodrigues, Pinal Shah, Sarath Subramanian, and Sidharth Mishra.
> 
> 
> Bugs: ATLAS-3700
>     https://issues.apache.org/jira/browse/ATLAS-3700
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Added 'isAppendOnPartialUpdate' option in attribute-def, to enable appending of values to array/map type attributes during partial-update operation. Example:
> 
>   {
>     "name":        "metadata",
>     "typeName":    "map<string,string>",
>     "isIndexable": false,
>     "isOptional":  true,
>     "isUnique":    false,
>     "options": {
>       "isAppendOnPartialUpdate": "true"
>     }
>   }
> 
> The value specified for this attribute in partial-update API calls will be appended to existing value - if present. Full-update API calls will overwrite the value of the attribute, as it does currently; there is no change in full-update behavior.
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java 1434a2459 
>   intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java 1d4e37b05 
>   intg/src/test/java/org/apache/atlas/TestUtilsV2.java 7ec2b87e3 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java 75b016cca 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v2/AtlasComplexAttributesTest.java b682e8673 
> 
> 
> Diff: https://reviews.apache.org/r/72288/diff/1/
> 
> 
> Testing
> -------
> 
> - added tests to cover the new scenarios introduced by the new option:
> - pre-commit tests run: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1779/
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>


Re: Review Request 72288: ATLAS-3700: updated attribute-def with an option to append value (instead of overwrite) during partial-updates

Posted by Na Li via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72288/#review220156
-----------------------------------------------------------


Ship it!




Ship It!

- Na Li


On March 31, 2020, 8:13 a.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72288/
> -----------------------------------------------------------
> 
> (Updated March 31, 2020, 8:13 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Na Li, Mandar Ambawane, mayank, Nikhil Bonte, Nixon Rodrigues, Pinal Shah, Sarath Subramanian, and Sidharth Mishra.
> 
> 
> Bugs: ATLAS-3700
>     https://issues.apache.org/jira/browse/ATLAS-3700
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Added 'isAppendOnPartialUpdate' option in attribute-def, to enable appending of values to array/map type attributes during partial-update operation. Example:
> 
>   {
>     "name":        "metadata",
>     "typeName":    "map<string,string>",
>     "isIndexable": false,
>     "isOptional":  true,
>     "isUnique":    false,
>     "options": {
>       "isAppendOnPartialUpdate": "true"
>     }
>   }
> 
> The value specified for this attribute in partial-update API calls will be appended to existing value - if present. Full-update API calls will overwrite the value of the attribute, as it does currently; there is no change in full-update behavior.
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java 1434a2459 
>   intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java 1d4e37b05 
>   intg/src/test/java/org/apache/atlas/TestUtilsV2.java 7ec2b87e3 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java 75b016cca 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v2/AtlasComplexAttributesTest.java b682e8673 
> 
> 
> Diff: https://reviews.apache.org/r/72288/diff/1/
> 
> 
> Testing
> -------
> 
> - added tests to cover the new scenarios introduced by the new option:
> - pre-commit tests run: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1779/
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>


Re: Review Request 72288: ATLAS-3700: updated attribute-def with an option to append value (instead of overwrite) during partial-updates

Posted by Na Li via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72288/#review220154
-----------------------------------------------------------




repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
Lines 1357 (patched)
<https://reviews.apache.org/r/72288/#comment308478>

    do we want to remove duplication?


- Na Li


On March 31, 2020, 8:13 a.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72288/
> -----------------------------------------------------------
> 
> (Updated March 31, 2020, 8:13 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Na Li, Mandar Ambawane, mayank, Nikhil Bonte, Nixon Rodrigues, Pinal Shah, Sarath Subramanian, and Sidharth Mishra.
> 
> 
> Bugs: ATLAS-3700
>     https://issues.apache.org/jira/browse/ATLAS-3700
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Added 'isAppendOnPartialUpdate' option in attribute-def, to enable appending of values to array/map type attributes during partial-update operation. Example:
> 
>   {
>     "name":        "metadata",
>     "typeName":    "map<string,string>",
>     "isIndexable": false,
>     "isOptional":  true,
>     "isUnique":    false,
>     "options": {
>       "isAppendOnPartialUpdate": "true"
>     }
>   }
> 
> The value specified for this attribute in partial-update API calls will be appended to existing value - if present. Full-update API calls will overwrite the value of the attribute, as it does currently; there is no change in full-update behavior.
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java 1434a2459 
>   intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java 1d4e37b05 
>   intg/src/test/java/org/apache/atlas/TestUtilsV2.java 7ec2b87e3 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java 75b016cca 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v2/AtlasComplexAttributesTest.java b682e8673 
> 
> 
> Diff: https://reviews.apache.org/r/72288/diff/1/
> 
> 
> Testing
> -------
> 
> - added tests to cover the new scenarios introduced by the new option:
> - pre-commit tests run: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1779/
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>