You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ma...@apache.org on 2016/04/11 18:57:56 UTC
incubator-ranger git commit: RANGER-807: updated to handle NULL
operationType in notifications
Repository: incubator-ranger
Updated Branches:
refs/heads/master 5386d4bdb -> 2bbb47619
RANGER-807: updated to handle NULL operationType in notifications
Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/2bbb4761
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/2bbb4761
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/2bbb4761
Branch: refs/heads/master
Commit: 2bbb47619c63840fff2caef621c3fc2339798c57
Parents: 5386d4b
Author: Madhan Neethiraj <ma...@apache.org>
Authored: Mon Apr 11 09:56:42 2016 -0700
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Mon Apr 11 09:56:42 2016 -0700
----------------------------------------------------------------------
.../source/atlas/AtlasNotificationMapper.java | 26 +++++++++++---------
1 file changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/2bbb4761/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasNotificationMapper.java
----------------------------------------------------------------------
diff --git a/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasNotificationMapper.java b/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasNotificationMapper.java
index 7dc487c..fb974a5 100644
--- a/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasNotificationMapper.java
+++ b/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasNotificationMapper.java
@@ -79,19 +79,21 @@ public class AtlasNotificationMapper {
EntityNotification.OperationType opType = entityNotification.getOperationType();
- switch (opType) {
- case ENTITY_CREATE: {
- LOG.debug("ENTITY_CREATE notification is not handled, as Ranger will get necessary information from any subsequent TRAIT_ADDED notification");
- break;
- }
- case ENTITY_UPDATE:
- case TRAIT_ADD:
- case TRAIT_DELETE: {
- ret = true;
- break;
+ if(opType != null) {
+ switch (opType) {
+ case ENTITY_CREATE: {
+ LOG.debug("ENTITY_CREATE notification is not handled, as Ranger will get necessary information from any subsequent TRAIT_ADDED notification");
+ break;
+ }
+ case ENTITY_UPDATE:
+ case TRAIT_ADD:
+ case TRAIT_DELETE: {
+ ret = true;
+ break;
+ }
+ default:
+ LOG.error(opType + ": unknown notification received - not handled");
}
- default:
- LOG.error(opType + ": unknown notification received - not handled");
}
return ret;