加载数据后无法读取配置单元表

qgelzfjb  于 2021-06-26  发布在  Hive
关注(0)|答案(1)|浏览(350)

我在hive(beeline)中创建了一个表,命令如下:

create table testemp(id int, name string, role string) row format delimited fields terminated by ',';

我有一个小的自定义文件以及示例记录:

12345,John,Doe
67890,Mary,Poppins
2234,Poppy,Mariann

正在尝试将此文件中的数据加载到上面创建的表中:

load data inpath '/tmp/dataFiles/data.csv' overwrite into table testemp;
INFO  : Loading data to table testemp from hdfs://HAN/tmp/dataFiles/data.csv
INFO  : Table testemp stats: [numFiles=1, numRows=0, totalSize=169, rawDataSize=0]
No rows affected (0.132 seconds)

如你所见,数据甚至没有加载。现在当我在table上做选择的时候,我就是做不到。

select * from testemp;
Error: java.io.IOException: java.io.IOException: java.net.SocketException: Unexpected end of file from server (state=,code=0)

我不知道为什么会出现这个错误。有人能通过直线在他们的煤焦化星团上重现这个问题吗?
有什么想法吗?

yebdmbv4

yebdmbv41#

请确认您的文件名为data或data.csv,并相应地提及。文件存储在本地文件或hdfs中,如果是本地文件系统,则将使用(加载数据本地inpath…)。

相关问题