You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Tim Armstrong (JIRA)" <ji...@apache.org> on 2018/06/11 16:50:00 UTC

[jira] [Resolved] (IMPALA-646) Handle gracefully an LZO-text table containing regular text files

     [ https://issues.apache.org/jira/browse/IMPALA-646?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Armstrong resolved IMPALA-646.
----------------------------------
    Resolution: Cannot Reproduce

We're a lot more lenient here, especially after IMPALA-6941

> Handle gracefully an LZO-text table containing regular text files
> -----------------------------------------------------------------
>
>                 Key: IMPALA-646
>                 URL: https://issues.apache.org/jira/browse/IMPALA-646
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Backend
>    Affects Versions: Impala 1.1.1
>            Reporter: John Russell
>            Priority: Minor
>              Labels: usability
>
> Somehow I managed to get Hive to create an LZO-text table yet not actually compress the contents, so the data files did not have a .lzo suffix:
> hive> create table lzo_t (s string) STORED AS INPUTFORMAT 'com.hadoop.mapred.DeprecatedLzoTextInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat';
> hive> describe formatted lzo_t;
> OK
> # col_name              data_type               comment
> s                       string                  None
> # Detailed Table Information
> Database:               default
> Owner:                  cloudera
> CreateTime:             Mon Oct 28 15:51:42 EDT 2013
> LastAccessTime:         UNKNOWN
> Protect Mode:           None
> Retention:              0
> Location:               hdfs://127.0.0.1:8020/user/hive/warehouse/lzo_t
> Table Type:             MANAGED_TABLE
> Table Parameters:
>         numFiles                2
>         numPartitions           0
>         numRows                 0
>         rawDataSize             0
>         totalSize               139667
>         transient_lastDdlTime   1382990204
> # Storage Information
> SerDe Library:          org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
> InputFormat:            com.hadoop.mapred.DeprecatedLzoTextInputFormat
> OutputFormat:           org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
> Compressed:             No
> Num Buckets:            -1
> Bucket Columns:         []
> Sort Columns:           []
> Storage Desc Params:
>         serialization.format    1
> Time taken: 4.479 seconds
> hive> insert into table lzo_t select s_manager from store;
> hive> insert into table lzo_t select s from parquet.billion_text limit 10000;
> $ hdfs dfs -ls /user/hive/warehouse/lzo_t
> Found 2 items
> -rw-r--r--   1 cloudera supergroup        156 2013-10-28 15:52 /user/hive/warehouse/lzo_t/000000_0
> -rw-r--r--   1 cloudera supergroup     139511 2013-10-28 15:56 /user/hive/warehouse/lzo_t/000000_0_copy_1
> $ hdfs dfs -cat /user/hive/warehouse/lzo_t/000000_0
> William Ward
> Scott Smith
> Scott Smith
> Edwin Adams
> Edwin Adams
> Edwin Adams
> David Thomas
> Brett Yates
> Brett Yates
> Raymond Jacobs
> The data should be compressed, but it's not.
> Impala fails like so trying to access the table:
> [localhost:21000] > describe formatted lzo_t;
> Query: describe formatted lzo_t
> ERROR: AnalysisException: Failed to load metadata for table: default.lzo_t
> CAUSED BY: TableLoadingException: TableLoadingException: Failed to load metadata for table: lzo_t
> CAUSED BY: RuntimeException: Expected file with .lzo suffix: hdfs://127.0.0.1:8020/user/hive/warehouse/lzo_t/000000_0
> com.cloudera.impala.catalog.TableLoadingException: Failed to load metadata for table: lzo_t
>         at com.cloudera.impala.catalog.HdfsTable.load(HdfsTable.java:776)
>         at com.cloudera.impala.catalog.Table.load(Table.java:174)
>         at com.cloudera.impala.catalog.Db.loadTable(Db.java:96)
>         at com.cloudera.impala.catalog.Db.access$000(Db.java:53)
>         at com.cloudera.impala.catalog.Db$1.load(Db.java:70)
>         at com.cloudera.impala.catalog.Db$1.load(Db.java:66)
>         at com.cloudera.impala.catalog.CatalogObjectCache$1.call(CatalogObjectCache.java:229)
>         at com.cloudera.impala.catalog.CatalogObjectCache$1.call(CatalogObjectCache.java:226)
>         at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4767)
>         at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568)
>         at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350)
>         at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)
>         at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)
>         at com.google.common.cache.LocalCache.get(LocalCache.java:3965)
>         at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4764)
>         at com.cloudera.impala.catalog.CatalogObjectCache.get(CatalogObjectCache.java:226)
>         at com.cloudera.impala.catalog.Db.getTable(Db.java:190)
>         at com.cloudera.impala.catalog.Catalog$2.run(Catalog.java:470)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.RuntimeException: Expected file with .lzo suffix: hdfs://127.0.0.1:8020/user/hive/warehouse/lzo_t/000000_0
>         at com.cloudera.impala.catalog.HdfsPartition.<init>(HdfsPartition.java:278)
>         at com.cloudera.impala.catalog.HdfsPartition.<init>(HdfsPartition.java:288)
>         at com.cloudera.impala.catalog.HdfsTable.addPartition(HdfsTable.java:627)
>         at com.cloudera.impala.catalog.HdfsTable.loadPartitions(HdfsTable.java:462)
>         at com.cloudera.impala.catalog.HdfsTable.load(HdfsTable.java:757)
>         ... 20 more
> Perhaps the error message could be more friendlier, or if this is a common occurrence Impala could fall back to considering this a normal text table. Hive is able to query the table despite the mismatching metadata.
> If something else is necessary on the Hive side to get the data to compress, I'm happy to add to the instructions here:
> http://www.cloudera.com/content/cloudera-content/cloudera-docs/Impala/latest/Installing-and-Using-Impala/ciiu_txtfile.html?scroll=lzo_unique_1
> We say, "Files in an LZO-compressed table must use the .lzo extension" but in this case Hive is not cooperating.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org