sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sp...@apache.org
Subject sentry git commit: SENTRY-2165: NotificationProcesser process notification methods have logs wrongly flagged as ERROR (Arjun Mishra, reviewed by Na Li, Steve Moist, Sergio Pena)
Date Tue, 27 Mar 2018 15:36:21 GMT
Repository: sentry
Updated Branches:
  refs/heads/master 5db336d79 -> 51c02fa24


SENTRY-2165: NotificationProcesser process notification methods have logs wrongly flagged
as ERROR (Arjun Mishra, reviewed by Na Li, Steve Moist, Sergio Pena)

Change-Id: Ifafb67c16b59483358e8a46c81d6167312be15e5


Project: http://git-wip-us.apache.org/repos/asf/sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/51c02fa2
Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/51c02fa2
Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/51c02fa2

Branch: refs/heads/master
Commit: 51c02fa2456cd72b1088ac5662e2f17681aebd3a
Parents: 5db336d
Author: Sergio Pena <sergio.pena@cloudera.com>
Authored: Tue Mar 27 10:35:33 2018 -0500
Committer: Sergio Pena <sergio.pena@cloudera.com>
Committed: Tue Mar 27 10:35:33 2018 -0500

----------------------------------------------------------------------
 .../service/persistent/NotificationProcessor.java | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/51c02fa2/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/NotificationProcessor.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/NotificationProcessor.java
b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/NotificationProcessor.java
index 94a0b0f..e5ad3b5 100644
--- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/NotificationProcessor.java
+++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/NotificationProcessor.java
@@ -239,7 +239,7 @@ final class NotificationProcessor {
     String dbName = message.getDB();
     String location = message.getLocation();
     if ((dbName == null) || (location == null)) {
-      LOGGER.error("Create database event "
+      LOGGER.warn("Create database event "
               + "has incomplete information. dbName: {} location: {}",
           StringUtils.defaultIfBlank(dbName, "null"),
           StringUtils.defaultIfBlank(location, "null"));
@@ -273,7 +273,7 @@ final class NotificationProcessor {
     String dbName = dropDatabaseMessage.getDB();
     String location = dropDatabaseMessage.getLocation();
     if (dbName == null) {
-      LOGGER.error("Drop database event has incomplete information: dbName = null");
+      LOGGER.warn("Drop database event has incomplete information: dbName = null");
       return false;
     }
     if (syncStoreOnDrop) {
@@ -303,7 +303,7 @@ final class NotificationProcessor {
     String tableName = createTableMessage.getTable();
     String location = createTableMessage.getLocation();
     if ((dbName == null) || (tableName == null) || (location == null)) {
-      LOGGER.error(String.format("Create table event " + "has incomplete information."
+      LOGGER.warn(String.format("Create table event " + "has incomplete information."
               + " dbName = %s, tableName = %s, location = %s",
           StringUtils.defaultIfBlank(dbName, "null"),
           StringUtils.defaultIfBlank(tableName, "null"),
@@ -338,7 +338,7 @@ final class NotificationProcessor {
     String dbName = dropTableMessage.getDB();
     String tableName = dropTableMessage.getTable();
     if ((dbName == null) || (tableName == null)) {
-      LOGGER.error("Drop table event "
+      LOGGER.warn("Drop table event "
           + "has incomplete information. dbName: {}, tableName: {}",
           StringUtils.defaultIfBlank(dbName, "null"),
           StringUtils.defaultIfBlank(tableName, "null"));
@@ -385,7 +385,7 @@ final class NotificationProcessor {
         || (newTableName == null)
         || (oldLocation == null)
         || (newLocation == null)) {
-      LOGGER.error(String.format("Alter table event "
+      LOGGER.warn(String.format("Alter table notification ignored since event "
               + "has incomplete information. oldDbName = %s, oldTableName = %s, oldLocation
= %s, "
               + "newDbName = %s, newTableName = %s, newLocation = %s",
           StringUtils.defaultIfBlank(oldDbName, "null"),
@@ -400,7 +400,7 @@ final class NotificationProcessor {
     if ((oldDbName.equals(newDbName))
         && (oldTableName.equals(newTableName))
         && (oldLocation.equals(newLocation))) {
-      LOGGER.error(String.format("Alter table notification ignored as neither name nor "
+      LOGGER.debug(String.format("Alter table notification ignored as neither name nor "
               + "location has changed: oldAuthzObj = %s, oldLocation = %s, newAuthzObj =
%s, "
               + "newLocation = %s", oldDbName + "." + oldTableName, oldLocation,
           newDbName + "." + newTableName, newLocation));
@@ -444,7 +444,7 @@ final class NotificationProcessor {
     String tableName = addPartitionMessage.getTable();
     List<String> locations = addPartitionMessage.getLocations();
     if ((dbName == null) || (tableName == null) || (locations == null)) {
-      LOGGER.error(String.format("Create table event has incomplete information. "
+      LOGGER.warn(String.format("Create table event has incomplete information. "
               + "dbName = %s, tableName = %s, locations = %s",
           StringUtils.defaultIfBlank(dbName, "null"),
           StringUtils.defaultIfBlank(tableName, "null"),
@@ -475,7 +475,7 @@ final class NotificationProcessor {
     String tableName = dropPartitionMessage.getTable();
     List<String> locations = dropPartitionMessage.getLocations();
     if ((dbName == null) || (tableName == null) || (locations == null)) {
-      LOGGER.error(String.format("Drop partition event "
+      LOGGER.warn(String.format("Drop partition event "
               + "has incomplete information. dbName = %s, tableName = %s, location = %s",
           StringUtils.defaultIfBlank(dbName, "null"),
           StringUtils.defaultIfBlank(tableName, "null"),
@@ -510,7 +510,7 @@ final class NotificationProcessor {
         || (tableName == null)
         || (oldLocation == null)
         || (newLocation == null)) {
-      LOGGER.error(String.format("Alter partition event "
+      LOGGER.warn(String.format("Alter partition event "
               + "has incomplete information. dbName = %s, tableName = %s, "
               + "oldLocation = %s, newLocation = %s",
           StringUtils.defaultIfBlank(dbName, "null"),


Mime
View raw message