You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Apoorv Naik <na...@gmail.com> on 2017/06/16 18:05:33 UTC

Review Request 60159: ATLAS-1880: Search using entity/trait attributes

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/
-----------------------------------------------------------

Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.


Bugs: ATLAS-1880
    https://issues.apache.org/jira/browse/ATLAS-1880


Repository: atlas


Description
-------

See JIRA


Sample Request structure

```json
{
	"typeName": "hive_table",
	"excludeDeletedEntities": false,
	"limit": 25,
	"offset": 0,
	"entityFilters": {
		"condition": "AND",
		"criterion": [{
			"attributeName": "retention",
			"operator": "=",
			"attributeValue": "10"
		}, {
			"condition": "OR",
			"criterion": [{
				"attributeName": "createTime",
				"operator": ">",
				"attributeValue": "1111111111"
			}, {
				"attributeName": "lastAccessTime",
				"operator": "<=",
				"attributeValue": "2222222222"
			}]
		}]
	}
}
```


Diffs
-----

  client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
  common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java bd7b35e4 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 5ad176b5 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 9dc175b6 
  intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
  repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
  repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SolrSearchStep.java PRE-CREATION 
  repository/src/test/java/org/apache/atlas/TestModules.java 095af417 
  repository/src/test/java/org/apache/atlas/discovery/GremlinSearchStepTest.java PRE-CREATION 
  repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
  webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 


Diff: https://reviews.apache.org/r/60159/diff/1/


Testing
-------

In progress

1. Tested Json marshalling and unmarshalling via REST


Thanks,

Apoorv Naik


Re: Review Request 60159: ATLAS-1880: Search using entity/trait attributes

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/#review179118
-----------------------------------------------------------




graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java
Lines 163 (patched)
<https://reviews.apache.org/r/60159/#comment253613>

    if (LOG.isDebugEnabled()) { .. }



graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java
Lines 171 (patched)
<https://reviews.apache.org/r/60159/#comment253615>

    Instead of multiple 'return's (line #171, #175), consider breaking from the loops to keep a single return at line #175.



graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java
Lines 182 (patched)
<https://reviews.apache.org/r/60159/#comment253625>

    Instead of adding "offset + limit" number of entries to the list and then returning a subset, consider skipping "offset" number of entries in the first place. This might require duplicating the code in vertices(limit).



repository/src/main/java/org/apache/atlas/discovery/GremlinStep.java
Lines 328 (patched)
<https://reviews.apache.org/r/60159/#comment253780>

    Given toGremlinFilterQuery() always return the passed in 'query', this condition "if" would always be false. Is this necessary? Same in line #336 as well.



repository/src/main/java/org/apache/atlas/discovery/GremlinStep.java
Lines 335 (patched)
<https://reviews.apache.org/r/60159/#comment253782>

    Passing 'query' seems incorrect here - as it would endup adding .has() to it. For 'OR' case, a new query object needs to be instantiated here. Please review.



repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java
Lines 373 (patched)
<https://reviews.apache.org/r/60159/#comment253761>

    vertexIndexKeys should be recomputed after index updates for type-registry changes (like add/update types)


- Madhan Neethiraj


On June 28, 2017, 9:18 p.m., Apoorv Naik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60159/
> -----------------------------------------------------------
> 
> (Updated June 28, 2017, 9:18 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.
> 
> 
> Bugs: ATLAS-1880
>     https://issues.apache.org/jira/browse/ATLAS-1880
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> See JIRA
> 
> 
> Sample Request structure
> 
> ```json
> {
> 	"typeName": "hive_table",
> 	"excludeDeletedEntities": false,
> 	"limit": 25,
> 	"offset": 0,
> 	"entityFilters": {
> 		"condition": "AND",
> 		"criterion": [{
> 			"attributeName": "retention",
> 			"operator": "=",
> 			"attributeValue": "10"
> 		}, {
> 			"condition": "OR",
> 			"criterion": [{
> 				"attributeName": "createTime",
> 				"operator": ">",
> 				"attributeValue": "1111111111"
> 			}, {
> 				"attributeName": "lastAccessTime",
> 				"operator": "<=",
> 				"attributeValue": "2222222222"
> 			}]
> 		}]
> 	}
> }
> ```
> 
> 
> Diffs
> -----
> 
>   client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
>   common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
>   distro/src/conf/atlas-log4j.xml e6c0d9f6 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java 841edf71 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java 1ff9d5ed 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasVertexQuery.java 53f490f5 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/NativeTitanGraphQuery.java 0211ff05 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java 0077a21f 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/AndCondition.java 68f0eb28 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/HasPredicate.java 24e4f5bc 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0IndexQuery.java 1ed1734f 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0VertexQuery.java bd8b897f 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 7ec6ffeb 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1IndexQuery.java 4073dd2a 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1VertexQuery.java 4452bcdd 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 1ca900d8 
>   intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java a402c628 
>   intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportRequest.java 21b64273 
>   repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
>   repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
>   repository/src/main/java/org/apache/atlas/discovery/GremlinStep.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SolrStep.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 3411f8de 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java 42bd58fb 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 9a8695af 
>   repository/src/main/java/org/apache/atlas/util/SearchContextContainer.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/TestModules.java fa2ac0d8 
>   repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 8c5623fa 
>   webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java 1fe31198 
> 
> 
> Diff: https://reviews.apache.org/r/60159/diff/9/
> 
> 
> Testing
> -------
> 
> 1. Tested Json marshalling and unmarshalling via REST
> 2. Tested with the attached request JSONs 
> 
> In progress
> 
> UTs (coding)
> 
> 
> File Attachments
> ----------------
> 
> Asset contains
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/a8fdf120-5eb1-4a84-af4a-1236a08a765b__asset-contains.json
> Asset IN
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/e2096d10-ea4d-4306-b68d-4f5c531fab3c__asset-in.json
> Asset like
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/6774768f-26ba-4386-b0b6-8ea682813dc7__asset-like.json
> Hive table (date comparison)
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/d6e54af0-f27f-4c6f-b9d3-4e3a0eb258ac__hive_table-date_2.json
> Hive table date
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/f3558280-60bd-49dd-92c6-c1176f86bc70__hive_table-date.json
> Hive Table Like
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/f07517dd-1c6c-4d2d-8bfd-3d494506b23c__hive_table-like.json
> Type and tag
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/83768696-aa5c-4c08-a776-143753eb4548__type-tag.json
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>


Re: Review Request 60159: ATLAS-1880: Search using entity/trait attributes

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/#review179336
-----------------------------------------------------------


Ship it!




Ship It!

- Madhan Neethiraj


On June 30, 2017, 6:27 a.m., Apoorv Naik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60159/
> -----------------------------------------------------------
> 
> (Updated June 30, 2017, 6:27 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.
> 
> 
> Bugs: ATLAS-1880
>     https://issues.apache.org/jira/browse/ATLAS-1880
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> See JIRA
> 
> 
> Sample Request structure
> 
> ```json
> {
> 	"typeName": "hive_table",
> 	"excludeDeletedEntities": false,
> 	"limit": 25,
> 	"offset": 0,
> 	"entityFilters": {
> 		"condition": "AND",
> 		"criterion": [{
> 			"attributeName": "retention",
> 			"operator": "=",
> 			"attributeValue": "10"
> 		}, {
> 			"condition": "OR",
> 			"criterion": [{
> 				"attributeName": "createTime",
> 				"operator": ">",
> 				"attributeValue": "1111111111"
> 			}, {
> 				"attributeName": "lastAccessTime",
> 				"operator": "<=",
> 				"attributeValue": "2222222222"
> 			}]
> 		}]
> 	}
> }
> ```
> 
> 
> Diffs
> -----
> 
>   client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
>   common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
>   distro/src/conf/atlas-log4j.xml e6c0d9f6 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java 841edf71 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java 1ff9d5ed 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasVertexQuery.java 53f490f5 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/NativeTitanGraphQuery.java 0211ff05 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java 0077a21f 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/AndCondition.java 68f0eb28 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/HasPredicate.java 24e4f5bc 
>   graphdb/titan0/src/main/java/com/thinkaurelius/titan/graphdb/query/graph/GraphCentricQueryBuilder.java 54ff7cb7 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0IndexQuery.java 1ed1734f 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0VertexQuery.java bd8b897f 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 7ec6ffeb 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1IndexQuery.java 4073dd2a 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1VertexQuery.java 4452bcdd 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 1ca900d8 
>   intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java a402c628 
>   intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportRequest.java 21b64273 
>   repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
>   repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
>   repository/src/main/java/org/apache/atlas/discovery/EntityLineageService.java b07091a0 
>   repository/src/main/java/org/apache/atlas/discovery/GremlinStep.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SolrStep.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java 35dbf6c4 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 3411f8de 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java 42bd58fb 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 9a8695af 
>   repository/src/main/java/org/apache/atlas/util/SearchTracker.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/TestModules.java fa2ac0d8 
>   repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 8c5623fa 
>   webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java 1fe31198 
> 
> 
> Diff: https://reviews.apache.org/r/60159/diff/11/
> 
> 
> Testing
> -------
> 
> 1. Tested Json marshalling and unmarshalling via REST
> 2. Tested with the attached request JSONs 
> 
> In progress
> 
> UTs (coding)
> 
> 
> File Attachments
> ----------------
> 
> Asset contains
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/a8fdf120-5eb1-4a84-af4a-1236a08a765b__asset-contains.json
> Asset IN
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/e2096d10-ea4d-4306-b68d-4f5c531fab3c__asset-in.json
> Asset like
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/6774768f-26ba-4386-b0b6-8ea682813dc7__asset-like.json
> Hive table (date comparison)
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/d6e54af0-f27f-4c6f-b9d3-4e3a0eb258ac__hive_table-date_2.json
> Hive table date
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/f3558280-60bd-49dd-92c6-c1176f86bc70__hive_table-date.json
> Hive Table Like
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/f07517dd-1c6c-4d2d-8bfd-3d494506b23c__hive_table-like.json
> Type and tag
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/83768696-aa5c-4c08-a776-143753eb4548__type-tag.json
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>


Re: Review Request 60159: ATLAS-1880: Search using entity/trait attributes

Posted by Apoorv Naik <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/
-----------------------------------------------------------

(Updated June 30, 2017, 6:27 a.m.)


Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.


Changes
-------

Few API and structural fixes


Bugs: ATLAS-1880
    https://issues.apache.org/jira/browse/ATLAS-1880


Repository: atlas


Description
-------

See JIRA


Sample Request structure

```json
{
	"typeName": "hive_table",
	"excludeDeletedEntities": false,
	"limit": 25,
	"offset": 0,
	"entityFilters": {
		"condition": "AND",
		"criterion": [{
			"attributeName": "retention",
			"operator": "=",
			"attributeValue": "10"
		}, {
			"condition": "OR",
			"criterion": [{
				"attributeName": "createTime",
				"operator": ">",
				"attributeValue": "1111111111"
			}, {
				"attributeName": "lastAccessTime",
				"operator": "<=",
				"attributeValue": "2222222222"
			}]
		}]
	}
}
```


Diffs (updated)
-----

  client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
  common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
  distro/src/conf/atlas-log4j.xml e6c0d9f6 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java 841edf71 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java 1ff9d5ed 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasVertexQuery.java 53f490f5 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/NativeTitanGraphQuery.java 0211ff05 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java 0077a21f 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/AndCondition.java 68f0eb28 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/HasPredicate.java 24e4f5bc 
  graphdb/titan0/src/main/java/com/thinkaurelius/titan/graphdb/query/graph/GraphCentricQueryBuilder.java 54ff7cb7 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0IndexQuery.java 1ed1734f 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0VertexQuery.java bd8b897f 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 7ec6ffeb 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1IndexQuery.java 4073dd2a 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1VertexQuery.java 4452bcdd 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 1ca900d8 
  intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java a402c628 
  intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportRequest.java 21b64273 
  repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
  repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
  repository/src/main/java/org/apache/atlas/discovery/EntityLineageService.java b07091a0 
  repository/src/main/java/org/apache/atlas/discovery/GremlinStep.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SolrStep.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java 35dbf6c4 
  repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 3411f8de 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java 42bd58fb 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 9a8695af 
  repository/src/main/java/org/apache/atlas/util/SearchTracker.java PRE-CREATION 
  repository/src/test/java/org/apache/atlas/TestModules.java fa2ac0d8 
  repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 8c5623fa 
  webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 
  webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java 1fe31198 


Diff: https://reviews.apache.org/r/60159/diff/11/

Changes: https://reviews.apache.org/r/60159/diff/10-11/


Testing
-------

1. Tested Json marshalling and unmarshalling via REST
2. Tested with the attached request JSONs 

In progress

UTs (coding)


File Attachments
----------------

Asset contains
  https://reviews.apache.org/media/uploaded/files/2017/06/22/a8fdf120-5eb1-4a84-af4a-1236a08a765b__asset-contains.json
Asset IN
  https://reviews.apache.org/media/uploaded/files/2017/06/22/e2096d10-ea4d-4306-b68d-4f5c531fab3c__asset-in.json
Asset like
  https://reviews.apache.org/media/uploaded/files/2017/06/22/6774768f-26ba-4386-b0b6-8ea682813dc7__asset-like.json
Hive table (date comparison)
  https://reviews.apache.org/media/uploaded/files/2017/06/22/d6e54af0-f27f-4c6f-b9d3-4e3a0eb258ac__hive_table-date_2.json
Hive table date
  https://reviews.apache.org/media/uploaded/files/2017/06/22/f3558280-60bd-49dd-92c6-c1176f86bc70__hive_table-date.json
Hive Table Like
  https://reviews.apache.org/media/uploaded/files/2017/06/22/f07517dd-1c6c-4d2d-8bfd-3d494506b23c__hive_table-like.json
Type and tag
  https://reviews.apache.org/media/uploaded/files/2017/06/22/83768696-aa5c-4c08-a776-143753eb4548__type-tag.json


Thanks,

Apoorv Naik


Re: Review Request 60159: ATLAS-1880: Search using entity/trait attributes

Posted by Apoorv Naik <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/
-----------------------------------------------------------

(Updated June 29, 2017, 3:05 a.m.)


Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.


Changes
-------

1. Removed status active check for TAG
2. On type change the vertex index keys should be refreshed
3. Fixed the OR condition gremlin query generation


Bugs: ATLAS-1880
    https://issues.apache.org/jira/browse/ATLAS-1880


Repository: atlas


Description
-------

See JIRA


Sample Request structure

```json
{
	"typeName": "hive_table",
	"excludeDeletedEntities": false,
	"limit": 25,
	"offset": 0,
	"entityFilters": {
		"condition": "AND",
		"criterion": [{
			"attributeName": "retention",
			"operator": "=",
			"attributeValue": "10"
		}, {
			"condition": "OR",
			"criterion": [{
				"attributeName": "createTime",
				"operator": ">",
				"attributeValue": "1111111111"
			}, {
				"attributeName": "lastAccessTime",
				"operator": "<=",
				"attributeValue": "2222222222"
			}]
		}]
	}
}
```


Diffs (updated)
-----

  client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
  common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
  distro/src/conf/atlas-log4j.xml e6c0d9f6 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java 841edf71 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java 1ff9d5ed 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasVertexQuery.java 53f490f5 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/NativeTitanGraphQuery.java 0211ff05 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java 0077a21f 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/AndCondition.java 68f0eb28 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/HasPredicate.java 24e4f5bc 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0IndexQuery.java 1ed1734f 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0VertexQuery.java bd8b897f 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 7ec6ffeb 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1IndexQuery.java 4073dd2a 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1VertexQuery.java 4452bcdd 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 1ca900d8 
  intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java a402c628 
  intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportRequest.java 21b64273 
  repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
  repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
  repository/src/main/java/org/apache/atlas/discovery/GremlinStep.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SolrStep.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java 35dbf6c4 
  repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 3411f8de 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java 42bd58fb 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 9a8695af 
  repository/src/main/java/org/apache/atlas/util/SearchTracker.java PRE-CREATION 
  repository/src/test/java/org/apache/atlas/TestModules.java fa2ac0d8 
  repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 8c5623fa 
  webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 
  webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java 1fe31198 


Diff: https://reviews.apache.org/r/60159/diff/10/

Changes: https://reviews.apache.org/r/60159/diff/9-10/


Testing
-------

1. Tested Json marshalling and unmarshalling via REST
2. Tested with the attached request JSONs 

In progress

UTs (coding)


File Attachments
----------------

Asset contains
  https://reviews.apache.org/media/uploaded/files/2017/06/22/a8fdf120-5eb1-4a84-af4a-1236a08a765b__asset-contains.json
Asset IN
  https://reviews.apache.org/media/uploaded/files/2017/06/22/e2096d10-ea4d-4306-b68d-4f5c531fab3c__asset-in.json
Asset like
  https://reviews.apache.org/media/uploaded/files/2017/06/22/6774768f-26ba-4386-b0b6-8ea682813dc7__asset-like.json
Hive table (date comparison)
  https://reviews.apache.org/media/uploaded/files/2017/06/22/d6e54af0-f27f-4c6f-b9d3-4e3a0eb258ac__hive_table-date_2.json
Hive table date
  https://reviews.apache.org/media/uploaded/files/2017/06/22/f3558280-60bd-49dd-92c6-c1176f86bc70__hive_table-date.json
Hive Table Like
  https://reviews.apache.org/media/uploaded/files/2017/06/22/f07517dd-1c6c-4d2d-8bfd-3d494506b23c__hive_table-like.json
Type and tag
  https://reviews.apache.org/media/uploaded/files/2017/06/22/83768696-aa5c-4c08-a776-143753eb4548__type-tag.json


Thanks,

Apoorv Naik


Re: Review Request 60159: ATLAS-1880: Search using entity/trait attributes

Posted by Apoorv Naik <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/#review179179
-----------------------------------------------------------




graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java
Lines 175 (patched)
<https://reviews.apache.org/r/60159/#comment253753>

    This should be offset + limit


- Apoorv Naik


On June 28, 2017, 9:18 p.m., Apoorv Naik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60159/
> -----------------------------------------------------------
> 
> (Updated June 28, 2017, 9:18 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.
> 
> 
> Bugs: ATLAS-1880
>     https://issues.apache.org/jira/browse/ATLAS-1880
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> See JIRA
> 
> 
> Sample Request structure
> 
> ```json
> {
> 	"typeName": "hive_table",
> 	"excludeDeletedEntities": false,
> 	"limit": 25,
> 	"offset": 0,
> 	"entityFilters": {
> 		"condition": "AND",
> 		"criterion": [{
> 			"attributeName": "retention",
> 			"operator": "=",
> 			"attributeValue": "10"
> 		}, {
> 			"condition": "OR",
> 			"criterion": [{
> 				"attributeName": "createTime",
> 				"operator": ">",
> 				"attributeValue": "1111111111"
> 			}, {
> 				"attributeName": "lastAccessTime",
> 				"operator": "<=",
> 				"attributeValue": "2222222222"
> 			}]
> 		}]
> 	}
> }
> ```
> 
> 
> Diffs
> -----
> 
>   client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
>   common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
>   distro/src/conf/atlas-log4j.xml e6c0d9f6 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java 841edf71 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java 1ff9d5ed 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasVertexQuery.java 53f490f5 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/NativeTitanGraphQuery.java 0211ff05 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java 0077a21f 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/AndCondition.java 68f0eb28 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/HasPredicate.java 24e4f5bc 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0IndexQuery.java 1ed1734f 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0VertexQuery.java bd8b897f 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 7ec6ffeb 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1IndexQuery.java 4073dd2a 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1VertexQuery.java 4452bcdd 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 1ca900d8 
>   intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java a402c628 
>   intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportRequest.java 21b64273 
>   repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
>   repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
>   repository/src/main/java/org/apache/atlas/discovery/GremlinStep.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SolrStep.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 3411f8de 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java 42bd58fb 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 9a8695af 
>   repository/src/main/java/org/apache/atlas/util/SearchContextContainer.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/TestModules.java fa2ac0d8 
>   repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 8c5623fa 
>   webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java 1fe31198 
> 
> 
> Diff: https://reviews.apache.org/r/60159/diff/9/
> 
> 
> Testing
> -------
> 
> 1. Tested Json marshalling and unmarshalling via REST
> 2. Tested with the attached request JSONs 
> 
> In progress
> 
> UTs (coding)
> 
> 
> File Attachments
> ----------------
> 
> Asset contains
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/a8fdf120-5eb1-4a84-af4a-1236a08a765b__asset-contains.json
> Asset IN
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/e2096d10-ea4d-4306-b68d-4f5c531fab3c__asset-in.json
> Asset like
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/6774768f-26ba-4386-b0b6-8ea682813dc7__asset-like.json
> Hive table (date comparison)
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/d6e54af0-f27f-4c6f-b9d3-4e3a0eb258ac__hive_table-date_2.json
> Hive table date
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/f3558280-60bd-49dd-92c6-c1176f86bc70__hive_table-date.json
> Hive Table Like
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/f07517dd-1c6c-4d2d-8bfd-3d494506b23c__hive_table-like.json
> Type and tag
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/83768696-aa5c-4c08-a776-143753eb4548__type-tag.json
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>


Re: Review Request 60159: ATLAS-1880: Search using entity/trait attributes

Posted by Apoorv Naik <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/#review179177
-----------------------------------------------------------




graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java
Line 77 (original), 76 (patched)
<https://reviews.apache.org/r/60159/#comment253752>

    This should be offset + limit



graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java
Line 77 (original), 77 (patched)
<https://reviews.apache.org/r/60159/#comment253751>

    This should be offset + limit


- Apoorv Naik


On June 28, 2017, 9:18 p.m., Apoorv Naik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60159/
> -----------------------------------------------------------
> 
> (Updated June 28, 2017, 9:18 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.
> 
> 
> Bugs: ATLAS-1880
>     https://issues.apache.org/jira/browse/ATLAS-1880
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> See JIRA
> 
> 
> Sample Request structure
> 
> ```json
> {
> 	"typeName": "hive_table",
> 	"excludeDeletedEntities": false,
> 	"limit": 25,
> 	"offset": 0,
> 	"entityFilters": {
> 		"condition": "AND",
> 		"criterion": [{
> 			"attributeName": "retention",
> 			"operator": "=",
> 			"attributeValue": "10"
> 		}, {
> 			"condition": "OR",
> 			"criterion": [{
> 				"attributeName": "createTime",
> 				"operator": ">",
> 				"attributeValue": "1111111111"
> 			}, {
> 				"attributeName": "lastAccessTime",
> 				"operator": "<=",
> 				"attributeValue": "2222222222"
> 			}]
> 		}]
> 	}
> }
> ```
> 
> 
> Diffs
> -----
> 
>   client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
>   common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
>   distro/src/conf/atlas-log4j.xml e6c0d9f6 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java 841edf71 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java 1ff9d5ed 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasVertexQuery.java 53f490f5 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/NativeTitanGraphQuery.java 0211ff05 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java 0077a21f 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/AndCondition.java 68f0eb28 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/HasPredicate.java 24e4f5bc 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0IndexQuery.java 1ed1734f 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0VertexQuery.java bd8b897f 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 7ec6ffeb 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1IndexQuery.java 4073dd2a 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1VertexQuery.java 4452bcdd 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 1ca900d8 
>   intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java a402c628 
>   intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportRequest.java 21b64273 
>   repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
>   repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
>   repository/src/main/java/org/apache/atlas/discovery/GremlinStep.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SolrStep.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 3411f8de 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java 42bd58fb 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 9a8695af 
>   repository/src/main/java/org/apache/atlas/util/SearchContextContainer.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/TestModules.java fa2ac0d8 
>   repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 8c5623fa 
>   webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java 1fe31198 
> 
> 
> Diff: https://reviews.apache.org/r/60159/diff/9/
> 
> 
> Testing
> -------
> 
> 1. Tested Json marshalling and unmarshalling via REST
> 2. Tested with the attached request JSONs 
> 
> In progress
> 
> UTs (coding)
> 
> 
> File Attachments
> ----------------
> 
> Asset contains
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/a8fdf120-5eb1-4a84-af4a-1236a08a765b__asset-contains.json
> Asset IN
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/e2096d10-ea4d-4306-b68d-4f5c531fab3c__asset-in.json
> Asset like
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/6774768f-26ba-4386-b0b6-8ea682813dc7__asset-like.json
> Hive table (date comparison)
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/d6e54af0-f27f-4c6f-b9d3-4e3a0eb258ac__hive_table-date_2.json
> Hive table date
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/f3558280-60bd-49dd-92c6-c1176f86bc70__hive_table-date.json
> Hive Table Like
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/f07517dd-1c6c-4d2d-8bfd-3d494506b23c__hive_table-like.json
> Type and tag
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/83768696-aa5c-4c08-a776-143753eb4548__type-tag.json
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>


Re: Review Request 60159: ATLAS-1880: Search using entity/trait attributes

Posted by Apoorv Naik <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/
-----------------------------------------------------------

(Updated June 28, 2017, 9:18 p.m.)


Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.


Changes
-------

1. Improvement for vertices(offset, limit)
2. Added LOG.isDebugEnabled guard for all debug methods


Bugs: ATLAS-1880
    https://issues.apache.org/jira/browse/ATLAS-1880


Repository: atlas


Description
-------

See JIRA


Sample Request structure

```json
{
	"typeName": "hive_table",
	"excludeDeletedEntities": false,
	"limit": 25,
	"offset": 0,
	"entityFilters": {
		"condition": "AND",
		"criterion": [{
			"attributeName": "retention",
			"operator": "=",
			"attributeValue": "10"
		}, {
			"condition": "OR",
			"criterion": [{
				"attributeName": "createTime",
				"operator": ">",
				"attributeValue": "1111111111"
			}, {
				"attributeName": "lastAccessTime",
				"operator": "<=",
				"attributeValue": "2222222222"
			}]
		}]
	}
}
```


Diffs (updated)
-----

  client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
  common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
  distro/src/conf/atlas-log4j.xml e6c0d9f6 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java 841edf71 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java 1ff9d5ed 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasVertexQuery.java 53f490f5 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/NativeTitanGraphQuery.java 0211ff05 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java 0077a21f 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/AndCondition.java 68f0eb28 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/HasPredicate.java 24e4f5bc 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0IndexQuery.java 1ed1734f 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0VertexQuery.java bd8b897f 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 7ec6ffeb 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1IndexQuery.java 4073dd2a 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1VertexQuery.java 4452bcdd 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 1ca900d8 
  intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java a402c628 
  intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportRequest.java 21b64273 
  repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
  repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
  repository/src/main/java/org/apache/atlas/discovery/GremlinStep.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SolrStep.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 3411f8de 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java 42bd58fb 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 9a8695af 
  repository/src/main/java/org/apache/atlas/util/SearchContextContainer.java PRE-CREATION 
  repository/src/test/java/org/apache/atlas/TestModules.java fa2ac0d8 
  repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 8c5623fa 
  webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 
  webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java 1fe31198 


Diff: https://reviews.apache.org/r/60159/diff/9/

Changes: https://reviews.apache.org/r/60159/diff/8-9/


Testing
-------

1. Tested Json marshalling and unmarshalling via REST
2. Tested with the attached request JSONs 

In progress

UTs (coding)


File Attachments
----------------

Asset contains
  https://reviews.apache.org/media/uploaded/files/2017/06/22/a8fdf120-5eb1-4a84-af4a-1236a08a765b__asset-contains.json
Asset IN
  https://reviews.apache.org/media/uploaded/files/2017/06/22/e2096d10-ea4d-4306-b68d-4f5c531fab3c__asset-in.json
Asset like
  https://reviews.apache.org/media/uploaded/files/2017/06/22/6774768f-26ba-4386-b0b6-8ea682813dc7__asset-like.json
Hive table (date comparison)
  https://reviews.apache.org/media/uploaded/files/2017/06/22/d6e54af0-f27f-4c6f-b9d3-4e3a0eb258ac__hive_table-date_2.json
Hive table date
  https://reviews.apache.org/media/uploaded/files/2017/06/22/f3558280-60bd-49dd-92c6-c1176f86bc70__hive_table-date.json
Hive Table Like
  https://reviews.apache.org/media/uploaded/files/2017/06/22/f07517dd-1c6c-4d2d-8bfd-3d494506b23c__hive_table-like.json
Type and tag
  https://reviews.apache.org/media/uploaded/files/2017/06/22/83768696-aa5c-4c08-a776-143753eb4548__type-tag.json


Thanks,

Apoorv Naik


Re: Review Request 60159: ATLAS-1880: Search using entity/trait attributes

Posted by Apoorv Naik <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/
-----------------------------------------------------------

(Updated June 28, 2017, 1:52 p.m.)


Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.


Changes
-------

Latest rebase


Bugs: ATLAS-1880
    https://issues.apache.org/jira/browse/ATLAS-1880


Repository: atlas


Description
-------

See JIRA


Sample Request structure

```json
{
	"typeName": "hive_table",
	"excludeDeletedEntities": false,
	"limit": 25,
	"offset": 0,
	"entityFilters": {
		"condition": "AND",
		"criterion": [{
			"attributeName": "retention",
			"operator": "=",
			"attributeValue": "10"
		}, {
			"condition": "OR",
			"criterion": [{
				"attributeName": "createTime",
				"operator": ">",
				"attributeValue": "1111111111"
			}, {
				"attributeName": "lastAccessTime",
				"operator": "<=",
				"attributeValue": "2222222222"
			}]
		}]
	}
}
```


Diffs (updated)
-----

  client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
  common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
  distro/src/conf/atlas-log4j.xml e6c0d9f6 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java 841edf71 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java 1ff9d5ed 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasVertexQuery.java 53f490f5 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/NativeTitanGraphQuery.java 0211ff05 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java 0077a21f 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/AndCondition.java 68f0eb28 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/HasPredicate.java 24e4f5bc 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0IndexQuery.java 1ed1734f 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0VertexQuery.java bd8b897f 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 7ec6ffeb 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1IndexQuery.java 4073dd2a 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1VertexQuery.java 4452bcdd 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 1ca900d8 
  intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java a402c628 
  intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportRequest.java 21b64273 
  repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
  repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
  repository/src/main/java/org/apache/atlas/discovery/GremlinStep.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SolrStep.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 3411f8de 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java 42bd58fb 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 9a8695af 
  repository/src/main/java/org/apache/atlas/util/SearchContextContainer.java PRE-CREATION 
  repository/src/test/java/org/apache/atlas/TestModules.java fa2ac0d8 
  repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 8c5623fa 
  webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 
  webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java 1fe31198 


Diff: https://reviews.apache.org/r/60159/diff/7/

Changes: https://reviews.apache.org/r/60159/diff/6-7/


Testing
-------

1. Tested Json marshalling and unmarshalling via REST
2. Tested with the attached request JSONs 

In progress

UTs (coding)


File Attachments
----------------

Asset contains
  https://reviews.apache.org/media/uploaded/files/2017/06/22/a8fdf120-5eb1-4a84-af4a-1236a08a765b__asset-contains.json
Asset IN
  https://reviews.apache.org/media/uploaded/files/2017/06/22/e2096d10-ea4d-4306-b68d-4f5c531fab3c__asset-in.json
Asset like
  https://reviews.apache.org/media/uploaded/files/2017/06/22/6774768f-26ba-4386-b0b6-8ea682813dc7__asset-like.json
Hive table (date comparison)
  https://reviews.apache.org/media/uploaded/files/2017/06/22/d6e54af0-f27f-4c6f-b9d3-4e3a0eb258ac__hive_table-date_2.json
Hive table date
  https://reviews.apache.org/media/uploaded/files/2017/06/22/f3558280-60bd-49dd-92c6-c1176f86bc70__hive_table-date.json
Hive Table Like
  https://reviews.apache.org/media/uploaded/files/2017/06/22/f07517dd-1c6c-4d2d-8bfd-3d494506b23c__hive_table-like.json
Type and tag
  https://reviews.apache.org/media/uploaded/files/2017/06/22/83768696-aa5c-4c08-a776-143753eb4548__type-tag.json


Thanks,

Apoorv Naik


Re: Review Request 60159: ATLAS-1880: Search using entity/trait attributes

Posted by Apoorv Naik <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/
-----------------------------------------------------------

(Updated June 28, 2017, 5:18 a.m.)


Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.


Changes
-------

1. Addressed review comments,
2. Small optimizations like query caching between search rounds
3. Fix for NOT attribute check
4. Fix for Like, contains, prefix and suffix in Gremlin
5. Performance fix to avoid GUID + typeName queries (leads to GC overhead and atlas goes into unusable state)
6. Added endpoint to list activeSearches and cancel them (if queries are long running)


Bugs: ATLAS-1880
    https://issues.apache.org/jira/browse/ATLAS-1880


Repository: atlas


Description
-------

See JIRA


Sample Request structure

```json
{
	"typeName": "hive_table",
	"excludeDeletedEntities": false,
	"limit": 25,
	"offset": 0,
	"entityFilters": {
		"condition": "AND",
		"criterion": [{
			"attributeName": "retention",
			"operator": "=",
			"attributeValue": "10"
		}, {
			"condition": "OR",
			"criterion": [{
				"attributeName": "createTime",
				"operator": ">",
				"attributeValue": "1111111111"
			}, {
				"attributeName": "lastAccessTime",
				"operator": "<=",
				"attributeValue": "2222222222"
			}]
		}]
	}
}
```


Diffs (updated)
-----

  3party-licenses/bootstrap-datepicker-LICENSE 3fd94fa1 
  client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
  common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
  distro/src/conf/atlas-log4j.xml e6c0d9f6 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java 841edf71 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java 1ff9d5ed 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasVertexQuery.java 53f490f5 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/NativeTitanGraphQuery.java 0211ff05 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java 0077a21f 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/AndCondition.java 68f0eb28 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/HasPredicate.java 24e4f5bc 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0IndexQuery.java 1ed1734f 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0VertexQuery.java bd8b897f 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 7ec6ffeb 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1IndexQuery.java 4073dd2a 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1VertexQuery.java 4452bcdd 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 1ca900d8 
  intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java a402c628 
  intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportRequest.java b19f7097 
  repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
  repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
  repository/src/main/java/org/apache/atlas/discovery/GremlinStep.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SolrStep.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 4ffbb88c 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java 75e91320 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java 00fe94b6 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 9a8695af 
  repository/src/main/java/org/apache/atlas/util/SearchContextContainer.java PRE-CREATION 
  repository/src/test/java/org/apache/atlas/TestModules.java d28956de 
  repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 8c5623fa 
  webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 
  webapp/src/main/java/org/apache/atlas/web/security/AtlasSecurityConfig.java 6b512af6 
  webapp/src/main/webapp/WEB-INF/web.xml 9b5c3b14 
  webapp/src/main/webapp/error.jsp PRE-CREATION 
  webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java 1fe31198 


Diff: https://reviews.apache.org/r/60159/diff/6/

Changes: https://reviews.apache.org/r/60159/diff/5-6/


Testing
-------

1. Tested Json marshalling and unmarshalling via REST
2. Tested with the attached request JSONs 

In progress

UTs (coding)


File Attachments
----------------

Asset contains
  https://reviews.apache.org/media/uploaded/files/2017/06/22/a8fdf120-5eb1-4a84-af4a-1236a08a765b__asset-contains.json
Asset IN
  https://reviews.apache.org/media/uploaded/files/2017/06/22/e2096d10-ea4d-4306-b68d-4f5c531fab3c__asset-in.json
Asset like
  https://reviews.apache.org/media/uploaded/files/2017/06/22/6774768f-26ba-4386-b0b6-8ea682813dc7__asset-like.json
Hive table (date comparison)
  https://reviews.apache.org/media/uploaded/files/2017/06/22/d6e54af0-f27f-4c6f-b9d3-4e3a0eb258ac__hive_table-date_2.json
Hive table date
  https://reviews.apache.org/media/uploaded/files/2017/06/22/f3558280-60bd-49dd-92c6-c1176f86bc70__hive_table-date.json
Hive Table Like
  https://reviews.apache.org/media/uploaded/files/2017/06/22/f07517dd-1c6c-4d2d-8bfd-3d494506b23c__hive_table-like.json
Type and tag
  https://reviews.apache.org/media/uploaded/files/2017/06/22/83768696-aa5c-4c08-a776-143753eb4548__type-tag.json


Thanks,

Apoorv Naik


Re: Review Request 60159: ATLAS-1880: Search using entity/trait attributes

Posted by Apoorv Naik <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/
-----------------------------------------------------------

(Updated June 26, 2017, 10:32 p.m.)


Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.


Changes
-------

There are some TODO items which need to be removed in the next round.


Bugs: ATLAS-1880
    https://issues.apache.org/jira/browse/ATLAS-1880


Repository: atlas


Description
-------

See JIRA


Sample Request structure

```json
{
	"typeName": "hive_table",
	"excludeDeletedEntities": false,
	"limit": 25,
	"offset": 0,
	"entityFilters": {
		"condition": "AND",
		"criterion": [{
			"attributeName": "retention",
			"operator": "=",
			"attributeValue": "10"
		}, {
			"condition": "OR",
			"criterion": [{
				"attributeName": "createTime",
				"operator": ">",
				"attributeValue": "1111111111"
			}, {
				"attributeName": "lastAccessTime",
				"operator": "<=",
				"attributeValue": "2222222222"
			}]
		}]
	}
}
```


Diffs (updated)
-----

  client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
  common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
  distro/src/conf/atlas-log4j.xml e6c0d9f6 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java 841edf71 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java 1ff9d5ed 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasVertexQuery.java 53f490f5 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/NativeTitanGraphQuery.java 0211ff05 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java 0077a21f 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/AndCondition.java 68f0eb28 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/HasPredicate.java 24e4f5bc 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0IndexQuery.java 1ed1734f 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0VertexQuery.java bd8b897f 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 7ec6ffeb 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1IndexQuery.java 4073dd2a 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1VertexQuery.java 4452bcdd 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 1ca900d8 
  intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java a402c628 
  intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportRequest.java b19f7097 
  repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
  repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
  repository/src/main/java/org/apache/atlas/discovery/GremlinStep.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SolrStep.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 4ffbb88c 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java 75e91320 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java 00fe94b6 
  repository/src/main/java/org/apache/atlas/util/SearchContextContainer.java PRE-CREATION 
  repository/src/test/java/org/apache/atlas/TestModules.java d28956de 
  repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 8c5623fa 
  webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 
  webapp/src/main/webapp/WEB-INF/web.xml 9b5c3b14 
  webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java 1fe31198 


Diff: https://reviews.apache.org/r/60159/diff/5/

Changes: https://reviews.apache.org/r/60159/diff/4-5/


Testing
-------

1. Tested Json marshalling and unmarshalling via REST
2. Tested with the attached request JSONs 

In progress

UTs (coding)


File Attachments
----------------

Asset contains
  https://reviews.apache.org/media/uploaded/files/2017/06/22/a8fdf120-5eb1-4a84-af4a-1236a08a765b__asset-contains.json
Asset IN
  https://reviews.apache.org/media/uploaded/files/2017/06/22/e2096d10-ea4d-4306-b68d-4f5c531fab3c__asset-in.json
Asset like
  https://reviews.apache.org/media/uploaded/files/2017/06/22/6774768f-26ba-4386-b0b6-8ea682813dc7__asset-like.json
Hive table (date comparison)
  https://reviews.apache.org/media/uploaded/files/2017/06/22/d6e54af0-f27f-4c6f-b9d3-4e3a0eb258ac__hive_table-date_2.json
Hive table date
  https://reviews.apache.org/media/uploaded/files/2017/06/22/f3558280-60bd-49dd-92c6-c1176f86bc70__hive_table-date.json
Hive Table Like
  https://reviews.apache.org/media/uploaded/files/2017/06/22/f07517dd-1c6c-4d2d-8bfd-3d494506b23c__hive_table-like.json
Type and tag
  https://reviews.apache.org/media/uploaded/files/2017/06/22/83768696-aa5c-4c08-a776-143753eb4548__type-tag.json


Thanks,

Apoorv Naik


Re: Review Request 60159: ATLAS-1880: Search using entity/trait attributes

Posted by Apoorv Naik <na...@gmail.com>.

> On June 22, 2017, 7:26 p.m., Sarath Subramanian wrote:
> > repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java
> > Lines 102 (patched)
> > <https://reviews.apache.org/r/60159/diff/2/?file=1758041#file1758041line102>
> >
> >     why use linkedlist? does order of the search results matter?

Doesn't really matter, added so that the search result order is consistent across calls (if the graph returns the vertices in order).


> On June 22, 2017, 7:26 p.m., Sarath Subramanian wrote:
> > repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java
> > Lines 246 (patched)
> > <https://reviews.apache.org/r/60159/diff/2/?file=1758041#file1758041line246>
> >
> >     criteria.getOperator() should return enum and use switch on this enum value.

Will address in next round of update


> On June 22, 2017, 7:26 p.m., Sarath Subramanian wrote:
> > repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java
> > Lines 137 (patched)
> > <https://reviews.apache.org/r/60159/diff/2/?file=1758042#file1758042line137>
> >
> >     if (LOG.isDebugEnabled()), check all LOG.debug references.

Will do.


> On June 22, 2017, 7:26 p.m., Sarath Subramanian wrote:
> > repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java
> > Lines 145 (patched)
> > <https://reviews.apache.org/r/60159/diff/2/?file=1758042#file1758042line145>
> >
> >     resultSet.size() < searchParameters.getLimit() - this check is already made in the outer while loop.

This ensures that the resultSet doesn't exceed the prescribed limit.


> On June 22, 2017, 7:26 p.m., Sarath Subramanian wrote:
> > webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java
> > Lines 218 (patched)
> > <https://reviews.apache.org/r/60159/diff/2/?file=1758051#file1758051line218>
> >
> >     basic --> /basic

This is not necessary, as jersey prepends the /


- Apoorv


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/#review178718
-----------------------------------------------------------


On June 22, 2017, 6:28 p.m., Apoorv Naik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60159/
> -----------------------------------------------------------
> 
> (Updated June 22, 2017, 6:28 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.
> 
> 
> Bugs: ATLAS-1880
>     https://issues.apache.org/jira/browse/ATLAS-1880
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> See JIRA
> 
> 
> Sample Request structure
> 
> ```json
> {
> 	"typeName": "hive_table",
> 	"excludeDeletedEntities": false,
> 	"limit": 25,
> 	"offset": 0,
> 	"entityFilters": {
> 		"condition": "AND",
> 		"criterion": [{
> 			"attributeName": "retention",
> 			"operator": "=",
> 			"attributeValue": "10"
> 		}, {
> 			"condition": "OR",
> 			"criterion": [{
> 				"attributeName": "createTime",
> 				"operator": ">",
> 				"attributeValue": "1111111111"
> 			}, {
> 				"attributeName": "lastAccessTime",
> 				"operator": "<=",
> 				"attributeValue": "2222222222"
> 			}]
> 		}]
> 	}
> }
> ```
> 
> 
> Diffs
> -----
> 
>   client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
>   common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java 841edf71 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java 1ff9d5ed 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasVertexQuery.java 53f490f5 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/NativeTitanGraphQuery.java 0211ff05 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java 0077a21f 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/AndCondition.java 68f0eb28 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/HasPredicate.java 24e4f5bc 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0IndexQuery.java 1ed1734f 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0VertexQuery.java bd8b897f 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 7ec6ffeb 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1IndexQuery.java 4073dd2a 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1VertexQuery.java 4452bcdd 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 1ca900d8 
>   intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java a402c628 
>   intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportRequest.java b19f7097 
>   repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
>   repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
>   repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SolrSearchStep.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 4ffbb88c 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java 75e91320 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java 00fe94b6 
>   repository/src/test/java/org/apache/atlas/TestModules.java d28956de 
>   repository/src/test/java/org/apache/atlas/discovery/GremlinSearchStepTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 8c5623fa 
>   webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 
>   webapp/src/main/webapp/WEB-INF/web.xml 9b5c3b14 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java 1fe31198 
> 
> 
> Diff: https://reviews.apache.org/r/60159/diff/3/
> 
> 
> Testing
> -------
> 
> 1. Tested Json marshalling and unmarshalling via REST
> 2. Tested with the attached request JSONs 
> 
> In progress
> 
> UTs (coding)
> 
> 
> File Attachments
> ----------------
> 
> Asset contains
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/a8fdf120-5eb1-4a84-af4a-1236a08a765b__asset-contains.json
> Asset IN
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/e2096d10-ea4d-4306-b68d-4f5c531fab3c__asset-in.json
> Asset like
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/6774768f-26ba-4386-b0b6-8ea682813dc7__asset-like.json
> Hive table (date comparison)
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/d6e54af0-f27f-4c6f-b9d3-4e3a0eb258ac__hive_table-date_2.json
> Hive table date
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/f3558280-60bd-49dd-92c6-c1176f86bc70__hive_table-date.json
> Hive Table Like
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/f07517dd-1c6c-4d2d-8bfd-3d494506b23c__hive_table-like.json
> Type and tag
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/83768696-aa5c-4c08-a776-143753eb4548__type-tag.json
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>


Re: Review Request 60159: ATLAS-1880: Search using entity/trait attributes

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/#review178718
-----------------------------------------------------------




client/src/main/java/org/apache/atlas/AtlasClientV2.java
Lines 105 (patched)
<https://reviews.apache.org/r/60159/#comment252866>

    why not reuse BASIC_SEARCH_URI? consider assigning FACETED_SEARCH_URI = BASIC_SEARCH_URI;



client/src/main/java/org/apache/atlas/AtlasClientV2.java
Lines 406 (patched)
<https://reviews.apache.org/r/60159/#comment252867>

    add "excludeDeletedEntities" to queryParams



intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java
Lines 44 (patched)
<https://reviews.apache.org/r/60159/#comment252870>

    update equals(), hashCode(), toString() with searchParameters



repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java
Lines 102 (patched)
<https://reviews.apache.org/r/60159/#comment252876>

    why use linkedlist? does order of the search results matter?



repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java
Lines 220 (patched)
<https://reviews.apache.org/r/60159/#comment252877>

    toGremlinQuery --> toGremlinFilterQuery



repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java
Lines 246 (patched)
<https://reviews.apache.org/r/60159/#comment252878>

    criteria.getOperator() should return enum and use switch on this enum value.



repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java
Lines 137 (patched)
<https://reviews.apache.org/r/60159/#comment252880>

    if (LOG.isDebugEnabled()), check all LOG.debug references.



repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java
Lines 145 (patched)
<https://reviews.apache.org/r/60159/#comment252881>

    resultSet.size() < searchParameters.getLimit() - this check is already made in the outer while loop.



repository/src/main/java/org/apache/atlas/discovery/SolrSearchStep.java
Lines 172 (patched)
<https://reviews.apache.org/r/60159/#comment252891>

    this is not needed, since line 174 gets the fully qualified attr name.



webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java
Line 215 (original), 217 (patched)
<https://reviews.apache.org/r/60159/#comment252875>

    add javadoc



webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java
Lines 218 (patched)
<https://reviews.apache.org/r/60159/#comment252874>

    basic --> /basic


- Sarath Subramanian


On June 22, 2017, 11:28 a.m., Apoorv Naik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60159/
> -----------------------------------------------------------
> 
> (Updated June 22, 2017, 11:28 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.
> 
> 
> Bugs: ATLAS-1880
>     https://issues.apache.org/jira/browse/ATLAS-1880
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> See JIRA
> 
> 
> Sample Request structure
> 
> ```json
> {
> 	"typeName": "hive_table",
> 	"excludeDeletedEntities": false,
> 	"limit": 25,
> 	"offset": 0,
> 	"entityFilters": {
> 		"condition": "AND",
> 		"criterion": [{
> 			"attributeName": "retention",
> 			"operator": "=",
> 			"attributeValue": "10"
> 		}, {
> 			"condition": "OR",
> 			"criterion": [{
> 				"attributeName": "createTime",
> 				"operator": ">",
> 				"attributeValue": "1111111111"
> 			}, {
> 				"attributeName": "lastAccessTime",
> 				"operator": "<=",
> 				"attributeValue": "2222222222"
> 			}]
> 		}]
> 	}
> }
> ```
> 
> 
> Diffs
> -----
> 
>   client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
>   common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java 841edf71 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java 1ff9d5ed 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasVertexQuery.java 53f490f5 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/NativeTitanGraphQuery.java 0211ff05 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java 0077a21f 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/AndCondition.java 68f0eb28 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/HasPredicate.java 24e4f5bc 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0IndexQuery.java 1ed1734f 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0VertexQuery.java bd8b897f 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 7ec6ffeb 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1IndexQuery.java 4073dd2a 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1VertexQuery.java 4452bcdd 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 1ca900d8 
>   intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java a402c628 
>   intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportRequest.java b19f7097 
>   repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
>   repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
>   repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SolrSearchStep.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 4ffbb88c 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java 75e91320 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java 00fe94b6 
>   repository/src/test/java/org/apache/atlas/TestModules.java d28956de 
>   repository/src/test/java/org/apache/atlas/discovery/GremlinSearchStepTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 8c5623fa 
>   webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 
>   webapp/src/main/webapp/WEB-INF/web.xml 9b5c3b14 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java 1fe31198 
> 
> 
> Diff: https://reviews.apache.org/r/60159/diff/3/
> 
> 
> Testing
> -------
> 
> 1. Tested Json marshalling and unmarshalling via REST
> 2. Tested with the attached request JSONs 
> 
> In progress
> 
> UTs (coding)
> 
> 
> File Attachments
> ----------------
> 
> Asset contains
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/a8fdf120-5eb1-4a84-af4a-1236a08a765b__asset-contains.json
> Asset IN
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/e2096d10-ea4d-4306-b68d-4f5c531fab3c__asset-in.json
> Asset like
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/6774768f-26ba-4386-b0b6-8ea682813dc7__asset-like.json
> Hive table (date comparison)
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/d6e54af0-f27f-4c6f-b9d3-4e3a0eb258ac__hive_table-date_2.json
> Hive table date
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/f3558280-60bd-49dd-92c6-c1176f86bc70__hive_table-date.json
> Hive Table Like
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/f07517dd-1c6c-4d2d-8bfd-3d494506b23c__hive_table-like.json
> Type and tag
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/83768696-aa5c-4c08-a776-143753eb4548__type-tag.json
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>


Re: Review Request 60159: ATLAS-1880: Search using entity/trait attributes

Posted by Apoorv Naik <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/
-----------------------------------------------------------

(Updated June 22, 2017, 6:28 p.m.)


Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.


Changes
-------

Addressed review comments. 
Added *vertices(offset, limit)* to support retrieval using starting offsets


Bugs: ATLAS-1880
    https://issues.apache.org/jira/browse/ATLAS-1880


Repository: atlas


Description
-------

See JIRA


Sample Request structure

```json
{
	"typeName": "hive_table",
	"excludeDeletedEntities": false,
	"limit": 25,
	"offset": 0,
	"entityFilters": {
		"condition": "AND",
		"criterion": [{
			"attributeName": "retention",
			"operator": "=",
			"attributeValue": "10"
		}, {
			"condition": "OR",
			"criterion": [{
				"attributeName": "createTime",
				"operator": ">",
				"attributeValue": "1111111111"
			}, {
				"attributeName": "lastAccessTime",
				"operator": "<=",
				"attributeValue": "2222222222"
			}]
		}]
	}
}
```


Diffs (updated)
-----

  client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
  common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java 841edf71 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java 1ff9d5ed 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasVertexQuery.java 53f490f5 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/NativeTitanGraphQuery.java 0211ff05 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java 0077a21f 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/AndCondition.java 68f0eb28 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/HasPredicate.java 24e4f5bc 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0IndexQuery.java 1ed1734f 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0VertexQuery.java bd8b897f 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 7ec6ffeb 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1IndexQuery.java 4073dd2a 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1VertexQuery.java 4452bcdd 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 1ca900d8 
  intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java a402c628 
  intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportRequest.java b19f7097 
  repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
  repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
  repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SolrSearchStep.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 4ffbb88c 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java 75e91320 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java 00fe94b6 
  repository/src/test/java/org/apache/atlas/TestModules.java d28956de 
  repository/src/test/java/org/apache/atlas/discovery/GremlinSearchStepTest.java PRE-CREATION 
  repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 8c5623fa 
  webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 
  webapp/src/main/webapp/WEB-INF/web.xml 9b5c3b14 
  webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java 1fe31198 


Diff: https://reviews.apache.org/r/60159/diff/3/

Changes: https://reviews.apache.org/r/60159/diff/2-3/


Testing
-------

1. Tested Json marshalling and unmarshalling via REST
2. Tested with the attached request JSONs 

In progress

UTs (coding)


File Attachments
----------------

Asset contains
  https://reviews.apache.org/media/uploaded/files/2017/06/22/a8fdf120-5eb1-4a84-af4a-1236a08a765b__asset-contains.json
Asset IN
  https://reviews.apache.org/media/uploaded/files/2017/06/22/e2096d10-ea4d-4306-b68d-4f5c531fab3c__asset-in.json
Asset like
  https://reviews.apache.org/media/uploaded/files/2017/06/22/6774768f-26ba-4386-b0b6-8ea682813dc7__asset-like.json
Hive table (date comparison)
  https://reviews.apache.org/media/uploaded/files/2017/06/22/d6e54af0-f27f-4c6f-b9d3-4e3a0eb258ac__hive_table-date_2.json
Hive table date
  https://reviews.apache.org/media/uploaded/files/2017/06/22/f3558280-60bd-49dd-92c6-c1176f86bc70__hive_table-date.json
Hive Table Like
  https://reviews.apache.org/media/uploaded/files/2017/06/22/f07517dd-1c6c-4d2d-8bfd-3d494506b23c__hive_table-like.json
Type and tag
  https://reviews.apache.org/media/uploaded/files/2017/06/22/83768696-aa5c-4c08-a776-143753eb4548__type-tag.json


Thanks,

Apoorv Naik


Re: Review Request 60159: ATLAS-1880: Search using entity/trait attributes

Posted by Apoorv Naik <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/#review178624
-----------------------------------------------------------




intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportRequest.java
Lines 89 (patched)
<https://reviews.apache.org/r/60159/#comment252730>

    Accidental change (will revert)



repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java
Lines 285 (patched)
<https://reviews.apache.org/r/60159/#comment252731>

    Contains can be collapsed with LIKE and IN ???



repository/src/main/java/org/apache/atlas/discovery/SolrSearchStep.java
Lines 114 (patched)
<https://reviews.apache.org/r/60159/#comment252733>

    Need better error handling here.



repository/src/main/java/org/apache/atlas/discovery/SolrSearchStep.java
Lines 118 (patched)
<https://reviews.apache.org/r/60159/#comment252734>

    No need of these two if blocks



repository/src/main/java/org/apache/atlas/discovery/SolrSearchStep.java
Lines 126 (patched)
<https://reviews.apache.org/r/60159/#comment252735>

    Might not be needed after latest nested query generation fix



webapp/src/main/webapp/WEB-INF/web.xml
Lines 36 (patched)
<https://reviews.apache.org/r/60159/#comment252736>

    Accidental change


- Apoorv Naik


On June 22, 2017, 5:24 a.m., Apoorv Naik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60159/
> -----------------------------------------------------------
> 
> (Updated June 22, 2017, 5:24 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.
> 
> 
> Bugs: ATLAS-1880
>     https://issues.apache.org/jira/browse/ATLAS-1880
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> See JIRA
> 
> 
> Sample Request structure
> 
> ```json
> {
> 	"typeName": "hive_table",
> 	"excludeDeletedEntities": false,
> 	"limit": 25,
> 	"offset": 0,
> 	"entityFilters": {
> 		"condition": "AND",
> 		"criterion": [{
> 			"attributeName": "retention",
> 			"operator": "=",
> 			"attributeValue": "10"
> 		}, {
> 			"condition": "OR",
> 			"criterion": [{
> 				"attributeName": "createTime",
> 				"operator": ">",
> 				"attributeValue": "1111111111"
> 			}, {
> 				"attributeName": "lastAccessTime",
> 				"operator": "<=",
> 				"attributeValue": "2222222222"
> 			}]
> 		}]
> 	}
> }
> ```
> 
> 
> Diffs
> -----
> 
>   client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
>   common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java 841edf71 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java 1ff9d5ed 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasVertexQuery.java 53f490f5 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/NativeTitanGraphQuery.java 0211ff05 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java 0077a21f 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/AndCondition.java 68f0eb28 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/HasPredicate.java 24e4f5bc 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0IndexQuery.java 1ed1734f 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0VertexQuery.java bd8b897f 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 7ec6ffeb 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1IndexQuery.java 4073dd2a 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1VertexQuery.java 4452bcdd 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 1ca900d8 
>   intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java a402c628 
>   intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportRequest.java b19f7097 
>   repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
>   repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
>   repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SolrSearchStep.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 4ffbb88c 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java 75e91320 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java 00fe94b6 
>   repository/src/test/java/org/apache/atlas/TestModules.java d28956de 
>   repository/src/test/java/org/apache/atlas/discovery/GremlinSearchStepTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 8c5623fa 
>   webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 
>   webapp/src/main/webapp/WEB-INF/web.xml 9b5c3b14 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java 1fe31198 
> 
> 
> Diff: https://reviews.apache.org/r/60159/diff/2/
> 
> 
> Testing
> -------
> 
> 1. Tested Json marshalling and unmarshalling via REST
> 2. Tested with the attached request JSONs 
> 
> In progress
> 
> UTs (coding)
> 
> 
> File Attachments
> ----------------
> 
> Asset contains
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/a8fdf120-5eb1-4a84-af4a-1236a08a765b__asset-contains.json
> Asset IN
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/e2096d10-ea4d-4306-b68d-4f5c531fab3c__asset-in.json
> Asset like
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/6774768f-26ba-4386-b0b6-8ea682813dc7__asset-like.json
> Hive table (date comparison)
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/d6e54af0-f27f-4c6f-b9d3-4e3a0eb258ac__hive_table-date_2.json
> Hive table date
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/f3558280-60bd-49dd-92c6-c1176f86bc70__hive_table-date.json
> Hive Table Like
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/f07517dd-1c6c-4d2d-8bfd-3d494506b23c__hive_table-like.json
> Type and tag
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/83768696-aa5c-4c08-a776-143753eb4548__type-tag.json
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>


Re: Review Request 60159: ATLAS-1880: Search using entity/trait attributes

Posted by Apoorv Naik <na...@gmail.com>.

> On June 22, 2017, 6:17 a.m., Madhan Neethiraj wrote:
> > repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java
> > Lines 74 (patched)
> > <https://reviews.apache.org/r/60159/diff/2/?file=1758041#file1758041line74>
> >
> >     Is 'typeName' mandatory in SearchParameters?
> 
> Apoorv Naik wrote:
>     No it's not mandatory, need to fix this.

Also need to add missing branch when only Tag is present in the search request and we need to process all tagged vertices


- Apoorv


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/#review178625
-----------------------------------------------------------


On June 22, 2017, 6:28 p.m., Apoorv Naik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60159/
> -----------------------------------------------------------
> 
> (Updated June 22, 2017, 6:28 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.
> 
> 
> Bugs: ATLAS-1880
>     https://issues.apache.org/jira/browse/ATLAS-1880
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> See JIRA
> 
> 
> Sample Request structure
> 
> ```json
> {
> 	"typeName": "hive_table",
> 	"excludeDeletedEntities": false,
> 	"limit": 25,
> 	"offset": 0,
> 	"entityFilters": {
> 		"condition": "AND",
> 		"criterion": [{
> 			"attributeName": "retention",
> 			"operator": "=",
> 			"attributeValue": "10"
> 		}, {
> 			"condition": "OR",
> 			"criterion": [{
> 				"attributeName": "createTime",
> 				"operator": ">",
> 				"attributeValue": "1111111111"
> 			}, {
> 				"attributeName": "lastAccessTime",
> 				"operator": "<=",
> 				"attributeValue": "2222222222"
> 			}]
> 		}]
> 	}
> }
> ```
> 
> 
> Diffs
> -----
> 
>   client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
>   common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java 841edf71 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java 1ff9d5ed 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasVertexQuery.java 53f490f5 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/NativeTitanGraphQuery.java 0211ff05 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java 0077a21f 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/AndCondition.java 68f0eb28 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/HasPredicate.java 24e4f5bc 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0IndexQuery.java 1ed1734f 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0VertexQuery.java bd8b897f 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 7ec6ffeb 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1IndexQuery.java 4073dd2a 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1VertexQuery.java 4452bcdd 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 1ca900d8 
>   intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java a402c628 
>   intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportRequest.java b19f7097 
>   repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
>   repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
>   repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SolrSearchStep.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 4ffbb88c 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java 75e91320 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java 00fe94b6 
>   repository/src/test/java/org/apache/atlas/TestModules.java d28956de 
>   repository/src/test/java/org/apache/atlas/discovery/GremlinSearchStepTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 8c5623fa 
>   webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 
>   webapp/src/main/webapp/WEB-INF/web.xml 9b5c3b14 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java 1fe31198 
> 
> 
> Diff: https://reviews.apache.org/r/60159/diff/3/
> 
> 
> Testing
> -------
> 
> 1. Tested Json marshalling and unmarshalling via REST
> 2. Tested with the attached request JSONs 
> 
> In progress
> 
> UTs (coding)
> 
> 
> File Attachments
> ----------------
> 
> Asset contains
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/a8fdf120-5eb1-4a84-af4a-1236a08a765b__asset-contains.json
> Asset IN
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/e2096d10-ea4d-4306-b68d-4f5c531fab3c__asset-in.json
> Asset like
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/6774768f-26ba-4386-b0b6-8ea682813dc7__asset-like.json
> Hive table (date comparison)
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/d6e54af0-f27f-4c6f-b9d3-4e3a0eb258ac__hive_table-date_2.json
> Hive table date
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/f3558280-60bd-49dd-92c6-c1176f86bc70__hive_table-date.json
> Hive Table Like
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/f07517dd-1c6c-4d2d-8bfd-3d494506b23c__hive_table-like.json
> Type and tag
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/83768696-aa5c-4c08-a776-143753eb4548__type-tag.json
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>


Re: Review Request 60159: ATLAS-1880: Search using entity/trait attributes

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/#review178625
-----------------------------------------------------------




graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java
Lines 161 (patched)
<https://reviews.apache.org/r/60159/#comment252732>

    if(LOG.isDebugEnabled()) {
      LOG.debug("Executing: " + queryCondition.toString());
    }



graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java
Lines 169 (patched)
<https://reviews.apache.org/r/60159/#comment252737>

    should this loop break out when "result.size() == limit"?



intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java
Line 46 (original), 45 (patched)
<https://reviews.apache.org/r/60159/#comment252739>

    'searchParameters' duplicates the values in other attributes here: queryText, type, classification, entities, attributes. Is 'searchParameters' attribute needed?



intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java
Lines 138 (patched)
<https://reviews.apache.org/r/60159/#comment252740>

    It will be useful to use an enum for 'operator'.



repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
Lines 412 (patched)
<https://reviews.apache.org/r/60159/#comment252742>

    Wouldn't skipping result entry here cause fewer number of entries in 'ret' - if searchPipeline.run() already restricted the result to 'searchParameters.limit' entries. This is better handled in searchPipeline.run().



repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java
Lines 68 (patched)
<https://reviews.apache.org/r/60159/#comment252743>

    if (LOG.isDebugEnabled()) {
    }



repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java
Lines 74 (patched)
<https://reviews.apache.org/r/60159/#comment252747>

    Is 'typeName' mandatory in SearchParameters?



repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java
Lines 76 (patched)
<https://reviews.apache.org/r/60159/#comment252744>

    add a warn level log here.



repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java
Lines 81 (patched)
<https://reviews.apache.org/r/60159/#comment252745>

    Validate that the given classification exists, similar to entity type valuration above in lines #74 - #78.



repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java
Lines 89 (patched)
<https://reviews.apache.org/r/60159/#comment252746>

    searchParameters.getTypeName() ==> searchParameters.getClassification():
      attributes referenced in tagFilters will be defined in the classification (and not the given entity).
      
    Better yet, consider passing AtlasClassification object to toGremlinQuery method. This will avoid multiple lookups inside toGremlinQuery()


- Madhan Neethiraj


On June 22, 2017, 5:24 a.m., Apoorv Naik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60159/
> -----------------------------------------------------------
> 
> (Updated June 22, 2017, 5:24 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.
> 
> 
> Bugs: ATLAS-1880
>     https://issues.apache.org/jira/browse/ATLAS-1880
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> See JIRA
> 
> 
> Sample Request structure
> 
> ```json
> {
> 	"typeName": "hive_table",
> 	"excludeDeletedEntities": false,
> 	"limit": 25,
> 	"offset": 0,
> 	"entityFilters": {
> 		"condition": "AND",
> 		"criterion": [{
> 			"attributeName": "retention",
> 			"operator": "=",
> 			"attributeValue": "10"
> 		}, {
> 			"condition": "OR",
> 			"criterion": [{
> 				"attributeName": "createTime",
> 				"operator": ">",
> 				"attributeValue": "1111111111"
> 			}, {
> 				"attributeName": "lastAccessTime",
> 				"operator": "<=",
> 				"attributeValue": "2222222222"
> 			}]
> 		}]
> 	}
> }
> ```
> 
> 
> Diffs
> -----
> 
>   client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
>   common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java 841edf71 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java 1ff9d5ed 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasVertexQuery.java 53f490f5 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/NativeTitanGraphQuery.java 0211ff05 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java 0077a21f 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/AndCondition.java 68f0eb28 
>   graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/HasPredicate.java 24e4f5bc 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0IndexQuery.java 1ed1734f 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0VertexQuery.java bd8b897f 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 7ec6ffeb 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1IndexQuery.java 4073dd2a 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1VertexQuery.java 4452bcdd 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 1ca900d8 
>   intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java a402c628 
>   intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportRequest.java b19f7097 
>   repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
>   repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
>   repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SolrSearchStep.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 4ffbb88c 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java 75e91320 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java 00fe94b6 
>   repository/src/test/java/org/apache/atlas/TestModules.java d28956de 
>   repository/src/test/java/org/apache/atlas/discovery/GremlinSearchStepTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 8c5623fa 
>   webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 
>   webapp/src/main/webapp/WEB-INF/web.xml 9b5c3b14 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java 1fe31198 
> 
> 
> Diff: https://reviews.apache.org/r/60159/diff/2/
> 
> 
> Testing
> -------
> 
> 1. Tested Json marshalling and unmarshalling via REST
> 2. Tested with the attached request JSONs 
> 
> In progress
> 
> UTs (coding)
> 
> 
> File Attachments
> ----------------
> 
> Asset contains
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/a8fdf120-5eb1-4a84-af4a-1236a08a765b__asset-contains.json
> Asset IN
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/e2096d10-ea4d-4306-b68d-4f5c531fab3c__asset-in.json
> Asset like
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/6774768f-26ba-4386-b0b6-8ea682813dc7__asset-like.json
> Hive table (date comparison)
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/d6e54af0-f27f-4c6f-b9d3-4e3a0eb258ac__hive_table-date_2.json
> Hive table date
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/f3558280-60bd-49dd-92c6-c1176f86bc70__hive_table-date.json
> Hive Table Like
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/f07517dd-1c6c-4d2d-8bfd-3d494506b23c__hive_table-like.json
> Type and tag
>   https://reviews.apache.org/media/uploaded/files/2017/06/22/83768696-aa5c-4c08-a776-143753eb4548__type-tag.json
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>


Re: Review Request 60159: ATLAS-1880: Search using entity/trait attributes

Posted by Apoorv Naik <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/
-----------------------------------------------------------

(Updated June 22, 2017, 5:24 a.m.)


Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.


Changes
-------

Added request jsons for different use cases (will add more as I test the API)


Bugs: ATLAS-1880
    https://issues.apache.org/jira/browse/ATLAS-1880


Repository: atlas


Description
-------

See JIRA


Sample Request structure

```json
{
	"typeName": "hive_table",
	"excludeDeletedEntities": false,
	"limit": 25,
	"offset": 0,
	"entityFilters": {
		"condition": "AND",
		"criterion": [{
			"attributeName": "retention",
			"operator": "=",
			"attributeValue": "10"
		}, {
			"condition": "OR",
			"criterion": [{
				"attributeName": "createTime",
				"operator": ">",
				"attributeValue": "1111111111"
			}, {
				"attributeName": "lastAccessTime",
				"operator": "<=",
				"attributeValue": "2222222222"
			}]
		}]
	}
}
```


Diffs
-----

  client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
  common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java 841edf71 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java 1ff9d5ed 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasVertexQuery.java 53f490f5 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/NativeTitanGraphQuery.java 0211ff05 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java 0077a21f 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/AndCondition.java 68f0eb28 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/HasPredicate.java 24e4f5bc 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0IndexQuery.java 1ed1734f 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0VertexQuery.java bd8b897f 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 7ec6ffeb 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1IndexQuery.java 4073dd2a 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1VertexQuery.java 4452bcdd 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 1ca900d8 
  intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java a402c628 
  intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportRequest.java b19f7097 
  repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
  repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
  repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SolrSearchStep.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 4ffbb88c 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java 75e91320 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java 00fe94b6 
  repository/src/test/java/org/apache/atlas/TestModules.java d28956de 
  repository/src/test/java/org/apache/atlas/discovery/GremlinSearchStepTest.java PRE-CREATION 
  repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 8c5623fa 
  webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 
  webapp/src/main/webapp/WEB-INF/web.xml 9b5c3b14 
  webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java 1fe31198 


Diff: https://reviews.apache.org/r/60159/diff/2/


Testing
-------

In progress

1. Tested Json marshalling and unmarshalling via REST


File Attachments (updated)
----------------

Asset contains
  https://reviews.apache.org/media/uploaded/files/2017/06/22/a8fdf120-5eb1-4a84-af4a-1236a08a765b__asset-contains.json
Asset IN
  https://reviews.apache.org/media/uploaded/files/2017/06/22/e2096d10-ea4d-4306-b68d-4f5c531fab3c__asset-in.json
Asset like
  https://reviews.apache.org/media/uploaded/files/2017/06/22/6774768f-26ba-4386-b0b6-8ea682813dc7__asset-like.json
Hive table (date comparison)
  https://reviews.apache.org/media/uploaded/files/2017/06/22/d6e54af0-f27f-4c6f-b9d3-4e3a0eb258ac__hive_table-date_2.json
Hive table date
  https://reviews.apache.org/media/uploaded/files/2017/06/22/f3558280-60bd-49dd-92c6-c1176f86bc70__hive_table-date.json
Hive Table Like
  https://reviews.apache.org/media/uploaded/files/2017/06/22/f07517dd-1c6c-4d2d-8bfd-3d494506b23c__hive_table-like.json
Type and tag
  https://reviews.apache.org/media/uploaded/files/2017/06/22/83768696-aa5c-4c08-a776-143753eb4548__type-tag.json


Thanks,

Apoorv Naik


Re: Review Request 60159: ATLAS-1880: Search using entity/trait attributes

Posted by Apoorv Naik <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/
-----------------------------------------------------------

(Updated June 22, 2017, 5:20 a.m.)


Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.


Changes
-------

Latest working code with all operators tested.

Typename + tag is working but is slow (need to improve execution time)


Bugs: ATLAS-1880
    https://issues.apache.org/jira/browse/ATLAS-1880


Repository: atlas


Description
-------

See JIRA


Sample Request structure

```json
{
	"typeName": "hive_table",
	"excludeDeletedEntities": false,
	"limit": 25,
	"offset": 0,
	"entityFilters": {
		"condition": "AND",
		"criterion": [{
			"attributeName": "retention",
			"operator": "=",
			"attributeValue": "10"
		}, {
			"condition": "OR",
			"criterion": [{
				"attributeName": "createTime",
				"operator": ">",
				"attributeValue": "1111111111"
			}, {
				"attributeName": "lastAccessTime",
				"operator": "<=",
				"attributeValue": "2222222222"
			}]
		}]
	}
}
```


Diffs (updated)
-----

  client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
  common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java 841edf71 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java 1ff9d5ed 
  graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasVertexQuery.java 53f490f5 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/NativeTitanGraphQuery.java 0211ff05 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/TitanGraphQuery.java 0077a21f 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/AndCondition.java 68f0eb28 
  graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/titan/query/expr/HasPredicate.java 24e4f5bc 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0IndexQuery.java 1ed1734f 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0VertexQuery.java bd8b897f 
  graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 7ec6ffeb 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1IndexQuery.java 4073dd2a 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1VertexQuery.java 4452bcdd 
  graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 1ca900d8 
  intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java a402c628 
  intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportRequest.java b19f7097 
  repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
  repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
  repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/discovery/SolrSearchStep.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 4ffbb88c 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java 75e91320 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java 00fe94b6 
  repository/src/test/java/org/apache/atlas/TestModules.java d28956de 
  repository/src/test/java/org/apache/atlas/discovery/GremlinSearchStepTest.java PRE-CREATION 
  repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 8c5623fa 
  webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 
  webapp/src/main/webapp/WEB-INF/web.xml 9b5c3b14 
  webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java 1fe31198 


Diff: https://reviews.apache.org/r/60159/diff/2/

Changes: https://reviews.apache.org/r/60159/diff/1-2/


Testing
-------

In progress

1. Tested Json marshalling and unmarshalling via REST


Thanks,

Apoorv Naik


Re: Review Request 60159: ATLAS-1880: Search using entity/trait attributes

Posted by Apoorv Naik <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60159/#review178117
-----------------------------------------------------------




repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
Line 250 (original), 255 (patched)
<https://reviews.apache.org/r/60159/#comment251925>

    Accidental change, will revert



repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java
Lines 114 (patched)
<https://reviews.apache.org/r/60159/#comment251929>

    Can be changed to a HashSet too.



repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java
Lines 151 (patched)
<https://reviews.apache.org/r/60159/#comment251928>

    No need of MapUtil check here as the map is already instantiated


- Apoorv Naik


On June 16, 2017, 6:05 p.m., Apoorv Naik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60159/
> -----------------------------------------------------------
> 
> (Updated June 16, 2017, 6:05 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Sarath Subramanian, and Suma Shivaprasad.
> 
> 
> Bugs: ATLAS-1880
>     https://issues.apache.org/jira/browse/ATLAS-1880
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> See JIRA
> 
> 
> Sample Request structure
> 
> ```json
> {
> 	"typeName": "hive_table",
> 	"excludeDeletedEntities": false,
> 	"limit": 25,
> 	"offset": 0,
> 	"entityFilters": {
> 		"condition": "AND",
> 		"criterion": [{
> 			"attributeName": "retention",
> 			"operator": "=",
> 			"attributeValue": "10"
> 		}, {
> 			"condition": "OR",
> 			"criterion": [{
> 				"attributeName": "createTime",
> 				"operator": ">",
> 				"attributeValue": "1111111111"
> 			}, {
> 				"attributeName": "lastAccessTime",
> 				"operator": "<=",
> 				"attributeValue": "2222222222"
> 			}]
> 		}]
> 	}
> }
> ```
> 
> 
> Diffs
> -----
> 
>   client/src/main/java/org/apache/atlas/AtlasClientV2.java 61413428 
>   common/src/main/java/org/apache/atlas/repository/Constants.java ac022528 
>   graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java bd7b35e4 
>   graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java 5ad176b5 
>   graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/query/NativeTitan1GraphQuery.java 9dc175b6 
>   intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 923a198b 
>   repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 128cdbf9 
>   repository/src/main/java/org/apache/atlas/discovery/GremlinSearchStep.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SearchPipeline.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/discovery/SolrSearchStep.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/TestModules.java 095af417 
>   repository/src/test/java/org/apache/atlas/discovery/GremlinSearchStepTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java 5d5b043e 
>   webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ea550211 
> 
> 
> Diff: https://reviews.apache.org/r/60159/diff/1/
> 
> 
> Testing
> -------
> 
> In progress
> 
> 1. Tested Json marshalling and unmarshalling via REST
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>