hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rupinder Singh <>
Subject Attempt to archive a partition in hive fails
Date Wed, 19 Mar 2014 12:29:54 GMT

I am trying to archive a partition in a hive table, but it keeps failing.
Env: Hadoop 2.2.0, Amazon EMR, Hive 0.11.0

The sequence of commands in hive is here:
hive> set hive.archive.enabled=true;
hive> set hive.archive.har.parentdir.settable=true;
hive> set har.partfile.size=1073741824;
hive> alter table hive_event_seq archive partition(name='Cp', countrycode='ab', year=2013,
intermediate.archived is hdfs://
intermediate.original is hdfs://
FAILED: Error in metadata: Couldn't create har URI from archive URI
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

In the hive log file, I see this exception:

2014-03-19 07:03:53,586 ERROR org.apache.hadoop.hive.ql.exec.Task (
- FAILED: Error in metadata: Couldn't create har URI from archive URI
org.apache.hadoop.hive.ql.metadata.HiveException: Couldn't create har URI from archive URI
        at org.apache.hadoop.hive.ql.exec.ArchiveUtils$HarPathHelper.<init>(
        at org.apache.hadoop.hive.ql.exec.DDLTask.archive(
        at org.apache.hadoop.hive.ql.exec.DDLTask.execute(
        at org.apache.hadoop.hive.ql.exec.Task.executeTask(
        at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(
        at org.apache.hadoop.hive.ql.Driver.launchTask(
        at org.apache.hadoop.hive.ql.Driver.execute(
        at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(
        at org.apache.hadoop.hive.cli.CliDriver.processLine(
        at org.apache.hadoop.hive.cli.CliDriver.main(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at org.apache.hadoop.util.RunJar.main(
Caused by: Illegal character in hostname at index 22: har://hdfs-
        at org.apache.hadoop.hive.ql.exec.ArchiveUtils$HarPathHelper.<init>(
        ... 17 more

The character at index 22 is '1' which should be fine.
Here's the table definition:
CREATE TABLE hive_event(m string, a string, ad string,....)
partitioned by (name string, countryCode string, year int, month int)
stored as sequencefile

I have tried different har.partfile.size settings and different file formats (rcfile, sequncefile)
but same error persists. Any pointers to uncovering the root cause are highly appreciated.


This email is intended for the person(s) to whom it is addressed and may contain information
that is PRIVILEGED or CONFIDENTIAL. Any unauthorized use, distribution, copying, or disclosure
by any person other than the addressee(s) is strictly prohibited. If you have received this
email in error, please notify the sender immediately by return email and delete the message
and any attachments from your system.
View raw message