You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by su...@apache.org on 2015/10/31 06:43:23 UTC
incubator-atlas git commit: ATLAS-232 Fix the API incompatibility
introduced in ATLAS-58. Fixed API base path from entity to entities for
entity resource operations(shwethags via sumasai)
Repository: incubator-atlas
Updated Branches:
refs/heads/master 3b6a2c8d3 -> 92490b9e2
ATLAS-232 Fix the API incompatibility introduced in ATLAS-58. Fixed API base path from entity to entities for entity resource operations(shwethags via sumasai)
Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/92490b9e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/92490b9e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/92490b9e
Branch: refs/heads/master
Commit: 92490b9e20abb1b5689238701a21ed32882e8988
Parents: 3b6a2c8
Author: Suma Shivaprasad <su...@gmail.com>
Authored: Sat Oct 31 11:13:04 2015 +0530
Committer: Suma Shivaprasad <su...@gmail.com>
Committed: Sat Oct 31 11:13:04 2015 +0530
----------------------------------------------------------------------
.../main/java/org/apache/atlas/AtlasClient.java | 2 +-
release-log.txt | 1 +
.../atlas/web/resources/EntityResource.java | 2 +-
.../web/resources/EntityJerseyResourceIT.java | 27 ++++++++++----------
4 files changed, 17 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/92490b9e/client/src/main/java/org/apache/atlas/AtlasClient.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/atlas/AtlasClient.java b/client/src/main/java/org/apache/atlas/AtlasClient.java
index 8f04653..7b6bcb7 100755
--- a/client/src/main/java/org/apache/atlas/AtlasClient.java
+++ b/client/src/main/java/org/apache/atlas/AtlasClient.java
@@ -66,7 +66,7 @@ public class AtlasClient {
public static final String BASE_URI = "api/atlas/";
public static final String TYPES = "types";
- public static final String URI_ENTITY = "entity";
+ public static final String URI_ENTITY = "entities";
public static final String URI_SEARCH = "discovery/search";
public static final String URI_LINEAGE = "lineage/hive/table";
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/92490b9e/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index d525d08..ac5ad64 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -9,6 +9,7 @@ ATLAS-54 Rename configs in hive hook (shwethags)
ATLAS-3 Mixed Index creation fails with Date types (sumasai via shwethags)
ALL CHANGES:
+ATLAS-255 Add log level setting for titan in atlas-log4j.xml(ayubkhan via sumasai)
ATLAS-246 QuickStart uses integer data type for dates, which causes data loss (dkantor via sumasai)
ATLAS-232 Fix the API incompatibility introduced in ATLAS-58(shwethags via sumasai)
ATLAS-198 Atlas UI Requires Internet Access(sanjayp via sumasai)
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/92490b9e/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java b/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java
index 0820d9c..98edc66 100755
--- a/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java
+++ b/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java
@@ -62,7 +62,7 @@ import java.util.List;
* An entity is an "instance" of a Type. Entities conform to the definition
* of the Type they correspond with.
*/
-@Path("entity")
+@Path("entities")
@Singleton
public class EntityResource {
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/92490b9e/webapp/src/test/java/org/apache/atlas/web/resources/EntityJerseyResourceIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/web/resources/EntityJerseyResourceIT.java b/webapp/src/test/java/org/apache/atlas/web/resources/EntityJerseyResourceIT.java
index e7fba6f..8053c9f 100755
--- a/webapp/src/test/java/org/apache/atlas/web/resources/EntityJerseyResourceIT.java
+++ b/webapp/src/test/java/org/apache/atlas/web/resources/EntityJerseyResourceIT.java
@@ -65,6 +65,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
private final String DATABASE_NAME = "db" + randomString();
private final String TABLE_NAME = "table" + randomString();
+ private static final String ENTITIES = "api/atlas/entities";
private static final String TRAITS = "traits";
private Referenceable tableInstance;
@@ -98,7 +99,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
databaseInstance.set("description", randomString());
ClientResponse clientResponse =
- service.path("api/atlas/entity").accept(Servlets.JSON_MEDIA_TYPE).type(Servlets.JSON_MEDIA_TYPE)
+ service.path(ENTITIES).accept(Servlets.JSON_MEDIA_TYPE).type(Servlets.JSON_MEDIA_TYPE)
.method(HttpMethod.POST, ClientResponse.class,
InstanceSerialization.toJson(databaseInstance, true));
Assert.assertEquals(clientResponse.getStatus(), Response.Status.CREATED.getStatusCode());
@@ -237,14 +238,14 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
}
private ClientResponse addProperty(String guid, String property, String value) {
- WebResource resource = service.path("api/atlas/entity").path(guid);
+ WebResource resource = service.path(ENTITIES).path(guid);
return resource.queryParam("property", property).queryParam("value", value).accept(Servlets.JSON_MEDIA_TYPE)
.type(Servlets.JSON_MEDIA_TYPE).method(HttpMethod.PUT, ClientResponse.class);
}
private ClientResponse getEntityDefinition(String guid) {
- WebResource resource = service.path("api/atlas/entity").path(guid);
+ WebResource resource = service.path(ENTITIES).path(guid);
return resource.accept(Servlets.JSON_MEDIA_TYPE).type(Servlets.JSON_MEDIA_TYPE)
.method(HttpMethod.GET, ClientResponse.class);
}
@@ -260,7 +261,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
@Test
public void testGetInvalidEntityDefinition() throws Exception {
- WebResource resource = service.path("api/atlas/entity").path("blah");
+ WebResource resource = service.path(ENTITIES).path("blah");
ClientResponse clientResponse = resource.accept(Servlets.JSON_MEDIA_TYPE).type(Servlets.JSON_MEDIA_TYPE)
.method(HttpMethod.GET, ClientResponse.class);
@@ -284,7 +285,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
@Test
public void testGetEntityListForBadEntityType() throws Exception {
ClientResponse clientResponse =
- service.path("api/atlas/entity").queryParam("type", "blah").accept(Servlets.JSON_MEDIA_TYPE)
+ service.path(ENTITIES).queryParam("type", "blah").accept(Servlets.JSON_MEDIA_TYPE)
.type(Servlets.JSON_MEDIA_TYPE).method(HttpMethod.GET, ClientResponse.class);
Assert.assertEquals(clientResponse.getStatus(), Response.Status.BAD_REQUEST.getStatusCode());
@@ -302,7 +303,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
String typeName = addNewType();
ClientResponse clientResponse =
- service.path("api/atlas/entity").queryParam("type", typeName).accept(Servlets.JSON_MEDIA_TYPE)
+ service.path(ENTITIES).queryParam("type", typeName).accept(Servlets.JSON_MEDIA_TYPE)
.type(Servlets.JSON_MEDIA_TYPE).method(HttpMethod.GET, ClientResponse.class);
Assert.assertEquals(clientResponse.getStatus(), Response.Status.OK.getStatusCode());
@@ -332,7 +333,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
public void testGetTraitNames() throws Exception {
final String guid = tableId._getId();
ClientResponse clientResponse =
- service.path("api/atlas/entity").path(guid).path(TRAITS).accept(Servlets.JSON_MEDIA_TYPE)
+ service.path(ENTITIES).path(guid).path(TRAITS).accept(Servlets.JSON_MEDIA_TYPE)
.type(Servlets.JSON_MEDIA_TYPE).method(HttpMethod.GET, ClientResponse.class);
Assert.assertEquals(clientResponse.getStatus(), Response.Status.OK.getStatusCode());
@@ -362,7 +363,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
final String guid = tableId._getId();
ClientResponse clientResponse =
- service.path("api/atlas/entity").path(guid).path(TRAITS).accept(Servlets.JSON_MEDIA_TYPE)
+ service.path(ENTITIES).path(guid).path(TRAITS).accept(Servlets.JSON_MEDIA_TYPE)
.type(Servlets.JSON_MEDIA_TYPE)
.method(HttpMethod.POST, ClientResponse.class, traitInstanceAsJSON);
Assert.assertEquals(clientResponse.getStatus(), Response.Status.CREATED.getStatusCode());
@@ -385,7 +386,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
final String guid = tableId._getId();
ClientResponse clientResponse =
- service.path("api/atlas/entity").path(guid).path(TRAITS).accept(Servlets.JSON_MEDIA_TYPE)
+ service.path(ENTITIES).path(guid).path(TRAITS).accept(Servlets.JSON_MEDIA_TYPE)
.type(Servlets.JSON_MEDIA_TYPE)
.method(HttpMethod.POST, ClientResponse.class, traitInstanceAsJSON);
Assert.assertEquals(clientResponse.getStatus(), Response.Status.NOT_FOUND.getStatusCode());
@@ -408,7 +409,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
final String guid = tableId._getId();
ClientResponse clientResponse =
- service.path("api/atlas/entity").path(guid).path(TRAITS).accept(Servlets.JSON_MEDIA_TYPE)
+ service.path(ENTITIES).path(guid).path(TRAITS).accept(Servlets.JSON_MEDIA_TYPE)
.type(Servlets.JSON_MEDIA_TYPE)
.method(HttpMethod.POST, ClientResponse.class, traitInstanceAsJSON);
Assert.assertEquals(clientResponse.getStatus(), Response.Status.CREATED.getStatusCode());
@@ -449,7 +450,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
LOG.debug("traitInstanceAsJSON = " + traitInstanceAsJSON);
ClientResponse clientResponse =
- service.path("api/atlas/entity").path("random").path(TRAITS).accept(Servlets.JSON_MEDIA_TYPE)
+ service.path(ENTITIES).path("random").path(TRAITS).accept(Servlets.JSON_MEDIA_TYPE)
.type(Servlets.JSON_MEDIA_TYPE)
.method(HttpMethod.POST, ClientResponse.class, traitInstanceAsJSON);
Assert.assertEquals(clientResponse.getStatus(), Response.Status.NOT_FOUND.getStatusCode());
@@ -459,7 +460,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
public void testDeleteTrait() throws Exception {
final String guid = tableId._getId();
- ClientResponse clientResponse = service.path("api/atlas/entity").path(guid).path(TRAITS).path(traitName)
+ ClientResponse clientResponse = service.path(ENTITIES).path(guid).path(TRAITS).path(traitName)
.accept(Servlets.JSON_MEDIA_TYPE).type(Servlets.JSON_MEDIA_TYPE)
.method(HttpMethod.DELETE, ClientResponse.class);
Assert.assertEquals(clientResponse.getStatus(), Response.Status.OK.getStatusCode());
@@ -477,7 +478,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
public void testDeleteTraitNonExistent() throws Exception {
final String traitName = "blah_trait";
- ClientResponse clientResponse = service.path("api/atlas/entity").path("random").path(TRAITS).path(traitName)
+ ClientResponse clientResponse = service.path(ENTITIES).path("random").path(TRAITS).path(traitName)
.accept(Servlets.JSON_MEDIA_TYPE).type(Servlets.JSON_MEDIA_TYPE)
.method(HttpMethod.DELETE, ClientResponse.class);
Assert.assertEquals(clientResponse.getStatus(), Response.Status.NOT_FOUND.getStatusCode());