0

我们的 S3 存储桶出现了非常不寻常的行为,并且这种行为并不一致。因此,我们无法确定问题所在。现在谈到这个问题,我触发了一个查询(创建外部表)。这导致删除我在外部表中指向的文件夹。这对我们来说已经发生了 3-4 次。那么,您能否解释一下这种行为。为方便起见,我附上了外部表查询和在 S3 存储桶上执行的操作的日志。

询问:

create table apr_2(date_local string, time_local string,s_computername string,c_ip string,s_ip string,s_port string,s_sitename string, referer string, localfile string, TimeTakenMS string, status string, w3status string, sc_substatus string, uri string, qs string, sc_bytes string, cs_bytes string, cs_username string, cs_User_Agent string, s_proxy string, c_protocol string, cs_version string, cs_method string, cs_Cookie string, cs_Host string, w3wpbytes string, RequestsPerSecond string, CPU_Utilization string, BeginRequest_UTC string, EndRequest_UTC string, time string, logdate string)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\001' location 's3://logs/apr_2_com'

日志:

 REST.DELETE.OBJECT logs/apr_2_com/000002.tar.gz 
 REST.DELETE.OBJECT logs/apr_2_com/000001.tar.gz 
4

1 回答 1

0

尝试使用这种语法 -

    create external table if not exists apr_2(date_local string, time_local string,s_computername string,c_ip string,s_ip string,s_port string,s_sitename string, referer string, localfile string, TimeTakenMS string, status string, w3status string, sc_substatus string, uri string, qs string, sc_bytes string, cs_bytes string, cs_username string, cs_User_Agent string, s_proxy string, c_protocol string, cs_version string, cs_method string, cs_Cookie string, cs_Host string, w3wpbytes string, RequestsPerSecond string, CPU_Utilization string, BeginRequest_UTC string, EndRequest_UTC string, time string, logdate string)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\001' location 's3://logs/apr_2_com'
于 2013-07-11T00:08:46.820 回答