Skip to content
This repository was archived by the owner on Jan 27, 2020. It is now read-only.
This repository was archived by the owner on Jan 27, 2020. It is now read-only.

Missing file extension for gzip compressed FTP export #195

@juliankeppel

Description

@juliankeppel

We use schedoscope (version 0.9.6) with Scala 2.11.11 and the export function for exporting a view to a FTP server.

If we disable compression of the output files, it works totally as expected. But if we enable gzip compression the original file extension (in our case .csv) is missing. According to the docs, the .gz extension should only be appended to the orgiginal file name:

<prefix>-<mr-task-id-that-generated-the-chunk>-<number-of-chunks>.json|csv[.gz|.bz2]

The file format definition looks like this:

  storedAs(TextFile(
    serDeProperties = Map(
      "separatorChar" -> config.getString("ftp-export.delimiter"),
      "escapeChar" -> config.getString("ftp-export.escape-char"),
      "quoteChar" -> config.getString("ftp-export.quote-char"))))

And the export definition looks like this:

  exportTo(() => Ftp(
    v = this,
    ftpEndpoint = config.getString("ftp-export.endpoint"),
    ftpUser = config.getString("ftp-export.user"),
    keyFile = config.getString("ftp-export.keyfile"),
    numReducers = config.getInt("ftp-export.chunks"),
    filePrefix = config.getString("ftp-export.file-prefix") + "_" + dateId.v.get,
    userIsRoot = false,
    codec = if (config.getBoolean("ftp-export.enable-compression")) FileCompressionCodec.gzip else FileCompressionCodec.none,
    delimiter = config.getString("ftp-export.delimiter")))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions