if (isSetCatalogName()) { if (!first) sb.append(", "); sb.append("catalogName:");
list.add(ownerType.getValue()); boolean present_catalogName = true && (isSetCatalogName()); list.add(present_catalogName); if (present_catalogName)
/** * Create a new Database * @param db * @throws AlreadyExistsException * @throws InvalidObjectException * @throws MetaException * @throws TException * @see org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore.Iface#create_database(Database) */ @Override public void createDatabase(Database db) throws AlreadyExistsException, InvalidObjectException, MetaException, TException { if (!db.isSetCatalogName()) { db.setCatalogName(getDefaultCatalog(conf)); } client.create_database(db); }
if (struct.isSetCatalogName()) { oprot.writeFieldBegin(CATALOG_NAME_FIELD_DESC); oprot.writeString(struct.catalogName);
lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(other.isSetCatalogName()); if (lastComparison != 0) { return lastComparison; if (isSetCatalogName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, other.catalogName); if (lastComparison != 0) {
/** 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 NAME: return isSetName(); case DESCRIPTION: return isSetDescription(); case LOCATION_URI: return isSetLocationUri(); case PARAMETERS: return isSetParameters(); case PRIVILEGES: return isSetPrivileges(); case OWNER_NAME: return isSetOwnerName(); case OWNER_TYPE: return isSetOwnerType(); case CATALOG_NAME: return isSetCatalogName(); case CREATE_TIME: return isSetCreateTime(); } throw new IllegalStateException(); }
optionals.set(6); if (struct.isSetCatalogName()) { optionals.set(7); oprot.writeI32(struct.ownerType.getValue()); if (struct.isSetCatalogName()) { oprot.writeString(struct.catalogName);
boolean this_present_catalogName = true && this.isSetCatalogName(); boolean that_present_catalogName = true && that.isSetCatalogName(); if (this_present_catalogName || that_present_catalogName) { if (!(this_present_catalogName && that_present_catalogName))
this.ownerType = other.ownerType; if (other.isSetCatalogName()) { this.catalogName = other.catalogName;
/** * @param dbEvent database event * @throws MetaException */ @Override public void onDropDatabase(DropDatabaseEvent dbEvent) throws MetaException { Database db = dbEvent.getDatabase(); DropDatabaseMessage msg = MessageBuilder.getInstance() .buildDropDatabaseMessage(db); NotificationEvent event = new NotificationEvent(0, now(), EventType.DROP_DATABASE.toString(), msgEncoder.getSerializer().serialize(msg)); event.setCatName(db.isSetCatalogName() ? db.getCatalogName() : DEFAULT_CATALOG_NAME); event.setDbName(db.getName()); process(event, dbEvent); }
/** * @param dbEvent database event * @throws MetaException */ @Override public void onCreateDatabase(CreateDatabaseEvent dbEvent) throws MetaException { Database db = dbEvent.getDatabase(); CreateDatabaseMessage msg = MessageBuilder.getInstance() .buildCreateDatabaseMessage(db); NotificationEvent event = new NotificationEvent(0, now(), EventType.CREATE_DATABASE.toString(), msgEncoder.getSerializer().serialize(msg)); event.setCatName(db.isSetCatalogName() ? db.getCatalogName() : DEFAULT_CATALOG_NAME); event.setDbName(db.getName()); process(event, dbEvent); }
boolean success = false; Exception ex = null; if (!db.isSetCatalogName()) { db.setCatalogName(getDefaultCatalog(conf));
/** * @param dbEvent alter database event * @throws MetaException */ @Override public void onAlterDatabase(AlterDatabaseEvent dbEvent) throws MetaException { Database oldDb = dbEvent.getOldDatabase(); Database newDb = dbEvent.getNewDatabase(); AlterDatabaseMessage msg = MessageBuilder.getInstance() .buildAlterDatabaseMessage(oldDb, newDb); NotificationEvent event = new NotificationEvent(0, now(), EventType.ALTER_DATABASE.toString(), msgEncoder.getSerializer().serialize(msg) ); event.setCatName(oldDb.isSetCatalogName() ? oldDb.getCatalogName() : DEFAULT_CATALOG_NAME); event.setDbName(oldDb.getName()); process(event, dbEvent); }
/** * @param dbEvent database event * @throws MetaException */ @Override public void onCreateDatabase(CreateDatabaseEvent dbEvent) throws MetaException { Database db = dbEvent.getDatabase(); NotificationEvent event = new NotificationEvent(0, now(), EventType.CREATE_DATABASE.toString(), msgFactory .buildCreateDatabaseMessage(db).toString()); event.setCatName(db.isSetCatalogName() ? db.getCatalogName() : DEFAULT_CATALOG_NAME); event.setDbName(db.getName()); process(event, dbEvent); }
/** * @param dbEvent database event * @throws MetaException */ @Override public void onDropDatabase(DropDatabaseEvent dbEvent) throws MetaException { Database db = dbEvent.getDatabase(); NotificationEvent event = new NotificationEvent(0, now(), EventType.DROP_DATABASE.toString(), msgFactory .buildDropDatabaseMessage(db).toString()); event.setCatName(db.isSetCatalogName() ? db.getCatalogName() : DEFAULT_CATALOG_NAME); event.setDbName(db.getName()); process(event, dbEvent); }
/** * @param dbEvent alter database event * @throws MetaException */ @Override public void onAlterDatabase(AlterDatabaseEvent dbEvent) throws MetaException { Database oldDb = dbEvent.getOldDatabase(); Database newDb = dbEvent.getNewDatabase(); NotificationEvent event = new NotificationEvent(0, now(), EventType.ALTER_DATABASE.toString(), msgFactory .buildAlterDatabaseMessage(oldDb, newDb).toString()); event.setCatName(oldDb.isSetCatalogName() ? oldDb.getCatalogName() : DEFAULT_CATALOG_NAME); event.setDbName(oldDb.getName()); process(event, dbEvent); }
boolean success = false; Exception ex = null; if (!db.isSetCatalogName()) { db.setCatalogName(getDefaultCatalog(conf));