You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2016/01/19 19:59:43 UTC
[1/2] incubator-tinkerpop git commit: TINKERPOP-998 Deprecated the
VertexPropertyFeatures.FEATURE_ADD_PROPERTY.
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/TINKERPOP-998 [created] 60de1502e
TINKERPOP-998 Deprecated the VertexPropertyFeatures.FEATURE_ADD_PROPERTY.
Replaced by the already existing (duplicate) VertexFeatures.FEATURE_META_PROPERTIES.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/37202332
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/37202332
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/37202332
Branch: refs/heads/TINKERPOP-998
Commit: 37202332d0c813412a807d5d6955beee90eb40fe
Parents: 427806b
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Jan 19 12:53:56 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Jan 19 12:53:56 2016 -0500
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
docs/src/upgrade/release-3.1.x-incubating.asciidoc | 14 +++++++++++---
.../org/apache/tinkerpop/gremlin/structure/Graph.java | 9 +++++++++
.../tinkerpop/gremlin/FeatureRequirementSet.java | 4 ++--
.../gremlin/structure/FeatureSupportTest.java | 6 +++---
.../tinkerpop/gremlin/structure/PropertyTest.java | 2 +-
6 files changed, 27 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/37202332/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index ce72316..9fb8cc7 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,6 +27,7 @@ TinkerPop 3.1.1 (NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Integrated `NumberHelper` in `SackFunctions`.
+* Deprecated `VertexPropertyFeatures.supportsAddProperty()` which effectively was a duplicate of `VertexFeatures.supportsMetaProperties`.
* The Spark persistence `StorageLevel` can now be set for both job graphs and `PersistedOutputRDD` data.
* Added to the list of "invalid binding keys" allowed by Gremlin Server to cover the private fields of `T` which get exposed in the `ScriptEngine` on static imports.
* Added `BulkDumperVertex` that allows to dump a whole graph in any of the supported IO formats (GraphSON, Gryo, Script).
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/37202332/docs/src/upgrade/release-3.1.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.1.x-incubating.asciidoc b/docs/src/upgrade/release-3.1.x-incubating.asciidoc
index f591a5d..23b430a 100644
--- a/docs/src/upgrade/release-3.1.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.1.x-incubating.asciidoc
@@ -148,6 +148,13 @@ the `AbsstractSandboxExtension` or extending directly from Groovy's `TypeCheckin
See: link:https://issues.apache.org/jira/browse/TINKERPOP-891[TINKERPOP-891],
link:http://tinkerpop.apache.org/docs/3.1.0-incubating/#script-execution[Reference Documentation - Script Execution]
+Deprecated supportsAddProperty()
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+It was realized that `VertexPropertyFeatures.supportsAddProperty()` was effectively a duplicate of
+`VertexFeatures.supportsMetaProperties()`. As a result, `supportsAddProperty()` was deprecated in favor of the other.
+If using `supportsAddProperty()`, simply modify that code to instead utilize `supportsMetaProperties()`.
+
Upgrading for Providers
~~~~~~~~~~~~~~~~~~~~~~~
@@ -198,13 +205,14 @@ Corrections fell into two groups of changes:
. Bugs in the how `Features` were applied to certain tests.
. Refactoring around the realization that `VertexFeatures.supportsMetaProperties()` is really just a duplicate of
-features already exposed as `VertexPropertyFeatures.supportsAddProperty()` and
-`VertexPropertyFeatures.supportsRemoveProperty()`. `VertexFeatures.supportsMetaProperties()` has been deprecated.
+features already exposed as `VertexPropertyFeatures.supportsAddProperty()`.
+`VertexPropertyFeatures.supportsAddProperty()` has been deprecated.
These changes related to "Feature Consistency" open up a number of previously non-executing tests for graphs that did
not support meta-properties, so providers should be wary of potential test failure on previously non-executing tests.
-See: link:https://issues.apache.org/jira/browse/TINKERPOP-985[TINKERPOP-985]
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-985[TINKERPOP-985],
+link:https://issues.apache.org/jira/browse/TINKERPOP-998[TINKERPOP-998]
Graph Processor Providers
^^^^^^^^^^^^^^^^^^^^^^^^^
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/37202332/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
index f4f2511..6c834d3 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
@@ -718,6 +718,11 @@ public interface Graph extends AutoCloseable, Host {
* Features that are related to {@link Vertex} {@link Property} objects.
*/
public interface VertexPropertyFeatures extends PropertyFeatures {
+ /**
+ * @deprecated As of release 3.1.1-incubating, replaced by
+ * {@link org.apache.tinkerpop.gremlin.structure.Graph.Features.VertexFeatures#FEATURE_META_PROPERTIES}
+ */
+ @Deprecated
public static final String FEATURE_ADD_PROPERTY = "AddProperty";
public static final String FEATURE_REMOVE_PROPERTY = "RemoveProperty";
public static final String FEATURE_USER_SUPPLIED_IDS = "UserSuppliedIds";
@@ -729,7 +734,11 @@ public interface Graph extends AutoCloseable, Host {
/**
* Determines if a {@link VertexProperty} allows properties to be added.
+ *
+ * @deprecated As of release 3.1.1-incubating, replaced by
+ * {@link org.apache.tinkerpop.gremlin.structure.Graph.Features.VertexFeatures#supportsMetaProperties()}
*/
+ @Deprecated
@FeatureDescriptor(name = FEATURE_ADD_PROPERTY)
public default boolean supportsAddProperty() {
return true;
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/37202332/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/FeatureRequirementSet.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/FeatureRequirementSet.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/FeatureRequirementSet.java
index a5ac693..65be622 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/FeatureRequirementSet.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/FeatureRequirementSet.java
@@ -54,7 +54,7 @@ public @interface FeatureRequirementSet {
private static final List<FeatureRequirement> featuresRequiredBySimple = new ArrayList<FeatureRequirement>() {{
add(FeatureRequirement.Factory.create(Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES, Graph.Features.VertexFeatures.class));
add(FeatureRequirement.Factory.create(Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES, Graph.Features.EdgeFeatures.class));
- add(FeatureRequirement.Factory.create(Graph.Features.VertexPropertyFeatures.FEATURE_ADD_PROPERTY, Graph.Features.VertexPropertyFeatures.class));
+ add(FeatureRequirement.Factory.create(Graph.Features.VertexFeatures.FEATURE_META_PROPERTIES, Graph.Features.VertexFeatures.class));
add(FeatureRequirement.Factory.create(Graph.Features.VertexPropertyFeatures.FEATURE_STRING_VALUES, Graph.Features.VertexPropertyFeatures.class));
add(FeatureRequirement.Factory.create(Graph.Features.VertexPropertyFeatures.FEATURE_STRING_VALUES, Graph.Features.EdgePropertyFeatures.class));
add(FeatureRequirement.Factory.create(Graph.Features.EdgeFeatures.FEATURE_ADD_PROPERTY, Graph.Features.EdgeFeatures.class));
@@ -63,7 +63,7 @@ public @interface FeatureRequirementSet {
private static final List<FeatureRequirement> featuresRequiredByVerticesOnly = new ArrayList<FeatureRequirement>() {{
add(FeatureRequirement.Factory.create(Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES, Graph.Features.VertexFeatures.class));
add(FeatureRequirement.Factory.create(Graph.Features.VertexPropertyFeatures.FEATURE_STRING_VALUES, Graph.Features.VertexPropertyFeatures.class));
- add(FeatureRequirement.Factory.create(Graph.Features.VertexPropertyFeatures.FEATURE_ADD_PROPERTY, Graph.Features.VertexPropertyFeatures.class));
+ add(FeatureRequirement.Factory.create(Graph.Features.VertexFeatures.FEATURE_META_PROPERTIES, Graph.Features.VertexFeatures.class));
}};
public List<FeatureRequirement> featuresRequired() {
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/37202332/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/FeatureSupportTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/FeatureSupportTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/FeatureSupportTest.java
index ac09c84..61beb52 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/FeatureSupportTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/FeatureSupportTest.java
@@ -890,7 +890,7 @@ public class FeatureSupportTest {
@FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = VertexFeatures.FEATURE_META_PROPERTIES, supported = false)
- @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = VertexPropertyFeatures.FEATURE_ADD_PROPERTY)
+ @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = VertexFeatures.FEATURE_META_PROPERTIES)
public void shouldSupportMetaPropertyIfPropertiesCanBePutOnProperties() throws Exception {
try {
final Vertex v = graph.addVertex();
@@ -905,7 +905,7 @@ public class FeatureSupportTest {
@FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = VertexFeatures.FEATURE_META_PROPERTIES, supported = false)
- @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = VertexPropertyFeatures.FEATURE_ADD_PROPERTY)
+ @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = VertexFeatures.FEATURE_META_PROPERTIES)
public void shouldSupportMetaPropertyIfPropertiesCanBePutOnPropertiesViaVertexProperty() throws Exception {
try {
final Vertex v = graph.addVertex("name", "stephen");
@@ -920,7 +920,7 @@ public class FeatureSupportTest {
@FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = VertexFeatures.FEATURE_META_PROPERTIES, supported = false)
- @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = VertexPropertyFeatures.FEATURE_ADD_PROPERTY)
+ @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = VertexFeatures.FEATURE_META_PROPERTIES)
public void shouldSupportMetaPropertyIfPropertiesHaveAnIteratorViaVertexProperty() throws Exception {
try {
final Vertex v = graph.addVertex("name", "stephen");
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/37202332/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/PropertyTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/PropertyTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/PropertyTest.java
index 2d5623e..2a7f240 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/PropertyTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/PropertyTest.java
@@ -255,7 +255,7 @@ public class PropertyTest {
@Test
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
@FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = FEATURE_PROPERTIES)
- @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = VertexPropertyFeatures.FEATURE_ADD_PROPERTY)
+ @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_META_PROPERTIES)
public void testGraphVertexSetPropertyStandard() throws Exception {
try {
final Vertex v = this.graph.addVertex();
[2/2] incubator-tinkerpop git commit: TINKERPOP-997
FeatureRequirementSet.SIMPLE uses VertexFeatures.FEATURE_ADD_PROPERTY
Posted by sp...@apache.org.
TINKERPOP-997 FeatureRequirementSet.SIMPLE uses VertexFeatures.FEATURE_ADD_PROPERTY
This opens up a large number of tests in the test suite (about 90 or so) - providers may see some breakage as a result.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/60de1502
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/60de1502
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/60de1502
Branch: refs/heads/TINKERPOP-998
Commit: 60de1502e2e846de76c69aee21f9d79a1d4ba952
Parents: 3720233
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Jan 19 13:58:28 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Jan 19 13:58:28 2016 -0500
----------------------------------------------------------------------
docs/src/upgrade/release-3.1.x-incubating.asciidoc | 1 +
.../java/org/apache/tinkerpop/gremlin/FeatureRequirementSet.java | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/60de1502/docs/src/upgrade/release-3.1.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.1.x-incubating.asciidoc b/docs/src/upgrade/release-3.1.x-incubating.asciidoc
index 23b430a..50f0d7c 100644
--- a/docs/src/upgrade/release-3.1.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.1.x-incubating.asciidoc
@@ -212,6 +212,7 @@ These changes related to "Feature Consistency" open up a number of previously no
not support meta-properties, so providers should be wary of potential test failure on previously non-executing tests.
See: link:https://issues.apache.org/jira/browse/TINKERPOP-985[TINKERPOP-985],
+link:https://issues.apache.org/jira/browse/TINKERPOP-997[TINKERPOP-997],
link:https://issues.apache.org/jira/browse/TINKERPOP-998[TINKERPOP-998]
Graph Processor Providers
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/60de1502/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/FeatureRequirementSet.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/FeatureRequirementSet.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/FeatureRequirementSet.java
index 65be622..3941584 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/FeatureRequirementSet.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/FeatureRequirementSet.java
@@ -54,7 +54,7 @@ public @interface FeatureRequirementSet {
private static final List<FeatureRequirement> featuresRequiredBySimple = new ArrayList<FeatureRequirement>() {{
add(FeatureRequirement.Factory.create(Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES, Graph.Features.VertexFeatures.class));
add(FeatureRequirement.Factory.create(Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES, Graph.Features.EdgeFeatures.class));
- add(FeatureRequirement.Factory.create(Graph.Features.VertexFeatures.FEATURE_META_PROPERTIES, Graph.Features.VertexFeatures.class));
+ add(FeatureRequirement.Factory.create(Graph.Features.VertexFeatures.FEATURE_ADD_PROPERTY, Graph.Features.VertexFeatures.class));
add(FeatureRequirement.Factory.create(Graph.Features.VertexPropertyFeatures.FEATURE_STRING_VALUES, Graph.Features.VertexPropertyFeatures.class));
add(FeatureRequirement.Factory.create(Graph.Features.VertexPropertyFeatures.FEATURE_STRING_VALUES, Graph.Features.EdgePropertyFeatures.class));
add(FeatureRequirement.Factory.create(Graph.Features.EdgeFeatures.FEATURE_ADD_PROPERTY, Graph.Features.EdgeFeatures.class));
@@ -63,7 +63,7 @@ public @interface FeatureRequirementSet {
private static final List<FeatureRequirement> featuresRequiredByVerticesOnly = new ArrayList<FeatureRequirement>() {{
add(FeatureRequirement.Factory.create(Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES, Graph.Features.VertexFeatures.class));
add(FeatureRequirement.Factory.create(Graph.Features.VertexPropertyFeatures.FEATURE_STRING_VALUES, Graph.Features.VertexPropertyFeatures.class));
- add(FeatureRequirement.Factory.create(Graph.Features.VertexFeatures.FEATURE_META_PROPERTIES, Graph.Features.VertexFeatures.class));
+ add(FeatureRequirement.Factory.create(Graph.Features.VertexFeatures.FEATURE_ADD_PROPERTY, Graph.Features.VertexFeatures.class));
}};
public List<FeatureRequirement> featuresRequired() {