using ${FILE} partitioned by (cs_sold_date_sk)] java.lang.RuntimeException: java.lang.ClassNotFoundException: Class com.aliyun.jindodata.oss.JindoOssFileSystem not found at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2688)
时间: 2023-09-30 14:12:18 浏览: 158
这个错误可能是因为在你的Hadoop配置文件中没有添加com.aliyun.jindodata.oss.JindoOssFileSystem这个类的路径,导致Hadoop无法找到这个类。你可以尝试在core-site.xml中添加以下内容:
```xml
<property>
<name>fs.jindooss.impl</name>
<value>com.aliyun.jindodata.oss.JindoOssFileSystem</value>
</property>
```
然后重新启动Hadoop集群,看看是否能解决这个问题。
相关问题
create table web_sales ( ws_sold_time_sk bigint, ws_ship_date_sk bigint, ws_item_sk bigint, ws_bill_customer_sk bigint, ws_bill_cdemo_sk bigint, ws_bill_hdemo_sk bigint, ws_bill_addr_sk bigint, ws_ship_customer_sk bigint, ws_ship_cdemo_sk bigint, ws_ship_hdemo_sk bigint, ws_ship_addr_sk bigint, ws_web_page_sk bigint, ws_web_site_sk bigint, ws_ship_mode_sk bigint, ws_warehouse_sk bigint, ws_promo_sk bigint, ws_order_number bigint, ws_quantity int, ws_wholesale_cost decimal(7,2), ws_list_price decimal(7,2), ws_sales_price decimal(7,2), ws_ext_discount_amt decimal(7,2), ws_ext_sales_price decimal(7,2), ws_ext_wholesale_cost decimal(7,2), ws_ext_list_price decimal(7,2), ws_ext_tax decimal(7,2), ws_coupon_amt decimal(7,2), ws_ext_ship_cost decimal(7,2), ws_net_paid decimal(7,2), ws_net_paid_inc_tax decimal(7,2), ws_net_paid_inc_ship decimal(7,2), ws_net_paid_inc_ship_tax decimal(7,2), ws_net_profit decimal(7,2), ws_sold_date_sk bigint ) using ${FILE} partitioned by (ws_sold_date_sk)]
这段代码的问题在于最后一个字符是一个多余的"]",应该将其删除。正确的代码如下:
```
create table web_sales (
ws_sold_time_sk bigint,
ws_ship_date_sk bigint,
ws_item_sk bigint,
ws_bill_customer_sk bigint,
ws_bill_cdemo_sk bigint,
ws_bill_hdemo_sk bigint,
ws_bill_addr_sk bigint,
ws_ship_customer_sk bigint,
ws_ship_cdemo_sk bigint,
ws_ship_hdemo_sk bigint,
ws_ship_addr_sk bigint,
ws_web_page_sk bigint,
ws_web_site_sk bigint,
ws_ship_mode_sk bigint,
ws_warehouse_sk bigint,
ws_promo_sk bigint,
ws_order_number bigint,
ws_quantity int,
ws_wholesale_cost decimal(7,2),
ws_list_price decimal(7,2),
ws_sales_price decimal(7,2),
ws_ext_discount_amt decimal(7,2),
ws_ext_sales_price decimal(7,2),
ws_ext_wholesale_cost decimal(7,2),
ws_ext_list_price decimal(7,2),
ws_ext_tax decimal(7,2),
ws_coupon_amt decimal(7,2),
ws_ext_ship_cost decimal(7,2),
ws_net_paid decimal(7,2),
ws_net_paid_inc_tax decimal(7,2),
ws_net_paid_inc_ship decimal(7,2),
ws_net_paid_inc_ship_tax decimal(7,2),
ws_net_profit decimal(7,2),
ws_sold_date_sk bigint
) using ${FILE} partitioned by (ws_sold_date_sk)
```
以下HOLODESK建表语句正确的有( ) 2分 CREATE FACT TABLE WECHAT_HISTORY( ID STRING, STORE STRING, TRANS_NO STRING, TRANS_DATE DATE, TRANS_TYPE STRING) PARTITIONED BY (TRANS_DATE) CLUSTERED BY (ID) STORED AS HOLODESK; CREATE FACT TABLE WECHAT_HISTORY( ID STRING, STORE STRING, TRANS_NO STRING, TRANS_DATE DATE, TRANS_TYPE STRING) PARTITIONED BY (PARTITION_DATE DATE) CLUSTERED BY (ID) STORED AS HOLODESK; CREATE TABLE WECHAT_HISTORY( ID STRING, STORE STRING, TRANS_NO STRING, TRANS_DATE DATE, TRANS_TYPE STRING) PARTITIONED BY (PARTITION_DATE DATE) CLUSTERED BY (ID) INTO 3 BUCKETS STORED AS HOLODESK; CREATE TABLE WECHAT_HISTORY( ID STRING, STORE STRING, TRANS_NO STRING, TRANS_DATE DATE, TRANS_TYPE STRING) PARTITIONED BY (PARTITION_DATE DATE) CLUSTERED BY (ID) STORED AS HOLODESK;
以下HOLODESK建表语句正确的有:
1. CREATE FACT TABLE WECHAT_HISTORY( ID STRING, STORE STRING, TRANS_NO STRING, TRANS_DATE DATE, TRANS_TYPE STRING) PARTITIONED BY (TRANS_DATE) CLUSTERED BY (ID) STORED AS HOLODESK;
2. CREATE TABLE WECHAT_HISTORY( ID STRING, STORE STRING, TRANS_NO STRING, TRANS_DATE DATE, TRANS_TYPE STRING) PARTITIONED BY (PARTITION_DATE DATE) CLUSTERED BY (ID) STORED AS HOLODESK;
第一条语句是创建一个事实表WECHAT_HISTORY,使用TRANS_DATE进行分区,使用ID进行聚集,并将数据存储为HOLODESK格式。
第二条语句是创建一个表WECHAT_HISTORY,使用PARTITION_DATE进行分区,使用ID进行聚集,并将数据存储为HOLODESK格式。
第三条语句中的BUCKETS是无效的关键字,不符合HOLODESK建表语法规范,因此是错误的。
第四条语句只缺少了FACT关键字,应该是CREATE FACT TABLE WECHAT_HISTORY,其他部分是正确的。
所以,正确的建表语句有两个:
1. CREATE FACT TABLE WECHAT_HISTORY( ID STRING, STORE STRING, TRANS_NO STRING, TRANS_DATE DATE, TRANS_TYPE STRING) PARTITIONED BY (TRANS_DATE) CLUSTERED BY (ID) STORED AS HOLODESK;
2. CREATE TABLE WECHAT_HISTORY( ID STRING, STORE STRING, TRANS_NO STRING, TRANS_DATE DATE, TRANS_TYPE STRING) PARTITIONED BY (PARTITION_DATE DATE) CLUSTERED BY (ID) STORED AS HOLODESK;
阅读全文