According to Drill documentation: http://drill.apache.org/docs/adding-custom-functions-to-drill/
You need to copy both class jar and source jar of your UDF to $DRILL_HOME/jars/3rdparty/ did you do it ? On Tue, Jan 5, 2016 at 11:58 PM, Nirav Shah <[email protected]> wrote: > Hi , > > > I am trying to extract info from user agent using WURFL libraries. > > I am not sure what's wrong I am doing here but it's not working and not > giving any errors as well. > > I have put wurfl.xml in source folder and wurfl<version>.jar to > /jar/3rdparty/ > > *Code :* > > wurfl = new > net.sourceforge.wurfl.core.GeneralWURFLEngine("wurfl.xml"); > String SUA = > > org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.toStringFromUTF8(userAgent.start, > userAgent.end, userAgent.buffer); > > > String[] capabilities = { > "device_os", > "device_os_version", > "is_tablet", > "is_wireless_device", > "pointing_method", > "preferred_markup", > "resolution_height", > "resolution_width", > "ux_full_desktop", > "xhtml_support_level", > "is_smarttv", > "can_assign_phone_number", > "brand_name", > "model_name", > "marketing_name", > "mobile_browser_version" > }; > wurfl.setEngineTarget(EngineTarget.accuracy); > wurfl.setCapabilityFilter(capabilities); > Device device = wurfl.getDeviceForRequest(SUA); > System.out.println("4-->"+new Date( > System.currentTimeMillis())); > System.out.println("Device OS: " + > device.getCapability("device_os")); > System.out.println("Device OS version: " + > device.getCapability("device_os_version")); > System.out.println("Brand name: " + > device.getCapability("brand_name")); > System.out.println("advertised_device_os_version: " + > device.getCapability("advertised_device_os_version")); > System.out.println("advertised_device_os: " + > device.getCapability("advertised_device_os")); > System.out.println("advertised_browser: " + > device.getCapability("advertised_browser")); > > > System.out.println("advertised_browser_version:"+device.getCapability("advertised_browser_version")); > stringOutValue = device.getCapability("device_os_version"); > > > Regards, > Nirav > -- Abdelhakim Deneche Software Engineer <http://www.mapr.com/> Now Available - Free Hadoop On-Demand Training <http://www.mapr.com/training?utm_source=Email&utm_medium=Signature&utm_campaign=Free%20available>
