本文整理了Java中org.apache.hadoop.hive.metastore.api.Function.isSetCatName()
方法的一些代码示例,展示了Function.isSetCatName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Function.isSetCatName()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.metastore.api.Function
类名称:Function
方法名:isSetCatName
[英]Returns true if field catName is set (has been assigned a value) and false otherwise
[中]如果设置了字段catName(已指定值),则返回true,否则返回false
代码示例来源:origin: apache/hive
if (isSetCatName()) {
if (!first) sb.append(", ");
sb.append("catName:");
代码示例来源:origin: apache/hive
list.add(resourceUris);
boolean present_catName = true && (isSetCatName());
list.add(present_catName);
if (present_catName)
代码示例来源:origin: apache/hive
if (struct.isSetCatName()) {
oprot.writeFieldBegin(CAT_NAME_FIELD_DESC);
oprot.writeString(struct.catName);
代码示例来源:origin: apache/hive
@Override
public void createFunction(Function func) throws TException {
if (func == null) {
throw new MetaException("Function cannot be null.");
}
if (!func.isSetCatName()) {
func.setCatName(getDefaultCatalog(conf));
}
client.create_function(func);
}
代码示例来源:origin: apache/hive
lastComparison = Boolean.valueOf(isSetCatName()).compareTo(other.isSetCatName());
if (lastComparison != 0) {
return lastComparison;
if (isSetCatName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catName, other.catName);
if (lastComparison != 0) {
代码示例来源:origin: apache/hive
if (other.isSetCatName()) {
this.catName = other.catName;
代码示例来源:origin: apache/hive
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case FUNCTION_NAME:
return isSetFunctionName();
case DB_NAME:
return isSetDbName();
case CLASS_NAME:
return isSetClassName();
case OWNER_NAME:
return isSetOwnerName();
case OWNER_TYPE:
return isSetOwnerType();
case CREATE_TIME:
return isSetCreateTime();
case FUNCTION_TYPE:
return isSetFunctionType();
case RESOURCE_URIS:
return isSetResourceUris();
case CAT_NAME:
return isSetCatName();
}
throw new IllegalStateException();
}
代码示例来源:origin: apache/hive
boolean this_present_catName = true && this.isSetCatName();
boolean that_present_catName = true && that.isSetCatName();
if (this_present_catName || that_present_catName) {
if (!(this_present_catName && that_present_catName))
代码示例来源:origin: apache/hive
optionals.set(7);
if (struct.isSetCatName()) {
optionals.set(8);
if (struct.isSetCatName()) {
oprot.writeString(struct.catName);
代码示例来源:origin: apache/hive
Map<String, String> transactionalListenerResponses = Collections.emptyMap();
try {
String catName = func.isSetCatName() ? func.getCatName() : getDefaultCatalog(conf);
ms.openTransaction();
Database db = ms.getDatabase(catName, func.getDbName());
代码示例来源:origin: apache/hive
/**
* @param fnEvent function event
* @throws MetaException
*/
@Override
public void onDropFunction(DropFunctionEvent fnEvent) throws MetaException {
Function fn = fnEvent.getFunction();
DropFunctionMessage msg = MessageBuilder.getInstance().buildDropFunctionMessage(fn);
NotificationEvent event =
new NotificationEvent(0, now(), EventType.DROP_FUNCTION.toString(),
msgEncoder.getSerializer().serialize(msg));
event.setCatName(fn.isSetCatName() ? fn.getCatName() : DEFAULT_CATALOG_NAME);
event.setDbName(fn.getDbName());
process(event, fnEvent);
}
代码示例来源: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
/**
* @param fnEvent function event
* @throws MetaException
*/
@Override
public void onCreateFunction(CreateFunctionEvent fnEvent) throws MetaException {
Function fn = fnEvent.getFunction();
CreateFunctionMessage msg = MessageBuilder.getInstance()
.buildCreateFunctionMessage(fn);
NotificationEvent event =
new NotificationEvent(0, now(), EventType.CREATE_FUNCTION.toString(),
msgEncoder.getSerializer().serialize(msg));
event.setCatName(fn.isSetCatName() ? fn.getCatName() : DEFAULT_CATALOG_NAME);
event.setDbName(fn.getDbName());
process(event, fnEvent);
}
代码示例来源:origin: apache/hive
boolean success = false;
try {
String newFuncCat = newFunction.isSetCatName() ? newFunction.getCatName() :
getDefaultCatalog(conf);
if (!newFuncCat.equalsIgnoreCase(catName)) {
代码示例来源:origin: org.apache.hive/hive-standalone-metastore
list.add(resourceUris);
boolean present_catName = true && (isSetCatName());
list.add(present_catName);
if (present_catName)
代码示例来源:origin: org.apache.hive/hive-standalone-metastore
if (other.isSetCatName()) {
this.catName = other.catName;
代码示例来源:origin: org.apache.hive/hive-standalone-metastore
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case FUNCTION_NAME:
return isSetFunctionName();
case DB_NAME:
return isSetDbName();
case CLASS_NAME:
return isSetClassName();
case OWNER_NAME:
return isSetOwnerName();
case OWNER_TYPE:
return isSetOwnerType();
case CREATE_TIME:
return isSetCreateTime();
case FUNCTION_TYPE:
return isSetFunctionType();
case RESOURCE_URIS:
return isSetResourceUris();
case CAT_NAME:
return isSetCatName();
}
throw new IllegalStateException();
}
代码示例来源:origin: org.apache.hive.hcatalog/hive-hcatalog-server-extensions
/**
* @param fnEvent function event
* @throws MetaException
*/
@Override
public void onCreateFunction(CreateFunctionEvent fnEvent) throws MetaException {
Function fn = fnEvent.getFunction();
NotificationEvent event =
new NotificationEvent(0, now(), EventType.CREATE_FUNCTION.toString(), msgFactory
.buildCreateFunctionMessage(fn).toString());
event.setCatName(fn.isSetCatName() ? fn.getCatName() : DEFAULT_CATALOG_NAME);
event.setDbName(fn.getDbName());
process(event, fnEvent);
}
代码示例来源:origin: org.apache.hive.hcatalog/hive-hcatalog-server-extensions
/**
* @param fnEvent function event
* @throws MetaException
*/
@Override
public void onDropFunction(DropFunctionEvent fnEvent) throws MetaException {
Function fn = fnEvent.getFunction();
NotificationEvent event =
new NotificationEvent(0, now(), EventType.DROP_FUNCTION.toString(), msgFactory
.buildDropFunctionMessage(fn).toString());
event.setCatName(fn.isSetCatName() ? fn.getCatName() : DEFAULT_CATALOG_NAME);
event.setDbName(fn.getDbName());
process(event, fnEvent);
}
代码示例来源: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;
}
内容来源于网络,如有侵权,请联系作者删除!