Skip to content
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

Add OrderedSerialization2 support in Matrix2. #1457

Merged
merged 4 commits into from
Dec 26, 2015
Merged

Conversation

reconditesea
Copy link
Contributor

To resolve issue #1418

@reconditesea
Copy link
Contributor Author

@johnynek Is this good to go?

@johnynek
Copy link
Collaborator

Sorry. Didn't see this. Thanks for bringing to my attention. I'll review
Monday.

On Saturday, December 19, 2015, Kevin Lin notifications@github.com wrote:

@johnynek https://github.com/johnynek Is this good to go?


Reply to this email directly or view it on GitHub
#1457 (comment).

P. Oscar Boykin, Ph.D. | http://twitter.com/posco | http://pobox.com/~boykin

@reconditesea
Copy link
Contributor Author

Thanks, happy holidays!

@@ -18,6 +18,7 @@ package com.twitter.scalding.mathematics
import cascading.flow.FlowDef
import cascading.pipe.Pipe
import cascading.tuple.Fields
import com.twitter.scalding.serialization.{ OrderedSerialization, OrderedSerialization2 }
import com.twitter.scalding.TDsl._
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you remove TDsl while you are at it?

@johnynek
Copy link
Collaborator

Need a test for this that some Matrix2 job works with the option: https://github.com/twitter/scalding/blob/develop/scalding-core/src/main/scala/com/twitter/scalding/Config.scala#L118 setRequiredOrderedSerialization(true).

In fact, we should write the test first and find an example that fails (I guess adding two matrices)

@reconditesea
Copy link
Contributor Author

Moved the method implementation into OrderedSerialization2 companion object.
Will add new test cases shortly.

@reconditesea
Copy link
Contributor Author

I had troubles in importing serialization test's intOrderedSerialization (

implicit val intOrderedSerialization: OrderedSerialization[Int] = new OrderedSerialization[Int] {
) into Matrix2 test, so pasted the code into Matrix2 test.

BTW, feel like we can use slack channel for discussions like this more frequently.

def dynamicSize(i: Int) = staticSize
}

val p1: Pipe = Tsv("mat1", ('x1, 'y1, 'v1)).read
Copy link
Collaborator

Choose a reason for hiding this comment

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

this style is not recommended any more (.toTypedPipe), so let's just use TypedText.tsv the whole way:

val tp1 = TypedPipe.from(TypedText.tsv[(Int, Int, Double)]("mat1"))

johnynek added a commit that referenced this pull request Dec 26, 2015
Add OrderedSerialization2 support in Matrix2.
@johnynek johnynek merged commit e5303e7 into develop Dec 26, 2015
@johnynek johnynek deleted the klin/matrix2/ordered branch December 26, 2015 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants