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
55ef909c
Commit
55ef909c
authored
5 years ago
by
Madhan Neethiraj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3135: typedef-delete with empty typedefs result in search failures
parent
fad2822f
master
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
AtlasTypeRegistry.java
...rc/main/java/org/apache/atlas/type/AtlasTypeRegistry.java
+13
-13
No files found.
intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java
View file @
55ef909c
...
...
@@ -393,9 +393,9 @@ public class AtlasTypeRegistry {
if
(
typeDef
!=
null
)
{
addTypeWithNoRefResolve
(
typeDef
);
}
resolveReferences
();
}
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.addType({})"
,
typeDef
);
...
...
@@ -421,9 +421,9 @@ public class AtlasTypeRegistry {
if
(
CollectionUtils
.
isNotEmpty
(
typeDefs
))
{
addTypesWithNoRefResolve
(
typeDefs
);
}
resolveReferences
();
}
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.addTypes(length={})"
,
(
typeDefs
==
null
?
0
:
typeDefs
.
size
()));
...
...
@@ -441,9 +441,9 @@ public class AtlasTypeRegistry {
addTypesWithNoRefResolve
(
typesDef
.
getClassificationDefs
());
addTypesWithNoRefResolve
(
typesDef
.
getEntityDefs
());
addTypesWithNoRefResolve
(
typesDef
.
getRelationshipDefs
());
}
resolveReferences
();
}
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.addTypes({})"
,
typesDef
);
...
...
@@ -457,9 +457,9 @@ public class AtlasTypeRegistry {
if
(
typeDef
!=
null
)
{
updateTypeWithNoRefResolve
(
typeDef
);
}
resolveReferences
();
}
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.updateType({})"
,
typeDef
);
...
...
@@ -473,9 +473,9 @@ public class AtlasTypeRegistry {
if
(
guid
!=
null
&&
typeDef
!=
null
)
{
updateTypeByGuidWithNoRefResolve
(
guid
,
typeDef
);
}
resolveReferences
();
}
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.updateTypeByGuid({})"
,
guid
);
...
...
@@ -489,9 +489,9 @@ public class AtlasTypeRegistry {
if
(
name
!=
null
&&
typeDef
!=
null
)
{
updateTypeByNameWithNoRefResolve
(
name
,
typeDef
);
}
resolveReferences
();
}
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.updateEnumDefByName({})"
,
name
);
...
...
@@ -505,9 +505,9 @@ public class AtlasTypeRegistry {
if
(
CollectionUtils
.
isNotEmpty
(
typeDefs
))
{
updateTypesWithNoRefResolve
(
typeDefs
);
}
resolveReferences
();
}
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.updateTypes(length={})"
,
(
typeDefs
==
null
?
0
:
typeDefs
.
size
()));
...
...
@@ -521,9 +521,9 @@ public class AtlasTypeRegistry {
if
(
typesDef
!=
null
)
{
updateTypesWithNoRefResolve
(
typesDef
);
}
resolveReferences
();
}
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.updateTypes({})"
,
typesDef
);
...
...
@@ -555,10 +555,10 @@ public class AtlasTypeRegistry {
removeTypesWithNoRefResolve
(
typesDef
.
getClassificationDefs
());
removeTypesWithNoRefResolve
(
typesDef
.
getEntityDefs
());
removeTypesWithNoRefResolve
(
typesDef
.
getRelationshipDefs
());
}
resolveReferences
();
}
}
private
void
removeTypesWithNoRefResolve
(
Collection
<?
extends
AtlasBaseTypeDef
>
typeDefs
)
{
if
(
CollectionUtils
.
isNotEmpty
(
typeDefs
))
{
...
...
@@ -619,17 +619,17 @@ public class AtlasTypeRegistry {
LOG
.
debug
(
"==> AtlasTypeRegistry.removeTypeByGuid({})"
,
guid
);
}
if
(
guid
!=
null
)
{
AtlasBaseTypeDef
typeDef
=
getTypeDefByGuid
(
guid
);
if
(
guid
!=
null
)
{
registryData
.
removeByGuid
(
guid
);
}
resolveReferences
();
if
(
typeDef
!=
null
)
{
deletedTypes
.
add
(
typeDef
);
}
}
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.removeTypeByGuid({})"
,
guid
);
...
...
@@ -641,17 +641,17 @@ public class AtlasTypeRegistry {
LOG
.
debug
(
"==> AtlasTypeRegistry.removeTypeByName({})"
,
name
);
}
if
(
name
!=
null
)
{
AtlasBaseTypeDef
typeDef
=
getTypeDefByName
(
name
);
if
(
name
!=
null
)
{
registryData
.
removeByName
(
name
);
}
resolveReferences
();
if
(
typeDef
!=
null
)
{
deletedTypes
.
add
(
typeDef
);
}
}
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.removeEnumDefByName({})"
,
name
);
...
...
This diff is collapsed.
Click to expand it.
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