Versions Compared

Key

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

...

Modification to Existing Classes:

HCatTableInfo

...

In the current code base, HCatTableInfo class acts a wrapper for the Table class, providing only required information to the users. Similar classes
need to be added for database and partition. Also, there needs to appropriate builder methods to construct HCatTableInfo, HCatPartitionInfo and
HCatDatabaseInfo classes.

The current relationship between HCatTableInfo, StorerInfo and PartInfo is as follows: Image Added

The "PartInfo" class can be modified to act as a wrapper to partition ( similar to HCatTableInfo). The following modifications need to be done:

  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.

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

...

Discussion Topics

  1. Templeton APIs should given as much information as HiveMetaStoreClient does using its APIs.
  2. Delete APIs in Templeton have user group and permissions as input parameters.
  3. The describe partition result in Templeton has column info , which Partition does not have.
  4. Addition of two more APIs, "MarkSetDone" and "listPartitionsByFilter"