@@ -0,0 +1,773 @@
+package udf_CD;%0A%0Aimport java.io.IOException;%0Aimport java.util.Arrays;%0A%0Aimport org.apache.pig.EvalFunc;%0Aimport org.apache.pig.data.Tuple;%0A%0Apublic class ConvertURL extends EvalFunc%3CString%3E%0A%7B%0A%0A        @Override%0A        public String exec(Tuple input) throws IOException%0A        %7B%0A                String url = %22%22;%0A                if(input != null && !input.isNull())%0A                %7B%0A                        String _url = (String)input.get(0);%0A%09%09%09String temp = _url;%0A%09%09%09if(_url.indexOf(%22http://%22) != -1)%0A%09%09%09%7B%0A%09%09%09%09temp = _url.substring(_url.indexOf(%22http://%22)+7);%0A%09%09%09%7D%0A%09%09%09if(temp.indexOf(%22www.%22) != -1)%0A%09%09%09%7B%0A%09%09%09%09temp = temp.substring(temp.indexOf(%22www.%22)+4);%0A%09%09%09%7D%0A%09%09%09//if(temp.contains(%22/%22))%0A%09%09%09//%7B%0A%09%09%09//%09temp = temp.split(%22/%22)%5B0%5D;%0A%09%09%09//%7D%0A%09%09%09url = temp;%0A%09%09%7D%0A%09%09return url;%0A%09%7D%0A%7D%0A

Create ConvertURL.java