Reply
Explorer
Posts: 35
Registered: ‎11-24-2015

impala : create table stored as avro

[ Edited ]

 

CREATE TABLE avro_examples_of_all_types (
                  >     id INT,
                  >     bool_col BOOLEAN,
                  >     tinyint_col TINYINT,
                  >     smallint_col SMALLINT,
                  >     int_col INT,
                  >     bigint_col BIGINT,
                  >     float_col FLOAT,
                  >     double_col DOUBLE,
                  >     date_string_col STRING,
                  >     string_col STRING
                  >   )
                  >   STORED AS AVRO
                  >   TBLPROPERTIES ('avro.schema.url'='hdfs://localhost:8020/avro_schemas/alltypes.json');

 

I am running a very similar statement as above but getting :

ERROR: AnalysisException: Failed to read Avro schema at: hdfs://localhost:8020/tmp/avroschemas/tbl.json. Call From host1.test.net/<ip address> to localhost:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused

 

I have the avro file in the above path in both hdfs and the local host that impala is running on (host1).

 

Appreciate the insights.

Cloudera Employee
Posts: 724
Registered: ‎03-23-2015

Re: impala : create table stored as avro

The error message:

Call From host1.test.net/<ip address> to localhost:8020 failed on connection exception: java.net.ConnectException

Means that Impala was not able to communicate with NN host via port 8020, are you sure the NN was healthy at the time?