[
https://issues.apache.org/jira/browse/HADOOP-1722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670305#action_12670305
]
Klaas Bosteels commented on HADOOP-1722:
----------------------------------------
Replies to Deveraj's comments:
* I guess it would indeed make sense to move everything I added in core to
streaming. I'll attach a new version of the patch later today.
* The main advantage of the typed bytes is not that they lead to more compact
representations, but rather that they can make it a lot easier to write certain
streaming apps. Suppose for instance that you want to write a streaming app
that consumes sequence files containing instances of {{VIntWritable}} as keys
and instances of a custom {{Record}} as values. With typed bytes, the keys and
values will then then be converted automatically to appropriate typed bytes
(namely, the keys will be converted to a typed bytes integer and the values to
a typed bytes list consisting of the typed bytes objects that correspond to the
attributes of the record), whereas your streaming app would have to implement
{{VIntWritable}} and {{Record}} deserialization itself if streaming would only
support raw bytes. So using typed bytes does indeed make things a bit more
complex, but it's definitely worth it in my opinion (and you can still use raw
bytes if you want to by using a 0 byte as type code).
> Make streaming to handle non-utf8 byte array
> --------------------------------------------
>
> Key: HADOOP-1722
> URL: https://issues.apache.org/jira/browse/HADOOP-1722
> Project: Hadoop Core
> Issue Type: Improvement
> Components: contrib/streaming
> Reporter: Runping Qi
> Assignee: Klaas Bosteels
> Attachments: HADOOP-1722-v2.patch, HADOOP-1722-v3.patch,
> HADOOP-1722-v4.patch, HADOOP-1722.patch
>
>
> Right now, the streaming framework expects the output sof the steam process
> (mapper or reducer) are line
> oriented UTF-8 text. This limit makes it impossible to use those programs
> whose outputs may be non-UTF-8
> (international encoding, or maybe even binary data). Streaming can overcome
> this limit by introducing a simple
> encoding protocol. For example, it can allow the mapper/reducer to hexencode
> its keys/values,
> the framework decodes them in the Java side.
> This way, as long as the mapper/reducer executables follow this encoding
> protocol,
> they can output arabitary bytearray and the streaming framework can handle
> them.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.