Package org.apache.hadoop.hive.ql.exec

Examples of org.apache.hadoop.hive.ql.exec.Description


public class FunctionExtractor {
  public static void main(String [] args) throws Exception {
    System.out.println("<ClassList>");
    for (String arg : args) {
      Class<?> c = Class.forName(arg);
      Description d = c.getAnnotation(Description.class);
      if (d == null) {
        continue;
      }
      System.out.print("    <Class javaname=\"");
      System.out.print(c.getName());
      System.out.print("\" sqlname=\"");
      System.out.print(d.name());
      System.out.println("\" />");
    }
    System.out.println("</ClassList>");
  }
View Full Code Here


    } else {
      Class<? extends GenericUDF> udfClass = hiveUDF.getClass();
      Annotation udfAnnotation = udfClass.getAnnotation(Description.class);

      if (udfAnnotation != null && udfAnnotation instanceof Description) {
        Description udfDescription = (Description) udfAnnotation;
        udfName = udfDescription.name();
        if (udfName != null) {
          String[] aliases = udfName.split(",");
          if (aliases.length > 0)
            udfName = aliases[0];
        }
View Full Code Here

      operatorTable.add(name, new HiveUDFOperator(name.toUpperCase()));
    }
  }

  private <C,I> void register(Class<? extends I> clazz, ArrayListMultimap<String,Class<? extends I>> methods) {
    Description desc = clazz.getAnnotation(Description.class);
    String[] names;
    if(desc != null){
      names = desc.name().split(",");
      for(int i=0; i<names.length; i++) names[i] = names[i].trim();
    }else{
      names = new String[]{clazz.getName().replace('.', '_')};
    }
   
View Full Code Here

      operatorTable.add(name, new HiveUDFOperator(name.toUpperCase()));
    }
  }

  private <C,I> void register(Class<? extends I> clazz, ArrayListMultimap<String,Class<? extends I>> methods) {
    Description desc = clazz.getAnnotation(Description.class);
    String[] names;
    if (desc != null) {
      names = desc.name().split(",");
      for (int i=0; i<names.length; i++) {
        names[i] = names[i].trim();
      }
    }else{
      names = new String[]{clazz.getName().replace('.', '_')};
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.ql.exec.Description

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.