-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-2583] ConnectionManager cannot distinguish whether error occurred or not #1490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e2b8c4a
Modify to propagete error using ConnectionManager
sarutak 6635467
Merge branch 'master' of git://git.apache.org/spark into SPARK-2583
sarutak 717c9c3
Merge branch 'master' of git://git.apache.org/spark into SPARK-2583
sarutak 4117b8f
Modified ConnectionManager to be alble to handle error during process…
sarutak 12d3de8
Added BlockFetcherIteratorSuite.scala
sarutak ffaa83d
Merge branch 'master' of git://git.apache.org/spark into SPARK-2583
sarutak 0654128
Merge branch 'master' of git://git.apache.org/spark into SPARK-2583
sarutak 281589c
Add a test case to BlockFetcherIteratorSuite.scala for fetching block…
sarutak e579302
Merge branch 'master' of git://git.apache.org/spark into SPARK-2583
sarutak 22d7ebd
Add test cases to BlockManagerSuite for SPARK-2583
sarutak 2a18d6b
Merge branch 'master' of git://git.apache.org/spark into SPARK-2583
sarutak 326a17f
Add test cases to ConnectionManagerSuite.scala for SPARK-2583
sarutak e7d9aa6
rebase to master
sarutak 9dfd0d8
Merge branch 'master' of git://git.apache.org/spark into SPARK-2583
sarutak ee91bb7
Modified BufferMessage.scala to keep the spark code style
sarutak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,7 @@ private[spark] class MessageChunkHeader( | |
| val totalSize: Int, | ||
| val chunkSize: Int, | ||
| val other: Int, | ||
| val hasError: Boolean, | ||
| val securityNeg: Int, | ||
| val address: InetSocketAddress) { | ||
| lazy val buffer = { | ||
|
|
@@ -41,6 +42,13 @@ private[spark] class MessageChunkHeader( | |
| putInt(totalSize). | ||
| putInt(chunkSize). | ||
| putInt(other). | ||
| put{ | ||
| if (hasError) { | ||
| 1.asInstanceOf[Byte] | ||
| } else { | ||
| 0.asInstanceOf[Byte] | ||
| } | ||
| }. | ||
| putInt(securityNeg). | ||
| putInt(ip.size). | ||
| put(ip). | ||
|
|
@@ -56,7 +64,7 @@ private[spark] class MessageChunkHeader( | |
|
|
||
|
|
||
| private[spark] object MessageChunkHeader { | ||
| val HEADER_SIZE = 44 | ||
| val HEADER_SIZE = 45 | ||
|
|
||
| def create(buffer: ByteBuffer): MessageChunkHeader = { | ||
| if (buffer.remaining != HEADER_SIZE) { | ||
|
|
@@ -67,13 +75,20 @@ private[spark] object MessageChunkHeader { | |
| val totalSize = buffer.getInt() | ||
| val chunkSize = buffer.getInt() | ||
| val other = buffer.getInt() | ||
| val hasError = { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. val hasError = buffer.get() != 0 |
||
| if (buffer.get() == 0) { | ||
| false | ||
| } else { | ||
| true | ||
| } | ||
| } | ||
| val securityNeg = buffer.getInt() | ||
| val ipSize = buffer.getInt() | ||
| val ipBytes = new Array[Byte](ipSize) | ||
| buffer.get(ipBytes) | ||
| val ip = InetAddress.getByAddress(ipBytes) | ||
| val port = buffer.getInt() | ||
| new MessageChunkHeader(typ, id, totalSize, chunkSize, other, securityNeg, | ||
| new MessageChunkHeader(typ, id, totalSize, chunkSize, other, hasError, securityNeg, | ||
| new InetSocketAddress(ip, port)) | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about