You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Lin, Yiqun" <yi...@ebay.com.INVALID> on 2025/04/27 06:45:49 UTC

HDFS file creation does not support O_CREATE && O_EXCL in libhdfs

Hi hdfs-dev,

Currently in libhdfs, we find that hdfs file create operation doesn’t support O_CREATE && O_EXCL.

https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/hdfs.c#L1148

    if ((flags & O_CREAT) && (flags & O_EXCL)) {
      fprintf(stderr,
              "WARN: hdfs does not truly support O_CREATE && O_EXCL\n");
    }

Anyone who can explain why for this? This semantic is supported in java implementation.

Regards,
Yiqun