beliefer commented on issue #23841: [SPARK-26936][SQL] Fix bug of insert overwrite local dir can not create temporary path in local staging directory URL: https://github.com/apache/spark/pull/23841#issuecomment-478073321 > Yeah, I think that's a potential problem. We don't know whether that same path is valid on a distributed store. I agree there's a problem to fix here. Is there any standard tmp dir you can instead write to in this case rather than reusing that local path as a distributed path? The purpose of executing this command is to write the data to a local path. So the `targetPath` should be a `local` path. The `writeToPath` created with `localFileSystem.makeQualified(targetPath)` used to confirm the final path which store result data. The `localFileSystem`'s type is `LocalFileSystem` so `writeToPath` is a local qualified `targetPath`. The `qualifiedPath` is always a distributed path in `yarn-client` deploy mode. The `tmpPath` is created with `getExternalTmpPath` and `qualifiedPath` and used as temporary storage of result data. I think `getExternalTmpPath` used to generate a string about standard tmp dir. If `qualifiedPath` is a local path, the `tmpPath` is created with `getExternalTmpPath` is a local path too. If `qualifiedPath` is a distributed path, the `tmpPath` is created with `getExternalTmpPath` is a distributed path too. The `qualifiedPath` is not the same as `writeToPath` or `targetPath`,so there not reuse the local path.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
