Package org.apache.hadoop.hive.ql.metadata

Examples of org.apache.hadoop.hive.ql.metadata.Hive.createTable()


        tbl.setOwner(System.getProperty("user.name"));
        // set create time
        tbl.getTTable().setCreateTime((int) (System.currentTimeMillis()/1000));

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

      dropTableDesc dropTbl = work.getDropTblDesc();
      if (dropTbl != null) {
View Full Code Here


    Hive h = Hive.get(conf);
    List<String> cols = new ArrayList<String>();
    cols.add("a");
    List<String> partCols = new ArrayList<String>();
    partCols.add("ds");
    h.createTable("foo", cols, partCols, OrcInputFormat.class, OrcOutputFormat.class);
    Table t = h.getTable("foo");
    Map<String, String> partSpec = new HashMap<String, String>();
    partSpec.put("ds", "today");
    h.createPartition(t, partSpec);
  }
View Full Code Here

    Hive h = Hive.get(conf);
    List<String> cols = new ArrayList<String>();
    cols.add("a");
    List<String> partCols = new ArrayList<String>();
    partCols.add("ds");
    h.createTable("foo", cols, partCols, OrcInputFormat.class, OrcOutputFormat.class);
    Table t = h.getTable("foo");
    Map<String, String> partSpec = new HashMap<String, String>();
    partSpec.put("ds", "today");
    h.createPartition(t, partSpec);
  }
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.