我正在从 IBM Cloud Object Storage 上的 csv 文件创建一个外部配置单元表。我在使用 clsadmin 用户 ssh 进入集群时使用直线客户端。我能够建立jdbc连接。创建表时出现以下错误。
csv 文件位于存储桶中 - bucket-name-masked,我已将 fs.cos 参数集命名为“hivetest”
0: jdbc:hive2://***hostname-masked***> CREATE EXTERNAL TABLE NYC311Complaints (UniqueKey string, CreatedDate string, ClosedDate string, Agency string, AgencyName string, ComplaintType string, Descriptor string, LocationType string, IncidentZip string, IncidentAddress string, StreetName string, CrossStreet1 string, CrossStreet2 string, IntersectionStreet1 string, IntersectionStreet2 string, AddressType string, City string, Landmark string, FacilityType string, Status string, DueDate string, ResolutionDescription string, ResolutionActionUpdatedDate string, CommunityBoard string, Borough string, XCoordinateStatePlane string, YCoordinateStatePlane string, ParkFacilityName string, ParkBorough string, SchoolName string, SchoolNumber string, SchoolRegion string, SchoolCode string, SchoolPhoneNumber string, SchoolAddress string, SchoolCity string, SchoolState string, SchoolZip string, SchoolNotFound string, SchoolorCitywideComplaint string, VehicleType string, TaxiCompanyBorough string, TaxiPickUpLocation string, BridgeHighwayName string, BridgeHighwayDirection string, RoadRamp string, BridgeHighwaySegment string, GarageLotName string, FerryDirection string, FerryTerminalName string, Latitude string, Longitude string, Location string) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LOCATION 'cos://*bucket-name-masked*.hivetest/IAE_examples_data_311NYC.csv';
错误:处理语句时出错:FAILED:执行错误,从 org.apache.hadoop.hive.ql.exec.DDLTask 返回代码 1。MetaException(message:cos:// bucket-name-masked .hivetest/IAE_examples_data_311NYC.csv 不是目录或无法创建目录) (state=08S01,code=1) 0: jdbc:hive2:// hostname-masked >
这看起来像是一个权限问题,但我已经为 hdfs 和 cos 中的相关用户 ID 提供了所有凭据