本文整理了Java中org.apache.hadoop.hive.metastore.api.Function.getOwnerName()
方法的一些代码示例,展示了Function.getOwnerName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Function.getOwnerName()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.metastore.api.Function
类名称:Function
方法名:getOwnerName
暂无
代码示例来源:origin: apache/hive
public Object getFieldValue(_Fields field) {
switch (field) {
case FUNCTION_NAME:
return getFunctionName();
case DB_NAME:
return getDbName();
case CLASS_NAME:
return getClassName();
case OWNER_NAME:
return getOwnerName();
case OWNER_TYPE:
return getOwnerType();
case CREATE_TIME:
return getCreateTime();
case FUNCTION_TYPE:
return getFunctionType();
case RESOURCE_URIS:
return getResourceUris();
case CAT_NAME:
return getCatName();
}
throw new IllegalStateException();
}
代码示例来源:origin: apache/hive
private MFunction convertToMFunction(Function func) throws InvalidObjectException {
if (func == null) {
return null;
}
MDatabase mdb = null;
String catName = func.isSetCatName() ? func.getCatName() : getDefaultCatalog(conf);
try {
mdb = getMDatabase(catName, func.getDbName());
} catch (NoSuchObjectException e) {
LOG.error("Database does not exist", e);
throw new InvalidObjectException("Database " + func.getDbName() + " doesn't exist.");
}
MFunction mfunc = new MFunction(func.getFunctionName(),
mdb,
func.getClassName(),
func.getOwnerName(),
func.getOwnerType().name(),
func.getCreateTime(),
func.getFunctionType().getValue(),
convertToMResourceUriList(func.getResourceUris()));
return mfunc;
}
代码示例来源:origin: apache/hive
assertEquals("function name", funcName, func.getFunctionName());
assertEquals("function class name", className, func.getClassName());
assertEquals("function owner name", owner, func.getOwnerName());
assertEquals("function owner type", PrincipalType.USER, func.getOwnerType());
assertEquals("function type", funcType, func.getFunctionType());
代码示例来源:origin: apache/hive
@Test
public void testCreateFunctionDefaultValues() throws Exception {
Function function = new Function();
function.setDbName(OTHER_DATABASE);
function.setFunctionName("test_function");
function.setClassName(TEST_FUNCTION_CLASS);
function.setOwnerType(PrincipalType.USER);
function.setFunctionType(FunctionType.JAVA);
client.createFunction(function);
Function createdFunction = client.getFunction(function.getDbName(),
function.getFunctionName());
Assert.assertNull("Comparing OwnerName", createdFunction.getOwnerName());
Assert.assertEquals("Comparing ResourceUris", 0, createdFunction.getResourceUris().size());
// The create time is set
Assert.assertNotEquals("Comparing CreateTime", 0, createdFunction.getCreateTime());
}
代码示例来源:origin: apache/hive
assertEquals("function name", funcName + "_0", func.getFunctionName());
assertEquals("function class name", className, func.getClassName());
assertEquals("function owner name", owner, func.getOwnerName());
assertEquals("function owner type", PrincipalType.USER, func.getOwnerType());
assertEquals("function type", funcType, func.getFunctionType());
代码示例来源:origin: apache/hive
Assert.assertEquals(expectedCatalog(), createdFunction.getCatName());
Assert.assertEquals(function.getClassName(), createdFunction.getClassName());
Assert.assertEquals(function.getOwnerName(), createdFunction.getOwnerName());
Assert.assertEquals(function.getOwnerType(), createdFunction.getOwnerType());
Assert.assertEquals(function.getFunctionType(), createdFunction.getFunctionType());
代码示例来源:origin: apache/hive
Assert.assertEquals("Comparing FunctionName", newFunction.getFunctionName(),
alteredFunction.getFunctionName());
Assert.assertEquals("Comparing OwnerName", newFunction.getOwnerName(),
alteredFunction.getOwnerName());
Assert.assertEquals("Comparing OwnerType", newFunction.getOwnerType(),
alteredFunction.getOwnerType());
代码示例来源:origin: com.facebook.presto.hive/hive-apache
public Object getFieldValue(_Fields field) {
switch (field) {
case FUNCTION_NAME:
return getFunctionName();
case DB_NAME:
return getDbName();
case CLASS_NAME:
return getClassName();
case OWNER_NAME:
return getOwnerName();
case OWNER_TYPE:
return getOwnerType();
case CREATE_TIME:
return Integer.valueOf(getCreateTime());
case FUNCTION_TYPE:
return getFunctionType();
case RESOURCE_URIS:
return getResourceUris();
}
throw new IllegalStateException();
}
代码示例来源:origin: org.spark-project.hive/hive-metastore
public Object getFieldValue(_Fields field) {
switch (field) {
case FUNCTION_NAME:
return getFunctionName();
case DB_NAME:
return getDbName();
case CLASS_NAME:
return getClassName();
case OWNER_NAME:
return getOwnerName();
case OWNER_TYPE:
return getOwnerType();
case CREATE_TIME:
return Integer.valueOf(getCreateTime());
case FUNCTION_TYPE:
return getFunctionType();
case RESOURCE_URIS:
return getResourceUris();
}
throw new IllegalStateException();
}
代码示例来源:origin: org.apache.hive/hive-standalone-metastore
public Object getFieldValue(_Fields field) {
switch (field) {
case FUNCTION_NAME:
return getFunctionName();
case DB_NAME:
return getDbName();
case CLASS_NAME:
return getClassName();
case OWNER_NAME:
return getOwnerName();
case OWNER_TYPE:
return getOwnerType();
case CREATE_TIME:
return getCreateTime();
case FUNCTION_TYPE:
return getFunctionType();
case RESOURCE_URIS:
return getResourceUris();
case CAT_NAME:
return getCatName();
}
throw new IllegalStateException();
}
代码示例来源:origin: org.spark-project.hive/hive-metastore
private MFunction convertToMFunction(Function func) throws InvalidObjectException {
if (func == null) {
return null;
}
MDatabase mdb = null;
try {
mdb = getMDatabase(func.getDbName());
} catch (NoSuchObjectException e) {
LOG.error(StringUtils.stringifyException(e));
throw new InvalidObjectException("Database " + func.getDbName() + " doesn't exist.");
}
MFunction mfunc = new MFunction(func.getFunctionName(),
mdb,
func.getClassName(),
func.getOwnerName(),
func.getOwnerType().name(),
func.getCreateTime(),
func.getFunctionType().getValue(),
convertToMResourceUriList(func.getResourceUris()));
return mfunc;
}
代码示例来源:origin: org.apache.hive/hive-standalone-metastore
private MFunction convertToMFunction(Function func) throws InvalidObjectException {
if (func == null) {
return null;
}
MDatabase mdb = null;
String catName = func.isSetCatName() ? func.getCatName() : getDefaultCatalog(conf);
try {
mdb = getMDatabase(catName, func.getDbName());
} catch (NoSuchObjectException e) {
LOG.error("Database does not exist", e);
throw new InvalidObjectException("Database " + func.getDbName() + " doesn't exist.");
}
MFunction mfunc = new MFunction(func.getFunctionName(),
mdb,
func.getClassName(),
func.getOwnerName(),
func.getOwnerType().name(),
func.getCreateTime(),
func.getFunctionType().getValue(),
convertToMResourceUriList(func.getResourceUris()));
return mfunc;
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
private MFunction convertToMFunction(Function func) throws InvalidObjectException {
if (func == null) {
return null;
}
MDatabase mdb = null;
try {
mdb = getMDatabase(func.getDbName());
} catch (NoSuchObjectException e) {
LOG.error(StringUtils.stringifyException(e));
throw new InvalidObjectException("Database " + func.getDbName() + " doesn't exist.");
}
MFunction mfunc = new MFunction(func.getFunctionName(),
mdb,
func.getClassName(),
func.getOwnerName(),
func.getOwnerType().name(),
func.getCreateTime(),
func.getFunctionType().getValue(),
convertToMResourceUriList(func.getResourceUris()));
return mfunc;
}
内容来源于网络,如有侵权,请联系作者删除!