by shigemk2

当面は技術的なことしか書かない

Can’t make directory for path

EMRとかAthenaとかでCREATE TABLEでLOCATIONをS3にするときに気をつけること。 パスはオブジェクトキーなので、ディレクトリと同名のファイルがあったら Can’t make directory for path なるエラーになる。

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Got exception: java.io.IOException Can’t make directory for path ‘s3://bucket/path/to’ since it is a file.)

https://forums.aws.amazon.com/thread.jspa?threadID=66736