Examples of DropTableDesc


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

 
  private void analyzeAlterTableDropParts(ASTNode ast) throws SemanticException {
    String tblName = unescapeIdentifier(ast.getChild(0).getText());
    // get table metadata
    List<Map<String, String>> partSpecs = getPartitionSpecs(ast);
    dropTableDesc dropTblDesc = new dropTableDesc(tblName, partSpecs);
    rootTasks.add(TaskFactory.get(new DDLWork(dropTblDesc), conf));
  }
View Full Code Here

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

      createTableDesc crtTbl = work.getCreateTblDesc();
      if (crtTbl != null) {
        return createTable(db, crtTbl);
      }

      dropTableDesc dropTbl = work.getDropTblDesc();
      if (dropTbl != null) {
        return dropTable(db, dropTbl);
      }

      alterTableDesc alterTbl = work.getAlterTblDesc();
View Full Code Here

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

      createTableLikeDesc crtTblLike = work.getCreateTblLikeDesc();
      if (crtTblLike != null) {
        return createTableLike(db, crtTblLike);
      }

      dropTableDesc dropTbl = work.getDropTblDesc();
      if (dropTbl != null) {
        return dropTable(db, dropTbl);
      }

      alterTableDesc alterTbl = work.getAlterTblDesc();
View Full Code Here

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

  }

  private void analyzeDropTable(ASTNode ast)
    throws SemanticException {
    String tableName = unescapeIdentifier(ast.getChild(0).getText());
    dropTableDesc dropTblDesc = new dropTableDesc(tableName);
    rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), dropTblDesc), conf));
  }
View Full Code Here

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

  private void analyzeAlterTableDropParts(ASTNode ast) throws SemanticException {
    String tblName = unescapeIdentifier(ast.getChild(0).getText());
    // get table metadata
    List<Map<String, String>> partSpecs = getPartitionSpecs(ast);
    dropTableDesc dropTblDesc = new dropTableDesc(tblName, partSpecs);
    rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), dropTblDesc), conf));
  }
View Full Code Here

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

      createTableLikeDesc crtTblLike = work.getCreateTblLikeDesc();
      if (crtTblLike != null) {
        return createTableLike(db, crtTblLike);
      }

      dropTableDesc dropTbl = work.getDropTblDesc();
      if (dropTbl != null) {
        return dropTable(db, dropTbl);
      }

      alterTableDesc alterTbl = work.getAlterTblDesc();
View Full Code Here

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

  }
 
  private void analyzeDropTable(ASTNode ast)
    throws SemanticException {
    String tableName = unescapeIdentifier(ast.getChild(0).getText());   
    dropTableDesc dropTblDesc = new dropTableDesc(tableName);
    rootTasks.add(TaskFactory.get(new DDLWork(dropTblDesc), conf));
  }
View Full Code Here

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

 
  private void analyzeAlterTableDropParts(ASTNode ast) throws SemanticException {
    String tblName = unescapeIdentifier(ast.getChild(0).getText());
    // get table metadata
    List<Map<String, String>> partSpecs = getPartitionSpecs(ast);
    dropTableDesc dropTblDesc = new dropTableDesc(tblName, partSpecs);
    rootTasks.add(TaskFactory.get(new DDLWork(dropTblDesc), conf));
  }
View Full Code Here

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

        // create the table
        db.createTable(tbl);
        return 0;
      }

      dropTableDesc dropTbl = work.getDropTblDesc();
      if (dropTbl != null) {
        if(dropTbl.getPartSpecs() == null) {
          // drop the table
          db.dropTable(dropTbl.getTableName());
        } else {
          // drop partitions in the list
          Table tbl  = db.getTable(dropTbl.getTableName());
          List<Partition> parts = new ArrayList<Partition>();
          for(HashMap<String, String> partSpec : dropTbl.getPartSpecs()) {
            Partition part = db.getPartition(tbl, partSpec, false);
            if(part == null) {
              console.printInfo("Partition " + partSpec + " does not exist.");
            } else {
              parts.add(part);
            }
          }
          // drop all existing partitions from the list
          for (Partition partition : parts) {
            console.printInfo("Dropping the partition " + partition.getName());
            db.dropPartition(MetaStoreUtils.DEFAULT_DATABASE_NAME,
                dropTbl.getTableName(),
                partition.getValues(),
                true); //drop data for the partition
          }
        }
        return 0;
View Full Code Here

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

  }
 
  private void analyzeDropTable(CommonTree ast)
    throws SemanticException {
    String tableName = ast.getChild(0).getText();   
    dropTableDesc dropTblDesc = new dropTableDesc(tableName);
    rootTasks.add(TaskFactory.get(new DDLWork(dropTblDesc), 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.