{"record":{"id":"6a963dbca646ec79","repo":"apache/hadoop","slug":"incomplete-hdfs-uri-no-host-6a963d","errorCode":null,"errorMessage":"Incomplete HDFS URI, no host: ","messagePattern":"Incomplete HDFS URI, no host: ","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java","lineNumber":192,"sourceCode":"   *\n   * @return <code>hdfs</code>\n   */\n  @Override\n  public String getScheme() {\n    return HdfsConstants.HDFS_URI_SCHEME;\n  }\n\n  @Override\n  public URI getUri() { return uri; }\n\n  @Override\n  public void initialize(URI uri, Configuration conf) throws IOException {\n    super.initialize(uri, conf);\n    setConf(conf);\n\n    String host = uri.getHost();\n    if (host == null) {\n      throw new IOException(\"Incomplete HDFS URI, no host: \"+ uri);\n    }\n\n    initDFSClient(uri, conf);\n    this.uri = URI.create(uri.getScheme()+\"://\"+uri.getAuthority());\n    this.workingDir = getHomeDirectory();\n\n    storageStatistics = (DFSOpsCountStatistics) GlobalStorageStatistics.INSTANCE\n        .put(DFSOpsCountStatistics.NAME,\n          new StorageStatisticsProvider() {\n            @Override\n            public StorageStatistics provide() {\n              return new DFSOpsCountStatistics();\n            }\n          });\n  }\n\n  void initDFSClient(URI theUri, Configuration conf) throws IOException {\n    this.dfs =  new DFSClient(theUri, conf, statistics);","sourceCodeStart":174,"sourceCodeEnd":210,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java#L174-L210","documentation":"Error \"Incomplete HDFS URI, no host: \" thrown in apache/hadoop.","triggerScenarios":"DistributedFileSystem is initialized with an HDFS URI that has no host authority, so the NameNode address cannot be determined.","commonSituations":"See trigger scenarios.","solutions":["Provide a complete HDFS URI including host, e.g. hdfs://namenode:8020/path instead of hdfs:///path without configured default.","Set fs.defaultFS in core-site.xml so relative paths resolve to a valid NameNode."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}