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
6 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
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 {
...
@@ -393,10 +393,10 @@ public class AtlasTypeRegistry {
if
(
typeDef
!=
null
)
{
if
(
typeDef
!=
null
)
{
addTypeWithNoRefResolve
(
typeDef
);
addTypeWithNoRefResolve
(
typeDef
);
resolveReferences
();
}
}
resolveReferences
();
if
(
LOG
.
isDebugEnabled
())
{
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.addType({})"
,
typeDef
);
LOG
.
debug
(
"<== AtlasTypeRegistry.addType({})"
,
typeDef
);
}
}
...
@@ -421,10 +421,10 @@ public class AtlasTypeRegistry {
...
@@ -421,10 +421,10 @@ public class AtlasTypeRegistry {
if
(
CollectionUtils
.
isNotEmpty
(
typeDefs
))
{
if
(
CollectionUtils
.
isNotEmpty
(
typeDefs
))
{
addTypesWithNoRefResolve
(
typeDefs
);
addTypesWithNoRefResolve
(
typeDefs
);
resolveReferences
();
}
}
resolveReferences
();
if
(
LOG
.
isDebugEnabled
())
{
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.addTypes(length={})"
,
(
typeDefs
==
null
?
0
:
typeDefs
.
size
()));
LOG
.
debug
(
"<== AtlasTypeRegistry.addTypes(length={})"
,
(
typeDefs
==
null
?
0
:
typeDefs
.
size
()));
}
}
...
@@ -441,10 +441,10 @@ public class AtlasTypeRegistry {
...
@@ -441,10 +441,10 @@ public class AtlasTypeRegistry {
addTypesWithNoRefResolve
(
typesDef
.
getClassificationDefs
());
addTypesWithNoRefResolve
(
typesDef
.
getClassificationDefs
());
addTypesWithNoRefResolve
(
typesDef
.
getEntityDefs
());
addTypesWithNoRefResolve
(
typesDef
.
getEntityDefs
());
addTypesWithNoRefResolve
(
typesDef
.
getRelationshipDefs
());
addTypesWithNoRefResolve
(
typesDef
.
getRelationshipDefs
());
resolveReferences
();
}
}
resolveReferences
();
if
(
LOG
.
isDebugEnabled
())
{
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.addTypes({})"
,
typesDef
);
LOG
.
debug
(
"<== AtlasTypeRegistry.addTypes({})"
,
typesDef
);
}
}
...
@@ -457,10 +457,10 @@ public class AtlasTypeRegistry {
...
@@ -457,10 +457,10 @@ public class AtlasTypeRegistry {
if
(
typeDef
!=
null
)
{
if
(
typeDef
!=
null
)
{
updateTypeWithNoRefResolve
(
typeDef
);
updateTypeWithNoRefResolve
(
typeDef
);
resolveReferences
();
}
}
resolveReferences
();
if
(
LOG
.
isDebugEnabled
())
{
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.updateType({})"
,
typeDef
);
LOG
.
debug
(
"<== AtlasTypeRegistry.updateType({})"
,
typeDef
);
}
}
...
@@ -473,10 +473,10 @@ public class AtlasTypeRegistry {
...
@@ -473,10 +473,10 @@ public class AtlasTypeRegistry {
if
(
guid
!=
null
&&
typeDef
!=
null
)
{
if
(
guid
!=
null
&&
typeDef
!=
null
)
{
updateTypeByGuidWithNoRefResolve
(
guid
,
typeDef
);
updateTypeByGuidWithNoRefResolve
(
guid
,
typeDef
);
resolveReferences
();
}
}
resolveReferences
();
if
(
LOG
.
isDebugEnabled
())
{
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.updateTypeByGuid({})"
,
guid
);
LOG
.
debug
(
"<== AtlasTypeRegistry.updateTypeByGuid({})"
,
guid
);
}
}
...
@@ -489,10 +489,10 @@ public class AtlasTypeRegistry {
...
@@ -489,10 +489,10 @@ public class AtlasTypeRegistry {
if
(
name
!=
null
&&
typeDef
!=
null
)
{
if
(
name
!=
null
&&
typeDef
!=
null
)
{
updateTypeByNameWithNoRefResolve
(
name
,
typeDef
);
updateTypeByNameWithNoRefResolve
(
name
,
typeDef
);
resolveReferences
();
}
}
resolveReferences
();
if
(
LOG
.
isDebugEnabled
())
{
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.updateEnumDefByName({})"
,
name
);
LOG
.
debug
(
"<== AtlasTypeRegistry.updateEnumDefByName({})"
,
name
);
}
}
...
@@ -505,10 +505,10 @@ public class AtlasTypeRegistry {
...
@@ -505,10 +505,10 @@ public class AtlasTypeRegistry {
if
(
CollectionUtils
.
isNotEmpty
(
typeDefs
))
{
if
(
CollectionUtils
.
isNotEmpty
(
typeDefs
))
{
updateTypesWithNoRefResolve
(
typeDefs
);
updateTypesWithNoRefResolve
(
typeDefs
);
resolveReferences
();
}
}
resolveReferences
();
if
(
LOG
.
isDebugEnabled
())
{
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.updateTypes(length={})"
,
(
typeDefs
==
null
?
0
:
typeDefs
.
size
()));
LOG
.
debug
(
"<== AtlasTypeRegistry.updateTypes(length={})"
,
(
typeDefs
==
null
?
0
:
typeDefs
.
size
()));
}
}
...
@@ -521,10 +521,10 @@ public class AtlasTypeRegistry {
...
@@ -521,10 +521,10 @@ public class AtlasTypeRegistry {
if
(
typesDef
!=
null
)
{
if
(
typesDef
!=
null
)
{
updateTypesWithNoRefResolve
(
typesDef
);
updateTypesWithNoRefResolve
(
typesDef
);
resolveReferences
();
}
}
resolveReferences
();
if
(
LOG
.
isDebugEnabled
())
{
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== AtlasTypeRegistry.updateTypes({})"
,
typesDef
);
LOG
.
debug
(
"<== AtlasTypeRegistry.updateTypes({})"
,
typesDef
);
}
}
...
@@ -555,9 +555,9 @@ public class AtlasTypeRegistry {
...
@@ -555,9 +555,9 @@ public class AtlasTypeRegistry {
removeTypesWithNoRefResolve
(
typesDef
.
getClassificationDefs
());
removeTypesWithNoRefResolve
(
typesDef
.
getClassificationDefs
());
removeTypesWithNoRefResolve
(
typesDef
.
getEntityDefs
());
removeTypesWithNoRefResolve
(
typesDef
.
getEntityDefs
());
removeTypesWithNoRefResolve
(
typesDef
.
getRelationshipDefs
());
removeTypesWithNoRefResolve
(
typesDef
.
getRelationshipDefs
());
resolveReferences
();
}
}
resolveReferences
();
}
}
private
void
removeTypesWithNoRefResolve
(
Collection
<?
extends
AtlasBaseTypeDef
>
typeDefs
)
{
private
void
removeTypesWithNoRefResolve
(
Collection
<?
extends
AtlasBaseTypeDef
>
typeDefs
)
{
...
@@ -619,16 +619,16 @@ public class AtlasTypeRegistry {
...
@@ -619,16 +619,16 @@ public class AtlasTypeRegistry {
LOG
.
debug
(
"==> AtlasTypeRegistry.removeTypeByGuid({})"
,
guid
);
LOG
.
debug
(
"==> AtlasTypeRegistry.removeTypeByGuid({})"
,
guid
);
}
}
if
(
guid
!=
null
)
{
AtlasBaseTypeDef
typeDef
=
getTypeDefByGuid
(
guid
);
AtlasBaseTypeDef
typeDef
=
getTypeDefByGuid
(
guid
);
if
(
guid
!=
null
)
{
registryData
.
removeByGuid
(
guid
);
registryData
.
removeByGuid
(
guid
);
}
resolveReferences
();
resolveReferences
();
if
(
typeDef
!=
null
)
{
if
(
typeDef
!=
null
)
{
deletedTypes
.
add
(
typeDef
);
deletedTypes
.
add
(
typeDef
);
}
}
}
if
(
LOG
.
isDebugEnabled
())
{
if
(
LOG
.
isDebugEnabled
())
{
...
@@ -641,16 +641,16 @@ public class AtlasTypeRegistry {
...
@@ -641,16 +641,16 @@ public class AtlasTypeRegistry {
LOG
.
debug
(
"==> AtlasTypeRegistry.removeTypeByName({})"
,
name
);
LOG
.
debug
(
"==> AtlasTypeRegistry.removeTypeByName({})"
,
name
);
}
}
if
(
name
!=
null
)
{
AtlasBaseTypeDef
typeDef
=
getTypeDefByName
(
name
);
AtlasBaseTypeDef
typeDef
=
getTypeDefByName
(
name
);
if
(
name
!=
null
)
{
registryData
.
removeByName
(
name
);
registryData
.
removeByName
(
name
);
}
resolveReferences
();
resolveReferences
();
if
(
typeDef
!=
null
)
{
if
(
typeDef
!=
null
)
{
deletedTypes
.
add
(
typeDef
);
deletedTypes
.
add
(
typeDef
);
}
}
}
if
(
LOG
.
isDebugEnabled
())
{
if
(
LOG
.
isDebugEnabled
())
{
...
...
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