Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
6b38df1c
Commit
6b38df1c
authored
May 29, 2015
by
Venkatesh Seetharam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG-38059 create entity with a set attribute with duplicates returns duplicate…
BUG-38059 create entity with a set attribute with duplicates returns duplicate values part of the post call
parent
7cf0db5b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
EntityResource.java
.../apache/hadoop/metadata/web/resources/EntityResource.java
+17
-5
No files found.
webapp/src/main/java/org/apache/hadoop/metadata/web/resources/EntityResource.java
View file @
6b38df1c
...
...
@@ -25,7 +25,6 @@ import org.apache.hadoop.metadata.services.MetadataService;
import
org.apache.hadoop.metadata.typesystem.types.ValueConversionException
;
import
org.apache.hadoop.metadata.web.util.Servlets
;
import
org.codehaus.jettison.json.JSONArray
;
import
org.codehaus.jettison.json.JSONException
;
import
org.codehaus.jettison.json.JSONObject
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -33,8 +32,21 @@ import org.slf4j.LoggerFactory;
import
javax.inject.Inject
;
import
javax.inject.Singleton
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.ws.rs.*
;
import
javax.ws.rs.core.*
;
import
javax.ws.rs.Consumes
;
import
javax.ws.rs.DELETE
;
import
javax.ws.rs.GET
;
import
javax.ws.rs.POST
;
import
javax.ws.rs.PUT
;
import
javax.ws.rs.Path
;
import
javax.ws.rs.PathParam
;
import
javax.ws.rs.Produces
;
import
javax.ws.rs.QueryParam
;
import
javax.ws.rs.WebApplicationException
;
import
javax.ws.rs.core.Context
;
import
javax.ws.rs.core.MediaType
;
import
javax.ws.rs.core.Response
;
import
javax.ws.rs.core.UriBuilder
;
import
javax.ws.rs.core.UriInfo
;
import
java.io.IOException
;
import
java.net.URI
;
import
java.util.List
;
...
...
@@ -88,7 +100,8 @@ public class EntityResource {
JSONObject
response
=
new
JSONObject
();
response
.
put
(
MetadataServiceClient
.
REQUEST_ID
,
Servlets
.
getRequestId
());
response
.
put
(
MetadataServiceClient
.
GUID
,
guid
);
response
.
put
(
MetadataServiceClient
.
DEFINITION
,
entity
);
response
.
put
(
MetadataServiceClient
.
DEFINITION
,
metadataService
.
getEntityDefinition
(
guid
));
return
Response
.
created
(
locationURI
).
entity
(
response
).
build
();
...
...
@@ -266,7 +279,6 @@ public class EntityResource {
JSONObject
response
=
new
JSONObject
();
response
.
put
(
MetadataServiceClient
.
REQUEST_ID
,
Servlets
.
getRequestId
());
response
.
put
(
MetadataServiceClient
.
GUID
,
guid
);
response
.
put
(
MetadataServiceClient
.
DEFINITION
,
traitDefinition
);
return
Response
.
created
(
locationURI
).
entity
(
response
).
build
();
}
catch
(
MetadataException
|
IOException
|
IllegalArgumentException
e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment