sparksql整合hive创建外部表报错(求大佬解答)

sparksql整合hive创建外部表的时候报错
建表语句如下:

create external table if not exists bdm.itcast_bdm_order_goods(
user_id string,--用户ID
order_id string,--订单ID
order_no string,--订单号
sku_id bigint,--SKU编号
sku_name string,--SKU名称
goods_id bigint,--商品编号

) partitioned by (dt string)
row format delimited fields terminated by ','
lines terminated by '\n'
location '/business/itcast_bdm_order_goods';

报如下错误:

**Moved: 'hdfs://hann/business/itcast_bdm_order_goods' to trash at: hdfs://hann/user/root/.Trash/Current
Error in query: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:java.lang.IllegalArgumentException: java.net.UnknownHostExc**eption: nhann);

启动spark-sql的语句如下:

spark-sql --master spark://node01:7077 --driver-class-path /export/servers/hive-1.1.0-cdh5.14.0/lib/mysql-connector-java-5.1.38.jar --conf spark.sql.warehouse.dir=hdfs://hann/user/hive/warehouse

hive-site.xml配置文件如下:

<configuration>
        <property>
                <name>javax.jdo.option.ConnectionURL</name>
                <value>jdbc:mysql://node03.hadoop.com:3306/hive?createDatabaseIfNotExist=true</value>
        </property>

        <property>
                <name>javax.jdo.option.ConnectionDriverName</name>
                <value>com.mysql.jdbc.Driver</value>
        </property>
        <property>
                <name>javax.jdo.option.ConnectionUserName</name>
                <value>root</value>
        </property>
        <property>
                <name>javax.jdo.option.ConnectionPassword</name>
                <value>123456</value>
        </property>
      <!-- <property>
                <name>hive.cli.print.current.db</name>
                <value>true</value>
        </property>
        <property>
                <name>hive.cli.print.header</name>
                <value>true</value>
        </property>
        <property>
                <name>hive.server2.thrift.bind.host</name>
                <value>node03.hadoop.com</value>
        </property>
         <property>
                <name>hive.metastore.uris</name>
                <value>thrift://node03.hadoop.com:9083</value>
        </property>
        <property>
                <name>hive.metastore.client.socket.timeout</name>
                <value>3600</value>
        </property>-->

</configuration>
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐