You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ma...@apache.org on 2017/08/16 18:34:30 UTC
[2/3] atlas git commit: ATLAS-2003 Add Javadoc format to class
summaries
ATLAS-2003 Add Javadoc format to class summaries
Signed-off-by: David Radley <da...@uk.ibm.com>
(cherry picked from commit 856a0c61b273dd9b4a70c69bd743c51e2425a568)
Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/bd5f74b5
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/bd5f74b5
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/bd5f74b5
Branch: refs/heads/0.8-incubating
Commit: bd5f74b53682914368f8b0fdceb9ac84c618f61e
Parents: 0d6f7a4
Author: Richard Ding <rd...@yahoo-inc.com>
Authored: Tue Aug 15 13:35:50 2017 +0100
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Wed Aug 16 11:15:30 2017 -0700
----------------------------------------------------------------------
.../security/InMemoryJAASConfiguration.java | 47 +++++++++++---------
.../graphdb/titan/query/TitanGraphQuery.java | 8 ++--
.../notification/NotificationInterface.java | 12 ++---
.../optimizer/ExpandAndsOptimization.java | 31 ++++++-------
.../audit/HBaseBasedAuditRepository.java | 20 +++++----
5 files changed, 63 insertions(+), 55 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/atlas/blob/bd5f74b5/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 c65048f..936311b 100644
--- a/common/src/main/java/org/apache/atlas/security/InMemoryJAASConfiguration.java
+++ b/common/src/main/java/org/apache/atlas/security/InMemoryJAASConfiguration.java
@@ -44,13 +44,14 @@ import java.util.TreeSet;
/**
* InMemoryJAASConfiguration
- *
+ * <p>
* An utility class - which has a static method init to load all JAAS configuration from Application
* properties file (eg: atlas.properties) and set it as part of the default lookup configuration for
* all JAAS configuration lookup.
- *
+ * <p>
* Example settings in jaas-application.properties:
*
+ * <pre class=code>
* atlas.jaas.KafkaClient.loginModuleName = com.sun.security.auth.module.Krb5LoginModule
* atlas.jaas.KafkaClient.loginModuleControlFlag = required
* atlas.jaas.KafkaClient.option.useKeyTab = true
@@ -72,9 +73,12 @@ import java.util.TreeSet;
* atlas.jaas.MyClient.1.option.storeKey = true
* atlas.jaas.MyClient.1.option.serviceName = kafka
* atlas.jaas.MyClient.1.option.keyTab = /etc/security/keytabs/kafka_client.keytab
- * atlas.jaas.MyClient.1.option.principal = kafka-client-1@EXAMPLE.COM
-
+ * atlas.jaas.MyClient.1.option.principal = kafka-client-1@EXAMPLE.COM </pre>
+ *
+ * <p>
* This will set the JAAS configuration - equivalent to the jaas.conf file entries:
+ *
+ * <pre class=code>
* KafkaClient {
* com.sun.security.auth.module.Krb5LoginModule required
* useKeyTab=true
@@ -97,23 +101,26 @@ import java.util.TreeSet;
* serviceName=kafka
* keyTab="/etc/security/keytabs/kafka_client.keytab"
* principal="kafka-client-1@EXAMPLE.COM";
- * };
- *
- * Here is the syntax for atlas.properties to add JAAS configuration:
- *
- * The property name has to begin with 'atlas.jaas.' + clientId (in case of Kafka client,
- * it expects the clientId to be KafkaClient).
- * The following property must be there to specify the JAAS loginModule name
- * 'atlas.jaas.' + clientId + '.loginModuleName'
- * The following optional property should be set to specify the loginModuleControlFlag
- * 'atlas.jaas.' + clientId + '.loginModuleControlFlag'
- * Default value : required , Possible values: required, optional, sufficient, requisite
- * Then you can add additional optional parameters as options for the configuration using the following
+ * }; </pre>
+ * <p>
+ * Here is the syntax for atlas.properties to add JAAS configuration:
+ * <p>
+ * The property name has to begin with 'atlas.jaas.' + clientId (in case of Kafka client,
+ * it expects the clientId to be KafkaClient).
+ * <p>
+ * The following property must be there to specify the JAAS loginModule name
+ * <pre> 'atlas.jaas.' + clientId + '.loginModuleName' </pre>
+ * <p>
+ * The following optional property should be set to specify the loginModuleControlFlag
+ * <pre> 'atlas.jaas.' + clientId + '.loginModuleControlFlag'
+ * Default value : required , Possible values: required, optional, sufficient, requisite </pre>
+ * <p>
+ * Then you can add additional optional parameters as options for the configuration using the following
* syntax:
- * 'atlas.jaas.' + clientId + '.option.' + <optionName> = <optionValue>
- *
- * The current setup will lookup JAAS configration from the atlas-application.properties first, if not available,
- * it will delegate to the original configuration
+ * <pre> 'atlas.jaas.' + clientId + '.option.' + <optionName> = <optionValue> </pre>
+ * <p>
+ * The current setup will lookup JAAS configration from the atlas-application.properties first,
+ * if not available, it will delegate to the original configuration
*
*/
http://git-wip-us.apache.org/repos/asf/atlas/blob/bd5f74b5/graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java
----------------------------------------------------------------------
diff --git a/graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java b/graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java
index c38f6cc..dfdb91b 100644
--- a/graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java
+++ b/graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java
@@ -40,18 +40,18 @@ import java.util.Set;
/**
* Abstract implementation of AtlasGraphQuery that is used by both Titan 0.5.4
* and Titan 1.0.0.
- *
+ * <p>
* Represents a graph query as an OrConditions which consists of
* 1 or more AndConditions. The query is executed by converting
* the AndConditions to native GraphQuery instances that can be executed
* directly against Titan. The overall result is obtained by unioning together
* the results from those individual GraphQueries.
- *
+ * <p>
* Here is a pictoral view of what is going on here. Conceptually,
* the query being executed can be though of as the where clause
* in a query
*
- *
+ * <pre>
* where (a =1 and b=2) or (a=2 and b=3)
*
* ||
@@ -85,7 +85,7 @@ import java.util.Set;
* \/
*
* result
- *
+ * </pre>
*
*
*/
http://git-wip-us.apache.org/repos/asf/atlas/blob/bd5f74b5/notification/src/main/java/org/apache/atlas/notification/NotificationInterface.java
----------------------------------------------------------------------
diff --git a/notification/src/main/java/org/apache/atlas/notification/NotificationInterface.java b/notification/src/main/java/org/apache/atlas/notification/NotificationInterface.java
index ef8ee27..956c85e 100644
--- a/notification/src/main/java/org/apache/atlas/notification/NotificationInterface.java
+++ b/notification/src/main/java/org/apache/atlas/notification/NotificationInterface.java
@@ -27,11 +27,13 @@ import java.lang.reflect.Type;
import java.util.List;
/**
- * Interface to the Atlas notification framework. Use this interface to create consumers and to send messages of a
- * given notification type.
- *
- * 1. Atlas sends entity notifications
- * 2. Hooks send notifications to create/update types/entities. Atlas reads these messages
+ * Interface to the Atlas notification framework.
+ * <p>
+ * Use this interface to create consumers and to send messages of a given notification type.
+ * <ol>
+ * <li>Atlas sends entity notifications
+ * <li>Hooks send notifications to create/update types/entities. Atlas reads these messages
+ * </ol>
*/
public interface NotificationInterface {
http://git-wip-us.apache.org/repos/asf/atlas/blob/bd5f74b5/repository/src/main/java/org/apache/atlas/gremlin/optimizer/ExpandAndsOptimization.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/gremlin/optimizer/ExpandAndsOptimization.java b/repository/src/main/java/org/apache/atlas/gremlin/optimizer/ExpandAndsOptimization.java
index 7cf9711..d8ecd07 100644
--- a/repository/src/main/java/org/apache/atlas/gremlin/optimizer/ExpandAndsOptimization.java
+++ b/repository/src/main/java/org/apache/atlas/gremlin/optimizer/ExpandAndsOptimization.java
@@ -29,33 +29,30 @@ import org.slf4j.LoggerFactory;
/**
* Optimizer that pulls has expressions out of an 'and' expression.
- *
+ * <p>
* For example:
- *
- * g.V().and(has('x'),has('y')
- *
+ * <pre class=code>
+ * g.V().and(has('x'),has('y') </pre>
+ * <p>
* is optimized to:
- *
- * g.V().has('x').has('y')
- *
+ * <pre class=code>
+ * g.V().has('x').has('y') </pre>
+ * <p>
* There are certain cases where it is not safe to move an expression out
* of the 'and'. For example, in the expression
- *
- * g.V().and(has('x').out('y'),has('z'))
- *
+ * <pre class=code>
+ * g.V().and(has('x').out('y'),has('z')) </pre>
+ * <p>
* has('x').out('y') cannot be moved out of the 'and', since it changes the value of the traverser.
- *
+ * <p>
* At this time, the ExpandAndsOptimizer is not able to handle this scenario, so we don't extract
* that expression. In this case, the result is:
- *
- * g.V().has('z').and(has('x').out('y'))
- *
+ * <pre class=code>
+ * g.V().has('z').and(has('x').out('y')) </pre>
+ * <p>
* The optimizer will call ExpandAndsOptimization recursively on the children, so
* there is no need to recursively update the children here.
*
- * @param expr
- * @param context
- * @return the expressions that should be unioned together to get the query result
*/
public class ExpandAndsOptimization implements GremlinOptimization {
http://git-wip-us.apache.org/repos/asf/atlas/blob/bd5f74b5/repository/src/main/java/org/apache/atlas/repository/audit/HBaseBasedAuditRepository.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/audit/HBaseBasedAuditRepository.java b/repository/src/main/java/org/apache/atlas/repository/audit/HBaseBasedAuditRepository.java
index 06e518e..5a5a2c1 100644
--- a/repository/src/main/java/org/apache/atlas/repository/audit/HBaseBasedAuditRepository.java
+++ b/repository/src/main/java/org/apache/atlas/repository/audit/HBaseBasedAuditRepository.java
@@ -61,15 +61,17 @@ import java.util.Map;
/**
* HBase based repository for entity audit events
- * Table -> 1, ATLAS_ENTITY_EVENTS
- * Key -> entity id + timestamp
- * Column Family -> 1,dt
- * Columns -> action, user, detail
- * versions -> 1
- *
- * Note: The timestamp in the key is assumed to be timestamp in milli seconds. Since the key is entity id + timestamp,
- * and only 1 version is kept, there can be just 1 audit event per entity id + timestamp. This is ok for one atlas server.
- * But if there are more than one atlas servers, we should use server id in the key
+ * <p>
+ * Table -> 1, ATLAS_ENTITY_EVENTS <br>
+ * Key -> entity id + timestamp <br>
+ * Column Family -> 1,dt <br>
+ * Columns -> action, user, detail <br>
+ * versions -> 1 <br>
+ * <p>
+ * Note: The timestamp in the key is assumed to be timestamp in milli seconds. Since the key is
+ * entity id + timestamp, and only 1 version is kept, there can be just 1 audit event per entity
+ * id + timestamp. This is ok for one atlas server. But if there are more than one atlas servers,
+ * we should use server id in the key
*/
@Singleton
@Component