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

Missing file extension for gzip compressed FTP export #195

Open
juliankeppel opened this issue Mar 27, 2018 · 0 comments
Open

Missing file extension for gzip compressed FTP export #195

juliankeppel opened this issue Mar 27, 2018 · 0 comments

Comments

@juliankeppel
Copy link

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")))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant