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
ec046d19
Commit
ec046d19
authored
Jun 04, 2015
by
Venkatesh Seetharam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG-38723 add trait to an entity which already has the trait throws a 500
parent
ce61caae
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
DefaultMetadataService.java
...ache/hadoop/metadata/services/DefaultMetadataService.java
+3
-0
No files found.
repository/src/main/java/org/apache/hadoop/metadata/services/DefaultMetadataService.java
View file @
ec046d19
...
...
@@ -331,6 +331,9 @@ public class DefaultMetadataService implements MetadataService {
// ensure trait type is already registered with the TS
Preconditions
.
checkArgument
(
typeSystem
.
isRegistered
(
traitName
),
"trait=%s should be defined in type system before it can be added"
,
traitName
);
// ensure trait is not already defined
Preconditions
.
checkArgument
(
getTraitNames
(
guid
).
contains
(
traitName
),
"trait=%s is already defined for entity=%s"
,
traitName
,
guid
);
repository
.
addTrait
(
guid
,
traitInstance
);
...
...
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