You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by "kevin.leach" <ke...@thomsonreuters.com> on 2011/03/17 22:42:39 UTC

How do I split input key on fixed length?

I'm using hadoop streaming and currently have these properties in my command
line:
   -Dstream.map.output.field.separator=' ' \
   -Dstream.num.map.output.key.fields=1 \

This works for me as my test data happens to have a space at column 14. If I
want to use a fixed length split, is there a simple cut function I could use
like undefining the separator and counting 13 bytes?
   -Dstream.map.output.field.separator= \
   -Dstream.num.map.output.key.fields=13 \

I have searched the forum for discussions on fixed length or splitting keys
but have not found my answer. Perhaps this is not possible, at least on the
command line?

Thanks for any help!
Kevin
-- 
View this message in context: http://old.nabble.com/How-do-I-split-input-key-on-fixed-length--tp31176690p31176690.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.