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
May 07, 2019
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
30 deletions
+30
-30
AtlasTypeRegistry.java
...rc/main/java/org/apache/atlas/type/AtlasTypeRegistry.java
+30
-30
No files found.
intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java
View file @
55ef909c
...
...
@@ -393,10 +393,10 @@ public class AtlasTypeRegistry {
if
(
typeDef
!=
null
)
{
addTypeWithNoRefResolve
(
typeDef
);
resolveReferences
();
}
resolveReferences
();
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.addType({})"
,
typeDef
);
}
...
...
@@ -421,10 +421,10 @@ public class AtlasTypeRegistry {
if
(
CollectionUtils
.
isNotEmpty
(
typeDefs
))
{
addTypesWithNoRefResolve
(
typeDefs
);
resolveReferences
();
}
resolveReferences
();
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.addTypes(length={})"
,
(
typeDefs
==
null
?
0
:
typeDefs
.
size
()));
}
...
...
@@ -441,10 +441,10 @@ public class AtlasTypeRegistry {
addTypesWithNoRefResolve
(
typesDef
.
getClassificationDefs
());
addTypesWithNoRefResolve
(
typesDef
.
getEntityDefs
());
addTypesWithNoRefResolve
(
typesDef
.
getRelationshipDefs
());
resolveReferences
();
}
resolveReferences
();
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.addTypes({})"
,
typesDef
);
}
...
...
@@ -457,10 +457,10 @@ public class AtlasTypeRegistry {
if
(
typeDef
!=
null
)
{
updateTypeWithNoRefResolve
(
typeDef
);
resolveReferences
();
}
resolveReferences
();
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.updateType({})"
,
typeDef
);
}
...
...
@@ -473,10 +473,10 @@ public class AtlasTypeRegistry {
if
(
guid
!=
null
&&
typeDef
!=
null
)
{
updateTypeByGuidWithNoRefResolve
(
guid
,
typeDef
);
resolveReferences
();
}
resolveReferences
();
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.updateTypeByGuid({})"
,
guid
);
}
...
...
@@ -489,10 +489,10 @@ public class AtlasTypeRegistry {
if
(
name
!=
null
&&
typeDef
!=
null
)
{
updateTypeByNameWithNoRefResolve
(
name
,
typeDef
);
resolveReferences
();
}
resolveReferences
();
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.updateEnumDefByName({})"
,
name
);
}
...
...
@@ -505,10 +505,10 @@ public class AtlasTypeRegistry {
if
(
CollectionUtils
.
isNotEmpty
(
typeDefs
))
{
updateTypesWithNoRefResolve
(
typeDefs
);
resolveReferences
();
}
resolveReferences
();
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.updateTypes(length={})"
,
(
typeDefs
==
null
?
0
:
typeDefs
.
size
()));
}
...
...
@@ -521,10 +521,10 @@ public class AtlasTypeRegistry {
if
(
typesDef
!=
null
)
{
updateTypesWithNoRefResolve
(
typesDef
);
resolveReferences
();
}
resolveReferences
();
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.updateTypes({})"
,
typesDef
);
}
...
...
@@ -555,9 +555,9 @@ public class AtlasTypeRegistry {
removeTypesWithNoRefResolve
(
typesDef
.
getClassificationDefs
());
removeTypesWithNoRefResolve
(
typesDef
.
getEntityDefs
());
removeTypesWithNoRefResolve
(
typesDef
.
getRelationshipDefs
());
resolveReferences
();
}
resolveReferences
();
}
private
void
removeTypesWithNoRefResolve
(
Collection
<?
extends
AtlasBaseTypeDef
>
typeDefs
)
{
...
...
@@ -619,16 +619,16 @@ public class AtlasTypeRegistry {
LOG
.
debug
(
"==> AtlasTypeRegistry.removeTypeByGuid({})"
,
guid
);
}
if
(
guid
!=
null
)
{
AtlasBaseTypeDef
typeDef
=
getTypeDefByGuid
(
guid
);
AtlasBaseTypeDef
typeDef
=
getTypeDefByGuid
(
guid
);
if
(
guid
!=
null
)
{
registryData
.
removeByGuid
(
guid
);
}
resolveReferences
();
resolveReferences
();
if
(
typeDef
!=
null
)
{
deletedTypes
.
add
(
typeDef
);
}
if
(
typeDef
!=
null
)
{
deletedTypes
.
add
(
typeDef
);
}
if
(
LOG
.
isDebugEnabled
())
{
...
...
@@ -641,16 +641,16 @@ public class AtlasTypeRegistry {
LOG
.
debug
(
"==> AtlasTypeRegistry.removeTypeByName({})"
,
name
);
}
if
(
name
!=
null
)
{
AtlasBaseTypeDef
typeDef
=
getTypeDefByName
(
name
);
AtlasBaseTypeDef
typeDef
=
getTypeDefByName
(
name
);
if
(
name
!=
null
)
{
registryData
.
removeByName
(
name
);
}
resolveReferences
();
resolveReferences
();
if
(
typeDef
!=
null
)
{
deletedTypes
.
add
(
typeDef
);
}
if
(
typeDef
!=
null
)
{
deletedTypes
.
add
(
typeDef
);
}
if
(
LOG
.
isDebugEnabled
())
{
...
...
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