Skip to content

Conversation

@xuanyuanking
Copy link
Member

@xuanyuanking xuanyuanking commented Jul 1, 2020

What changes were proposed in this pull request?

Use the invalid value Int.MinValue to fill the map index when the event logs from the old Spark version.

Why are the changes needed?

Follow up PR for #28941.

Does this PR introduce any user-facing change?

When we use the Spark version 3.0 history server reading the event log written by the old Spark version, we use the invalid value -2 to fill the map index.

How was this patch tested?

Existing UT.

@xuanyuanking
Copy link
Member Author

@SparkQA
Copy link

SparkQA commented Jul 1, 2020

Test build #124760 has finished for PR 28965 at commit 9b9e4ee.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

// Note, we use the invalid value -2 here to fill the map index for backward
// compatibility. Otherwise, the fetch failed event will be dropped when the history
// server loads the event log written by the Spark version before 3.0.
-2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any special reasons using -2 instead of -1? BTW, I'm unsure whether this filed will be displayed in UI, if so, we better show Unknown for invalid value in UI.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah once we provide it with magic number to mark INVALID/UNKNOWN, there should be relevant code change to handle INVALID/UNKNOWN value. Looks like the code change doesn't address it, which makes me unsure how it will be represented on the UI.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HeartSaVioR I think it is represented as error string in FetchFailed.toErrorString. So we just need to make sure the default unknown value is consistent in the code here and FetchFailed.toErrorString. Personally I prefer Int.MinValue since -1 can't be used here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Gengliang for confirming!

Any special reasons using -2 instead of -1?

mapIndex = -1 has been used in MetadataFetchFailedException.

Yep, I think Int.MinValue is a better choice.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the info! If the value is only leveraged via FetchFailed.toErrorString, what we may want to do (and proposed in previous comment) is projecting the magic number to the specific string so that it can be determined easily. +1 to Int.MinValue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I'm seeing it's done. Thanks for the quick address!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, already addressed in 9dfa5c0

@xuanyuanking xuanyuanking changed the title [SPARK-32124][CORE][FOLLOW-UP] Use the invalid value -2 to fill the map index when the event logs from the old Spark version [SPARK-32124][CORE][FOLLOW-UP] Use the invalid value Int.MinValue to fill the map index when the event logs from the old Spark version Jul 2, 2020
@SparkQA
Copy link

SparkQA commented Jul 2, 2020

Test build #124884 has finished for PR 28965 at commit 9dfa5c0.

  • This patch fails build dependency tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun
Copy link
Member

Hi, @HeartSaVioR . Could you finalize this as an Apache Spark committer? :)

@gengliangwang
Copy link
Member

@HeartSaVioR Congratulations!

Copy link
Contributor

@HeartSaVioR HeartSaVioR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending Jenkins

@HeartSaVioR
Copy link
Contributor

retest this, please

@HeartSaVioR
Copy link
Contributor

Btw thanks @dongjoon-hyun and @gengliangwang ! I thought it's probably better to take committer's work after official announcement, but this looks to be simple and good example to try out before dealing with larger PR. Thanks again for the guidance!

@dongjoon-hyun
Copy link
Member

dongjoon-hyun commented Jul 2, 2020

Ya. That's also reasonable. Usually, the annoucement gets some delays because the invitations go out to multiple persons at the same season. You don't need to be blocked. ;) You've been waiting so long. Please do what you want in your way.

@HeartSaVioR
Copy link
Contributor

Jenkins doesn't seem to pick this up by request ;( Mentioned the behavior in the dev@ list.

@gengliangwang
Copy link
Member

retest this please

@xuanyuanking
Copy link
Member Author

Wow, Congratulations @HeartSaVioR! Well deserved!

@SparkQA
Copy link

SparkQA commented Jul 5, 2020

Test build #124936 has finished for PR 28965 at commit 9dfa5c0.

  • This patch fails build dependency tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun
Copy link
Member

Retest this please.

@SparkQA
Copy link

SparkQA commented Jul 5, 2020

Test build #124960 has finished for PR 28965 at commit 9dfa5c0.

  • This patch fails build dependency tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HeartSaVioR
Copy link
Contributor

retest this, please

@SparkQA
Copy link

SparkQA commented Jul 6, 2020

Test build #124972 has finished for PR 28965 at commit 9dfa5c0.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HeartSaVioR
Copy link
Contributor

retest this, please

@SparkQA
Copy link

SparkQA commented Jul 6, 2020

Test build #125058 has finished for PR 28965 at commit 9dfa5c0.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HeartSaVioR
Copy link
Contributor

retest this, please

@SparkQA
Copy link

SparkQA commented Jul 6, 2020

Test build #125089 has finished for PR 28965 at commit 9dfa5c0.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HeartSaVioR
Copy link
Contributor

retest this, please

@SparkQA
Copy link

SparkQA commented Jul 7, 2020

Test build #125122 has finished for PR 28965 at commit 9dfa5c0.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HeartSaVioR
Copy link
Contributor

retest this, please

@SparkQA
Copy link

SparkQA commented Jul 7, 2020

Test build #125171 has finished for PR 28965 at commit 9dfa5c0.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@xuanyuanking
Copy link
Member Author

retest this please

@SparkQA
Copy link

SparkQA commented Jul 7, 2020

Test build #125190 has finished for PR 28965 at commit 9dfa5c0.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HeartSaVioR
Copy link
Contributor

retest this please

@SparkQA
Copy link

SparkQA commented Jul 7, 2020

Test build #125216 has finished for PR 28965 at commit 9dfa5c0.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HeartSaVioR
Copy link
Contributor

retest this please

@SparkQA
Copy link

SparkQA commented Jul 8, 2020

Test build #125248 has finished for PR 28965 at commit 9dfa5c0.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

HeartSaVioR pushed a commit that referenced this pull request Jul 8, 2020
…fill the map index when the event logs from the old Spark version

### What changes were proposed in this pull request?
Use the invalid value Int.MinValue to fill the map index when the event logs from the old Spark version.

### Why are the changes needed?
Follow up PR for #28941.

### Does this PR introduce _any_ user-facing change?
When we use the Spark version 3.0 history server reading the event log written by the old Spark version, we use the invalid value -2 to fill the map index.

### How was this patch tested?
Existing UT.

Closes #28965 from xuanyuanking/follow-up.

Authored-by: Yuanjian Li <[email protected]>
Signed-off-by: Jungtaek Lim (HeartSaVioR) <[email protected]>
(cherry picked from commit 3659611)
Signed-off-by: Jungtaek Lim (HeartSaVioR) <[email protected]>
@HeartSaVioR
Copy link
Contributor

Thanks! Merged to master and branch-3.0.

@HyukjinKwon
Copy link
Member

The very first commit merged by @HeartSaVioR!

@xuanyuanking xuanyuanking deleted the follow-up branch July 16, 2020 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants