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
c1f4007a
Commit
c1f4007a
authored
7 years ago
by
Madhan Neethiraj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2141: edit/disassociate tag results in NPE
(cherry picked from commit 4b9d2670709df52e0d983587832fe6256220691b)
parent
ccd121e7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
13 deletions
+10
-13
GraphHelper.java
...n/java/org/apache/atlas/repository/graph/GraphHelper.java
+5
-1
AtlasEntityChangeNotifier.java
.../repository/store/graph/v1/AtlasEntityChangeNotifier.java
+2
-11
NotificationEntityChangeListener.java
.../atlas/notification/NotificationEntityChangeListener.java
+3
-1
No files found.
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
View file @
c1f4007a
...
@@ -1079,8 +1079,12 @@ public final class GraphHelper {
...
@@ -1079,8 +1079,12 @@ public final class GraphHelper {
}
}
public
static
boolean
isInternalType
(
AtlasVertex
vertex
)
{
return
vertex
!=
null
&&
isInternalType
(
getTypeName
(
vertex
));
}
public
static
boolean
isInternalType
(
String
typeName
)
{
public
static
boolean
isInternalType
(
String
typeName
)
{
return
typeName
.
startsWith
(
Constants
.
INTERNAL_PROPERTY_KEY_PREFIX
);
return
typeName
!=
null
&&
typeName
.
startsWith
(
Constants
.
INTERNAL_PROPERTY_KEY_PREFIX
);
}
}
public
static
void
setArrayElementsProperty
(
IDataType
elementType
,
AtlasVertex
instanceVertex
,
String
propertyName
,
List
<
Object
>
values
)
{
public
static
void
setArrayElementsProperty
(
IDataType
elementType
,
AtlasVertex
instanceVertex
,
String
propertyName
,
List
<
Object
>
values
)
{
...
...
This diff is collapsed.
Click to expand it.
repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityChangeNotifier.java
View file @
c1f4007a
...
@@ -227,14 +227,10 @@ public class AtlasEntityChangeNotifier {
...
@@ -227,14 +227,10 @@ public class AtlasEntityChangeNotifier {
}
}
for
(
AtlasEntityHeader
atlasEntityHeader
:
atlasEntityHeaders
)
{
for
(
AtlasEntityHeader
atlasEntityHeader
:
atlasEntityHeaders
)
{
if
(
GraphHelper
.
isInternalType
(
atlasEntityHeader
.
getTypeName
()))
{
continue
;
}
String
guid
=
atlasEntityHeader
.
getGuid
();
String
guid
=
atlasEntityHeader
.
getGuid
();
AtlasVertex
atlasVertex
=
AtlasGraphUtilsV1
.
findByGuid
(
guid
);
AtlasVertex
atlasVertex
=
AtlasGraphUtilsV1
.
findByGuid
(
guid
);
if
(
atlasVertex
==
null
)
{
if
(
atlasVertex
==
null
||
GraphHelper
.
isInternalType
(
atlasVertex
)
)
{
continue
;
continue
;
}
}
...
@@ -262,12 +258,7 @@ public class AtlasEntityChangeNotifier {
...
@@ -262,12 +258,7 @@ public class AtlasEntityChangeNotifier {
}
}
AtlasVertex
atlasVertex
=
AtlasGraphUtilsV1
.
findByGuid
(
entityId
);
AtlasVertex
atlasVertex
=
AtlasGraphUtilsV1
.
findByGuid
(
entityId
);
if
(
atlasVertex
==
null
)
{
if
(
atlasVertex
==
null
||
GraphHelper
.
isInternalType
(
atlasVertex
))
{
return
;
}
if
(
atlasVertex
==
null
)
{
LOG
.
warn
(
"updateFullTextMapping(): no entity exists with guid {}"
,
entityId
);
return
;
return
;
}
}
...
...
This diff is collapsed.
Click to expand it.
webapp/src/main/java/org/apache/atlas/notification/NotificationEntityChangeListener.java
View file @
c1f4007a
...
@@ -187,7 +187,9 @@ public class NotificationEntityChangeListener implements EntityChangeListener {
...
@@ -187,7 +187,9 @@ public class NotificationEntityChangeListener implements EntityChangeListener {
messages
.
add
(
notification
);
messages
.
add
(
notification
);
}
}
notificationInterface
.
send
(
NotificationInterface
.
NotificationType
.
ENTITIES
,
messages
);
if
(!
messages
.
isEmpty
())
{
notificationInterface
.
send
(
NotificationInterface
.
NotificationType
.
ENTITIES
,
messages
);
}
}
}
private
List
<
String
>
getNotificationAttributes
(
String
entityType
)
{
private
List
<
String
>
getNotificationAttributes
(
String
entityType
)
{
...
...
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