APISonar


org.apache.hadoop.hive.metastore.api.FunctionType.JAVA

> org > apache > hadoop > hive > metastore > api > FunctionType > JAVA
org APIs apache APIs hadoop APIs hive APIs metastore APIs api APIs FunctionType APIs JAVA APIs

Example 1
private static FunctionType convertFunctionTypes(HbaseMetastoreProto.Function.FunctionType type) {
    switch (type) {
    case JAVA: return FunctionType.JAVA;
    default: throw new RuntimeException("Unknown function type " + type.toString());
    }
  }
Example 2
public void dropFunction() throws Exception {
    String funcName = "delfunc";
    int now = (int)(System.currentTimeMillis()/ 1000);
    Function func = new Function(funcName, DB, "o.a.h.h.myfunc", "me", PrincipalType.USER,
        now, FunctionType.JAVA, Arrays.asList(new ResourceUri(ResourceType.JAR, "file:/tmp/somewhere")));
    store.createFunction(func);

    Function f = store.getFunction(DB, funcName);
    Assert.assertNotNull(f);

    store.dropFunction(DB, funcName);
    //thrown.expect(NoSuchObjectException.class);
    Assert.assertNull(store.getFunction(DB, funcName));
  }