list.add(description); boolean present_locationUri = true && (isSetLocationUri()); list.add(present_locationUri); if (present_locationUri)
private void makeLocationQualified(Database database) throws HiveException { if (database.isSetLocationUri()) { database.setLocationUri(Utilities.getQualifiedPath(conf, new Path(database.getLocationUri()))); } else { // Location is not set we utilize METASTOREWAREHOUSE together with database name database.setLocationUri( Utilities.getQualifiedPath(conf, new Path(HiveConf.getVar(conf, HiveConf.ConfVars.METASTOREWAREHOUSE), database.getName().toLowerCase() + DATABASE_PATH_SUFFIX))); } }
private void makeLocationQualified(Database database) throws HiveException { if (database.isSetLocationUri()) { database.setLocationUri(Utilities.getQualifiedPath(conf, new Path(database.getLocationUri()))); } else { // Location is not set we utilize METASTOREWAREHOUSE together with database name database.setLocationUri( Utilities.getQualifiedPath(conf, new Path(HiveConf.getVar(conf, HiveConf.ConfVars.METASTOREWAREHOUSE), database.getName().toLowerCase() + DATABASE_PATH_SUFFIX))); } }
/** * Build the database path based on catalog name and database name. This should only be used * when a database is being created or altered. If you just want to find out the path a * database is already using call {@link #getDatabasePath(Database)}. If the passed in * database already has a path set that will be used. If not the location will be built using * catalog's path and the database name. * @param cat catalog the database is in * @param db database object * @return Path representing the directory for the database * @throws MetaException when the file path cannot be properly determined from the configured * file system. */ public Path determineDatabasePath(Catalog cat, Database db) throws MetaException { if (db.isSetLocationUri()) { return getDnsPath(new Path(db.getLocationUri())); } if (cat == null || cat.getName().equalsIgnoreCase(DEFAULT_CATALOG_NAME)) { if (db.getName().equalsIgnoreCase(DEFAULT_DATABASE_NAME)) { return getWhRoot(); } else { return new Path(getWhRoot(), dbDirFromDbName(db)); } } else { return new Path(getDnsPath(new Path(cat.getLocationUri())), dbDirFromDbName(db)); } }
lastComparison = Boolean.valueOf(isSetLocationUri()).compareTo(other.isSetLocationUri()); if (lastComparison != 0) { return lastComparison; if (isSetLocationUri()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.locationUri, other.locationUri); 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(1); if (struct.isSetLocationUri()) { optionals.set(2); oprot.writeString(struct.description); if (struct.isSetLocationUri()) { oprot.writeString(struct.locationUri);
boolean this_present_locationUri = true && this.isSetLocationUri(); boolean that_present_locationUri = true && that.isSetLocationUri(); if (this_present_locationUri || that_present_locationUri) { if (!(this_present_locationUri && that_present_locationUri))
this.description = other.description; if (other.isSetLocationUri()) { this.locationUri = other.locationUri;
builder.append(description); boolean present_locationUri = true && (isSetLocationUri()); builder.append(present_locationUri); if (present_locationUri)
/** Returns true if field corresponding to fieldID is set (has been asigned 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(); } throw new IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public Database(Database other) { if (other.isSetName()) { this.name = other.name; } if (other.isSetDescription()) { this.description = other.description; } if (other.isSetLocationUri()) { this.locationUri = other.locationUri; } if (other.isSetParameters()) { Map<String,String> __this__parameters = new HashMap<String,String>(); for (Map.Entry<String, String> other_element : other.parameters.entrySet()) { String other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); String __this__parameters_copy_key = other_element_key; String __this__parameters_copy_value = other_element_value; __this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value); } this.parameters = __this__parameters; } if (other.isSetPrivileges()) { this.privileges = new PrincipalPrivilegeSet(other.privileges); } }
/** * Make qualified location for a database . * * @param database * Database. */ private void makeLocationQualified(Database database) throws HiveException { if (database.isSetLocationUri()) { database.setLocationUri(Utilities.getQualifiedPath(conf, new Path(database.getLocationUri()))); } else { // Location is not set we utilize METASTOREWAREHOUSE together with database name database.setLocationUri( Utilities.getQualifiedPath(conf, new Path(HiveConf.getVar(conf, HiveConf.ConfVars.METASTOREWAREHOUSE), database.getName().toLowerCase() + ".db"))); } }
this.description = other.description; if (other.isSetLocationUri()) { this.locationUri = other.locationUri;
/** * Build the database path based on catalog name and database name. This should only be used * when a database is being created or altered. If you just want to find out the path a * database is already using call {@link #getDatabasePath(Database)}. If the passed in * database already has a path set that will be used. If not the location will be built using * catalog's path and the database name. * @param cat catalog the database is in * @param db database object * @return Path representing the directory for the database * @throws MetaException when the file path cannot be properly determined from the configured * file system. */ public Path determineDatabasePath(Catalog cat, Database db) throws MetaException { if (db.isSetLocationUri()) { return getDnsPath(new Path(db.getLocationUri())); } if (cat == null || cat.getName().equalsIgnoreCase(DEFAULT_CATALOG_NAME)) { if (db.getName().equalsIgnoreCase(DEFAULT_DATABASE_NAME)) { return getWhRoot(); } else { return new Path(getWhRoot(), dbDirFromDbName(db)); } } else { return new Path(getDnsPath(new Path(cat.getLocationUri())), dbDirFromDbName(db)); } }
this.description = other.description; if (other.isSetLocationUri()) { this.locationUri = other.locationUri;
/** 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(); } throw new IllegalStateException(); }
/** 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(); } throw new IllegalStateException(); }
boolean this_present_locationUri = true && this.isSetLocationUri(); boolean that_present_locationUri = true && that.isSetLocationUri(); if (this_present_locationUri || that_present_locationUri) { if (!(this_present_locationUri && that_present_locationUri))
builder.append(description); boolean present_locationUri = true && (isSetLocationUri()); builder.append(present_locationUri); if (present_locationUri)