shell脚本失败

vwhgwdsa  于 2021-06-27  发布在  Hive
关注(0)|答案(0)|浏览(195)

我正在编写一个shell脚本,将数据从配置单元表加载到apachesolr模式中

SRC=$1

    TGT=$2

    SOLR_COLLECTION=$3

    SCHEMA=$(python schemaFetch.py ${SRC})

    hive -e "ADD JAR /hadoopfs/fs1/dev/solr-hive-serde-3.0.0.jar;
    create external table if not exists ${TGT}${SCHEMA}
    row format delimited
    fields terminated by ','
    STORED BY 'com.lucidworks.hadoop.hive.LWStorageHandler'
    TBLPROPERTIES('solr.server.url' = 'http://10.165.137.139:8886/solr/',
    'solr.collection' = '${SOLR_COLLECTION}',
    'solr.query' = '*:*');"

     hive -e "insert into ${TGT} select * from ${SRC};"

但它显示运行时异常:
失败:runtimeexception org.apache.hadoop.hive.ql.metadata.hiveexception:加载storage handler.com.lucidworks.hadoop.hive.lwstoragehandler时出错
然而,在特定的配置单元位置正在创建模式,下面列出的insert into query无法从脚本中工作。

hive -e "insert into ${TGT} select * from ${SRC};

我不明白背后发生了什么。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题