<?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: Entity ID generation in Navigator in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Entity-ID-generation-in-Navigator/m-p/48296#M29041</link>
    <description>&lt;P&gt;Thanks for the info.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't have a real need to generate ids this way at the moment -- mostly I was just curious how it was done. I'd seen the parent link in navigator from an HDFS entity to its parent and figured you must be generating that functionally from other available info since the parent ID isn't part of the entity payload (later I realized the page could probably just&amp;nbsp;be using a relation query to get it). Also, I was wondering whether I could create custom entities without using the java plugin.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been using the api as you suggest and for the most part I've found what I've needed between the docs, the sdk code, and a fair amount of experimentation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 03 Dec 2016 00:48:21 GMT</pubDate>
    <dc:creator>geochap</dc:creator>
    <dc:date>2016-12-03T00:48:21Z</dc:date>
    <item>
      <title>Entity ID generation in Navigator</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Entity-ID-generation-in-Navigator/m-p/47678#M29038</link>
      <description>&lt;P&gt;The entity indentity field returned via Navigator API calls appears to be a MD5 hash of key entity fields. E.g. from looking at the navigator SDK source an HDFS entity's identity should be the hash of the sourceId and the fileSystemPath (separated by ##):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="https://github.com/cloudera/navigator-sdk/blob/master/model/src/main/java/com/cloudera/nav/sdk/model/HdfsIdGenerator.java#L30" href="https://github.com/cloudera/navigator-sdk/blob/master/model/src/main/java/com/cloudera/nav/sdk/model/HdfsIdGenerator.java#L30" target="_self"&gt;https://github.com/cloudera/navigator-sdk/blob/master/model/src/main/java/com/cloudera/nav/sdk/model/HdfsIdGenerator.java#L30&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if I try to reproduce a sample entity's identity value using that approach I can't get the same identity value that actually comes back in API for that entity.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Any ideas why the identities might differ? Is a salt value used in the production version when hashing, or does the separator differ in some cases?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm testing on CDH 5.8.0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2016 13:22:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Entity-ID-generation-in-Navigator/m-p/47678#M29038</guid>
      <dc:creator>geochap</dc:creator>
      <dc:date>2016-11-21T13:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Entity ID generation in Navigator</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Entity-ID-generation-in-Navigator/m-p/47755#M29039</link>
      <description>&lt;P&gt;The issue is that the guava MD5 hasher&amp;nbsp;hashes a string as a series of utf-16 chars if not passed an encoding:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;A href="http://stackoverflow.com/questions/21287714/hashing-issue-between-guava-versions" target="_self"&gt;http://stackoverflow.com/questions/21287714/hashing-issue-between-guava-versions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was testing using a different MD5 implementation which treated the string as utf-8 encoded. Once I changed my code to treat the same way guava does, the IDs matched.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2016 22:39:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Entity-ID-generation-in-Navigator/m-p/47755#M29039</guid>
      <dc:creator>geochap</dc:creator>
      <dc:date>2016-11-21T22:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Entity ID generation in Navigator</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Entity-ID-generation-in-Navigator/m-p/48294#M29040</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Although this might work right now, we're using a different algorithm to calculate the entity ID starting in C5.10, which ships next month. We'll automatically translate from the old entity ID to the new one transparently, but you're best off using our API to determine the entity ID -- specifically:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="block request_url"&gt;&lt;PRE&gt;api/v10/entities/?query=&amp;lt;entity_query&amp;gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps. Regards, Mark.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 23:52:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Entity-ID-generation-in-Navigator/m-p/48294#M29040</guid>
      <dc:creator>mark</dc:creator>
      <dc:date>2016-12-02T23:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Entity ID generation in Navigator</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Entity-ID-generation-in-Navigator/m-p/48296#M29041</link>
      <description>&lt;P&gt;Thanks for the info.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't have a real need to generate ids this way at the moment -- mostly I was just curious how it was done. I'd seen the parent link in navigator from an HDFS entity to its parent and figured you must be generating that functionally from other available info since the parent ID isn't part of the entity payload (later I realized the page could probably just&amp;nbsp;be using a relation query to get it). Also, I was wondering whether I could create custom entities without using the java plugin.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been using the api as you suggest and for the most part I've found what I've needed between the docs, the sdk code, and a fair amount of experimentation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Dec 2016 00:48:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Entity-ID-generation-in-Navigator/m-p/48296#M29041</guid>
      <dc:creator>geochap</dc:creator>
      <dc:date>2016-12-03T00:48:21Z</dc:date>
    </item>
  </channel>
</rss>

