Examples of CreateDatabaseDesc


Examples of org.apache.hadoop.hive.ql.plan.CreateDatabaseDesc

    // Create the db
    Hive db;
    try {
      db = Hive.get(conf);

      CreateDatabaseDesc createDatabaseDesc = work.getCreateDatabaseDesc();
      if (null != createDatabaseDesc) {
        return createDatabase(db, createDatabaseDesc);
      }

      DropDatabaseDesc dropDatabaseDesc = work.getDropDatabaseDesc();
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.CreateDatabaseDesc

    // Create the db
    Hive db;
    try {
      db = Hive.get(conf);

      CreateDatabaseDesc createDatabaseDesc = work.getCreateDatabaseDesc();
      if (null != createDatabaseDesc) {
        return createDatabase(db, createDatabaseDesc);
      }

      DropDatabaseDesc dropDatabaseDesc = work.getDropDatabaseDesc();
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.CreateDatabaseDesc

      default:
        throw new SemanticException("Unrecognized token in CREATE DATABASE statement");
      }
    }

    CreateDatabaseDesc createDatabaseDesc =
        new CreateDatabaseDesc(dbName, dbComment, dbLocation, ifNotExists);
    if (dbProps != null) {
      createDatabaseDesc.setDatabaseProperties(dbProps);
    }

    rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(),
        createDatabaseDesc), conf));
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.CreateDatabaseDesc

    // Create the db
    Hive db;
    try {
      db = Hive.get(conf);

      CreateDatabaseDesc createDatabaseDesc = work.getCreateDatabaseDesc();
      if (null != createDatabaseDesc) {
        return createDatabase(db, createDatabaseDesc);
      }

      DropDatabaseDesc dropDatabaseDesc = work.getDropDatabaseDesc();
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.CreateDatabaseDesc

      default:
        throw new SemanticException("Unrecognized token in CREATE DATABASE statement");
      }
    }

    CreateDatabaseDesc createDatabaseDesc =
        new CreateDatabaseDesc(dbName, dbComment, dbLocation, ifNotExists);
    if (dbProps != null) {
      createDatabaseDesc.setDatabaseProperties(dbProps);
    }

    rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(),
        createDatabaseDesc), conf));
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.CreateDatabaseDesc

  }
 
  @Override
  protected void authorizeDDLWork(HiveSemanticAnalyzerHookContext context,
      Hive hive, DDLWork work) throws HiveException {
    CreateDatabaseDesc createDb = work.getCreateDatabaseDesc();
    if (createDb != null) {
      Database db = new Database(createDb.getName(), createDb.getComment(),
          createDb.getLocationUri(), createDb.getDatabaseProperties());
      authorize(db, Privilege.CREATE);
    }
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.CreateDatabaseDesc

  }

  @Override
  protected void authorizeDDLWork(HiveSemanticAnalyzerHookContext context,
                  Hive hive, DDLWork work) throws HiveException {
    CreateDatabaseDesc createDb = work.getCreateDatabaseDesc();
    if (createDb != null) {
      Database db = new Database(createDb.getName(), createDb.getComment(),
        createDb.getLocationUri(), createDb.getDatabaseProperties());
      authorize(db, Privilege.CREATE);
    }
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.CreateDatabaseDesc

  }

  @Override
  protected void authorizeDDLWork(HiveSemanticAnalyzerHookContext context,
                  Hive hive, DDLWork work) throws HiveException {
    CreateDatabaseDesc createDb = work.getCreateDatabaseDesc();
    if (createDb != null) {
      Database db = new Database(createDb.getName(), createDb.getComment(),
        createDb.getLocationUri(), createDb.getDatabaseProperties());
      authorize(db, Privilege.CREATE);
    }
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.CreateDatabaseDesc

    // Create the db
    Hive db;
    try {
      db = Hive.get(conf);

      CreateDatabaseDesc createDatabaseDesc = work.getCreateDatabaseDesc();
      if (null != createDatabaseDesc) {
        return createDatabase(db, createDatabaseDesc);
      }

      DropDatabaseDesc dropDatabaseDesc = work.getDropDatabaseDesc();
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.CreateDatabaseDesc

      default:
        throw new SemanticException("Unrecognized token in CREATE DATABASE statement");
      }
    }

    CreateDatabaseDesc createDatabaseDesc =
        new CreateDatabaseDesc(dbName, dbComment, dbLocation, ifNotExists);
    if (dbProps != null) {
      createDatabaseDesc.setDatabaseProperties(dbProps);
    }

    rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(),
        createDatabaseDesc), conf));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.