You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@atlas.apache.org by Connie Chen <sp...@gmail.com> on 2017/12/06 01:17:24 UTC

500 returns when I try to basic search

Hi, I am new to using Atlas and I am testing out the API to create my data
models. I've created a classification with a string attribute "dataType"
where "isIndexable" is set to true. However, I cannot figure out how to
query for a specific value via the API without getting a 500.

Here is my configuration:
https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3

This is the field I am indexing on: https://gist.github.com/co
nnie-stripe/597e087433869036e63e5d8363d61bd3#file-gistfile1-txt-L22

Here is the curl command I am running to try and retrieve a value where
that attribute field is a specific value: https://gist.github.com
/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277045

Then I am getting these logs back: https://gist.github.com/
connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277047

Am I doing something wrong? Is there an easier way to debug these sorts of
errors? The stack trace hasn't been very helpful. Thanks!

Connie

Re: 500 returns when I try to basic search

Posted by Madhan Neethiraj <ma...@apache.org>.
Connie,

 

GET version of basic-search doesn’t provide an option to return classification attributes. Please use the POST version, as shown below:

 

curl -iv -H 'Content-Type: application/json' -u admin:admin -X POST atlas-server.service.consul:21000/api/atlas/v2/search/basic -d '{ "classification" : "PII2", "includeClassificationAttributes": true }'

 

 

Madhan

 

From: Connie Chen <sp...@gmail.com>
Reply-To: "user@atlas.apache.org" <us...@atlas.apache.org>
Date: Tuesday, December 12, 2017 at 12:18 PM
To: "user@atlas.apache.org" <us...@atlas.apache.org>
Subject: Re: 500 returns when I try to basic search

 

Also, if I do something like this 

 

curl -H "Content-Type: application/json" -iv -u admin:admin atlas-server.service.consul:21000/api/atlas/v2/search/basic?classification=PII2&includeClassificationAttributes=true

 

The attributes don't come back either.  

 

On Tue, Dec 12, 2017 at 12:01 PM, Connie Chen <sp...@gmail.com> wrote:

Hi, I am still trying to resolve this issue and it is somewhat difficult as I don't understand the gremlin query language. I am trying to just run the query that outputs on gremlin, and it is giving me this error 

 

> GET /api/atlas/discovery/search/gremlin?gremlinQuery=def r=(([]) as Set);def f1={GremlinPipeline x->x.as('theTrait').in().as('theInstance')}; [0..<25].select(['theTrait', 'theInstance']).fill(r)};f1(g.V().has('__typeName','PII2'));f1(g.V().has('__superTypeNames','PII2'));r._().as('__tmp').transform({((Row)it).getColumn('theTrait')}).as('theTrait').back('__tmp').transform({((Row)it).getColumn('theInstance')}).as('theInstance').select(['theTrait', 'theInstance'],{[it]},{[it]}).as('a0').has('PII2.pii_type',T.'eq','example').back('a0') [0..<25].toList() HTTP/1.1
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.35.0
> Host: atlas-server.service.consul:21000
> Accept: */*
>
< HTTP/1.1 400 Unknown Version
< Content-Length: 0
< Connection: close
* Server Jetty(9.2.12.v20150709) is not blacklisted
< Server: Jetty(9.2.12.v20150709)
<
* Closing connection 0

 

If it works in your env do you think you can add an example of this in the QuickStartV2? That entire quick start works on our setup. But, there is no example of a attribute def on a classification (and searching for it). I am not sure if something is wrong with the query it is generating (see above) or our setup. Thanks again for your help. 

 

Connie 

 

On Fri, Dec 8, 2017 at 4:03 PM, Connie Chen <sp...@gmail.com> wrote:

Hi Madhan, thanks for the response. It is still producing the same result. Do you have any suggestions for where to debug this? It looks like it is in the jersey layer, but where is that being controlled? thank you. 

 

Connie

 

On Thu, Dec 7, 2017 at 7:58 PM, Madhan Neethiraj <ma...@apache.org> wrote:

Connie,

 

The error was due to missing request header: -H 'Content-Type: application/json'. Can you try the following?

 

curl -iv -H 'Content-Type: application/json' -u admin:admin -X POST atlas-server/api/atlas/v2/search/basic -d '{

   "excludeDeletedEntities": true,

   "classification"        : "PII",

   "query"                 : "",

   "limit"                 : 50,

   "offset"                : 0,

   "entityFilters"         : null,

   "tagFilters"            : {

     "attributeName" : "pii_type",

     "operator"      : "eq",

     "attributeValue": "example"

   },

   "attributes": [""]

}'

 

 

Hope this helps.

 

Madhan

 

 

 

From: Connie Chen <sp...@gmail.com>
Reply-To: "user@atlas.apache.org" <us...@atlas.apache.org>
Date: Wednesday, December 6, 2017 at 11:38 AM


To: "user@atlas.apache.org" <us...@atlas.apache.org>
Subject: Re: 500 returns when I try to basic search

 

I tried an example from the suggested queries applied to classification, like `PII PII.type="name"` and got this error 

 

2017-12-06 19:36:35,743 ERROR - [pool-1-thread-7 - 4cdc2d8b-f710-4c59-9eb2-ef7560801a74:] ~ Error handling a request: e83408f35ae8fcd6 (ExceptionMapperUtil:32)
org.apache.atlas.exception.AtlasBaseException: Discovery query failed L:{def r=(([]) as Set);def f1={GremlinPipeline x->x.as('theTrait').in().as('theInstance') [0..<25].select(['theTrait', 'theInstance']).fill(r)};f1(g.V().has('__typeName','PII'));f1(g.V().has('__superTypeNames','PII'));r._().as('__tmp').transform({((Row)it).getColumn('theTrait')}).as('theTrait').back('__tmp').transform({((Row)it).getColumn('theInstance')}).as('theInstance').select(['theTrait', 'theInstance'],{[it]},{[it]}).as('a0').has('PII.type').back('a0') [0..<25].toList()}
at org.apache.atlas.discovery.EntityDiscoveryService.searchUsingDslQuery(EntityDiscoveryService.java:143)
at org.apache.atlas.web.rest.DiscoveryREST.searchUsingDSL(DiscoveryREST.java:94)

 

On Wed, Dec 6, 2017 at 11:30 AM, Connie Chen <sp...@gmail.com> wrote:

Hi Madhan, thanks for looking. I changed the config properties but getting the same error. I don't see the "Given type" error in the startup anymore though: 

 

https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#file-taxonomy-enable-false

 

I also tried an advanced search in the UI I think that was causing those `Discovery query` errors. Let me know what you think, thanks

 

Connie

 

On Wed, Dec 6, 2017 at 11:00 AM, Madhan Neethiraj <ma...@apache.org> wrote:

Connie,

 

The query text is correct; it works in my env. The log file shows failures in bunch of other calls as well:

  - com.sun.jersey.api.NotFoundException: null for uri: http://atlas-server.service.consul:21000/api/atlas/discovery/search/basic

  - com.sun.jersey.api.NotFoundException: null for uri: http://atlas-server.service.consul:21000/api/atlas/v2/types/typedefs/classification

  - com.sun.jersey.api.NotFoundException: null for uri: http://atlas-server.service.consul:21000/api/atlas/v2/discovery/search/attribute?attrName=dataType

  - org.apache.atlas.exception.AtlasBaseException: Discovery query failed L:{def r=(([]) as Set);def f1={GremlinPipeline x->x.as('theTrait').in().as('theInstance') [0..<25].select(['theTrait', 'theInstance']).fill(r)};f1(g.V().has('__typeName','PII'));f1(g.V().has('__superTypeNames','PII'));r._().as('__tmp').transform({((Row)it).getColumn('theTrait')}).as('theTrait').back('__tmp').transform({((Row)it).getColumn('theInstance')}).as('theInstance').select(['theTrait', 'theInstance'],{[it]},{[it]}).as('a0').has('PII.dataType',T.'eq','example').back('a0') [0..<25].toList()}

  - org.apache.atlas.exception.AtlasBaseException: Discovery query failed PII OR Metric

  - org.apache.atlas.exception.AtlasBaseException: Discovery query failed Column WHERE Column isa PII

 

Log file shows a restart of Atlas running into the following error during initialization: “Given type TaxonomyTerm already exists”. If taxonomy feature (which is in tech-preview) is enabled, can you try after disabling it? Please set the following configuration in atlas-application.properties:

    atlas.feature.taxonomy.enable=false

 

Madhan

 

From: Nixon Rodrigues <ni...@freestoneinfotech.com>
Reply-To: "user@atlas.apache.org" <us...@atlas.apache.org>
Date: Wednesday, December 6, 2017 at 1:04 AM
To: "user@atlas.apache.org" <us...@atlas.apache.org>
Subject: Re: 500 returns when I try to basic search

 

Connie,

 

Can you try this json as the body, I think to search on attribute needs to be added to in criterion attribute.

 

 http://atlasUrl:21000/api/atlas/v2/search/basic method - post

 

{

    "excludeDeletedEntities": true,

    "entityFilters": null,

    "tagFilters": {

      "criterion": [

        {

          "attributeName": "type",

          "operator": "eq",

          "attributeValue": "example"

        }

      ]

    },

    "attributes": [],

    "limit": 25,

    "offset": 0,

    "classification": "PII"

  }

 

 

On Wed, Dec 6, 2017 at 11:50 AM, Connie Chen <sp...@gmail.com> wrote:

Hi Madhan, thanks for the fast response.  

 

I added the snippet of the application log that shows the stack trace when I make the search request. https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277245

 

I also added as much of the application log as I could in another file https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#file-application-log

 

Let me know if that helps, thanks!

Connie

 

On Tue, Dec 5, 2017 at 6:41 PM, Madhan Neethiraj <ma...@apache.org> wrote:

Connie,

 

Thanks for the details provided on this issue. Classification definition and basic-search REST API call details look good. To troubleshoot further, can you add complete application.log file?

 

Madhan

 

 

 

 

From: Connie Chen <sp...@gmail.com>
Reply-To: "user@atlas.apache.org" <us...@atlas.apache.org>
Date: Tuesday, December 5, 2017 at 5:17 PM
To: "user@atlas.apache.org" <us...@atlas.apache.org>
Subject: 500 returns when I try to basic search

 

Hi, I am new to using Atlas and I am testing out the API to create my data models. I've created a classification with a string attribute "dataType" where "isIndexable" is set to true. However, I cannot figure out how to query for a specific value via the API without getting a 500.  

 

Here is my configuration:

https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3

 

This is the field I am indexing on: https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#file-gistfile1-txt-L22

 

Here is the curl command I am running to try and retrieve a value where that attribute field is a specific value: https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277045

 

Then I am getting these logs back: https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277047

 

Am I doing something wrong? Is there an easier way to debug these sorts of errors? The stack trace hasn't been very helpful. Thanks!

 

Connie

 

 

 

 

 

 

 


Re: 500 returns when I try to basic search

Posted by Connie Chen <sp...@gmail.com>.
Also, if I do something like this

curl -H "Content-Type: application/json" -iv -u admin:admin
> atlas-server.service.consul:21000/api/atlas/v2/search/basic?classification=PII2&includeClassificationAttributes=true


The attributes don't come back either.

On Tue, Dec 12, 2017 at 12:01 PM, Connie Chen <sp...@gmail.com> wrote:

> Hi, I am still trying to resolve this issue and it is somewhat difficult
> as I don't understand the gremlin query language. I am trying to just run
> the query that outputs on gremlin, and it is giving me this error
>
> > GET /api/atlas/discovery/search/gremlin?gremlinQuery=def r=(([]) as
>> Set);def f1={GremlinPipeline x->x.as('theTrait').in().as('theInstance')};
>> [0..<25].select(['theTrait', 'theInstance']).fill(r)};f1(g.
>> V().has('__typeName','PII2'));f1(g.V().has('__
>> superTypeNames','PII2'));r._().as('__tmp').transform({((Row)
>> it).getColumn('theTrait')}).as('theTrait').back('__tmp').
>> transform({((Row)it).getColumn('theInstance')}).as(
>> 'theInstance').select(['theTrait', 'theInstance'],{[it]},{[it]}).
>> as('a0').has('PII2.pii_type',T.'eq','example').back('a0')
>> [0..<25].toList() HTTP/1.1
>> > Authorization: Basic YWRtaW46YWRtaW4=
>> > User-Agent: curl/7.35.0
>> > Host: atlas-server.service.consul:21000
>> > Accept: */*
>> >
>> < HTTP/1.1 400 Unknown Version
>> < Content-Length: 0
>> < Connection: close
>> * Server Jetty(9.2.12.v20150709) is not blacklisted
>> < Server: Jetty(9.2.12.v20150709)
>> <
>> * Closing connection 0
>
>
> If it works in your env do you think you can add an example of this in the
> QuickStartV2? That entire quick start works on our setup. But, there is no
> example of a attribute def on a classification (and searching for it). I am
> not sure if something is wrong with the query it is generating (see above)
> or our setup. Thanks again for your help.
>
> Connie
>
> On Fri, Dec 8, 2017 at 4:03 PM, Connie Chen <sp...@gmail.com> wrote:
>
>> Hi Madhan, thanks for the response. It is still producing the same
>> result. Do you have any suggestions for where to debug this? It looks like
>> it is in the jersey layer, but where is that being controlled? thank you.
>>
>> Connie
>>
>> On Thu, Dec 7, 2017 at 7:58 PM, Madhan Neethiraj <ma...@apache.org>
>> wrote:
>>
>>> Connie,
>>>
>>>
>>>
>>> The error was due to missing request header: -H 'Content-Type:
>>> application/json'. Can you try the following?
>>>
>>>
>>>
>>> curl -iv -H 'Content-Type: application/json' -u admin:admin -X POST
>>> atlas-server/api/atlas/v2/search/basic -d '{
>>>
>>>    "excludeDeletedEntities": true,
>>>
>>>    "classification"        : "PII",
>>>
>>>    "query"                 : "",
>>>
>>>    "limit"                 : 50,
>>>
>>>    "offset"                : 0,
>>>
>>>    "entityFilters"         : null,
>>>
>>>    "tagFilters"            : {
>>>
>>>      "attributeName" : "pii_type",
>>>
>>>      "operator"      : "eq",
>>>
>>>      "attributeValue": "example"
>>>
>>>    },
>>>
>>>    "attributes": [""]
>>>
>>> }'
>>>
>>>
>>>
>>>
>>>
>>> Hope this helps.
>>>
>>>
>>>
>>> Madhan
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *From: *Connie Chen <sp...@gmail.com>
>>> *Reply-To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>>> *Date: *Wednesday, December 6, 2017 at 11:38 AM
>>>
>>> *To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>>> *Subject: *Re: 500 returns when I try to basic search
>>>
>>>
>>>
>>> I tried an example from the suggested queries applied to classification,
>>> like `PII PII.type="name"` and got this error
>>>
>>>
>>>
>>> 2017-12-06 19:36:35,743 ERROR - [pool-1-thread-7 -
>>> 4cdc2d8b-f710-4c59-9eb2-ef7560801a74:] ~ Error handling a request:
>>> e83408f35ae8fcd6 (ExceptionMapperUtil:32)
>>> org.apache.atlas.exception.AtlasBaseException: Discovery query failed
>>> L:{def r=(([]) as Set);def f1={GremlinPipeline x->x.as
>>> ('theTrait').in().as('theInstance') [0..<25].select(['theTrait',
>>> 'theInstance']).fill(r)};f1(g.V().has('__typeName','PII'));f
>>> 1(g.V().has('__superTypeNames','PII'));r._().as('__tmp').tra
>>> nsform({((Row)it).getColumn('theTrait')}).as('theTrait').
>>> back('__tmp').transform({((Row)it).getColumn('theInstance
>>> ')}).as('theInstance').select(['theTrait',
>>> 'theInstance'],{[it]},{[it]}).as('a0').has('PII.type').back('a0')
>>> [0..<25].toList()}
>>> at org.apache.atlas.discovery.EntityDiscoveryService.searchUsin
>>> gDslQuery(EntityDiscoveryService.java:143)
>>> at org.apache.atlas.web.rest.DiscoveryREST.searchUsingDSL(Disco
>>> veryREST.java:94)
>>>
>>>
>>>
>>> On Wed, Dec 6, 2017 at 11:30 AM, Connie Chen <sp...@gmail.com>
>>> wrote:
>>>
>>> Hi Madhan, thanks for looking. I changed the config properties but
>>> getting the same error. I don't see the "Given type" error in the startup
>>> anymore though:
>>>
>>>
>>>
>>> https://gist.github.com/connie-stripe/597e087433869036e63e5d
>>> 8363d61bd3#file-taxonomy-enable-false
>>>
>>>
>>>
>>> I also tried an advanced search in the UI I think that was causing those
>>> `Discovery query` errors. Let me know what you think, thanks
>>>
>>>
>>>
>>> Connie
>>>
>>>
>>>
>>> On Wed, Dec 6, 2017 at 11:00 AM, Madhan Neethiraj <ma...@apache.org>
>>> wrote:
>>>
>>> Connie,
>>>
>>>
>>>
>>> The query text is correct; it works in my env. The log file shows
>>> failures in bunch of other calls as well:
>>>
>>>   - com.sun.jersey.api.NotFoundException: null for uri:
>>> http://atlas-server.service.consul:21000/api/atlas/discovery
>>> /search/basic
>>>
>>>   - com.sun.jersey.api.NotFoundException: null for uri:
>>> http://atlas-server.service.consul:21000/api/atlas/v2/types/
>>> typedefs/classification
>>>
>>>   - com.sun.jersey.api.NotFoundException: null for uri:
>>> http://atlas-server.service.consul:21000/api/atlas/v2/discov
>>> ery/search/attribute?attrName=dataType
>>>
>>>   - org.apache.atlas.exception.AtlasBaseException: Discovery query
>>> failed L:{def r=(([]) as Set);def f1={GremlinPipeline x->x.as
>>> ('theTrait').in().as('theInstance') [0..<25].select(['theTrait',
>>> 'theInstance']).fill(r)};f1(g.V().has('__typeName','PII'));f
>>> 1(g.V().has('__superTypeNames','PII'));r._().as('__tmp').tra
>>> nsform({((Row)it).getColumn('theTrait')}).as('theTrait').
>>> back('__tmp').transform({((Row)it).getColumn('theInstance
>>> ')}).as('theInstance').select(['theTrait',
>>> 'theInstance'],{[it]},{[it]}).as('a0').has('PII.dataType',T.'eq','example').back('a0')
>>> [0..<25].toList()}
>>>
>>>   - org.apache.atlas.exception.AtlasBaseException: Discovery query
>>> failed PII OR Metric
>>>
>>>   - org.apache.atlas.exception.AtlasBaseException: Discovery query
>>> failed Column WHERE Column isa PII
>>>
>>>
>>>
>>> Log file shows a restart of Atlas running into the following error
>>> during initialization: “Given type TaxonomyTerm already exists”. If
>>> taxonomy feature (which is in tech-preview) is enabled, can you try after
>>> disabling it? Please set the following configuration in
>>> atlas-application.properties:
>>>
>>>     atlas.feature.taxonomy.enable=false
>>>
>>>
>>>
>>> Madhan
>>>
>>>
>>>
>>> *From: *Nixon Rodrigues <ni...@freestoneinfotech.com>
>>> *Reply-To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>>> *Date: *Wednesday, December 6, 2017 at 1:04 AM
>>> *To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>>> *Subject: *Re: 500 returns when I try to basic search
>>>
>>>
>>>
>>> Connie,
>>>
>>>
>>>
>>> Can you try this json as the body, I think to search on attribute needs
>>> to be added to in criterion attribute.
>>>
>>>
>>>
>>>  http://atlasUrl:21000/api/atlas/v2/search/basic method - post
>>>
>>>
>>>
>>> {
>>>
>>>     "excludeDeletedEntities": true,
>>>
>>>     "entityFilters": null,
>>>
>>>     "tagFilters": {
>>>
>>>       "criterion": [
>>>
>>>         {
>>>
>>>           "attributeName": "type",
>>>
>>>           "operator": "eq",
>>>
>>>           "attributeValue": "example"
>>>
>>>         }
>>>
>>>       ]
>>>
>>>     },
>>>
>>>     "attributes": [],
>>>
>>>     "limit": 25,
>>>
>>>     "offset": 0,
>>>
>>>     "classification": "PII"
>>>
>>>   }
>>>
>>>
>>>
>>>
>>>
>>> On Wed, Dec 6, 2017 at 11:50 AM, Connie Chen <sp...@gmail.com>
>>> wrote:
>>>
>>> Hi Madhan, thanks for the fast response.
>>>
>>>
>>>
>>> I added the snippet of the application log that shows the stack trace
>>> when I make the search request. https://gist.github.c
>>> om/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277245
>>>
>>>
>>>
>>> I also added as much of the application log as I could in another file
>>> https://gist.github.com/connie-stripe/597e087433869036e
>>> 63e5d8363d61bd3#file-application-log
>>>
>>>
>>>
>>> Let me know if that helps, thanks!
>>>
>>> Connie
>>>
>>>
>>>
>>> On Tue, Dec 5, 2017 at 6:41 PM, Madhan Neethiraj <ma...@apache.org>
>>> wrote:
>>>
>>> Connie,
>>>
>>>
>>>
>>> Thanks for the details provided on this issue. Classification definition
>>> and basic-search REST API call details look good. To troubleshoot further,
>>> can you add complete application.log file?
>>>
>>>
>>>
>>> Madhan
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *From: *Connie Chen <sp...@gmail.com>
>>> *Reply-To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>>> *Date: *Tuesday, December 5, 2017 at 5:17 PM
>>> *To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>>> *Subject: *500 returns when I try to basic search
>>>
>>>
>>>
>>> Hi, I am new to using Atlas and I am testing out the API to create my
>>> data models. I've created a classification with a string attribute
>>> "dataType" where "isIndexable" is set to true. However, I cannot figure out
>>> how to query for a specific value via the API without getting a 500.
>>>
>>>
>>>
>>> Here is my configuration:
>>>
>>> https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3
>>>
>>>
>>>
>>> This is the field I am indexing on: https://gist.github.com/co
>>> nnie-stripe/597e087433869036e63e5d8363d61bd3#file-gistfile1-txt-L22
>>>
>>>
>>>
>>> Here is the curl command I am running to try and retrieve a value where
>>> that attribute field is a specific value: https://gist.github.com
>>> /connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277045
>>>
>>>
>>>
>>> Then I am getting these logs back: https://gist.github.com/
>>> connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277047
>>>
>>>
>>>
>>> Am I doing something wrong? Is there an easier way to debug these sorts
>>> of errors? The stack trace hasn't been very helpful. Thanks!
>>>
>>>
>>>
>>> Connie
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>

Re: 500 returns when I try to basic search

Posted by Madhan Neethiraj <ma...@apache.org>.
Connie,

 

“/api/atlas/discovery/search/gremlin?gremlinQuery” is a deprecated API, which will be removed in 1.0.0 release. I would suggest to avoid using this API. Can you describe what query you are trying to run? Did you try look into using basic-search API for this?

 

Madhan

 

 

 

From: Connie Chen <sp...@gmail.com>
Reply-To: "user@atlas.apache.org" <us...@atlas.apache.org>
Date: Tuesday, December 12, 2017 at 12:02 PM
To: "user@atlas.apache.org" <us...@atlas.apache.org>
Subject: Re: 500 returns when I try to basic search

 

Hi, I am still trying to resolve this issue and it is somewhat difficult as I don't understand the gremlin query language. I am trying to just run the query that outputs on gremlin, and it is giving me this error 

 

> GET /api/atlas/discovery/search/gremlin?gremlinQuery=def r=(([]) as Set);def f1={GremlinPipeline x->x.as('theTrait').in().as('theInstance')}; [0..<25].select(['theTrait', 'theInstance']).fill(r)};f1(g.V().has('__typeName','PII2'));f1(g.V().has('__superTypeNames','PII2'));r._().as('__tmp').transform({((Row)it).getColumn('theTrait')}).as('theTrait').back('__tmp').transform({((Row)it).getColumn('theInstance')}).as('theInstance').select(['theTrait', 'theInstance'],{[it]},{[it]}).as('a0').has('PII2.pii_type',T.'eq','example').back('a0') [0..<25].toList() HTTP/1.1
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.35.0
> Host: atlas-server.service.consul:21000
> Accept: */*
>
< HTTP/1.1 400 Unknown Version
< Content-Length: 0
< Connection: close
* Server Jetty(9.2.12.v20150709) is not blacklisted
< Server: Jetty(9.2.12.v20150709)
<
* Closing connection 0

 

If it works in your env do you think you can add an example of this in the QuickStartV2? That entire quick start works on our setup. But, there is no example of a attribute def on a classification (and searching for it). I am not sure if something is wrong with the query it is generating (see above) or our setup. Thanks again for your help. 

 

Connie 

 

On Fri, Dec 8, 2017 at 4:03 PM, Connie Chen <sp...@gmail.com> wrote:

Hi Madhan, thanks for the response. It is still producing the same result. Do you have any suggestions for where to debug this? It looks like it is in the jersey layer, but where is that being controlled? thank you. 

 

Connie

 

On Thu, Dec 7, 2017 at 7:58 PM, Madhan Neethiraj <ma...@apache.org> wrote:

Connie,

 

The error was due to missing request header: -H 'Content-Type: application/json'. Can you try the following?

 

curl -iv -H 'Content-Type: application/json' -u admin:admin -X POST atlas-server/api/atlas/v2/search/basic -d '{

   "excludeDeletedEntities": true,

   "classification"        : "PII",

   "query"                 : "",

   "limit"                 : 50,

   "offset"                : 0,

   "entityFilters"         : null,

   "tagFilters"            : {

     "attributeName" : "pii_type",

     "operator"      : "eq",

     "attributeValue": "example"

   },

   "attributes": [""]

}'

 

 

Hope this helps.

 

Madhan

 

 

 

From: Connie Chen <sp...@gmail.com>
Reply-To: "user@atlas.apache.org" <us...@atlas.apache.org>
Date: Wednesday, December 6, 2017 at 11:38 AM


To: "user@atlas.apache.org" <us...@atlas.apache.org>
Subject: Re: 500 returns when I try to basic search

 

I tried an example from the suggested queries applied to classification, like `PII PII.type="name"` and got this error 

 

2017-12-06 19:36:35,743 ERROR - [pool-1-thread-7 - 4cdc2d8b-f710-4c59-9eb2-ef7560801a74:] ~ Error handling a request: e83408f35ae8fcd6 (ExceptionMapperUtil:32)
org.apache.atlas.exception.AtlasBaseException: Discovery query failed L:{def r=(([]) as Set);def f1={GremlinPipeline x->x.as('theTrait').in().as('theInstance') [0..<25].select(['theTrait', 'theInstance']).fill(r)};f1(g.V().has('__typeName','PII'));f1(g.V().has('__superTypeNames','PII'));r._().as('__tmp').transform({((Row)it).getColumn('theTrait')}).as('theTrait').back('__tmp').transform({((Row)it).getColumn('theInstance')}).as('theInstance').select(['theTrait', 'theInstance'],{[it]},{[it]}).as('a0').has('PII.type').back('a0') [0..<25].toList()}
at org.apache.atlas.discovery.EntityDiscoveryService.searchUsingDslQuery(EntityDiscoveryService.java:143)
at org.apache.atlas.web.rest.DiscoveryREST.searchUsingDSL(DiscoveryREST.java:94)

 

On Wed, Dec 6, 2017 at 11:30 AM, Connie Chen <sp...@gmail.com> wrote:

Hi Madhan, thanks for looking. I changed the config properties but getting the same error. I don't see the "Given type" error in the startup anymore though: 

 

https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#file-taxonomy-enable-false

 

I also tried an advanced search in the UI I think that was causing those `Discovery query` errors. Let me know what you think, thanks

 

Connie

 

On Wed, Dec 6, 2017 at 11:00 AM, Madhan Neethiraj <ma...@apache.org> wrote:

Connie,

 

The query text is correct; it works in my env. The log file shows failures in bunch of other calls as well:

  - com.sun.jersey.api.NotFoundException: null for uri: http://atlas-server.service.consul:21000/api/atlas/discovery/search/basic

  - com.sun.jersey.api.NotFoundException: null for uri: http://atlas-server.service.consul:21000/api/atlas/v2/types/typedefs/classification

  - com.sun.jersey.api.NotFoundException: null for uri: http://atlas-server.service.consul:21000/api/atlas/v2/discovery/search/attribute?attrName=dataType

  - org.apache.atlas.exception.AtlasBaseException: Discovery query failed L:{def r=(([]) as Set);def f1={GremlinPipeline x->x.as('theTrait').in().as('theInstance') [0..<25].select(['theTrait', 'theInstance']).fill(r)};f1(g.V().has('__typeName','PII'));f1(g.V().has('__superTypeNames','PII'));r._().as('__tmp').transform({((Row)it).getColumn('theTrait')}).as('theTrait').back('__tmp').transform({((Row)it).getColumn('theInstance')}).as('theInstance').select(['theTrait', 'theInstance'],{[it]},{[it]}).as('a0').has('PII.dataType',T.'eq','example').back('a0') [0..<25].toList()}

  - org.apache.atlas.exception.AtlasBaseException: Discovery query failed PII OR Metric

  - org.apache.atlas.exception.AtlasBaseException: Discovery query failed Column WHERE Column isa PII

 

Log file shows a restart of Atlas running into the following error during initialization: “Given type TaxonomyTerm already exists”. If taxonomy feature (which is in tech-preview) is enabled, can you try after disabling it? Please set the following configuration in atlas-application.properties:

    atlas.feature.taxonomy.enable=false

 

Madhan

 

From: Nixon Rodrigues <ni...@freestoneinfotech.com>
Reply-To: "user@atlas.apache.org" <us...@atlas.apache.org>
Date: Wednesday, December 6, 2017 at 1:04 AM
To: "user@atlas.apache.org" <us...@atlas.apache.org>
Subject: Re: 500 returns when I try to basic search

 

Connie,

 

Can you try this json as the body, I think to search on attribute needs to be added to in criterion attribute.

 

 http://atlasUrl:21000/api/atlas/v2/search/basic method - post

 

{

    "excludeDeletedEntities": true,

    "entityFilters": null,

    "tagFilters": {

      "criterion": [

        {

          "attributeName": "type",

          "operator": "eq",

          "attributeValue": "example"

        }

      ]

    },

    "attributes": [],

    "limit": 25,

    "offset": 0,

    "classification": "PII"

  }

 

 

On Wed, Dec 6, 2017 at 11:50 AM, Connie Chen <sp...@gmail.com> wrote:

Hi Madhan, thanks for the fast response.  

 

I added the snippet of the application log that shows the stack trace when I make the search request. https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277245

 

I also added as much of the application log as I could in another file https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#file-application-log

 

Let me know if that helps, thanks!

Connie

 

On Tue, Dec 5, 2017 at 6:41 PM, Madhan Neethiraj <ma...@apache.org> wrote:

Connie,

 

Thanks for the details provided on this issue. Classification definition and basic-search REST API call details look good. To troubleshoot further, can you add complete application.log file?

 

Madhan

 

 

 

 

From: Connie Chen <sp...@gmail.com>
Reply-To: "user@atlas.apache.org" <us...@atlas.apache.org>
Date: Tuesday, December 5, 2017 at 5:17 PM
To: "user@atlas.apache.org" <us...@atlas.apache.org>
Subject: 500 returns when I try to basic search

 

Hi, I am new to using Atlas and I am testing out the API to create my data models. I've created a classification with a string attribute "dataType" where "isIndexable" is set to true. However, I cannot figure out how to query for a specific value via the API without getting a 500.  

 

Here is my configuration:

https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3

 

This is the field I am indexing on: https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#file-gistfile1-txt-L22

 

Here is the curl command I am running to try and retrieve a value where that attribute field is a specific value: https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277045

 

Then I am getting these logs back: https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277047

 

Am I doing something wrong? Is there an easier way to debug these sorts of errors? The stack trace hasn't been very helpful. Thanks!

 

Connie

 

 

 

 

 

 


Re: 500 returns when I try to basic search

Posted by Connie Chen <sp...@gmail.com>.
Hi, I am still trying to resolve this issue and it is somewhat difficult as
I don't understand the gremlin query language. I am trying to just run the
query that outputs on gremlin, and it is giving me this error

> GET /api/atlas/discovery/search/gremlin?gremlinQuery=def r=(([]) as
> Set);def f1={GremlinPipeline x->x.as('theTrait').in().as('theInstance')};
> [0..<25].select(['theTrait',
> 'theInstance']).fill(r)};f1(g.V().has('__typeName','PII2'));f1(g.V().has('__superTypeNames','PII2'));r._().as('__tmp').transform({((Row)it).getColumn('theTrait')}).as('theTrait').back('__tmp').transform({((Row)it).getColumn('theInstance')}).as('theInstance').select(['theTrait',
> 'theInstance'],{[it]},{[it]}).as('a0').has('PII2.pii_type',T.'eq','example').back('a0')
> [0..<25].toList() HTTP/1.1
> > Authorization: Basic YWRtaW46YWRtaW4=
> > User-Agent: curl/7.35.0
> > Host: atlas-server.service.consul:21000
> > Accept: */*
> >
> < HTTP/1.1 400 Unknown Version
> < Content-Length: 0
> < Connection: close
> * Server Jetty(9.2.12.v20150709) is not blacklisted
> < Server: Jetty(9.2.12.v20150709)
> <
> * Closing connection 0


If it works in your env do you think you can add an example of this in the
QuickStartV2? That entire quick start works on our setup. But, there is no
example of a attribute def on a classification (and searching for it). I am
not sure if something is wrong with the query it is generating (see above)
or our setup. Thanks again for your help.

Connie

On Fri, Dec 8, 2017 at 4:03 PM, Connie Chen <sp...@gmail.com> wrote:

> Hi Madhan, thanks for the response. It is still producing the same result.
> Do you have any suggestions for where to debug this? It looks like it is in
> the jersey layer, but where is that being controlled? thank you.
>
> Connie
>
> On Thu, Dec 7, 2017 at 7:58 PM, Madhan Neethiraj <ma...@apache.org>
> wrote:
>
>> Connie,
>>
>>
>>
>> The error was due to missing request header: -H 'Content-Type:
>> application/json'. Can you try the following?
>>
>>
>>
>> curl -iv -H 'Content-Type: application/json' -u admin:admin -X POST
>> atlas-server/api/atlas/v2/search/basic -d '{
>>
>>    "excludeDeletedEntities": true,
>>
>>    "classification"        : "PII",
>>
>>    "query"                 : "",
>>
>>    "limit"                 : 50,
>>
>>    "offset"                : 0,
>>
>>    "entityFilters"         : null,
>>
>>    "tagFilters"            : {
>>
>>      "attributeName" : "pii_type",
>>
>>      "operator"      : "eq",
>>
>>      "attributeValue": "example"
>>
>>    },
>>
>>    "attributes": [""]
>>
>> }'
>>
>>
>>
>>
>>
>> Hope this helps.
>>
>>
>>
>> Madhan
>>
>>
>>
>>
>>
>>
>>
>> *From: *Connie Chen <sp...@gmail.com>
>> *Reply-To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>> *Date: *Wednesday, December 6, 2017 at 11:38 AM
>>
>> *To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>> *Subject: *Re: 500 returns when I try to basic search
>>
>>
>>
>> I tried an example from the suggested queries applied to classification,
>> like `PII PII.type="name"` and got this error
>>
>>
>>
>> 2017-12-06 19:36:35,743 ERROR - [pool-1-thread-7 -
>> 4cdc2d8b-f710-4c59-9eb2-ef7560801a74:] ~ Error handling a request:
>> e83408f35ae8fcd6 (ExceptionMapperUtil:32)
>> org.apache.atlas.exception.AtlasBaseException: Discovery query failed
>> L:{def r=(([]) as Set);def f1={GremlinPipeline x->x.as
>> ('theTrait').in().as('theInstance') [0..<25].select(['theTrait',
>> 'theInstance']).fill(r)};f1(g.V().has('__typeName','PII'));f
>> 1(g.V().has('__superTypeNames','PII'));r._().as('__tmp').
>> transform({((Row)it).getColumn('theTrait')}).as('
>> theTrait').back('__tmp').transform({((Row)it).getColumn('
>> theInstance')}).as('theInstance').select(['theTrait',
>> 'theInstance'],{[it]},{[it]}).as('a0').has('PII.type').back('a0')
>> [0..<25].toList()}
>> at org.apache.atlas.discovery.EntityDiscoveryService.searchUsin
>> gDslQuery(EntityDiscoveryService.java:143)
>> at org.apache.atlas.web.rest.DiscoveryREST.searchUsingDSL(Disco
>> veryREST.java:94)
>>
>>
>>
>> On Wed, Dec 6, 2017 at 11:30 AM, Connie Chen <sp...@gmail.com>
>> wrote:
>>
>> Hi Madhan, thanks for looking. I changed the config properties but
>> getting the same error. I don't see the "Given type" error in the startup
>> anymore though:
>>
>>
>>
>> https://gist.github.com/connie-stripe/597e087433869036e63e5d
>> 8363d61bd3#file-taxonomy-enable-false
>>
>>
>>
>> I also tried an advanced search in the UI I think that was causing those
>> `Discovery query` errors. Let me know what you think, thanks
>>
>>
>>
>> Connie
>>
>>
>>
>> On Wed, Dec 6, 2017 at 11:00 AM, Madhan Neethiraj <ma...@apache.org>
>> wrote:
>>
>> Connie,
>>
>>
>>
>> The query text is correct; it works in my env. The log file shows
>> failures in bunch of other calls as well:
>>
>>   - com.sun.jersey.api.NotFoundException: null for uri:
>> http://atlas-server.service.consul:21000/api/atlas/discovery/search/basic
>>
>>   - com.sun.jersey.api.NotFoundException: null for uri:
>> http://atlas-server.service.consul:21000/api/atlas/v2/types/
>> typedefs/classification
>>
>>   - com.sun.jersey.api.NotFoundException: null for uri:
>> http://atlas-server.service.consul:21000/api/atlas/v2/discov
>> ery/search/attribute?attrName=dataType
>>
>>   - org.apache.atlas.exception.AtlasBaseException: Discovery query
>> failed L:{def r=(([]) as Set);def f1={GremlinPipeline x->x.as
>> ('theTrait').in().as('theInstance') [0..<25].select(['theTrait',
>> 'theInstance']).fill(r)};f1(g.V().has('__typeName','PII'));f
>> 1(g.V().has('__superTypeNames','PII'));r._().as('__tmp').
>> transform({((Row)it).getColumn('theTrait')}).as('
>> theTrait').back('__tmp').transform({((Row)it).getColumn('
>> theInstance')}).as('theInstance').select(['theTrait',
>> 'theInstance'],{[it]},{[it]}).as('a0').has('PII.dataType',T.'eq','example').back('a0')
>> [0..<25].toList()}
>>
>>   - org.apache.atlas.exception.AtlasBaseException: Discovery query
>> failed PII OR Metric
>>
>>   - org.apache.atlas.exception.AtlasBaseException: Discovery query
>> failed Column WHERE Column isa PII
>>
>>
>>
>> Log file shows a restart of Atlas running into the following error during
>> initialization: “Given type TaxonomyTerm already exists”. If taxonomy
>> feature (which is in tech-preview) is enabled, can you try after disabling
>> it? Please set the following configuration in atlas-application.properties:
>>
>>     atlas.feature.taxonomy.enable=false
>>
>>
>>
>> Madhan
>>
>>
>>
>> *From: *Nixon Rodrigues <ni...@freestoneinfotech.com>
>> *Reply-To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>> *Date: *Wednesday, December 6, 2017 at 1:04 AM
>> *To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>> *Subject: *Re: 500 returns when I try to basic search
>>
>>
>>
>> Connie,
>>
>>
>>
>> Can you try this json as the body, I think to search on attribute needs
>> to be added to in criterion attribute.
>>
>>
>>
>>  http://atlasUrl:21000/api/atlas/v2/search/basic method - post
>>
>>
>>
>> {
>>
>>     "excludeDeletedEntities": true,
>>
>>     "entityFilters": null,
>>
>>     "tagFilters": {
>>
>>       "criterion": [
>>
>>         {
>>
>>           "attributeName": "type",
>>
>>           "operator": "eq",
>>
>>           "attributeValue": "example"
>>
>>         }
>>
>>       ]
>>
>>     },
>>
>>     "attributes": [],
>>
>>     "limit": 25,
>>
>>     "offset": 0,
>>
>>     "classification": "PII"
>>
>>   }
>>
>>
>>
>>
>>
>> On Wed, Dec 6, 2017 at 11:50 AM, Connie Chen <sp...@gmail.com>
>> wrote:
>>
>> Hi Madhan, thanks for the fast response.
>>
>>
>>
>> I added the snippet of the application log that shows the stack trace
>> when I make the search request. https://gist.github.c
>> om/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277245
>>
>>
>>
>> I also added as much of the application log as I could in another file
>> https://gist.github.com/connie-stripe/597e087433869036e
>> 63e5d8363d61bd3#file-application-log
>>
>>
>>
>> Let me know if that helps, thanks!
>>
>> Connie
>>
>>
>>
>> On Tue, Dec 5, 2017 at 6:41 PM, Madhan Neethiraj <ma...@apache.org>
>> wrote:
>>
>> Connie,
>>
>>
>>
>> Thanks for the details provided on this issue. Classification definition
>> and basic-search REST API call details look good. To troubleshoot further,
>> can you add complete application.log file?
>>
>>
>>
>> Madhan
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *From: *Connie Chen <sp...@gmail.com>
>> *Reply-To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>> *Date: *Tuesday, December 5, 2017 at 5:17 PM
>> *To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>> *Subject: *500 returns when I try to basic search
>>
>>
>>
>> Hi, I am new to using Atlas and I am testing out the API to create my
>> data models. I've created a classification with a string attribute
>> "dataType" where "isIndexable" is set to true. However, I cannot figure out
>> how to query for a specific value via the API without getting a 500.
>>
>>
>>
>> Here is my configuration:
>>
>> https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3
>>
>>
>>
>> This is the field I am indexing on: https://gist.github.com/co
>> nnie-stripe/597e087433869036e63e5d8363d61bd3#file-gistfile1-txt-L22
>>
>>
>>
>> Here is the curl command I am running to try and retrieve a value where
>> that attribute field is a specific value: https://gist.github.com
>> /connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277045
>>
>>
>>
>> Then I am getting these logs back: https://gist.github.com/
>> connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277047
>>
>>
>>
>> Am I doing something wrong? Is there an easier way to debug these sorts
>> of errors? The stack trace hasn't been very helpful. Thanks!
>>
>>
>>
>> Connie
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>

Re: 500 returns when I try to basic search

Posted by Connie Chen <sp...@gmail.com>.
Hi Madhan, thanks for the response. It is still producing the same result.
Do you have any suggestions for where to debug this? It looks like it is in
the jersey layer, but where is that being controlled? thank you.

Connie

On Thu, Dec 7, 2017 at 7:58 PM, Madhan Neethiraj <ma...@apache.org> wrote:

> Connie,
>
>
>
> The error was due to missing request header: -H 'Content-Type:
> application/json'. Can you try the following?
>
>
>
> curl -iv -H 'Content-Type: application/json' -u admin:admin -X POST
> atlas-server/api/atlas/v2/search/basic -d '{
>
>    "excludeDeletedEntities": true,
>
>    "classification"        : "PII",
>
>    "query"                 : "",
>
>    "limit"                 : 50,
>
>    "offset"                : 0,
>
>    "entityFilters"         : null,
>
>    "tagFilters"            : {
>
>      "attributeName" : "pii_type",
>
>      "operator"      : "eq",
>
>      "attributeValue": "example"
>
>    },
>
>    "attributes": [""]
>
> }'
>
>
>
>
>
> Hope this helps.
>
>
>
> Madhan
>
>
>
>
>
>
>
> *From: *Connie Chen <sp...@gmail.com>
> *Reply-To: *"user@atlas.apache.org" <us...@atlas.apache.org>
> *Date: *Wednesday, December 6, 2017 at 11:38 AM
>
> *To: *"user@atlas.apache.org" <us...@atlas.apache.org>
> *Subject: *Re: 500 returns when I try to basic search
>
>
>
> I tried an example from the suggested queries applied to classification,
> like `PII PII.type="name"` and got this error
>
>
>
> 2017-12-06 19:36:35,743 ERROR - [pool-1-thread-7 - 4cdc2d8b-f710-4c59-9eb2-ef7560801a74:]
> ~ Error handling a request: e83408f35ae8fcd6 (ExceptionMapperUtil:32)
> org.apache.atlas.exception.AtlasBaseException: Discovery query failed
> L:{def r=(([]) as Set);def f1={GremlinPipeline x->x.as
> ('theTrait').in().as('theInstance') [0..<25].select(['theTrait',
> 'theInstance']).fill(r)};f1(g.V().has('__typeName','PII'));
> f1(g.V().has('__superTypeNames','PII'));r._().
> as('__tmp').transform({((Row)it).getColumn('theTrait')}).
> as('theTrait').back('__tmp').transform({((Row)it).
> getColumn('theInstance')}).as('theInstance').select(['theTrait',
> 'theInstance'],{[it]},{[it]}).as('a0').has('PII.type').back('a0')
> [0..<25].toList()}
> at org.apache.atlas.discovery.EntityDiscoveryService.searchUsingDslQuery(
> EntityDiscoveryService.java:143)
> at org.apache.atlas.web.rest.DiscoveryREST.searchUsingDSL(
> DiscoveryREST.java:94)
>
>
>
> On Wed, Dec 6, 2017 at 11:30 AM, Connie Chen <sp...@gmail.com>
> wrote:
>
> Hi Madhan, thanks for looking. I changed the config properties but getting
> the same error. I don't see the "Given type" error in the startup anymore
> though:
>
>
>
> https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61b
> d3#file-taxonomy-enable-false
>
>
>
> I also tried an advanced search in the UI I think that was causing those
> `Discovery query` errors. Let me know what you think, thanks
>
>
>
> Connie
>
>
>
> On Wed, Dec 6, 2017 at 11:00 AM, Madhan Neethiraj <ma...@apache.org>
> wrote:
>
> Connie,
>
>
>
> The query text is correct; it works in my env. The log file shows failures
> in bunch of other calls as well:
>
>   - com.sun.jersey.api.NotFoundException: null for uri:
> http://atlas-server.service.consul:21000/api/atlas/discovery/search/basic
>
>   - com.sun.jersey.api.NotFoundException: null for uri:
> http://atlas-server.service.consul:21000/api/atlas/v2/
> types/typedefs/classification
>
>   - com.sun.jersey.api.NotFoundException: null for uri:
> http://atlas-server.service.consul:21000/api/atlas/v2/
> discovery/search/attribute?attrName=dataType
>
>   - org.apache.atlas.exception.AtlasBaseException: Discovery query failed
> L:{def r=(([]) as Set);def f1={GremlinPipeline x->x.as
> ('theTrait').in().as('theInstance') [0..<25].select(['theTrait',
> 'theInstance']).fill(r)};f1(g.V().has('__typeName','PII'));
> f1(g.V().has('__superTypeNames','PII'));r._().
> as('__tmp').transform({((Row)it).getColumn('theTrait')}).
> as('theTrait').back('__tmp').transform({((Row)it).
> getColumn('theInstance')}).as('theInstance').select(['theTrait',
> 'theInstance'],{[it]},{[it]}).as('a0').has('PII.dataType',T.'eq','example').back('a0')
> [0..<25].toList()}
>
>   - org.apache.atlas.exception.AtlasBaseException: Discovery query failed
> PII OR Metric
>
>   - org.apache.atlas.exception.AtlasBaseException: Discovery query failed
> Column WHERE Column isa PII
>
>
>
> Log file shows a restart of Atlas running into the following error during
> initialization: “Given type TaxonomyTerm already exists”. If taxonomy
> feature (which is in tech-preview) is enabled, can you try after disabling
> it? Please set the following configuration in atlas-application.properties:
>
>     atlas.feature.taxonomy.enable=false
>
>
>
> Madhan
>
>
>
> *From: *Nixon Rodrigues <ni...@freestoneinfotech.com>
> *Reply-To: *"user@atlas.apache.org" <us...@atlas.apache.org>
> *Date: *Wednesday, December 6, 2017 at 1:04 AM
> *To: *"user@atlas.apache.org" <us...@atlas.apache.org>
> *Subject: *Re: 500 returns when I try to basic search
>
>
>
> Connie,
>
>
>
> Can you try this json as the body, I think to search on attribute needs to
> be added to in criterion attribute.
>
>
>
>  http://atlasUrl:21000/api/atlas/v2/search/basic method - post
>
>
>
> {
>
>     "excludeDeletedEntities": true,
>
>     "entityFilters": null,
>
>     "tagFilters": {
>
>       "criterion": [
>
>         {
>
>           "attributeName": "type",
>
>           "operator": "eq",
>
>           "attributeValue": "example"
>
>         }
>
>       ]
>
>     },
>
>     "attributes": [],
>
>     "limit": 25,
>
>     "offset": 0,
>
>     "classification": "PII"
>
>   }
>
>
>
>
>
> On Wed, Dec 6, 2017 at 11:50 AM, Connie Chen <sp...@gmail.com>
> wrote:
>
> Hi Madhan, thanks for the fast response.
>
>
>
> I added the snippet of the application log that shows the stack trace when
> I make the search request. https://gist.github.com/connie-stripe/
> 597e087433869036e63e5d8363d61bd3#gistcomment-2277245
>
>
>
> I also added as much of the application log as I could in another file
> https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61b
> d3#file-application-log
>
>
>
> Let me know if that helps, thanks!
>
> Connie
>
>
>
> On Tue, Dec 5, 2017 at 6:41 PM, Madhan Neethiraj <ma...@apache.org>
> wrote:
>
> Connie,
>
>
>
> Thanks for the details provided on this issue. Classification definition
> and basic-search REST API call details look good. To troubleshoot further,
> can you add complete application.log file?
>
>
>
> Madhan
>
>
>
>
>
>
>
>
>
> *From: *Connie Chen <sp...@gmail.com>
> *Reply-To: *"user@atlas.apache.org" <us...@atlas.apache.org>
> *Date: *Tuesday, December 5, 2017 at 5:17 PM
> *To: *"user@atlas.apache.org" <us...@atlas.apache.org>
> *Subject: *500 returns when I try to basic search
>
>
>
> Hi, I am new to using Atlas and I am testing out the API to create my data
> models. I've created a classification with a string attribute "dataType"
> where "isIndexable" is set to true. However, I cannot figure out how to
> query for a specific value via the API without getting a 500.
>
>
>
> Here is my configuration:
>
> https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3
>
>
>
> This is the field I am indexing on: https://gist.github.com/connie-stripe/
> 597e087433869036e63e5d8363d61bd3#file-gistfile1-txt-L22
>
>
>
> Here is the curl command I am running to try and retrieve a value where
> that attribute field is a specific value: https://gist.github.
> com/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277045
>
>
>
> Then I am getting these logs back: https://gist.github.com/connie-stripe/
> 597e087433869036e63e5d8363d61bd3#gistcomment-2277047
>
>
>
> Am I doing something wrong? Is there an easier way to debug these sorts of
> errors? The stack trace hasn't been very helpful. Thanks!
>
>
>
> Connie
>
>
>
>
>
>
>
>
>

Re: 500 returns when I try to basic search

Posted by Madhan Neethiraj <ma...@apache.org>.
Connie,

 

The error was due to missing request header: -H 'Content-Type: application/json'. Can you try the following?

 

curl -iv -H 'Content-Type: application/json' -u admin:admin -X POST atlas-server/api/atlas/v2/search/basic -d '{

   "excludeDeletedEntities": true,

   "classification"        : "PII",

   "query"                 : "",

   "limit"                 : 50,

   "offset"                : 0,

   "entityFilters"         : null,

   "tagFilters"            : {

     "attributeName" : "pii_type",

     "operator"      : "eq",

     "attributeValue": "example"

   },

   "attributes": [""]

 }'

 

 

Hope this helps.

 

Madhan

 

 

 

From: Connie Chen <sp...@gmail.com>
Reply-To: "user@atlas.apache.org" <us...@atlas.apache.org>
Date: Wednesday, December 6, 2017 at 11:38 AM
To: "user@atlas.apache.org" <us...@atlas.apache.org>
Subject: Re: 500 returns when I try to basic search

 

I tried an example from the suggested queries applied to classification, like `PII PII.type="name"` and got this error 

 

2017-12-06 19:36:35,743 ERROR - [pool-1-thread-7 - 4cdc2d8b-f710-4c59-9eb2-ef7560801a74:] ~ Error handling a request: e83408f35ae8fcd6 (ExceptionMapperUtil:32)
org.apache.atlas.exception.AtlasBaseException: Discovery query failed L:{def r=(([]) as Set);def f1={GremlinPipeline x->x.as('theTrait').in().as('theInstance') [0..<25].select(['theTrait', 'theInstance']).fill(r)};f1(g.V().has('__typeName','PII'));f1(g.V().has('__superTypeNames','PII'));r._().as('__tmp').transform({((Row)it).getColumn('theTrait')}).as('theTrait').back('__tmp').transform({((Row)it).getColumn('theInstance')}).as('theInstance').select(['theTrait', 'theInstance'],{[it]},{[it]}).as('a0').has('PII.type').back('a0') [0..<25].toList()}
at org.apache.atlas.discovery.EntityDiscoveryService.searchUsingDslQuery(EntityDiscoveryService.java:143)
at org.apache.atlas.web.rest.DiscoveryREST.searchUsingDSL(DiscoveryREST.java:94)

 

On Wed, Dec 6, 2017 at 11:30 AM, Connie Chen <sp...@gmail.com> wrote:

Hi Madhan, thanks for looking. I changed the config properties but getting the same error. I don't see the "Given type" error in the startup anymore though: 

 

https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#file-taxonomy-enable-false

 

I also tried an advanced search in the UI I think that was causing those `Discovery query` errors. Let me know what you think, thanks

 

Connie

 

On Wed, Dec 6, 2017 at 11:00 AM, Madhan Neethiraj <ma...@apache.org> wrote:

Connie,

 

The query text is correct; it works in my env. The log file shows failures in bunch of other calls as well:

  - com.sun.jersey.api.NotFoundException: null for uri: http://atlas-server.service.consul:21000/api/atlas/discovery/search/basic

  - com.sun.jersey.api.NotFoundException: null for uri: http://atlas-server.service.consul:21000/api/atlas/v2/types/typedefs/classification

  - com.sun.jersey.api.NotFoundException: null for uri: http://atlas-server.service.consul:21000/api/atlas/v2/discovery/search/attribute?attrName=dataType

  - org.apache.atlas.exception.AtlasBaseException: Discovery query failed L:{def r=(([]) as Set);def f1={GremlinPipeline x->x.as('theTrait').in().as('theInstance') [0..<25].select(['theTrait', 'theInstance']).fill(r)};f1(g.V().has('__typeName','PII'));f1(g.V().has('__superTypeNames','PII'));r._().as('__tmp').transform({((Row)it).getColumn('theTrait')}).as('theTrait').back('__tmp').transform({((Row)it).getColumn('theInstance')}).as('theInstance').select(['theTrait', 'theInstance'],{[it]},{[it]}).as('a0').has('PII.dataType',T.'eq','example').back('a0') [0..<25].toList()}

  - org.apache.atlas.exception.AtlasBaseException: Discovery query failed PII OR Metric

  - org.apache.atlas.exception.AtlasBaseException: Discovery query failed Column WHERE Column isa PII

 

Log file shows a restart of Atlas running into the following error during initialization: “Given type TaxonomyTerm already exists”. If taxonomy feature (which is in tech-preview) is enabled, can you try after disabling it? Please set the following configuration in atlas-application.properties:

    atlas.feature.taxonomy.enable=false

 

Madhan

 

From: Nixon Rodrigues <ni...@freestoneinfotech.com>
Reply-To: "user@atlas.apache.org" <us...@atlas.apache.org>
Date: Wednesday, December 6, 2017 at 1:04 AM
To: "user@atlas.apache.org" <us...@atlas.apache.org>
Subject: Re: 500 returns when I try to basic search

 

Connie,

 

Can you try this json as the body, I think to search on attribute needs to be added to in criterion attribute.

 

 http://atlasUrl:21000/api/atlas/v2/search/basic method - post

 

{

    "excludeDeletedEntities": true,

    "entityFilters": null,

    "tagFilters": {

      "criterion": [

        {

          "attributeName": "type",

          "operator": "eq",

          "attributeValue": "example"

        }

      ]

    },

    "attributes": [],

    "limit": 25,

    "offset": 0,

    "classification": "PII"

  }

 

 

On Wed, Dec 6, 2017 at 11:50 AM, Connie Chen <sp...@gmail.com> wrote:

Hi Madhan, thanks for the fast response.  

 

I added the snippet of the application log that shows the stack trace when I make the search request. https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277245

 

I also added as much of the application log as I could in another file https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#file-application-log

 

Let me know if that helps, thanks!

Connie

 

On Tue, Dec 5, 2017 at 6:41 PM, Madhan Neethiraj <ma...@apache.org> wrote:

Connie,

 

Thanks for the details provided on this issue. Classification definition and basic-search REST API call details look good. To troubleshoot further, can you add complete application.log file?

 

Madhan

 

 

 

 

From: Connie Chen <sp...@gmail.com>
Reply-To: "user@atlas.apache.org" <us...@atlas.apache.org>
Date: Tuesday, December 5, 2017 at 5:17 PM
To: "user@atlas.apache.org" <us...@atlas.apache.org>
Subject: 500 returns when I try to basic search

 

Hi, I am new to using Atlas and I am testing out the API to create my data models. I've created a classification with a string attribute "dataType" where "isIndexable" is set to true. However, I cannot figure out how to query for a specific value via the API without getting a 500.  

 

Here is my configuration:

https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3

 

This is the field I am indexing on: https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#file-gistfile1-txt-L22

 

Here is the curl command I am running to try and retrieve a value where that attribute field is a specific value: https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277045

 

Then I am getting these logs back: https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277047

 

Am I doing something wrong? Is there an easier way to debug these sorts of errors? The stack trace hasn't been very helpful. Thanks!

 

Connie

 

 

 

 


Re: 500 returns when I try to basic search

Posted by Connie Chen <sp...@gmail.com>.
I tried an example from the suggested queries applied to classification,
like `PII PII.type="name"` and got this error

2017-12-06 19:36:35,743 ERROR - [pool-1-thread-7 -
> 4cdc2d8b-f710-4c59-9eb2-ef7560801a74:] ~ Error handling a request:
> e83408f35ae8fcd6 (ExceptionMapperUtil:32)
> org.apache.atlas.exception.AtlasBaseException: Discovery query failed
> L:{def r=(([]) as Set);def f1={GremlinPipeline x->x.as('theTrait').in().as('theInstance')
> [0..<25].select(['theTrait',
> 'theInstance']).fill(r)};f1(g.V().has('__typeName','PII'));f1(g.V().has('__superTypeNames','PII'));r._().as('__tmp').transform({((Row)it).getColumn('theTrait')}).as('theTrait').back('__tmp').transform({((Row)it).getColumn('theInstance')}).as('theInstance').select(['theTrait',
> 'theInstance'],{[it]},{[it]}).as('a0').has('PII.type').back('a0')
> [0..<25].toList()}
> at
> org.apache.atlas.discovery.EntityDiscoveryService.searchUsingDslQuery(EntityDiscoveryService.java:143)
> at
> org.apache.atlas.web.rest.DiscoveryREST.searchUsingDSL(DiscoveryREST.java:94)


On Wed, Dec 6, 2017 at 11:30 AM, Connie Chen <sp...@gmail.com> wrote:

> Hi Madhan, thanks for looking. I changed the config properties but getting
> the same error. I don't see the "Given type" error in the startup anymore
> though:
>
> https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61b
> d3#file-taxonomy-enable-false
>
> I also tried an advanced search in the UI I think that was causing those
> `Discovery query` errors. Let me know what you think, thanks
>
> Connie
>
> On Wed, Dec 6, 2017 at 11:00 AM, Madhan Neethiraj <ma...@apache.org>
> wrote:
>
>> Connie,
>>
>>
>>
>> The query text is correct; it works in my env. The log file shows
>> failures in bunch of other calls as well:
>>
>>   - com.sun.jersey.api.NotFoundException: null for uri:
>> http://atlas-server.service.consul:21000/api/atlas/discovery/search/basic
>>
>>   - com.sun.jersey.api.NotFoundException: null for uri:
>> http://atlas-server.service.consul:21000/api/atlas/v2/types/
>> typedefs/classification
>>
>>   - com.sun.jersey.api.NotFoundException: null for uri:
>> http://atlas-server.service.consul:21000/api/atlas/v2/discov
>> ery/search/attribute?attrName=dataType
>>
>>   - org.apache.atlas.exception.AtlasBaseException: Discovery query
>> failed L:{def r=(([]) as Set);def f1={GremlinPipeline x->x.as
>> ('theTrait').in().as('theInstance') [0..<25].select(['theTrait',
>> 'theInstance']).fill(r)};f1(g.V().has('__typeName','PII'));f
>> 1(g.V().has('__superTypeNames','PII'));r._().as('__tmp').
>> transform({((Row)it).getColumn('theTrait')}).as('
>> theTrait').back('__tmp').transform({((Row)it).getColumn('
>> theInstance')}).as('theInstance').select(['theTrait',
>> 'theInstance'],{[it]},{[it]}).as('a0').has('PII.dataType',T.'eq','example').back('a0')
>> [0..<25].toList()}
>>
>>   - org.apache.atlas.exception.AtlasBaseException: Discovery query
>> failed PII OR Metric
>>
>>   - org.apache.atlas.exception.AtlasBaseException: Discovery query
>> failed Column WHERE Column isa PII
>>
>>
>>
>> Log file shows a restart of Atlas running into the following error during
>> initialization: “Given type TaxonomyTerm already exists”. If taxonomy
>> feature (which is in tech-preview) is enabled, can you try after disabling
>> it? Please set the following configuration in atlas-application.properties:
>>
>>     atlas.feature.taxonomy.enable=false
>>
>>
>>
>> Madhan
>>
>>
>>
>> *From: *Nixon Rodrigues <ni...@freestoneinfotech.com>
>> *Reply-To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>> *Date: *Wednesday, December 6, 2017 at 1:04 AM
>> *To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>> *Subject: *Re: 500 returns when I try to basic search
>>
>>
>>
>> Connie,
>>
>>
>>
>> Can you try this json as the body, I think to search on attribute needs
>> to be added to in criterion attribute.
>>
>>
>>
>>  http://atlasUrl:21000/api/atlas/v2/search/basic method - post
>>
>>
>>
>> {
>>
>>     "excludeDeletedEntities": true,
>>
>>     "entityFilters": null,
>>
>>     "tagFilters": {
>>
>>       "criterion": [
>>
>>         {
>>
>>           "attributeName": "type",
>>
>>           "operator": "eq",
>>
>>           "attributeValue": "example"
>>
>>         }
>>
>>       ]
>>
>>     },
>>
>>     "attributes": [],
>>
>>     "limit": 25,
>>
>>     "offset": 0,
>>
>>     "classification": "PII"
>>
>>   }
>>
>>
>>
>>
>>
>> On Wed, Dec 6, 2017 at 11:50 AM, Connie Chen <sp...@gmail.com>
>> wrote:
>>
>> Hi Madhan, thanks for the fast response.
>>
>>
>>
>> I added the snippet of the application log that shows the stack trace
>> when I make the search request. https://gist.github.c
>> om/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277245
>>
>>
>>
>> I also added as much of the application log as I could in another file
>> https://gist.github.com/connie-stripe/597e087433869036e
>> 63e5d8363d61bd3#file-application-log
>>
>>
>>
>> Let me know if that helps, thanks!
>>
>> Connie
>>
>>
>>
>> On Tue, Dec 5, 2017 at 6:41 PM, Madhan Neethiraj <ma...@apache.org>
>> wrote:
>>
>> Connie,
>>
>>
>>
>> Thanks for the details provided on this issue. Classification definition
>> and basic-search REST API call details look good. To troubleshoot further,
>> can you add complete application.log file?
>>
>>
>>
>> Madhan
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *From: *Connie Chen <sp...@gmail.com>
>> *Reply-To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>> *Date: *Tuesday, December 5, 2017 at 5:17 PM
>> *To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>> *Subject: *500 returns when I try to basic search
>>
>>
>>
>> Hi, I am new to using Atlas and I am testing out the API to create my
>> data models. I've created a classification with a string attribute
>> "dataType" where "isIndexable" is set to true. However, I cannot figure out
>> how to query for a specific value via the API without getting a 500.
>>
>>
>>
>> Here is my configuration:
>>
>> https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3
>>
>>
>>
>> This is the field I am indexing on: https://gist.github.com/co
>> nnie-stripe/597e087433869036e63e5d8363d61bd3#file-gistfile1-txt-L22
>>
>>
>>
>> Here is the curl command I am running to try and retrieve a value where
>> that attribute field is a specific value: https://gist.github.com
>> /connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277045
>>
>>
>>
>> Then I am getting these logs back: https://gist.github.com/
>> connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277047
>>
>>
>>
>> Am I doing something wrong? Is there an easier way to debug these sorts
>> of errors? The stack trace hasn't been very helpful. Thanks!
>>
>>
>>
>> Connie
>>
>>
>>
>>
>>
>
>

Re: 500 returns when I try to basic search

Posted by Connie Chen <sp...@gmail.com>.
Hi Madhan, thanks for looking. I changed the config properties but getting
the same error. I don't see the "Given type" error in the startup anymore
though:

https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#file-taxonomy-enable-false

I also tried an advanced search in the UI I think that was causing those
`Discovery query` errors. Let me know what you think, thanks

Connie

On Wed, Dec 6, 2017 at 11:00 AM, Madhan Neethiraj <ma...@apache.org> wrote:

> Connie,
>
>
>
> The query text is correct; it works in my env. The log file shows failures
> in bunch of other calls as well:
>
>   - com.sun.jersey.api.NotFoundException: null for uri:
> http://atlas-server.service.consul:21000/api/atlas/discovery/search/basic
>
>   - com.sun.jersey.api.NotFoundException: null for uri:
> http://atlas-server.service.consul:21000/api/atlas/v2/
> types/typedefs/classification
>
>   - com.sun.jersey.api.NotFoundException: null for uri:
> http://atlas-server.service.consul:21000/api/atlas/v2/
> discovery/search/attribute?attrName=dataType
>
>   - org.apache.atlas.exception.AtlasBaseException: Discovery query failed
> L:{def r=(([]) as Set);def f1={GremlinPipeline x->x.as
> ('theTrait').in().as('theInstance') [0..<25].select(['theTrait',
> 'theInstance']).fill(r)};f1(g.V().has('__typeName','PII'));
> f1(g.V().has('__superTypeNames','PII'));r._().
> as('__tmp').transform({((Row)it).getColumn('theTrait')}).
> as('theTrait').back('__tmp').transform({((Row)it).
> getColumn('theInstance')}).as('theInstance').select(['theTrait',
> 'theInstance'],{[it]},{[it]}).as('a0').has('PII.dataType',T.'eq','example').back('a0')
> [0..<25].toList()}
>
>   - org.apache.atlas.exception.AtlasBaseException: Discovery query failed
> PII OR Metric
>
>   - org.apache.atlas.exception.AtlasBaseException: Discovery query failed
> Column WHERE Column isa PII
>
>
>
> Log file shows a restart of Atlas running into the following error during
> initialization: “Given type TaxonomyTerm already exists”. If taxonomy
> feature (which is in tech-preview) is enabled, can you try after disabling
> it? Please set the following configuration in atlas-application.properties:
>
>     atlas.feature.taxonomy.enable=false
>
>
>
> Madhan
>
>
>
> *From: *Nixon Rodrigues <ni...@freestoneinfotech.com>
> *Reply-To: *"user@atlas.apache.org" <us...@atlas.apache.org>
> *Date: *Wednesday, December 6, 2017 at 1:04 AM
> *To: *"user@atlas.apache.org" <us...@atlas.apache.org>
> *Subject: *Re: 500 returns when I try to basic search
>
>
>
> Connie,
>
>
>
> Can you try this json as the body, I think to search on attribute needs to
> be added to in criterion attribute.
>
>
>
>  http://atlasUrl:21000/api/atlas/v2/search/basic method - post
>
>
>
> {
>
>     "excludeDeletedEntities": true,
>
>     "entityFilters": null,
>
>     "tagFilters": {
>
>       "criterion": [
>
>         {
>
>           "attributeName": "type",
>
>           "operator": "eq",
>
>           "attributeValue": "example"
>
>         }
>
>       ]
>
>     },
>
>     "attributes": [],
>
>     "limit": 25,
>
>     "offset": 0,
>
>     "classification": "PII"
>
>   }
>
>
>
>
>
> On Wed, Dec 6, 2017 at 11:50 AM, Connie Chen <sp...@gmail.com>
> wrote:
>
> Hi Madhan, thanks for the fast response.
>
>
>
> I added the snippet of the application log that shows the stack trace when
> I make the search request. https://gist.github.com/connie-stripe/
> 597e087433869036e63e5d8363d61bd3#gistcomment-2277245
>
>
>
> I also added as much of the application log as I could in another file
> https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61b
> d3#file-application-log
>
>
>
> Let me know if that helps, thanks!
>
> Connie
>
>
>
> On Tue, Dec 5, 2017 at 6:41 PM, Madhan Neethiraj <ma...@apache.org>
> wrote:
>
> Connie,
>
>
>
> Thanks for the details provided on this issue. Classification definition
> and basic-search REST API call details look good. To troubleshoot further,
> can you add complete application.log file?
>
>
>
> Madhan
>
>
>
>
>
>
>
>
>
> *From: *Connie Chen <sp...@gmail.com>
> *Reply-To: *"user@atlas.apache.org" <us...@atlas.apache.org>
> *Date: *Tuesday, December 5, 2017 at 5:17 PM
> *To: *"user@atlas.apache.org" <us...@atlas.apache.org>
> *Subject: *500 returns when I try to basic search
>
>
>
> Hi, I am new to using Atlas and I am testing out the API to create my data
> models. I've created a classification with a string attribute "dataType"
> where "isIndexable" is set to true. However, I cannot figure out how to
> query for a specific value via the API without getting a 500.
>
>
>
> Here is my configuration:
>
> https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3
>
>
>
> This is the field I am indexing on: https://gist.github.com/connie-stripe/
> 597e087433869036e63e5d8363d61bd3#file-gistfile1-txt-L22
>
>
>
> Here is the curl command I am running to try and retrieve a value where
> that attribute field is a specific value: https://gist.github.
> com/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277045
>
>
>
> Then I am getting these logs back: https://gist.github.com/connie-stripe/
> 597e087433869036e63e5d8363d61bd3#gistcomment-2277047
>
>
>
> Am I doing something wrong? Is there an easier way to debug these sorts of
> errors? The stack trace hasn't been very helpful. Thanks!
>
>
>
> Connie
>
>
>
>
>

Re: 500 returns when I try to basic search

Posted by Madhan Neethiraj <ma...@apache.org>.
Connie,

 

The query text is correct; it works in my env. The log file shows failures in bunch of other calls as well:

  - com.sun.jersey.api.NotFoundException: null for uri: http://atlas-server.service.consul:21000/api/atlas/discovery/search/basic

  - com.sun.jersey.api.NotFoundException: null for uri: http://atlas-server.service.consul:21000/api/atlas/v2/types/typedefs/classification

  - com.sun.jersey.api.NotFoundException: null for uri: http://atlas-server.service.consul:21000/api/atlas/v2/discovery/search/attribute?attrName=dataType

  - org.apache.atlas.exception.AtlasBaseException: Discovery query failed L:{def r=(([]) as Set);def f1={GremlinPipeline x->x.as('theTrait').in().as('theInstance') [0..<25].select(['theTrait', 'theInstance']).fill(r)};f1(g.V().has('__typeName','PII'));f1(g.V().has('__superTypeNames','PII'));r._().as('__tmp').transform({((Row)it).getColumn('theTrait')}).as('theTrait').back('__tmp').transform({((Row)it).getColumn('theInstance')}).as('theInstance').select(['theTrait', 'theInstance'],{[it]},{[it]}).as('a0').has('PII.dataType',T.'eq','example').back('a0') [0..<25].toList()}

  - org.apache.atlas.exception.AtlasBaseException: Discovery query failed PII OR Metric

  - org.apache.atlas.exception.AtlasBaseException: Discovery query failed Column WHERE Column isa PII

 

Log file shows a restart of Atlas running into the following error during initialization: “Given type TaxonomyTerm already exists”. If taxonomy feature (which is in tech-preview) is enabled, can you try after disabling it? Please set the following configuration in atlas-application.properties:

    atlas.feature.taxonomy.enable=false

 

Madhan

 

From: Nixon Rodrigues <ni...@freestoneinfotech.com>
Reply-To: "user@atlas.apache.org" <us...@atlas.apache.org>
Date: Wednesday, December 6, 2017 at 1:04 AM
To: "user@atlas.apache.org" <us...@atlas.apache.org>
Subject: Re: 500 returns when I try to basic search

 

Connie,

 

Can you try this json as the body, I think to search on attribute needs to be added to in criterion attribute.

 

 http://atlasUrl:21000/api/atlas/v2/search/basic method - post

 

{

    "excludeDeletedEntities": true,

    "entityFilters": null,

    "tagFilters": {

      "criterion": [

        {

          "attributeName": "type",

          "operator": "eq",

          "attributeValue": "example"

        }

      ]

    },

    "attributes": [],

    "limit": 25,

    "offset": 0,

    "classification": "PII"

  }

 

 

On Wed, Dec 6, 2017 at 11:50 AM, Connie Chen <sp...@gmail.com> wrote:

Hi Madhan, thanks for the fast response.  

 

I added the snippet of the application log that shows the stack trace when I make the search request. https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277245

 

I also added as much of the application log as I could in another file https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#file-application-log

 

Let me know if that helps, thanks!

Connie

 

On Tue, Dec 5, 2017 at 6:41 PM, Madhan Neethiraj <ma...@apache.org> wrote:

Connie,

 

Thanks for the details provided on this issue. Classification definition and basic-search REST API call details look good. To troubleshoot further, can you add complete application.log file?

 

Madhan

 

 

 

 

From: Connie Chen <sp...@gmail.com>
Reply-To: "user@atlas.apache.org" <us...@atlas.apache.org>
Date: Tuesday, December 5, 2017 at 5:17 PM
To: "user@atlas.apache.org" <us...@atlas.apache.org>
Subject: 500 returns when I try to basic search

 

Hi, I am new to using Atlas and I am testing out the API to create my data models. I've created a classification with a string attribute "dataType" where "isIndexable" is set to true. However, I cannot figure out how to query for a specific value via the API without getting a 500.  

 

Here is my configuration:

https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3

 

This is the field I am indexing on: https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#file-gistfile1-txt-L22

 

Here is the curl command I am running to try and retrieve a value where that attribute field is a specific value: https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277045

 

Then I am getting these logs back: https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277047

 

Am I doing something wrong? Is there an easier way to debug these sorts of errors? The stack trace hasn't been very helpful. Thanks!

 

Connie

 

 


Re: 500 returns when I try to basic search

Posted by Connie Chen <sp...@gmail.com>.
Hi Nixon, thanks for the response. I am still getting the same error

2017-12-06 18:43:27,508 ERROR - [pool-1-thread-6 -
> 0b9d94fa-c40a-4689-a106-28e00161d8ab:] ~ Error handling a request:
> 7cf35990f7e47cfc (ExceptionMapperUtil:32)
> javax.ws.rs.WebApplicationException
> at
> com.sun.jersey.server.impl.uri.rules.TerminatingRule.accept(TerminatingRule.java:66)
> at
> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
> at
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)


Is it possible that sub-attributes within a classification don't work? I
would actually like to have that attribute type be an `array<enum>` but not
sure how to get it working with just a simple type.

Connie

On Wed, Dec 6, 2017 at 1:03 AM, Nixon Rodrigues <
nixon.rodrigues@freestoneinfotech.com> wrote:

> Connie,
>
> Can you try this json as the body, I think to search on attribute needs to
> be added to in criterion attribute.
>
>  http://atlasUrl:21000/api/atlas/v2/search/basic method - post
>
> {
>     "excludeDeletedEntities": true,
>     "entityFilters": null,
>     "tagFilters": {
>       "criterion": [
>         {
>           "attributeName": "type",
>           "operator": "eq",
>           "attributeValue": "example"
>         }
>       ]
>     },
>     "attributes": [],
>     "limit": 25,
>     "offset": 0,
>     "classification": "PII"
>   }
>
>
> On Wed, Dec 6, 2017 at 11:50 AM, Connie Chen <sp...@gmail.com>
> wrote:
>
>> Hi Madhan, thanks for the fast response.
>>
>> I added the snippet of the application log that shows the stack trace
>> when I make the search request. https://gist.github.c
>> om/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277245
>>
>> I also added as much of the application log as I could in another file
>> https://gist.github.com/connie-stripe/597e087433869036e
>> 63e5d8363d61bd3#file-application-log
>>
>> Let me know if that helps, thanks!
>>
>> Connie
>>
>> On Tue, Dec 5, 2017 at 6:41 PM, Madhan Neethiraj <ma...@apache.org>
>> wrote:
>>
>>> Connie,
>>>
>>>
>>>
>>> Thanks for the details provided on this issue. Classification definition
>>> and basic-search REST API call details look good. To troubleshoot further,
>>> can you add complete application.log file?
>>>
>>>
>>>
>>> Madhan
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *From: *Connie Chen <sp...@gmail.com>
>>> *Reply-To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>>> *Date: *Tuesday, December 5, 2017 at 5:17 PM
>>> *To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>>> *Subject: *500 returns when I try to basic search
>>>
>>>
>>>
>>> Hi, I am new to using Atlas and I am testing out the API to create my
>>> data models. I've created a classification with a string attribute
>>> "dataType" where "isIndexable" is set to true. However, I cannot figure out
>>> how to query for a specific value via the API without getting a 500.
>>>
>>>
>>>
>>> Here is my configuration:
>>>
>>> https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3
>>>
>>>
>>>
>>> This is the field I am indexing on: https://gist.github.com/co
>>> nnie-stripe/597e087433869036e63e5d8363d61bd3#file-gistfile1-txt-L22
>>>
>>>
>>>
>>> Here is the curl command I am running to try and retrieve a value where
>>> that attribute field is a specific value: https://gist.github.com
>>> /connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277045
>>>
>>>
>>>
>>> Then I am getting these logs back: https://gist.github.com/
>>> connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277047
>>>
>>>
>>>
>>> Am I doing something wrong? Is there an easier way to debug these sorts
>>> of errors? The stack trace hasn't been very helpful. Thanks!
>>>
>>>
>>>
>>> Connie
>>>
>>
>>
>

Re: 500 returns when I try to basic search

Posted by Nixon Rodrigues <ni...@freestoneinfotech.com>.
Connie,

Can you try this json as the body, I think to search on attribute needs to
be added to in criterion attribute.

 http://atlasUrl:21000/api/atlas/v2/search/basic method - post

{
    "excludeDeletedEntities": true,
    "entityFilters": null,
    "tagFilters": {
      "criterion": [
        {
          "attributeName": "type",
          "operator": "eq",
          "attributeValue": "example"
        }
      ]
    },
    "attributes": [],
    "limit": 25,
    "offset": 0,
    "classification": "PII"
  }


On Wed, Dec 6, 2017 at 11:50 AM, Connie Chen <sp...@gmail.com> wrote:

> Hi Madhan, thanks for the fast response.
>
> I added the snippet of the application log that shows the stack trace when
> I make the search request. https://gist.github.com/connie-stripe/
> 597e087433869036e63e5d8363d61bd3#gistcomment-2277245
>
> I also added as much of the application log as I could in another file
> https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61b
> d3#file-application-log
>
> Let me know if that helps, thanks!
>
> Connie
>
> On Tue, Dec 5, 2017 at 6:41 PM, Madhan Neethiraj <ma...@apache.org>
> wrote:
>
>> Connie,
>>
>>
>>
>> Thanks for the details provided on this issue. Classification definition
>> and basic-search REST API call details look good. To troubleshoot further,
>> can you add complete application.log file?
>>
>>
>>
>> Madhan
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *From: *Connie Chen <sp...@gmail.com>
>> *Reply-To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>> *Date: *Tuesday, December 5, 2017 at 5:17 PM
>> *To: *"user@atlas.apache.org" <us...@atlas.apache.org>
>> *Subject: *500 returns when I try to basic search
>>
>>
>>
>> Hi, I am new to using Atlas and I am testing out the API to create my
>> data models. I've created a classification with a string attribute
>> "dataType" where "isIndexable" is set to true. However, I cannot figure out
>> how to query for a specific value via the API without getting a 500.
>>
>>
>>
>> Here is my configuration:
>>
>> https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3
>>
>>
>>
>> This is the field I am indexing on: https://gist.github.com/co
>> nnie-stripe/597e087433869036e63e5d8363d61bd3#file-gistfile1-txt-L22
>>
>>
>>
>> Here is the curl command I am running to try and retrieve a value where
>> that attribute field is a specific value: https://gist.github.com
>> /connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277045
>>
>>
>>
>> Then I am getting these logs back: https://gist.github.com/
>> connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277047
>>
>>
>>
>> Am I doing something wrong? Is there an easier way to debug these sorts
>> of errors? The stack trace hasn't been very helpful. Thanks!
>>
>>
>>
>> Connie
>>
>
>

Re: 500 returns when I try to basic search

Posted by Connie Chen <sp...@gmail.com>.
Hi Madhan, thanks for the fast response.

I added the snippet of the application log that shows the stack trace when
I make the search request.
https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277245

I also added as much of the application log as I could in another file
https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#file-application-log

Let me know if that helps, thanks!

Connie

On Tue, Dec 5, 2017 at 6:41 PM, Madhan Neethiraj <ma...@apache.org> wrote:

> Connie,
>
>
>
> Thanks for the details provided on this issue. Classification definition
> and basic-search REST API call details look good. To troubleshoot further,
> can you add complete application.log file?
>
>
>
> Madhan
>
>
>
>
>
>
>
>
>
> *From: *Connie Chen <sp...@gmail.com>
> *Reply-To: *"user@atlas.apache.org" <us...@atlas.apache.org>
> *Date: *Tuesday, December 5, 2017 at 5:17 PM
> *To: *"user@atlas.apache.org" <us...@atlas.apache.org>
> *Subject: *500 returns when I try to basic search
>
>
>
> Hi, I am new to using Atlas and I am testing out the API to create my data
> models. I've created a classification with a string attribute "dataType"
> where "isIndexable" is set to true. However, I cannot figure out how to
> query for a specific value via the API without getting a 500.
>
>
>
> Here is my configuration:
>
> https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3
>
>
>
> This is the field I am indexing on: https://gist.github.com/connie-stripe/
> 597e087433869036e63e5d8363d61bd3#file-gistfile1-txt-L22
>
>
>
> Here is the curl command I am running to try and retrieve a value where
> that attribute field is a specific value: https://gist.github.
> com/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277045
>
>
>
> Then I am getting these logs back: https://gist.github.com/connie-stripe/
> 597e087433869036e63e5d8363d61bd3#gistcomment-2277047
>
>
>
> Am I doing something wrong? Is there an easier way to debug these sorts of
> errors? The stack trace hasn't been very helpful. Thanks!
>
>
>
> Connie
>

Re: 500 returns when I try to basic search

Posted by Madhan Neethiraj <ma...@apache.org>.
Connie,

 

Thanks for the details provided on this issue. Classification definition and basic-search REST API call details look good. To troubleshoot further, can you add complete application.log file?

 

Madhan

 

 

 

 

From: Connie Chen <sp...@gmail.com>
Reply-To: "user@atlas.apache.org" <us...@atlas.apache.org>
Date: Tuesday, December 5, 2017 at 5:17 PM
To: "user@atlas.apache.org" <us...@atlas.apache.org>
Subject: 500 returns when I try to basic search

 

Hi, I am new to using Atlas and I am testing out the API to create my data models. I've created a classification with a string attribute "dataType" where "isIndexable" is set to true. However, I cannot figure out how to query for a specific value via the API without getting a 500.  

 

Here is my configuration:

https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3

 

This is the field I am indexing on: https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#file-gistfile1-txt-L22

 

Here is the curl command I am running to try and retrieve a value where that attribute field is a specific value: https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277045

 

Then I am getting these logs back: https://gist.github.com/connie-stripe/597e087433869036e63e5d8363d61bd3#gistcomment-2277047

 

Am I doing something wrong? Is there an easier way to debug these sorts of errors? The stack trace hasn't been very helpful. Thanks!

 

Connie