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:29 UTC

[1/3] atlas git commit: ATLAS-2046: UI Regression - Columns Filter not listing all attributes of a datatype

Repository: atlas
Updated Branches:
  refs/heads/0.8-incubating b993f9227 -> 374cc342d


ATLAS-2046: UI Regression - Columns Filter not listing all attributes of a datatype

Signed-off-by: Madhan Neethiraj <ma...@apache.org>
(cherry picked from commit fa11d13a5c431fe3c46a7ad2b267bea1f61da3e9)


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

Branch: refs/heads/0.8-incubating
Commit: 0d6f7a4faa9c1066196473704bc125ef4bdd50de
Parents: b993f92
Author: kevalbhatt <kb...@apache.org>
Authored: Wed Aug 16 16:02:06 2017 +0530
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Wed Aug 16 11:14:31 2017 -0700

----------------------------------------------------------------------
 .../js/views/search/SearchResultLayoutView.js   | 76 ++++++++++----------
 1 file changed, 38 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/0d6f7a4f/dashboardv2/public/js/views/search/SearchResultLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
index b9a8895..072295e 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -637,48 +637,48 @@ define(['require',
                             }
                         })
                     };
-                    if (this.value && this.value.searchType === "basic") {
-                        var def = this.entityDefCollection.fullCollection.find({ name: this.value.type });
-                        if (def) {
-                            var attrObj = Utils.getNestedSuperTypeObj({ data: def.toJSON(), collection: this.entityDefCollection, attrMerge: true });
-                            _.each(attrObj, function(obj, key) {
-                                var key = obj.name,
-                                    isRenderable = _.contains(columnToShow, key)
-                                if (key == "name" || key == "description" || key == "owner") {
-                                    if (columnToShow) {
-                                        col[key].renderable = isRenderable;
-                                    }
-                                    return;
+                }
+                if (this.value && this.value.searchType === "basic") {
+                    var def = this.entityDefCollection.fullCollection.find({ name: this.value.type });
+                    if (def) {
+                        var attrObj = Utils.getNestedSuperTypeObj({ data: def.toJSON(), collection: this.entityDefCollection, attrMerge: true });
+                        _.each(attrObj, function(obj, key) {
+                            var key = obj.name,
+                                isRenderable = _.contains(columnToShow, key)
+                            if (key == "name" || key == "description" || key == "owner") {
+                                if (columnToShow) {
+                                    col[key].renderable = isRenderable;
                                 }
-                                col[obj.name] = {
-                                    label: obj.name.capitalize(),
-                                    cell: "Html",
-                                    editable: false,
-                                    sortable: false,
-                                    resizeable: true,
-                                    orderable: true,
-                                    renderable: isRenderable,
-                                    formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
-                                        fromRaw: function(rawValue, model) {
-                                            var modelObj = model.toJSON();
-
-                                            if (modelObj && modelObj.attributes && !_.isUndefined(modelObj.attributes[key])) {
-                                                var tempObj = {
-                                                    'scope': that,
-                                                    'attributeDefs': [obj],
-                                                    'valueObject': {},
-                                                    'isTable': false
-                                                }
+                                return;
+                            }
+                            col[obj.name] = {
+                                label: obj.name.capitalize(),
+                                cell: "Html",
+                                editable: false,
+                                sortable: false,
+                                resizeable: true,
+                                orderable: true,
+                                renderable: isRenderable,
+                                formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
+                                    fromRaw: function(rawValue, model) {
+                                        var modelObj = model.toJSON();
 
-                                                tempObj.valueObject[key] = modelObj.attributes[key]
-                                                Utils.findAndMergeRefEntity(tempObj.valueObject, that.searchCollection.referredEntities);
-                                                return CommonViewFunction.propertyTable(tempObj);
+                                        if (modelObj && modelObj.attributes && !_.isUndefined(modelObj.attributes[key])) {
+                                            var tempObj = {
+                                                'scope': that,
+                                                'attributeDefs': [obj],
+                                                'valueObject': {},
+                                                'isTable': false
                                             }
+
+                                            tempObj.valueObject[key] = modelObj.attributes[key]
+                                            Utils.findAndMergeRefEntity(tempObj.valueObject, that.searchCollection.referredEntities);
+                                            return CommonViewFunction.propertyTable(tempObj);
                                         }
-                                    })
-                                };
-                            });
-                        }
+                                    }
+                                })
+                            };
+                        });
                     }
                 }
                 return this.searchCollection.constructor.getTableCols(col, this.searchCollection);


[3/3] atlas git commit: ATLAS-1867 ATLASClientV2 correct delete typedefs expected http code

Posted by ma...@apache.org.
ATLAS-1867 ATLASClientV2 correct delete typedefs expected http code

Signed-off-by: David Radley <da...@uk.ibm.com>
(cherry picked from commit 376298540ceca9315d3726c9dbaab619d33ea4f7)


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

Branch: refs/heads/0.8-incubating
Commit: 374cc342daf1982145b3c36788fb972682bc6d35
Parents: bd5f74b
Author: Richard Ding <rd...@yahoo-inc.com>
Authored: Wed Aug 16 10:36:00 2017 +0100
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Wed Aug 16 11:15:59 2017 -0700

----------------------------------------------------------------------
 client/src/main/java/org/apache/atlas/AtlasClientV2.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/374cc342/client/src/main/java/org/apache/atlas/AtlasClientV2.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/atlas/AtlasClientV2.java b/client/src/main/java/org/apache/atlas/AtlasClientV2.java
index 1353357..2cb9e84 100644
--- a/client/src/main/java/org/apache/atlas/AtlasClientV2.java
+++ b/client/src/main/java/org/apache/atlas/AtlasClientV2.java
@@ -67,7 +67,7 @@ public class AtlasClientV2 extends AtlasBaseClient {
     private static final APIInfo GET_ALL_TYPE_DEFS = new APIInfo(TYPEDEFS_API, HttpMethod.GET, Response.Status.OK);
     private static final APIInfo CREATE_ALL_TYPE_DEFS = new APIInfo(TYPEDEFS_API, HttpMethod.POST, Response.Status.OK);
     private static final APIInfo UPDATE_ALL_TYPE_DEFS = new APIInfo(TYPEDEFS_API, HttpMethod.PUT, Response.Status.OK);
-    private static final APIInfo DELETE_ALL_TYPE_DEFS = new APIInfo(TYPEDEFS_API, HttpMethod.DELETE, Response.Status.OK);
+    private static final APIInfo DELETE_ALL_TYPE_DEFS = new APIInfo(TYPEDEFS_API, HttpMethod.DELETE, Response.Status.NO_CONTENT);
 
     // Entity APIs
     public static final String ENTITY_API = BASE_URI + "v2/entity/";
@@ -278,7 +278,7 @@ public class AtlasClientV2 extends AtlasBaseClient {
      * @param typesDef A composite object that captures all types to be deleted
      */
     public void deleteAtlasTypeDefs(final AtlasTypesDef typesDef) throws AtlasServiceException {
-        callAPI(DELETE_ALL_TYPE_DEFS, AtlasTypesDef.class, AtlasType.toJson(typesDef));
+        callAPI(DELETE_ALL_TYPE_DEFS, (Class<?>)null, AtlasType.toJson(typesDef));
     }
 
     /* Lineage Calls  */


[2/3] atlas git commit: ATLAS-2003 Add Javadoc format to class summaries

Posted by ma...@apache.org.
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