question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Presto Hive StorageHandler - outputFormat should not be accessed from a null StorageFormat Error

See original GitHub issue

Hi,

I’m working with presto 0.170 version. Everything is working awesome, except Hive Custom Storage Handler external tables.

Getting outputFormat should not be accessed from a null StorageFormat error. Please help to fix.

Table DDL:

hive > show create table flights_hbase
CREATE EXTERNAL TABLE flights_hbase (
flight_id string,
flightnum string
)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cols:flightnum")
TBLPROPERTIES ("hbase.table.name" = "flights");
hive >

Added required storage handler and related jars to plugin connector dir on all worker and master nodes and restarted presto

$ ls -ltr /usr/local/presto-server-0.170/plugin/hive-hadoop2/h*
-rwxr-xr-x. 1 root        root        24164995 Mar 26 19:15 /usr/local/presto-server-0.170/plugin/hive-hadoop2/hadoop-apache2-0.10.jar
-rwxr-xr-x. 1 root        root          736658 Mar 26 19:15 /usr/local/presto-server-0.170/plugin/hive-hadoop2/httpclient-4.5.2.jar
-rwxr-xr-x. 1 root        root        26409112 Mar 26 19:15 /usr/local/presto-server-0.170/plugin/hive-hadoop2/hive-apache-1.2.0-1.jar
-rwxr-xr-x. 1 root        root          326724 Mar 26 19:15 /usr/local/presto-server-0.170/plugin/hive-hadoop2/httpcore-4.4.4.jar
-rwxr-xr-x. 1 root        root          901834 Mar 26 19:15 /usr/local/presto-server-0.170/plugin/hive-hadoop2/hive-dwrf-0.8.2.jar
-rwxr-xr-x. 1 prabhu prabhu  1366504 Mar 31 23:58 /usr/local/presto-server-0.170/plugin/hive-hadoop2/hbase-client.jar
-rwxr-xr-x. 1 prabhu prabhu   557343 Mar 31 23:58 /usr/local/presto-server-0.170/plugin/hive-hadoop2/hbase-common.jar
-rwxr-xr-x. 1 prabhu prabhu  4753129 Mar 31 23:58 /usr/local/presto-server-0.170/plugin/hive-hadoop2/hbase-protocol.jar
-rwxr-xr-x. 1 prabhu prabhu  4457393 Mar 31 23:59 /usr/local/presto-server-0.170/plugin/hive-hadoop2/hbase-server.jar
-rwxr-xr-x. 1 prabhu prabhu   118707 Mar 31 23:59 /usr/local/presto-server-0.170/plugin/hive-hadoop2/hive-hbase-handler-1.2.1000.2.5.3.0-37.jar
$

Querying on Presto:

presto:default> select * from flights_hbase limit 5;
Query 20170331_235243_00026_8wscc failed: outputFormat should not be accessed from a null StorageFormat
presto:default>

Thanks Prabhu

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
pkasinathancommented, Jun 3, 2017

Thanks @dain!

Does presto support other custom storage handlers? I’m trying to query Elastic Search External Hive table through presto and getting the same error.

presto:default> select * from acc_elastic;
Query 20170603_230413_00004_cwtww failed: outputFormat should not be accessed from a null StorageFormat
presto:default>

Please advice.

Thanks Prabhu

0reactions
kokosingcommented, Nov 13, 2018

Is there a way to make Presto ignore such tables (metadata refresh encounters an exception)?

Not yet today.

This issue looks like a duplicate https://github.com/prestodb/presto/issues/6972

Read more comments on GitHub >

github_iconTop Results From Across the Web

Athena : serDe should not be accessed from a null ...
While I'm running query against that table in Athena , getting below error. HIVE_UNKNOWN_ERROR: serDe should not be accessed from a null StorageFormat....
Read more >
presto报错:outputFormat should not be accessed from a null ...
像hbase,es这种在hive见外部表对于presto都是不可行的,也就是hive表InputFormat、OutputFormat不能为空,如下图就不行:...
Read more >
HiveMetastore outputFormat should not be accessed from a ...
HiveMetastore outputFormat should not be accessed from a null StorageFormat ... With this commit , starting Presto 0.152, we can't query System ...
Read more >
11.2. Hive Connector — Presto 0.141t Documentation
Metadata about how the data files are mapped to schemas and tables. This metadata is stored in a database such as MySQL and...
Read more >
Spark SQL and DataFrames - Spark 2.3.2 Documentation
To use these features, you do not need to have an existing Hive setup. Creating DataFrames. Scala; Java; Python; R. With a SparkSession...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found