Index: hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/HCatCreateDBDesc.java =================================================================== --- hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/HCatCreateDBDesc.java (revision 1617425) +++ hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/HCatCreateDBDesc.java (working copy) @@ -33,6 +33,7 @@ private String comment; private Map dbProperties; private boolean ifNotExits = false; + private String ownerName; /** * Gets the database properties. @@ -69,6 +70,15 @@ public String getLocation() { return this.locationUri; } + + /** + * Gets the ownerName. + * + * @return the ownerName + */ + public String getOwnerName() { + return ownerName; + } /** * Gets the database name. @@ -87,6 +97,7 @@ public String toString() { return "HCatCreateDBDesc [" + (dbName != null ? "dbName=" + dbName + ", " : "dbName=null") + + (ownerName != null ? "ownerName=" + ownerName + ", " : "ownerName=null") + (locationUri != null ? "location=" + locationUri + ", " : "location=null") + (comment != null ? "comment=" + comment + ", " : "comment=null") @@ -106,6 +117,7 @@ Database toHiveDb() { Database hiveDB = new Database(); + hiveDB.setOwnerName(this.ownerName); hiveDB.setDescription(this.comment); hiveDB.setLocationUri(this.locationUri); hiveDB.setName(this.dbName); @@ -120,6 +132,7 @@ private Map innerDBProps; private String dbName; private boolean ifNotExists = false; + private String ownerName; private Builder(String dbName) { this.dbName = dbName; @@ -168,6 +181,17 @@ this.innerDBProps = dbProps; return this; } + + /** + * Owner name. + * + * @param owner name. + * @return the builder + */ + public Builder ownerName(String ownerName) { + this.ownerName = ownerName; + return this; + } /** @@ -185,6 +209,7 @@ desc.locationUri = this.innerLoc; desc.dbProperties = this.innerDBProps; desc.ifNotExits = this.ifNotExists; + desc.ownerName = this.ownerName; return desc; }