Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
pkasinathan opened this issue Apr 1, 2017 · 6 comments

Comments

@pkasinathan
Copy link

pkasinathan commented Apr 1, 2017

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

@dain
Copy link
Contributor

dain commented Apr 1, 2017

Can you run with the --debug command line option and post the full stack trace?

@dain
Copy link
Contributor

dain commented Apr 1, 2017

Oh, never mind the --degug request. Presto does not support the HBaseStorageHandler, so this isn't going to work anyway. Currently, I don't think anyone is considering adding support for this.

@pkasinathan
Copy link
Author

pkasinathan commented 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

@dain
Copy link
Contributor

dain commented Jun 5, 2017 via email

@danielhaviv
Copy link

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

@kokosing
Copy link
Contributor

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

Not yet today.

This issue looks like a duplicate #6972

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants