Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate the seedMatching option on Operations #1798

Closed
p013570 opened this issue May 15, 2018 · 2 comments
Closed

Deprecate the seedMatching option on Operations #1798

p013570 opened this issue May 15, 2018 · 2 comments
Assignees
Labels
enhancement Improvement to existing functionality/feature
Milestone

Comments

@p013570
Copy link
Member

p013570 commented May 15, 2018

The seed matching option allows users to define whether they want Edges/Entities that are 'equal to' or 'related to' their seeds.

For Entity Seeds, the matching types determines whether to return just the Entities at the given vertices or also return any Edges that are linked to a vertex.

For Edge Seeds, the matching types determines whether to return just the Edges that have the same src/dest/direction as the Edge seed or also return the Entities either end of the edge seeds.

So effectively the matching type allows you to limit whether Entities and/or Edges are returned. This can and probably should just be done using the View. We should deprecate this flag and remove it in version 2.0 as it will simplify for user queries and also the logic for any new store implementations.

@p013570 p013570 added enhancement Improvement to existing functionality/feature p:high labels May 15, 2018
@p013570 p013570 added this to the v1.6.0 milestone May 15, 2018
@m55624 m55624 self-assigned this May 21, 2018
@m55624
Copy link
Contributor

m55624 commented May 22, 2018

Migration Notes

The default for seedMatching is RELATED so if that is currently used nothing will need to change. There is one limitation however, if you have a seedMatching = EQUAL and specify both Edges and Entities that will have to now be done under 2 Operations in a chain as there can only be one View applied globally to all input.

As seedMatching is now deprecated to write an equivalent Operation for Edges it should now be written as below:

OLD:

{
   "class": "uk.gov.gchq.gaffer.operation.impl.get.GetElements",
    "seedMatching": "EQUAL",
      "input": [
      {
         "class": "uk.gov.gchq.gaffer.operation.data.EdgeSeed",
         "source": “source1“,
         "destination": “dest1“,
         "directed": "true"
      }
   ]
}

NEW:

{
   "class": "uk.gov.gchq.gaffer.operation.impl.get.GetElements”,
      "input": [
      {
         "class": "uk.gov.gchq.gaffer.operation.data.EdgeSeed",
         "source": “source1“,
         "destination": “dest1”,
         "directed": "true"
      }
   ],
   "view" : {
    "edges": {
      “group1“:{}
    }
  }
}

For entities it should now be written:

OLD:

{
   "class": "uk.gov.gchq.gaffer.operation.impl.get.GetElements",
    "seedMatching": "EQUAL",
      "input": [
      {
         "class": "uk.gov.gchq.gaffer.operation.data.EntitySeed",
         "vertex": “vertex1”
      }
   ]
}

NEW:

{
  "class" : "uk.gov.gchq.gaffer.operation.impl.get.GetElements",
  "input" : [ {
    "class" : "uk.gov.gchq.gaffer.operation.data.EntitySeed",
    "vertex" : “vertex1”
  } ],
  "view" : {
    "entities": {
      “group1“: {}
    }
  }
}

m55624 added a commit that referenced this issue May 23, 2018
p013570 pushed a commit that referenced this issue Jun 18, 2018
* gh-1798 - added deprecated flag to Operations with seedMatching field

* gh-1798 - addition of more deprecation annotations

* gh-1798 - checkstyle fix
@p013570
Copy link
Member Author

p013570 commented Jun 18, 2018

Merged into develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to existing functionality/feature
Projects
None yet
Development

No branches or pull requests

2 participants