THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- Remove job properties.
- All the properties required by the partition info are available with the Partition. HCatPartitionInfo( present PartInfo) should make use of it.
- There is no need to store HCatTableInfo as a member. It is only used to obtain data column and value mapping. There can be a method that can take a HCatTableInfo as input.
Usage
Code Block |
---|
Configuration config = new Configuration(); config.add("hive-site.xml"); HCatTempletonClient client = new HCatTempletonClient(config); HCatCreateTableDesc desc = new HCatCreateTableDesc(); desc.setTableName("demo_table"); desc.setDatabaseName("db1"); desc.setFileFormat("rcfile"); ArrayList<HCatFieldSchema> cols = new ArrayList<HCatFieldSchema>(); cols.add(new HCatFieldSchema("col1", Type.INT, "comment1")); cols.add(new HCatFieldSchema("col2", Type.STRING, "comment2")); desc.setCols(cols); //Validate desc.validateCommandDesc(); boolean success = client.createTable(desc); |
...