Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Remove job properties.
  2. All the properties required by the partition info are available with the Partition. HCatPartitionInfo( present PartInfo) should make use of it.
  3. 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.

Image Added

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);

...