Permalink
Browse files

type checker enforces serialization of copy job

  • Loading branch information...
1 parent 9106fb7 commit 15270725be699a7a635dd7d95469b0e032a1d6c9 Nick Kallen committed Apr 2, 2010
Showing with 1 addition and 0 deletions.
  1. BIN libs/gizzard-1.0.jar
  2. +1 −0 src/main/scala/com/twitter/rowz/jobs/Copy.scala
View
BIN libs/gizzard-1.0.jar
Binary file not shown.
View
1 src/main/scala/com/twitter/rowz/jobs/Copy.scala
@@ -13,6 +13,7 @@ object CopyFactory extends gizzard.jobs.CopyFactory[Shard] {
}
class Copy(sourceShardId: Int, destinationShardId: Int, cursor: Cursor) extends gizzard.jobs.Copy[Shard](sourceShardId, destinationShardId, Copy.COUNT) {
+ def serialize = Map("cursor" -> cursor)
def copyPage(sourceShard: Shard, destinationShard: Shard, count: Int) = {
val (items, nextCursor) = sourceShard.selectAll(cursor, count)
destinationShard.write(items)

0 comments on commit 1527072

Please sign in to comment.