|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.hive.ql.exec.UDF org.apache.hadoop.hive.ql.udf.UDFParseUrl
public class UDFParseUrl
UDF to extract specfic parts from URL For example,
parse_url('http://facebook.com/path/p1.php?query=1', 'HOST') will return
'facebook.com' For example,
parse_url('http://facebook.com/path/p1.php?query=1', 'PATH') will return
'/path/p1.php' parse_url('http://facebook.com/path/p1.php?query=1', 'QUERY')
will return 'query=1'
parse_url('http://facebook.com/path/p1.php?query=1#Ref', 'REF') will return
'Ref' parse_url('http://facebook.com/path/p1.php?query=1#Ref', 'PROTOCOL')
will return 'http' Possible values are
HOST,PATH,QUERY,REF,PROTOCOL,AUTHORITY,FILE,USERINFO Also you can get a value
of particular key in QUERY, using syntax QUERY:
Constructor Summary
UDFParseUrl()
Method Summary
String
evaluate(String urlStr,
String partToExtract)
String
evaluate(String urlStr,
String partToExtract,
String key)
Methods inherited from class org.apache.hadoop.hive.ql.exec.UDF
getRequiredFiles, getRequiredJars, getResolver, setResolver
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
UDFParseUrl
public UDFParseUrl()
Method Detail
evaluate
public String evaluate(String urlStr,
String partToExtract)
evaluate
public String evaluate(String urlStr,
String partToExtract,
String key)
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Copyright © 2014 The Apache Software Foundation. All rights reserved.