atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kbh...@apache.org
Subject incubator-atlas git commit: ATLAS-1546 : Fix for styleCheck error in Hive hook should choose appropriate JAAS config if host uses kerberos ticket-cache
Date Thu, 16 Feb 2017 11:35:30 GMT
Repository: incubator-atlas
Updated Branches:
  refs/heads/master 6170063c8 -> 20fb5894d


ATLAS-1546 : Fix for styleCheck error in Hive hook should choose appropriate JAAS config if
host uses kerberos ticket-cache


Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/20fb5894
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/20fb5894
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/20fb5894

Branch: refs/heads/master
Commit: 20fb5894d8be8551d0f2cf325d32f062f866832a
Parents: 6170063
Author: nixonrodrigues <nixon.rodrigues@freestoneinfotech.com>
Authored: Thu Feb 16 16:13:12 2017 +0530
Committer: kevalbhatt <kbhatt@apache.org>
Committed: Thu Feb 16 17:04:48 2017 +0530

----------------------------------------------------------------------
 .../security/InMemoryJAASConfiguration.java     | 38 ++++++++++----------
 .../java/org/apache/atlas/hook/AtlasHook.java   |  9 ++---
 release-log.txt                                 |  4 +++
 3 files changed, 28 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/20fb5894/common/src/main/java/org/apache/atlas/security/InMemoryJAASConfiguration.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/atlas/security/InMemoryJAASConfiguration.java
b/common/src/main/java/org/apache/atlas/security/InMemoryJAASConfiguration.java
index 8be6658..c65048f 100644
--- a/common/src/main/java/org/apache/atlas/security/InMemoryJAASConfiguration.java
+++ b/common/src/main/java/org/apache/atlas/security/InMemoryJAASConfiguration.java
@@ -26,6 +26,8 @@ import org.apache.hadoop.security.SecurityUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.security.auth.login.AppConfigurationEntry;
+import javax.security.auth.login.Configuration;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
@@ -39,8 +41,6 @@ import java.util.SortedSet;
 import java.util.StringTokenizer;
 import java.util.TreeSet;
 
-import javax.security.auth.login.AppConfigurationEntry;
-import javax.security.auth.login.Configuration;
 
 /**
  * InMemoryJAASConfiguration
@@ -127,7 +127,7 @@ public final class InMemoryJAASConfiguration extends Configuration {
     private static final String JAAS_CONFIG_LOGIN_MODULE_CONTROL_FLAG_PARAM = "loginModuleControlFlag";
     private static final String JAAS_CONFIG_LOGIN_OPTIONS_PREFIX = "option";
     private static final String JAAS_PRINCIPAL_PROP = "principal";
-    private static final Map<String, String> configSectionRedirects = new HashMap<>();
+    private static final Map<String, String> CONFIG_SECTION_REDIRECTS = new HashMap<>();
 
     private Configuration parent = null;
     private Map<String, List<AppConfigurationEntry>> applicationConfigEntryMap
= new HashMap<>();
@@ -227,9 +227,9 @@ public final class InMemoryJAASConfiguration extends Configuration {
             ret = retList.toArray(ret);
         }
 
-		if (LOG.isDebugEnabled()) {
+        if (LOG.isDebugEnabled()) {
             LOG.debug("<== InMemoryJAASConfiguration.getAppConfigurationEntry({}): {}",
name, ArrayUtils.toString(ret));
-		}
+        }
 
         return ret;
     }
@@ -245,11 +245,11 @@ public final class InMemoryJAASConfiguration extends Configuration {
         int prefixLen = JAAS_CONFIG_PREFIX_PARAM.length();
 
         Map<String, SortedSet<Integer>> jaasClients = new HashMap<>();
-        for(String key : properties.stringPropertyNames()) {
+        for (String key : properties.stringPropertyNames()) {
             if (key.startsWith(JAAS_CONFIG_PREFIX_PARAM)) {
-                String jaasKey  = key.substring(prefixLen);
+                String jaasKey = key.substring(prefixLen);
                 StringTokenizer tokenizer = new StringTokenizer(jaasKey, ".");
-                int tokenCount =tokenizer.countTokens();
+                int tokenCount = tokenizer.countTokens();
                 if (tokenCount > 0) {
                     String clientId = tokenizer.nextToken();
                     SortedSet<Integer> indexList = jaasClients.get(clientId);
@@ -259,7 +259,7 @@ public final class InMemoryJAASConfiguration extends Configuration {
                     }
                     String indexStr = tokenizer.nextToken();
 
-                    int indexId =  isNumeric(indexStr) ? Integer.parseInt(indexStr)  : -1;
+                    int indexId = isNumeric(indexStr) ? Integer.parseInt(indexStr) : -1;
 
                     Integer clientIdIndex = Integer.valueOf(indexId);
 
@@ -270,14 +270,14 @@ public final class InMemoryJAASConfiguration extends Configuration {
                 }
             }
         }
-        for(String jaasClient : jaasClients.keySet()) {
+        for (String jaasClient : jaasClients.keySet()) {
 
-            for(Integer index :  jaasClients.get(jaasClient)) {
+            for (Integer index : jaasClients.get(jaasClient)) {
 
                 String keyPrefix = JAAS_CONFIG_PREFIX_PARAM + jaasClient + ".";
 
                 if (index > -1) {
-                    keyPrefix = keyPrefix  + String.valueOf(index) + ".";
+                    keyPrefix = keyPrefix + String.valueOf(index) + ".";
                 }
 
                 String keyParam = keyPrefix + JAAS_CONFIG_LOGIN_MODULE_NAME_PARAM;
@@ -291,7 +291,7 @@ public final class InMemoryJAASConfiguration extends Configuration {
                 }
 
                 keyParam = keyPrefix + JAAS_CONFIG_LOGIN_MODULE_CONTROL_FLAG_PARAM;
-                String  controlFlag =    properties.getProperty(keyParam);
+                String controlFlag = properties.getProperty(keyParam);
 
                 AppConfigurationEntry.LoginModuleControlFlag loginControlFlag = null;
                 if (controlFlag != null) {
@@ -322,9 +322,9 @@ public final class InMemoryJAASConfiguration extends Configuration {
 
 
                 Map<String, String> options = new HashMap<>();
-                String optionPrefix =  keyPrefix + JAAS_CONFIG_LOGIN_OPTIONS_PREFIX + ".";
+                String optionPrefix = keyPrefix + JAAS_CONFIG_LOGIN_OPTIONS_PREFIX + ".";
                 int optionPrefixLen = optionPrefix.length();
-                for(String key : properties.stringPropertyNames()) {
+                for (String key : properties.stringPropertyNames()) {
                     if (key.startsWith(optionPrefix)) {
                         String optionKey = key.substring(optionPrefixLen);
                         String optionVal = properties.getProperty(key);
@@ -357,7 +357,7 @@ public final class InMemoryJAASConfiguration extends Configuration {
                     LOG.debug(sb.toString());
                 }
 
-                List<AppConfigurationEntry> retList =  applicationConfigEntryMap.get(jaasClient);
+                List<AppConfigurationEntry> retList = applicationConfigEntryMap.get(jaasClient);
                 if (retList == null) {
                     retList = new ArrayList<>();
                     applicationConfigEntryMap.put(jaasClient, retList);
@@ -381,14 +381,14 @@ public final class InMemoryJAASConfiguration extends Configuration {
 
         if (name != null) {
             if (redirectTo != null) {
-                configSectionRedirects.put(name, redirectTo);
+                CONFIG_SECTION_REDIRECTS.put(name, redirectTo);
             } else {
-                configSectionRedirects.remove(name);
+                CONFIG_SECTION_REDIRECTS.remove(name);
             }
         }
     }
 
     private static String getConfigSectionRedirect(String name) {
-        return name != null ? configSectionRedirects.get(name) : null;
+        return name != null ? CONFIG_SECTION_REDIRECTS.get(name) : null;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/20fb5894/notification/src/main/java/org/apache/atlas/hook/AtlasHook.java
----------------------------------------------------------------------
diff --git a/notification/src/main/java/org/apache/atlas/hook/AtlasHook.java b/notification/src/main/java/org/apache/atlas/hook/AtlasHook.java
index c8df08c..fb73d3a 100644
--- a/notification/src/main/java/org/apache/atlas/hook/AtlasHook.java
+++ b/notification/src/main/java/org/apache/atlas/hook/AtlasHook.java
@@ -114,7 +114,7 @@ public abstract class AtlasHook {
      * De-duping of entities is done on server side depending on the
      * unique attribute on the entities.
      *
-     * @param messages hook notification messages
+     * @param messages   hook notification messages
      * @param maxRetries maximum number of retries while sending message to messaging system
      */
     public static void notifyEntities(List<HookNotification.HookNotificationMessage>
messages, int maxRetries) {
@@ -142,7 +142,7 @@ public abstract class AtlasHook {
                     try {
                         LOG.debug("Sleeping for {} ms before retry", notificationRetryInterval);
                         Thread.sleep(notificationRetryInterval);
-                    } catch (InterruptedException ie){
+                    } catch (InterruptedException ie) {
                         LOG.error("Notification hook thread sleep interrupted");
                     }
 
@@ -176,6 +176,7 @@ public abstract class AtlasHook {
 
     /**
      * Returns the logged in user.
+     *
      * @return
      */
     public static String getUser() {
@@ -223,7 +224,7 @@ public abstract class AtlasHook {
         try {
             ret = UserGroupInformation.isLoginKeytabBased();
         } catch (Exception excp) {
-            LOG.error("error in determining whether to use ticket-cache or keytab for KafkaClient
JAAS configuration", excp);
+            LOG.error("Error in determining keytab for KafkaClient-JAAS config", excp);
         }
 
         return ret;
@@ -235,7 +236,7 @@ public abstract class AtlasHook {
         try {
             ret = UserGroupInformation.isLoginTicketBased();
         } catch (Exception excp) {
-            LOG.error("error in determining whether to use ticket-cache or keytab for KafkaClient
JAAS configuration", excp);
+            LOG.error("Error in determining ticket-cache for KafkaClient-JAAS config", excp);
         }
 
         return ret;

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/20fb5894/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 007e235..9111d4e 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -9,6 +9,10 @@ ATLAS-1060 Add composite indexes for exact match performance improvements
for al
 ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
 
 ALL CHANGES:
+ATLAS-1546 (ATLAS-1546.3.patch)Hive hook should choose appropriate JAAS config if host uses
kerberos ticket-cache (nixonrodrigues via kevalbhat)
+ATLAS-1503 Export/import support to copy data between Atlas instances (ashutoshm via mneethiraj)
+ATLAS-1554 v2 EntityREST implementation for entity partial update (sarathkumarsubramanian
 via mneethiraj)
+ATLAS-1547 Fix DeleteHandlerV1 for new model changes and add tests (mneethiraj)
 ATLAS-1556 Edit entity button not working from search table of tag detail page. (kevalbhatt)
 ATLAS-1559 Regression - If a new tag is created then the earlier tags doesn't render properly
(kevalbhatt)
 ATLAS-1508 Make AtlasADAuthenticationProvider like Ranger ADLdap Methods (gss2002 via mneethiraj)


Mime
View raw message