Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Sed rules for porting to scalding 0.9.0 from earlier versions. Run this in the directory with your jobs with gnu sed (brew install gnu-sed).
find . -type f -print0 | xargs -0 gsed -i 's/\.sum(/.sum[Double](/g'
find . -type f -print0 | xargs -0 gsed -i 's/\.plus\[/.sum[/g'
find . -type f -print0 | xargs -0 gsed -i 's/import com.twitter.scalding.DateOps.richDateToCalendar/import com.twitter.scalding.RichDate.toCalendar/'
find . -type f -print0 | xargs -0 gsed -i 's/ RichDate("\([^"]\+\)")(\([^)]\+\))/ com.twitter.scalding.DateParser.default.parse("\1")(\2).get/g'
find . -type f -print0 | xargs -0 gsed -i 's/\.then[^(Do)]/.thenDo/g'
find . -type f -print0 | xargs -0 gsed -i 's/Mode\.mode/mode/g'
find . -type f -print0 | xargs -0 gsed -i 's/new RichDate/RichDate/g'
@epishkin

This comment has been minimized.

Show comment Hide comment
@epishkin

epishkin Oct 16, 2013

If you use old avro library then run

find . -type f -print0 | xargs -0 gsed -i 's/import scalding.avro/import com.twitter.scalding.avro/'

If you use old avro library then run

find . -type f -print0 | xargs -0 gsed -i 's/import scalding.avro/import com.twitter.scalding.avro/'
@epishkin

This comment has been minimized.

Show comment Hide comment
@epishkin

epishkin Mar 21, 2014

the 1st command is wrong. Should be

find . -type f -print0 | xargs -0 gsed -i 's/\.sum(/.sum[Double](/g'

the 1st command is wrong. Should be

find . -type f -print0 | xargs -0 gsed -i 's/\.sum(/.sum[Double](/g'
@johnynek

This comment has been minimized.

Show comment Hide comment
@johnynek

johnynek Apr 6, 2014

@epishkin thanks!

Owner

johnynek commented Apr 6, 2014

@epishkin thanks!

@ishaaq

This comment has been minimized.

Show comment Hide comment
@ishaaq

ishaaq May 18, 2014

If you're using Linux (at least the Debian/Ubuntu flavours), it's sed not gsed.

ishaaq commented May 18, 2014

If you're using Linux (at least the Debian/Ubuntu flavours), it's sed not gsed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment