title: Convert 15 char length string to unique long number - using BigInteger longValue()
body: <p>I want to convert a string of max length 15 to a unique long number. I am trying to use BigInteger's longValue() function for the same. </p>
  
  <pre><code>BigInteger bigInt = new BigInteger("abcdeabcdeabcda".getBytes());
  long n = bigInt.longValue();
  </code></pre>
  
  <ol>
  <li>Can we avoid collision of long value until 15 chars of String?</li>
  <li>String can contain alphanumeric including special character.</li>
  <li>The idea not to encrypt the string to long. But to improve the performance of count(distinct) of hive queries.</li>
  <li>We note that count(distinct) in hive provides good performance if long is used instead of string.</li>
  <li>We don't want approx. or probablistic count distinct. We want exact count distinct.</li>
  </ol>
  
  <p>Thanks in Advance</p>