<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Apache Atlas Rest API post and get command taking a long time to execute in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-Atlas-Rest-API-post-and-get-command-taking-a-long/m-p/143914#M56489</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/14607/subashsharma.html" nodeid="14607"&gt;@subash sharma&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Glad that the issue is resolved. Please close the loop by accepting the answer.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Mar 2017 14:35:57 GMT</pubDate>
    <dc:creator>apathan</dc:creator>
    <dc:date>2017-03-15T14:35:57Z</dc:date>
    <item>
      <title>Apache Atlas Rest API post and get command taking a long time to execute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-Atlas-Rest-API-post-and-get-command-taking-a-long/m-p/143910#M56485</link>
      <description>&lt;P&gt;I am running a python script to associate an Attribute to a tag (one at a time because of GUID Constraint) and i have to tag around 3k attributes on daily basis. My script functions in below manner :&lt;/P&gt;&lt;P&gt;Run get command on a table and fetch GUID's of all columns available in the table, (i am using DSL Search here)&lt;/P&gt;&lt;PRE&gt;get_tables= requests.get(hostname +'/api/atlas/discovery/search/dsl?query=hive_table+where+name=%27'+tab+'%27and+__state=%27ACTIVE%27', headers={"Content-Type": "application/json","Accept": "application/json"}, auth=('username','password'))&lt;/PRE&gt;&lt;P style="margin-left: 40px;"&gt;&lt;/P&gt;&lt;P&gt;Check whether the columns are tagged or not, If a column is not tagged, Fetch the GUID of that column and run a post command to associate it with a tag.&lt;/P&gt;&lt;PRE&gt;post_tag=requests.post((hostname+'/api/atlas/entities/'+guid+'/traits'), auth=(username ,password),json={ "typeName": "tag_name", "values": {}, "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Struct" },headers = {"Content-Type": "application/json","Accept": "application/json"})&lt;/PRE&gt;&lt;P&gt;Once the tag is associated, I am closing the HTTP connection.&lt;/P&gt;&lt;PRE&gt;get_tables.close()

post_tag.close()&lt;/PRE&gt;&lt;P&gt;Now each of the API post call is taking more than 30 seconds to execute (which is not good) :(. Can someone please let me know an efficient method to tag attributes.&lt;/P&gt;&lt;P&gt;Thank you in advance,&lt;/P&gt;&lt;P&gt;Subash &lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 02:40:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-Atlas-Rest-API-post-and-get-command-taking-a-long/m-p/143910#M56485</guid>
      <dc:creator>subash_sharma</dc:creator>
      <dc:date>2017-03-08T02:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Atlas Rest API post and get command taking a long time to execute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-Atlas-Rest-API-post-and-get-command-taking-a-long/m-p/143911#M56486</link>
      <description>&lt;P&gt;A2A &lt;A rel="user" href="https://community.cloudera.com/users/40/apathan.html" nodeid="40"&gt;@Ayub Khan&lt;/A&gt; and &lt;A rel="user" href="https://community.cloudera.com/users/15067/sshivaprasad.html" nodeid="15067"&gt;@sshivaprasad&lt;/A&gt;. Thanks guys.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 02:03:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-Atlas-Rest-API-post-and-get-command-taking-a-long/m-p/143911#M56486</guid>
      <dc:creator>VR46</dc:creator>
      <dc:date>2017-03-09T02:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Atlas Rest API post and get command taking a long time to execute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-Atlas-Rest-API-post-and-get-command-taking-a-long/m-p/143912#M56487</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/14607/subashsharma.html" nodeid="14607"&gt;@subash sharma&lt;/A&gt; Do you see any debug logging in the application log while this POST commands are executed? could you please share the debug logs?&lt;/P&gt;&lt;P&gt;Also, are you executing this POST command from the same machine as the atlas is running? This might also be happening due to network delay. I would recommend to do such bulk operations from the same machine as Atlas to avoid any network delays.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 14:12:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-Atlas-Rest-API-post-and-get-command-taking-a-long/m-p/143912#M56487</guid>
      <dc:creator>apathan</dc:creator>
      <dc:date>2017-03-15T14:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Atlas Rest API post and get command taking a long time to execute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-Atlas-Rest-API-post-and-get-command-taking-a-long/m-p/143913#M56488</link>
      <description>&lt;P&gt;Sure &lt;A rel="user" href="https://community.cloudera.com/users/40/apathan.html" nodeid="40"&gt;@Ayub Khan&lt;/A&gt;, We were able to resolve the issue by Restarting Apache Atlas (To close All Web Connections) and Multi-Processing to execute REST API command&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 14:33:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-Atlas-Rest-API-post-and-get-command-taking-a-long/m-p/143913#M56488</guid>
      <dc:creator>subash_sharma</dc:creator>
      <dc:date>2017-03-15T14:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Atlas Rest API post and get command taking a long time to execute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-Atlas-Rest-API-post-and-get-command-taking-a-long/m-p/143914#M56489</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/14607/subashsharma.html" nodeid="14607"&gt;@subash sharma&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Glad that the issue is resolved. Please close the loop by accepting the answer.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 14:35:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-Atlas-Rest-API-post-and-get-command-taking-a-long/m-p/143914#M56489</guid>
      <dc:creator>apathan</dc:creator>
      <dc:date>2017-03-15T14:35:57Z</dc:date>
    </item>
  </channel>
</rss>

