hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krishna Kumar (JIRA)" <>
Subject [jira] Commented: (HIVE-1918) Add export/import facilities to the hive system
Date Fri, 21 Jan 2011 04:49:44 GMT


Krishna Kumar commented on HIVE-1918:

Why export/import needs this change: It is not the export part, but rather the import part
which needs this change. While creating a partition as part of an import, we need to be able
to create the partition along with its ancillary data including partition parameters. But
first part of the existing "create partition" flow (AddPartitionDesc -> DDLTask.addPartition
-> Hive.createPartition) did not support partition params specification but the second
part (metastore.api.Partition -> IMetaStoreClient.add_partition -> HiveMetaStore.HMSHandler.add_partition
-> ObjectStore.addPartition) does. So I added the ability to pass the partition parameters
along in the first part of the flow.

In terms of options for compatible changes, there are two I can see:

1. The solution suggested above. Add an additional ctor so that no existing code breaks.

public Partition(Table tbl, Map<String, String> partSpec, Path location) {
  this(tbl, partSpec, location, null);

public Partition(Table tbl, Map<String, String> partSpec, Path location, Map<String,
String> partParams) {...}

2. Have only the current ctor but in Hive.createPartition get the underlying metastore.api.Partition
and set the parameters to it before passing it on to the metastoreClient.


> Add export/import facilities to the hive system
> -----------------------------------------------
>                 Key: HIVE-1918
>                 URL:
>             Project: Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Krishna Kumar
>         Attachments: HIVE-1918.patch.txt
> This is an enhancement request to add export/import features to hive.
> With this language extension, the user can export the data of the table - which may be
located in different hdfs locations in case of a partitioned table - as well as the metadata
of the table into a specified output location. This output location can then be moved over
to another different hadoop/hive instance and imported there.  
> This should work independent of the source and target metastore dbms used; for instance,
between derby and mysql.
> For partitioned tables, the ability to export/import a subset of the partition must be
> Howl will add more features on top of this: The ability to create/use the exported data
even in the absence of hive, using MR or Pig. Please see
for these details.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message