Examples of dropDatabase()


Examples of org.apache.hadoop.hive.metastore.HiveMetaStoreClient.dropDatabase()

    FileOutputStream to = new FileOutputStream(dataFile);
    Resources.copy(Resources.getResource(SINGLE_TYPE_DATA_FILE_NAME), to);
    to.close();

    HiveMetaStoreClient client = context.getMetaStoreClient(ADMIN1);
    client.dropDatabase(dbName, true, true, true);
    createMetastoreDB(client, dbName);
    client.close();

  }
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.HiveMetaStoreClient.dropDatabase()

   */
  @Test
  public void testServerPrivileges() throws Exception {
    String tabName = "tab1";
    HiveMetaStoreClient client = context.getMetaStoreClient(ADMIN1);
    client.dropDatabase(dbName, true, true, true);

    createMetastoreDB(client, dbName);
    createMetastoreTable(client, dbName, tabName,
        Lists.newArrayList(new FieldSchema("col1", "int", "")));
    assertEquals(1, client.getTables(dbName, tabName).size());
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.HiveMetaStoreClient.dropDatabase()

    createMetastoreDB(client, dbName);
    createMetastoreTable(client, dbName, tabName,
        Lists.newArrayList(new FieldSchema("col1", "int", "")));
    assertEquals(1, client.getTables(dbName, tabName).size());
    client.dropTable(dbName, tabName);
    client.dropDatabase(dbName, true, true, true);
  }

  /**
   * verify non-admin user can not create or drop DB
   * @throws Exception
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.HiveMetaStoreClient.dropDatabase()

            "server=server1->db=" + dbName + "->table=*->action=SELECT")
        .setUserGroupMapping(StaticUserGroup.getStaticMapping());
    writePolicyFile(policyFile);

    HiveMetaStoreClient client = context.getMetaStoreClient(ADMIN1);
    client.dropDatabase(dbName, true, true, true);
    createMetastoreDB(client, dbName);
    client.close();
  }

  /**
 
View Full Code Here

Examples of org.apache.hcatalog.api.HCatClient.dropDatabase()

        client.createDatabase(dbDesc);
    }

    public static  void dropDatabase(String metaStoreUrl, String databaseName) throws Exception {
        HCatClient client = HiveCatalogService.get(metaStoreUrl);
        client.dropDatabase(databaseName, true, HCatClient.DropDBMode.CASCADE);
    }

    public static void createTable(String metaStoreUrl, String databaseName,
                                   String tableName) throws Exception {
        HCatClient client = HiveCatalogService.get(metaStoreUrl);
View Full Code Here

Examples of org.dbwiki.driver.rdbms.DatabaseConnector.dropDatabase()

      Connection con = connector.getConnection();
      Statement stmt = con.createStatement();
      stmt.execute("DELETE FROM " + RelationDatabase + " WHERE " + RelDatabaseColName + " = '" + name + "'");
      System.out.println("DELETE FROM " + RelationDatabase + " WHERE " + RelDatabaseColName + " = '" + name + "'");
      stmt.close();
      connector.dropDatabase(con, name);
      /*Statement stmt = con.createStatement();
      stmt.execute("DELETE FROM " + RelationDatabase + " WHERE " + RelDatabaseColName + " = '" + name + "'");
      stmt.close();*/
      con.close();
    } catch (Exception exception) {
View Full Code Here

Examples of org.geotools.data.postgis.PostgisNGDataStoreFactory.dropDatabase()

        store.createSchema(DataUtilities.createType("test", "id:String,polygonProperty:Polygon:srid=32615"));
        store.getSchema("test");
       
        // now disconnect and drop
        store.dispose();
        factory.dropDatabase(params);
       
        // try to connect again, it must fail
        params.remove(PostgisNGDataStoreFactory.CREATE_DB_IF_MISSING.key);
        try {
            store = factory.createDataStore(params);
View Full Code Here

Examples of org.sf.bee.persistence.sql.executors.AbstractSQLExecutor.dropDatabase()

            final BeePersistenceProperties props) throws Exception {
        final AbstractSQLExecutor exec = _execfactory.create(props);
        if (null != exec) {
            exec.open();
            try {
                exec.dropDatabase();
                exec.createDatabase();
            } catch (Throwable t) {
                // may be tables doest not exists
            }
            //-- recreate schema tables --//
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.