15 package com.cloudera.impala.analysis;
17 import org.apache.hadoop.fs.permission.FsAction;
18 import org.apache.hadoop.hive.metastore.MetaStoreUtils;
23 import com.cloudera.impala.thrift.TCreateDbParams;
38 this(dbName, null, null,
false);
48 boolean ifNotExists) {
49 this.dbName_ = dbName;
50 this.comment_ = comment;
51 this.location_ = location;
52 this.ifNotExists_ = ifNotExists;
62 StringBuilder sb =
new StringBuilder(
"CREATE DATABASE");
71 TCreateDbParams params =
new TCreateDbParams();
72 params.setDb(
getDb());
74 params.setLocation(
location_ == null ? null : location_.toString());
82 if (!MetaStoreUtils.validateName(
dbName_)) {
96 location_.analyze(analyzer,
Privilege.ALL, FsAction.READ_WRITE);
void analyze(Analyzer analyzer)
CreateDbStmt(String dbName)
final boolean ifNotExists_
static final String DB_ALREADY_EXISTS_ERROR_MSG
CreateDbStmt(String dbName, String comment, HdfsUri location, boolean ifNotExists)
TCreateDbParams toThrift()