scalding icon indicating copy to clipboard operation
scalding copied to clipboard

toIterator won't work for VersionedKeyValSource

Open reconditesea opened this issue 12 years ago • 2 comments

We found that calling toIterator on a VersionedKeyValSource won't work. The returned Iterator cannot be correctly deserialized. We used a workaround like:

toIterator .asInstanceOf[Iterator[(Array[Byte], Array[Byte])]] .map{x : (Array[Byte], Array[Byte]) => checkedInversion(x).get}

Should we consider this as a bug? And put this code to VersionedKeyValSource class and override its toIterator?

reconditesea avatar Aug 29 '14 21:08 reconditesea

this is a dup of #1013

The issue is transformForRead can be incompatible with toIterator.

johnynek avatar Aug 30 '14 23:08 johnynek

Gotcha. Let's close this issue since it's tracked in #1013.

reconditesea avatar Sep 02 '14 06:09 reconditesea