[GitHub] [atlas] Seandity commented on issue #76: Update GlossaryTermUtils.java

2019-11-15 Thread GitBox
Seandity commented on issue #76: Update GlossaryTermUtils.java
URL: https://github.com/apache/atlas/pull/76#issuecomment-554270575
 
 
   please check ~ thanks :)


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [atlas] Seandity opened a new pull request #76: Update GlossaryTermUtils.java

2019-11-15 Thread GitBox
Seandity opened a new pull request #76: Update GlossaryTermUtils.java
URL: https://github.com/apache/atlas/pull/76
 
 
   There is an error in the existing filter ... :0


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Re: Review Request 71736: ATLAS-3482 Enhance basic search to enable search on entity system attributes

2019-11-15 Thread Madhan Neethiraj

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



Le - the updated patch looks good! Please review the comments and update. 
Thanks!


intg/src/main/java/org/apache/atlas/type/AtlasBuiltInTypes.java
Lines 53 (patched)


getType() methods added in AtlasBooleanType/AtlasLongType/AtlasStringType 
don't seem to be used. Please review and remove if unused.



intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java
Lines 45 (patched)


- please move 'static' field to #42, before instance fields
- consider renaming 'baseType' to 'CLASSIFICATION_ROOT'
- consider marking this as 'public final' and initialize with:
  public static final AtlasClassificationType CLASSIFICATION_ROOT = 
initBaseClassificationType();
- remove assignment in #86, as this will be initialized in every call to 
the constructor



intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java
Lines 87 (patched)


Instead of calling baseType.resolveReferences() here i.e. in every 
instantiation of AtlasClassificationType, consider calling from 
AtlasTypeRegistry.resolveReferences().



intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java
Lines 92 (patched)


- please move all 'private' methods to end of the class
- per comment in #45, mark this method as 'static', so that this can be 
called to initialize 'static final' in #45.



intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java
Lines 95 (patched)


Following system-attributes should be added to classifications:
 - Constants.TIMESTAMP_PROPERTY_KEY
 - Constants.MODIFICATION_TIMESTAMP_PROPERTY_KEY
 - Constants.CREATED_BY_KEY
 - Constants.MODIFIED_BY_KEY



intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java
Lines 100 (patched)


ALL_CLASSIFIED => __CLASSIFICATION_ROOT



intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java
Lines 304 (patched)


Consider removing hasAttribute() and getAttribute() implementations in 
AtlasClassificationType and AtlasEntityType; and update 
AtlasStructType.getAttribute as:

  class AtlasStructType {
...

public AtlasAttribute getAttribute(String attributeName) {
  AtlasAttribute ret = allAttributes.get(attributeName);
  
  if (ret == null) {
ret = getSystemAttribute(attributeName);
  }
  
  return ret;
}

public AtlasAttribute getSystemAttribute(attributeName) {
  return null;
}
  }



intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java
Lines 650 (patched)


ALL_ENTITY_TYPES => __ENTITY_ROOT



intg/src/main/java/org/apache/atlas/type/AtlasStructType.java
Lines 50 (patched)


Struct-types are not needed in searches (yet). So, baseStructAttributeDef 
and SYSTEM_ATTRIBUTES here may not be necessary. Please review and remove.



intg/src/main/java/org/apache/atlas/type/AtlasStructType.java
Line 634 (original), 673 (patched)


AtlasAttribute attribute = getAttribute(attrName);
  
  if (attribute != null) {
return attribute.getQualifiedName();
  }
  
  throw new AtlasBaseException(AtlasErrorCode.UNKNOWN_ATTRIBUTE, attrName, 
structDef.getName());



intg/src/main/java/org/apache/atlas/type/AtlasStructType.java
Lines 960 (patched)


if (StringUtils.equals(structDef.getName(), 
AtlasEntityType.ENTITY_ROOT.getName()) ||
  StringUtils.equals(structDef.getName(), 
AtlasClassificationType.CLASSIFICATION_ROOT.getName()) ||
  StringUtils.isEmpty(structDef.getName()) {
return attrName;
  } else {
...
  }



intg/src/main/java/org/apache/atlas/type/AtlasStructType.java
Line 923 (original), 968 (patched)


String attrName = attrDef.getName();
  
  if (StringUtils.equals(structDef.getName(), 
AtlasEntityType.ENTITY_ROOT.getName()) ||
  StringUtils.equals(structDef.getName(), 
AtlasClassificationType.CLASSIFICATION_ROOT.getName()) ||
  StringUtils.isEmpty(structDef.getName()) {
return attrName;
  } else {
String vertexPropertyName = qualifiedName;

...
  }



intg/

[jira] [Updated] (ATLAS-3526) UI,Regex classification,Saved Queries: UI doesn't pick the classification from Saved search body if it has *

2019-11-15 Thread Sameer Shaikh (Jira)


 [ 
https://issues.apache.org/jira/browse/ATLAS-3526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sameer Shaikh updated ATLAS-3526:
-
Attachment: ATLAS-3526.patch

> UI,Regex classification,Saved Queries: UI doesn't pick the classification 
> from Saved search body if it has *
> 
>
> Key: ATLAS-3526
> URL: https://issues.apache.org/jira/browse/ATLAS-3526
> Project: Atlas
>  Issue Type: Bug
>Reporter: Sameer Shaikh
>Assignee: Sameer Shaikh
>Priority: Major
> Fix For: 2.1.0, 3.0.0
>
> Attachments: ATLAS-3526.patch
>
>
> # Save a search typename = hive_table , classification = PII* as search1.
>  # Execute the saved search using API : 
> /api/atlas/v2/search/saved/execute/search1. Returns correct results.
>  # Click on search1 in saved search.
> UI doesn't populate classification to be PII* due to which it returns results 
> only for typename = hive_table .
> If search is saved with classification = PII (without any *) , when clicking 
> the search, UI populates the fields correctly.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (ATLAS-3526) UI,Regex classification,Saved Queries: UI doesn't pick the classification from Saved search body if it has *

2019-11-15 Thread Rahul Kurup (Jira)


[ 
https://issues.apache.org/jira/browse/ATLAS-3526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16975025#comment-16975025
 ] 

Rahul Kurup commented on ATLAS-3526:


+1

> UI,Regex classification,Saved Queries: UI doesn't pick the classification 
> from Saved search body if it has *
> 
>
> Key: ATLAS-3526
> URL: https://issues.apache.org/jira/browse/ATLAS-3526
> Project: Atlas
>  Issue Type: Bug
>Reporter: Sameer Shaikh
>Assignee: Sameer Shaikh
>Priority: Major
> Fix For: 2.1.0, 3.0.0
>
> Attachments: ATLAS-3526.patch
>
>
> # Save a search typename = hive_table , classification = PII* as search1.
>  # Execute the saved search using API : 
> /api/atlas/v2/search/saved/execute/search1. Returns correct results.
>  # Click on search1 in saved search.
> UI doesn't populate classification to be PII* due to which it returns results 
> only for typename = hive_table .
> If search is saved with classification = PII (without any *) , when clicking 
> the search, UI populates the fields correctly.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (ATLAS-3526) UI,Regex classification,Saved Queries: UI doesn't pick the classification from Saved search body if it has *

2019-11-15 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/ATLAS-3526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16975027#comment-16975027
 ] 

ASF subversion and git services commented on ATLAS-3526:


Commit e3e7f2e070674d00eba8171123ffe0b7d58751b1 in atlas's branch 
refs/heads/master from sameer79
[ https://gitbox.apache.org/repos/asf?p=atlas.git;h=e3e7f2e ]

ATLAS-3526 :- UI doesn't pick the classification from Saved search body if it 
has *.

Signed-off-by: nixonrodrigues 


> UI,Regex classification,Saved Queries: UI doesn't pick the classification 
> from Saved search body if it has *
> 
>
> Key: ATLAS-3526
> URL: https://issues.apache.org/jira/browse/ATLAS-3526
> Project: Atlas
>  Issue Type: Bug
>Reporter: Sameer Shaikh
>Assignee: Sameer Shaikh
>Priority: Major
> Fix For: 2.1.0, 3.0.0
>
> Attachments: ATLAS-3526.patch
>
>
> # Save a search typename = hive_table , classification = PII* as search1.
>  # Execute the saved search using API : 
> /api/atlas/v2/search/saved/execute/search1. Returns correct results.
>  # Click on search1 in saved search.
> UI doesn't populate classification to be PII* due to which it returns results 
> only for typename = hive_table .
> If search is saved with classification = PII (without any *) , when clicking 
> the search, UI populates the fields correctly.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (ATLAS-3526) UI,Regex classification,Saved Queries: UI doesn't pick the classification from Saved search body if it has *

2019-11-15 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/ATLAS-3526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16975028#comment-16975028
 ] 

ASF subversion and git services commented on ATLAS-3526:


Commit e302e8968367c365d9da1356cd446410f84afbbf in atlas's branch 
refs/heads/branch-2.0 from sameer79
[ https://gitbox.apache.org/repos/asf?p=atlas.git;h=e302e89 ]

ATLAS-3526 :- UI doesn't pick the classification from Saved search body if it 
has *.

Signed-off-by: nixonrodrigues 
(cherry picked from commit e3e7f2e070674d00eba8171123ffe0b7d58751b1)


> UI,Regex classification,Saved Queries: UI doesn't pick the classification 
> from Saved search body if it has *
> 
>
> Key: ATLAS-3526
> URL: https://issues.apache.org/jira/browse/ATLAS-3526
> Project: Atlas
>  Issue Type: Bug
>Reporter: Sameer Shaikh
>Assignee: Sameer Shaikh
>Priority: Major
> Fix For: 2.1.0, 3.0.0
>
> Attachments: ATLAS-3526.patch
>
>
> # Save a search typename = hive_table , classification = PII* as search1.
>  # Execute the saved search using API : 
> /api/atlas/v2/search/saved/execute/search1. Returns correct results.
>  # Click on search1 in saved search.
> UI doesn't populate classification to be PII* due to which it returns results 
> only for typename = hive_table .
> If search is saved with classification = PII (without any *) , when clicking 
> the search, UI populates the fields correctly.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


Re: Review Request 71736: ATLAS-3482 Enhance basic search to enable search on entity system attributes

2019-11-15 Thread Sarath Subramanian

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




intg/src/main/java/org/apache/atlas/type/AtlasBuiltInTypes.java
Lines 53 (patched)


getType() is never used. please review. Also in line #274 and line #700



intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java
Lines 102 (patched)


can we refactor to do resolveReferences() inside initBaseEntityType() 
method?

=> baseType = initBaseEntityType(typeRegistry);



intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java
Lines 650 (patched)


consider creating a constant string in AtlasStructType for 
"ALL_ENTITY_TYPES"


- Sarath Subramanian


On Nov. 14, 2019, 3:57 p.m., Le Ma wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71736/
> ---
> 
> (Updated Nov. 14, 2019, 3:57 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Aadarsh Jajodia, Sridhar K, Madhan 
> Neethiraj, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3482
> https://issues.apache.org/jira/browse/ATLAS-3482
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Introduce ALL_ENTITY_TYPE to support search on system attributes across all 
> entity types. System attributes will be passed in as normal entity attributes.
> 
> 
> Diffs
> -
> 
>   intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java 
> 8f0e5912d 
>   intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java 
> e10965b87 
>   intg/src/main/java/org/apache/atlas/type/AtlasBuiltInTypes.java ed1e5ded2 
>   intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java 
> 417194202 
>   intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java 884447f81 
>   intg/src/main/java/org/apache/atlas/type/AtlasStructType.java e8bf7f9eb 
>   intg/src/main/java/org/apache/atlas/type/Constants.java PRE-CREATION 
>   
> repository/src/main/java/org/apache/atlas/discovery/ClassificationSearchProcessor.java
>  672f38132 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
>  03eb92bcc 
>   
> repository/src/main/java/org/apache/atlas/discovery/FullTextSearchProcessor.java
>  152ade8d4 
>   repository/src/main/java/org/apache/atlas/discovery/SearchContext.java 
> 7ad32bdb9 
>   repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java 
> b56d8e83a 
>   
> repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java
>  7c551304b 
>   webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java 825cda30b 
>   webapp/src/test/java/org/apache/atlas/web/adapters/TestEntitiesREST.java 
> cd8f8981c 
> 
> 
> Diff: https://reviews.apache.org/r/71736/diff/3/
> 
> 
> Testing
> ---
> 
> - Added new unit tests, passed.
> - will run pre-commit job.
> 
> 
> Thanks,
> 
> Le Ma
> 
>