Constructor and Description |
---|
DatabaseBuilder(@NotNull String name)
Constructor from database name.
|
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.hive.metastore.api.Database |
build()
Build database object
|
Util.DatabaseBuilder |
withDescription(@NotNull String description)
Add database description.
|
Util.DatabaseBuilder |
withLocation(@NotNull String location)
Add database location
|
Util.DatabaseBuilder |
withOwnerName(@NotNull String ownerName)
Add database owner name
|
Util.DatabaseBuilder |
withOwnerType(org.apache.hadoop.hive.metastore.api.PrincipalType ownerType)
Add owner tyoe
|
Util.DatabaseBuilder |
withParam(@NotNull String key,
@NotNull String val)
Add a single database parameter.
|
Util.DatabaseBuilder |
withParams(@NotNull Map<String,String> params)
Add Database parameters
|
public DatabaseBuilder(@NotNull @NotNull String name)
name
- Database namepublic Util.DatabaseBuilder withDescription(@NotNull @NotNull String description)
description
- Database description string.public Util.DatabaseBuilder withLocation(@NotNull @NotNull String location)
location
- Database location stringpublic Util.DatabaseBuilder withParams(@NotNull @NotNull Map<String,String> params)
params
- database parameterspublic Util.DatabaseBuilder withParam(@NotNull @NotNull String key, @NotNull @NotNull String val)
key
- parameter keyval
- parameter valuepublic Util.DatabaseBuilder withOwnerName(@NotNull @NotNull String ownerName)
ownerName
- new owner namepublic Util.DatabaseBuilder withOwnerType(org.apache.hadoop.hive.metastore.api.PrincipalType ownerType)
ownerType
- database owner type (USER or GROUP)public org.apache.hadoop.hive.metastore.api.Database build()
Copyright © 2018. All rights reserved.