You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by mahender bigdata <Ma...@outlook.com> on 2016/04/28 00:30:55 UTC

get version number of hive-contrib in HQL

Hi,

For generating row sequencing, we are using Hive-contrib library in Hive 
Script.  We are using  "ADD JAR 
/apps/dist/hive-1.2.1.2.3.3.1-5/lib/hive-contrib-1.2.1.2.3.3.1-5.jar"; 
and creating temporary function
CREATE TEMPORARY FUNCTION rwSequenceid AS 
'org.apache.hadoop.hive.contrib.udf.UDFRowSequence'; and calling 
rwSequenceid() in  Select clause.

As Our Script goes into production and some times production hive 
version is different, it contains new versions of hive, HiveContrib 
library  is getting fail to load because of the version in production is 
not same has our DEV version, This makes us to manually update HQL in 
production.

Is there a way of getting HiveContrib version in HQL like any hive 
environmental variable ?. I see Hive Version numbers (till end) and 
HiveContrib Version number are always in sync. Is there a way to 
concatenate hive version number with "Hive-contrib-{0}" string. If yes, 
is there way of getting hive version in HQL

our Dev machine version is  hive-contrib-1.2.1.2.3.3.1-16.jar  where as 
our Prod is hive-1.2.1.2.3.3.1-16.

Thanks in advance.

Re: get version number of hive-contrib in HQL

Posted by mahender bigdata <Ma...@outlook.com>.
ping...

On 4/27/2016 3:30 PM, mahender bigdata wrote:
> Hi,
>
> For generating row sequencing, we are using Hive-contrib library in 
> Hive Script.  We are using  "ADD JAR 
> /apps/dist/hive-1.2.1.2.3.3.1-5/lib/hive-contrib-1.2.1.2.3.3.1-5.jar"; 
> and creating temporary function
> CREATE TEMPORARY FUNCTION rwSequenceid AS 
> 'org.apache.hadoop.hive.contrib.udf.UDFRowSequence'; and calling 
> rwSequenceid() in  Select clause.
>
> As Our Script goes into production and some times production hive 
> version is different, it contains new versions of hive, HiveContrib 
> library  is getting fail to load because of the version in production 
> is not same has our DEV version, This makes us to manually update HQL 
> in production.
>
> Is there a way of getting HiveContrib version in HQL like any hive 
> environmental variable ?. I see Hive Version numbers (till end) and 
> HiveContrib Version number are always in sync. Is there a way to 
> concatenate hive version number with "Hive-contrib-{0}" string. If 
> yes, is there way of getting hive version in HQL
>
> our Dev machine version is  hive-contrib-1.2.1.2.3.3.1-16.jar where as 
> our Prod is hive-1.2.1.2.3.3.1-16.
>
> Thanks in advance.