RANGER-660: log level fix in the previous commit

Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/9aa396b5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/9aa396b5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/9aa396b5

Branch: refs/heads/master
Commit: 9aa396b5029c48aa49d954492b5d36c2afb14d83
Parents: 5db1473
Author: Madhan Neethiraj <[email protected]>
Authored: Thu Oct 1 20:18:02 2015 -0700
Committer: Madhan Neethiraj <[email protected]>
Committed: Thu Oct 1 20:18:02 2015 -0700

----------------------------------------------------------------------
 .../tagsync/source/atlas/AtlasNotificationMapper.java     | 10 ++++++----
 .../ranger/tagsync/source/atlas/TagAtlasSource.java       |  4 +++-
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/9aa396b5/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 13d67b3..44c4973 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
@@ -61,7 +61,9 @@ class AtlasNotificationMapper {
                        if (isEntityMappable(entityNotification.getEntity())) {
                                ret = createServiceTags(entityNotification);
                        } else {
-                               LOG.info("Ranger not interested in Entity 
Notification for entity-type " + entityNotification.getEntity().getTypeName());
+                               if(LOG.isDebugEnabled()) {
+                                       LOG.debug("Ranger not interested in 
Entity Notification for entity-type " + 
entityNotification.getEntity().getTypeName());
+                               }
                        }
                } catch (Exception exception) {
                        LOG.error("createServiceTags() failed!! ", exception);
@@ -94,13 +96,13 @@ class AtlasNotificationMapper {
                String opName = entityNotification.getOperationType().name();
                switch (opType) {
                        case ENTITY_CREATED: {
-                               LOG.info("ENTITY_CREATED notification is not 
handled, as Ranger will get necessary information from any subsequent 
TRAIT_ADDED notification");
+                               LOG.debug("ENTITY_CREATED notification is not 
handled, as Ranger will get necessary information from any subsequent 
TRAIT_ADDED notification");
                                break;
                        }
                        case ENTITY_UPDATED: {
                                ret = getServiceTags(entity);
                                if (MapUtils.isEmpty(ret.getTags())) {
-                                       LOG.info("No traits associated with 
this entity update notification. Ignoring it altogether");
+                                       LOG.debug("No traits associated with 
this entity update notification. Ignoring it altogether");
                                        ret = null;
                                }
                                break;
@@ -111,7 +113,7 @@ class AtlasNotificationMapper {
                                break;
                        }
                        default:
-                               LOG.error("Unknown notification received. Will 
not be handled, notificationType=" + opName);
+                               LOG.error(opName + ": unknown notification 
received - not handled");
                }
 
                return ret;

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/9aa396b5/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/TagAtlasSource.java
----------------------------------------------------------------------
diff --git 
a/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/TagAtlasSource.java
 
b/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/TagAtlasSource.java
index 0c0dee9..1c2a25b 100644
--- 
a/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/TagAtlasSource.java
+++ 
b/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/TagAtlasSource.java
@@ -151,7 +151,9 @@ public class TagAtlasSource implements TagSource {
                                                printNotification(notification);
                                                ServiceTags serviceTags = 
AtlasNotificationMapper.processEntityNotification(notification, properties);
                                                if (serviceTags == null) {
-                                                       LOG.info("Did not 
create ServiceTags structure for notification type:" + 
notification.getOperationType().name());
+                                                       
if(LOG.isDebugEnabled()) {
+                                                               LOG.debug("Did 
not create ServiceTags structure for notification type:" + 
notification.getOperationType().name());
+                                                       }
                                                } else {
                                                        if 
(LOG.isDebugEnabled()) {
                                                                String 
serviceTagsJSON = new Gson().toJson(serviceTags);

Reply via email to