Uploaded image for project: 'Apache Sedona'
  1. Apache Sedona
  2. SEDONA-494

Raster data source cannot write to HDFS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.0, 1.4.1, 1.5.0, 1.5.1
    • 1.5.2

    Description

      Reproduce

       

      When run the following code

      var df = spark.read.format("binaryFile").load("/user/spark/raster/input.tif")
      df.write.format("raster").mode(org.apache.spark.sql.SaveMode.Overwrite).save("output")

       

      Just a _SUCCESS file found in the path.

      I can find tiff file created in HDFS audit.log , but there's not 'rename' cmd .
      I can find "SparkHadoopMapRedUtil: No need to commit output of task because needsTaskCommit=false: attempt_xxx
      BasicWriteTaskStatsTracker: Expected 1 files, but only saw 0. This could be due to the output format not writing empty files, or files being not immediately visible in the filesystem." in executor log.

       

      Solution:

      in "org.apache.spark.sql.sedona_sql.io.raster.RasterFileFormat.scala"
      val out = hfs.create(new Path(Paths.get(savePath, new Path(rasterFilePath).getName).toString))
      =>
      val out = hfs.create(new Path(savePath, new Path(rasterFilePath).getName))
      will solve the problem

      Paths.get should not be used in FileSystem implements

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jiayu Jia Yu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m