本文整理了Java中org.apache.hadoop.hive.metastore.api.Function.getCreateTime()
方法的一些代码示例,展示了Function.getCreateTime()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Function.getCreateTime()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.metastore.api.Function
类名称:Function
方法名:getCreateTime
暂无
代码示例来源: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
@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
newFunction.setCreateTime(alteredFunction.getCreateTime());
Assert.assertEquals("Comparing functions", newFunction, alteredFunction);
try {
newFunction.setCreateTime(alteredFunction.getCreateTime());
Assert.assertEquals("Comparing functions", newFunction, alteredFunction);
try {
代码示例来源:origin: apache/hive
function.setCreateTime(createdFunction.getCreateTime());
Assert.assertEquals("Comparing functions", function, createdFunction);
代码示例来源:origin: apache/hive
function.getFunctionName());
function.setCreateTime(createdFunction.getCreateTime());
Assert.assertEquals("Comparing functions", function, createdFunction);
client.dropFunction(function.getDbName(), function.getFunctionName());
代码示例来源: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: 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.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;
}
内容来源于网络,如有侵权,请联系作者删除!