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
0ed96321
Commit
0ed96321
authored
Jan 14, 2015
by
Venkatesh Seetharam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ISSUE-28 Add types resource for put/get. Contributed by Venkatesh Seetharam
parent
ed517933
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
TypesResource.java
...g/apache/hadoop/metadata/web/resources/TypesResource.java
+9
-3
No files found.
webapp/src/main/java/org/apache/hadoop/metadata/web/resources/TypesResource.java
View file @
0ed96321
...
...
@@ -18,9 +18,11 @@
package
org
.
apache
.
hadoop
.
metadata
.
web
.
resources
;
import
org.apache.hadoop.metadata.MetadataException
;
import
org.apache.hadoop.metadata.services.MetadataService
;
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
;
...
...
@@ -78,7 +80,7 @@ public class TypesResource {
return
Response
.
ok
(
response
).
build
();
}
catch
(
Exception
e
)
{
LOG
.
error
(
"Unable to persist
entity object"
,
e
);
LOG
.
error
(
"Unable to persist
type {}"
,
typeName
,
e
);
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
e
,
Response
.
Status
.
BAD_REQUEST
));
}
...
...
@@ -98,8 +100,12 @@ public class TypesResource {
response
.
put
(
"requestId"
,
Thread
.
currentThread
().
getName
());
return
Response
.
ok
(
response
).
build
();
}
catch
(
Exception
e
)
{
LOG
.
error
(
"Unable to persist entity object"
,
e
);
}
catch
(
MetadataException
e
)
{
LOG
.
error
(
"Unable to get type definition for type {}"
,
typeName
,
e
);
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
e
,
Response
.
Status
.
NOT_FOUND
));
}
catch
(
JSONException
e
)
{
LOG
.
error
(
"Unable to get type definition for type {}"
,
typeName
,
e
);
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
e
,
Response
.
Status
.
BAD_REQUEST
));
}
...
...
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