This is an automated email from the ASF dual-hosted git repository.

madhan pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 79e7f8b  ATLAS-3151: fix clientv2 getRelationshipByGuid bug
79e7f8b is described below

commit 79e7f8b6ac0755b776e583f72c52c05462a15a39
Author: jxzhao <jxz...@freewheel.tv>
AuthorDate: Fri Apr 19 12:20:46 2019 +0800

    ATLAS-3151: fix clientv2 getRelationshipByGuid bug
    
    Signed-off-by: Madhan Neethiraj <mad...@apache.org>
    (cherry picked from commit 2c9376f8cbc15c20b02bfd6b227e7063d29b23bd)
---
 .../src/main/java/org/apache/atlas/AtlasClientV2.java       | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/client/client-v2/src/main/java/org/apache/atlas/AtlasClientV2.java 
b/client/client-v2/src/main/java/org/apache/atlas/AtlasClientV2.java
index c7ce5a9..f582fbd 100644
--- a/client/client-v2/src/main/java/org/apache/atlas/AtlasClientV2.java
+++ b/client/client-v2/src/main/java/org/apache/atlas/AtlasClientV2.java
@@ -28,6 +28,7 @@ import 
org.apache.atlas.model.instance.AtlasClassification.AtlasClassifications;
 import org.apache.atlas.model.instance.AtlasEntity.AtlasEntitiesWithExtInfo;
 import org.apache.atlas.model.instance.AtlasEntity.AtlasEntityWithExtInfo;
 import org.apache.atlas.model.instance.AtlasRelationship;
+import 
org.apache.atlas.model.instance.AtlasRelationship.AtlasRelationshipWithExtInfo;
 import org.apache.atlas.model.instance.AtlasEntityHeaders;
 import org.apache.atlas.model.instance.EntityMutationResponse;
 import org.apache.atlas.model.lineage.AtlasLineageInfo;
@@ -436,8 +437,16 @@ public class AtlasClientV2 extends AtlasBaseClient {
         return callAPI(API_V2.FACETED_SEARCH, AtlasSearchResult.class, 
searchParameters);
     }
 
-    public AtlasRelationship getRelationshipByGuid(String guid) throws 
AtlasServiceException {
-        return callAPI(API_V2.GET_RELATIONSHIP_BY_GUID, 
AtlasRelationship.class, null, guid);
+    public AtlasRelationshipWithExtInfo getRelationshipByGuid(String guid) 
throws AtlasServiceException {
+        return callAPI(API_V2.GET_RELATIONSHIP_BY_GUID, 
AtlasRelationshipWithExtInfo.class, null, guid);
+    }
+
+    public AtlasRelationshipWithExtInfo getRelationshipByGuid(String guid, 
boolean extendedInfo) throws AtlasServiceException {
+        MultivaluedMap<String, String> queryParams = new MultivaluedMapImpl();
+
+        queryParams.add("extendedInfo", String.valueOf(extendedInfo));
+
+        return callAPI(API_V2.GET_RELATIONSHIP_BY_GUID, 
AtlasRelationshipWithExtInfo.class, queryParams, guid);
     }
 
     public void deleteRelationshipByGuid(String guid) throws 
AtlasServiceException {

Reply via email to