Skip to content

Instantly share code, notes, and snippets.

@epishkin
Forked from johnynek/gist:6632488
Last active August 29, 2015 13:57
Show Gist options
  • Save epishkin/9844553 to your computer and use it in GitHub Desktop.
Save epishkin/9844553 to your computer and use it in GitHub Desktop.
upgrade code to scalding 0.9 using 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'
find . -type f -print0 | xargs -0 gsed -i 's/import scalding.avro/import com.twitter.scalding.avro/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment