项目作者: brndnmtthws

项目描述 :
Facebook的Hive UDF
高级语言: Java
项目地址: git://github.com/brndnmtthws/facebook-hive-udfs.git
创建时间: 2013-08-08T20:43:02Z
项目社区:https://github.com/brndnmtthws/facebook-hive-udfs

开源协议:Apache License 2.0

下载


Build & test with Maven

facebook-hive-udfs

Facebook’s Hive UDFs

WHAT IT IS

A computer guy at Facebook dumped a bunch of UDFs/UDAFs here:

https://issues.apache.org/jira/browse/HIVE-1545

However, the code does not build and is missing many parts.

This is a partial copy of that code, except it builds and may (or may not) work. Use at your own risk. To build it:

  1. mvn package

This will produce a jar in target/ which you can add to your Hive classpath.

Alternatively, you can use the published jar included with this repo’s packages.

You can add this repository as a maven source with:

  1. <project>
  2. ...
  3. <repositories>
  4. <repository>
  5. <id>github</id>
  6. <name>facebook-hive-udfs</name>
  7. <url>https://maven.pkg.github.com/brndnmtthws/facebook-hive-udfs</url>
  8. <snapshots>
  9. <enabled>true</enabled>
  10. </snapshots>
  11. </repository>
  12. </repositories>
  13. ...
  14. </project>

And then include it in your pom.xml:

  1. <dependency>
  2. <groupId>com.airbnb</groupId>
  3. <artifactId>facebook-udfs</artifactId>
  4. <version>1.1.5</version>
  5. </dependency>

HOW DO USE IT?

Like any other UDF, silly!

Here’s a sample:

  1. CREATE TEMPORARY FUNCTION md5 AS 'com.facebook.hive.udf.UDFMD5';
  2. SELECT md5(password) from users limit 1;

cool!!