0
私はavroとハイブを初めて使いました。使用方法ハイブ実行エラー
tblproperties('avro.schema.url'='somewhereinHDFS/categories.avsc')
私は
create table categories (id Int , dep_Id Int , name String)
stored as avrofile
tblproperties('avro.schema.url'=
'hdfs://quickstart.cloudera/user/cloudera/data/retail_avro_avsc/categories.avsc')
のように、このcreate
のコマンドを実行しますが、なぜ私は完全なスキーマが含まれているavsc
ファイルを与えている場合でも、上記のコマンドでid Int, dep_Id Int
を使用する必要があります。
create table categories stored as avrofile
tblproperties('avro/schema.url'=
'hdfs://quickstart.cloudera/user/cloudera/data/retail_avro_avsc/categories.avsc')
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask.
java.lang.RuntimeException: MetaException(message:org.apache.hadoop.hive.serde2.SerDeException
Encountered AvroSerdeException determining schema.
Returning signal schema to indicate problem:
Neither avro.schema.literal nor avro.schema.url specified,
can't determine table schema)
なぜavsc
ファイルが存在し、それが既にスキーマが含まれている場合でも、スキーマを指定するハイブ必要はありませんか?