<?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: IMPALA function 'hive generic UDF SHA2 ' in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/IMPALA-function-hive-generic-UDF-SHA2/m-p/292422#M216085</link>
    <description>&lt;P&gt;HI Rosa,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry I gave up that time&amp;nbsp; because It was an urgent matter&amp;nbsp; , so I just took the short way and used hive to hash my data and put it in a table , where I can run my queries later with Impala&amp;nbsp; ,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'll come back for it later for sure since hive is a bit slow&amp;nbsp; while having java based functions.&lt;BR /&gt;I'd recommend you to try with C language&amp;nbsp; ,it's suitable for impala tho it will work faster .&lt;BR /&gt;&lt;BR /&gt;So please If you came up with anything share it with us , otherwise I'll post for sure my solution once it's done .&lt;BR /&gt;&lt;BR /&gt;best luck&lt;BR /&gt;Bilal&lt;/P&gt;</description>
    <pubDate>Tue, 24 Mar 2020 14:17:36 GMT</pubDate>
    <dc:creator>Bildervic</dc:creator>
    <dc:date>2020-03-24T14:17:36Z</dc:date>
    <item>
      <title>IMPALA function 'hive generic UDF SHA2 '</title>
      <link>https://community.cloudera.com/t5/Support-Questions/IMPALA-function-hive-generic-UDF-SHA2/m-p/288561#M213727</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;I'm trying to create a function to use in imapla.&lt;BR /&gt;my function is simply re-using&amp;nbsp; hive's sha2() function.&lt;BR /&gt;the creation of the function goes smoothly&amp;nbsp;&lt;BR /&gt;:&lt;BR /&gt;&lt;EM&gt;create function to_sha2(string,int) returns string location 'user/hive/hive.jar' symbol='org.apache.hadoop.hive.ql.udf.generic.GenericUDFSha2' ;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;but when I try to use it doesn't work launching this warning&amp;nbsp; :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;select to_sha2('test',256);&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;PRE&gt; Query State: EXCEPTION
    Query Status: ClassCastException: class org.apache.hadoop.hive.ql.udf.generic.GenericUDFSha2&lt;/PRE&gt;
&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;I have tried to search for&amp;nbsp;&lt;STRONG&gt;UDFSha2&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;that doesn't contain the Generic word in the hive's jar but I couldn't find it.&lt;BR /&gt;the original built-in function in hive :&lt;BR /&gt;sha2(string/binary, len) - Calculates the SHA-2 family of hash functions (SHA-224, SHA-256, SHA-384, and SHA-512). |&lt;BR /&gt;the other functions are working normally in impala (for example&amp;nbsp; I have tried to create UDF MD5 function from hive's jar and it was working ).&lt;BR /&gt;&lt;BR /&gt;so my question is do I have to create my own&amp;nbsp;&lt;EM&gt;UDF-Sha2&amp;nbsp; function?&lt;BR /&gt;or there is a saving situation for my case, any help will be appreciated&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Impala version 2.9&lt;BR /&gt;Hive : 1.1.0&lt;BR /&gt;CDH : 5.12&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 19:35:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/IMPALA-function-hive-generic-UDF-SHA2/m-p/288561#M213727</guid>
      <dc:creator>Bildervic</dc:creator>
      <dc:date>2020-01-29T19:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: IMPALA function 'hive generic UDF SHA2 '</title>
      <link>https://community.cloudera.com/t5/Support-Questions/IMPALA-function-hive-generic-UDF-SHA2/m-p/288706#M213818</link>
      <description>&lt;P&gt;After some researches I did, it seems that Impala does not support GenericUDFs yet.&amp;nbsp;&lt;BR /&gt;&lt;A href="https://issues.apache.org/jira/browse/IMPALA-7877" target="_blank" rel="noopener"&gt;https://issues.apache.org/jira/browse/IMPALA-7877&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/IMPALA-8369" target="_blank" rel="noopener"&gt;https://issues.apache.org/jira/browse/IMPALA-8369&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;so I'll just try to create my own function for Impala.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 16:11:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/IMPALA-function-hive-generic-UDF-SHA2/m-p/288706#M213818</guid>
      <dc:creator>Bildervic</dc:creator>
      <dc:date>2020-01-30T16:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: IMPALA function 'hive generic UDF SHA2 '</title>
      <link>https://community.cloudera.com/t5/Support-Questions/IMPALA-function-hive-generic-UDF-SHA2/m-p/292084#M215883</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any results of your own sh function in Impala?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rosa&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2020 03:36:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/IMPALA-function-hive-generic-UDF-SHA2/m-p/292084#M215883</guid>
      <dc:creator>RosaT</dc:creator>
      <dc:date>2020-03-19T03:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: IMPALA function 'hive generic UDF SHA2 '</title>
      <link>https://community.cloudera.com/t5/Support-Questions/IMPALA-function-hive-generic-UDF-SHA2/m-p/292422#M216085</link>
      <description>&lt;P&gt;HI Rosa,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry I gave up that time&amp;nbsp; because It was an urgent matter&amp;nbsp; , so I just took the short way and used hive to hash my data and put it in a table , where I can run my queries later with Impala&amp;nbsp; ,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'll come back for it later for sure since hive is a bit slow&amp;nbsp; while having java based functions.&lt;BR /&gt;I'd recommend you to try with C language&amp;nbsp; ,it's suitable for impala tho it will work faster .&lt;BR /&gt;&lt;BR /&gt;So please If you came up with anything share it with us , otherwise I'll post for sure my solution once it's done .&lt;BR /&gt;&lt;BR /&gt;best luck&lt;BR /&gt;Bilal&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 14:17:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/IMPALA-function-hive-generic-UDF-SHA2/m-p/292422#M216085</guid>
      <dc:creator>Bildervic</dc:creator>
      <dc:date>2020-03-24T14:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: IMPALA function 'hive generic UDF SHA2 '</title>
      <link>https://community.cloudera.com/t5/Support-Questions/IMPALA-function-hive-generic-UDF-SHA2/m-p/292429#M216092</link>
      <description>&lt;P&gt;Hi!&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your response and good luck too! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rosita&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 15:08:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/IMPALA-function-hive-generic-UDF-SHA2/m-p/292429#M216092</guid>
      <dc:creator>RosaT</dc:creator>
      <dc:date>2020-03-24T15:08:18Z</dc:date>
    </item>
  </channel>
</rss>

