Can not create a Path from an empty string

2026-08-14T07:32:31.96+00:00
Can not create a Path from an empty string
sshuser@hn0-dhl-hd:~$ hdfs dfs -ls -h wasbs://******@dhlsghdinsightprodsa2.blob.core.windows.net/RMGR_RP_20260814*.csv.gz
-ls: Can not create a Path from an empty string
Usage: hadoop fs [generic options]
        [-appendToFile <localsrc> ... <dst>]
        [-cat [-ignoreCrc] <src> ...]
        [-checksum [-v] <src> ...]
        [-chgrp [-R] GROUP PATH...]
        [-chmod [-R] <MODE[,MODE]... | OCTALMODE> PATH...]
        [-chown [-R] [OWNER][:[GROUP]] PATH...]
        [-concat <target path> <src path> <src path> ...]
        [-copyFromLocal [-f] [-p] [-l] [-d] [-t <thread count>] [-q <thread pool queue size>] <localsrc> ... <dst>]
        [-copyToLocal [-f] [-p] [-crc] [-ignoreCrc] [-t <thread count>] [-q <thread pool queue size>] <src> ... <localdst>]
        [-count [-q] [-h] [-v] [-t [<storage type>]] [-u] [-x] [-e] [-s] <path> ...]
        [-cp [-f] [-p | -p[topax]] [-d] [-t <thread count>] [-q <thread pool queue size>] <src> ... <dst>]
        [-createSnapshot <snapshotDir> [<snapshotName>]]
        [-deleteSnapshot <snapshotDir> <snapshotName>]
        [-df [-h] [<path> ...]]
        [-du [-s] [-h] [-v] [-x] <path> ...]
        [-expunge [-immediate] [-fs <path>]]
        [-find <path> ... <expression> ...]
        [-get [-f] [-p] [-crc] [-ignoreCrc] [-t <thread count>] [-q <thread pool queue size>] <src> ... <localdst>]
        [-getfacl [-R] <path>]
        [-getfattr [-R] {-n name | -d} [-e en] <path>]
        [-getmerge [-nl] [-skip-empty-file] <src> <localdst>]
        [-head <file>]
        [-help [cmd ...]]
        [-ls [-C] [-d] [-h] [-q] [-R] [-t] [-S] [-r] [-u] [-e] [<path> ...]]
        [-mkdir [-p] <path> ...]
        [-moveFromLocal [-f] [-p] [-l] [-d] <localsrc> ... <dst>]
        [-moveToLocal <src> <localdst>]
        [-mv <src> ... <dst>]
        [-put [-f] [-p] [-l] [-d] [-t <thread count>] [-q <thread pool queue size>] <localsrc> ... <dst>]
        [-renameSnapshot <snapshotDir> <oldName> <newName>]
        [-rm [-f] [-r|-R] [-skipTrash] [-safely] <src> ...]
        [-rmdir [--ignore-fail-on-non-empty] <dir> ...]
        [-setfacl [-R] [{-b|-k} {-m|-x <acl_spec>} <path>]|[--set <acl_spec> <path>]]
        [-setfattr {-n name [-v value] | -x name} <path>]
        [-setrep [-R] [-w] <rep> <path> ...]
        [-stat [format] <path> ...]
        [-tail [-f] [-s <sleep interval>] <file>]
        [-test -[defswrz] <path>]
        [-text [-ignoreCrc] <src> ...]
        [-touch [-a] [-m] [-t TIMESTAMP (yyyyMMdd:HHmmss) ] [-c] <path> ...]
        [-touchz <path> ...]
        [-truncate [-w] <length> <path> ...]
        [-usage [cmd ...]]

Generic options supported are:
-conf <configuration file>        specify an application configuration file
-D <property=value>               define a value for a given property
-fs <file:///|hdfs://namenode:port> specify default filesystem URL to use, overrides 'fs.defaultFS' property from configurations.
-jt <local|resourcemanager:port>  specify a ResourceManager
-files <file1,...>                specify a comma-separated list of files to be copied to the map reduce cluster
-libjars <jar1,...>               specify a comma-separated list of jar files to be included in the classpath
-archives <archive1,...>          specify a comma-separated list of archives to be unarchived on the compute machines

The general command line syntax is:
command [genericOptions] [commandOptions]

Usage: hadoop fs [generic options] -ls [-C] [-d] [-h] [-q] [-R] [-t] [-S] [-r] [-u] [-e] [<path> ...]
n empty string
Azure HDInsight
Azure HDInsight

An Azure managed cluster service for open-source analytics.


1 answer

Sort by: Most helpful
  1. Smaran Thoomu 495 Reputation points Microsoft External Staff Moderator
    2026-08-18T18:39:43.4233333+00:00

    Hi @UDAYA SRINIVASARAO KOTHAMASU
    Thank you for the additional details.

    Since you confirmed that:

    • An explicit filename works successfully.
    • The same hdfs dfs -ls commands work when the complete filename is provided.
    • The failure occurs only when the * wildcard is used.
    • The batch has been working for several years and the issue started only recently.

    this helps narrow the issue to how the wildcard path is being handled by the shell/PySpark batch, rather than a general connectivity or storage permission issue.

    Could you please try the following from the same environment/user where the batch is running?

    hdfs dfs -ls -h 'wasbs://******@dhlsghdinsightprodsa2.blob.core.windows.net/RMGR_RP_20260814*.csv.gz'
    

    Please note the single quotes around the complete path. This prevents the Linux shell from expanding * before the command reaches Hadoop.

    Also, please run:

    echo hdfs dfs -ls -h wasbs://******@dhlsghdinsightprodsa2.blob.core.windows.net/RMGR_RP_20260814*.csv.gz
    

    and

    echo hdfs dfs -ls -h 'wasbs://******@dhlsghdinsightprodsa2.blob.core.windows.net/RMGR_RP_20260814*.csv.gz'
    

    Please share the output of both commands.

    Since the failure is occurring from the PySpark batch, could you also share the portion of the PySpark code/job configuration where this wildcard path is constructed and passed to Hadoop/HDFS? Please mask any credentials or sensitive information.

    This will help us determine whether the wildcard is being expanded by the shell, PySpark, or the Hadoop filesystem layer.

    If possible, please also provide:

    1. The exact error from the failed PySpark batch.
    2. The last successful execution date/time.
    3. The first failed execution date/time.
    4. Whether the same batch is running with the same cluster/image/runtime version as before.
    5. Whether any recent changes were made to the cluster, script, shell environment, Python/PySpark version, or storage configuration.

    Once we have these details, we can narrow down why the wildcard behavior changed even though the same batch had been working previously.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.