You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2015/12/10 13:55:10 UTC
[jira] [Resolved] (SPARK-12136) rddToFileName does not properly
handle prefix and suffix parameters
[ https://issues.apache.org/jira/browse/SPARK-12136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Owen resolved SPARK-12136.
-------------------------------
Resolution: Fixed
Fix Version/s: 1.6.1
2.0.0
Issue resolved by pull request 10185
[https://github.com/apache/spark/pull/10185]
> rddToFileName does not properly handle prefix and suffix parameters
> -------------------------------------------------------------------
>
> Key: SPARK-12136
> URL: https://issues.apache.org/jira/browse/SPARK-12136
> Project: Spark
> Issue Type: Bug
> Components: Streaming
> Reporter: Brian Webb
> Priority: Minor
> Labels: starter
> Fix For: 2.0.0, 1.6.1
>
>
> See code here: https://github.com/apache/spark/blob/master/streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala#L894
> private[streaming] def rddToFileName[T](prefix: String, suffix: String, time: Time): String = {
> if (prefix == null) {
> time.milliseconds.toString
> } else if (suffix == null || suffix.length ==0) {
> prefix + "-" + time.milliseconds
> } else {
> prefix + "-" + time.milliseconds + "." + suffix
> }
> }
> This code does not seem to properly handle the cases where the prefix is null, but suffix is not null - the suffix should be used but is not.
> Also, the check for length == 0 is only applied to the suffix, bot the prefix. It seems the check should be consistent between the two.
> Is there a reason not to address these two issues and change the code?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org