Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. class Miner(args: Args) extends Job(args) {
  2.  
  3. def fetchUrl(url:String) = {
  4. ...
  5. }
  6.  
  7. TextLine(args("input")).map(url: String => fetchUrl(url))
  8. .write(args("output"))
  9. }
  10.  
  11. TextLine(args("input")).map(fetchUrl)
  12. .write(args("output"))
  13.  
  14. val savings =
  15. items.mapTo(('price, 'discountedPrice) -> 'savings) {
  16. x : (Float, Float) =>
  17. val (price, discountedPrice) = x
  18. price - discountedPrice
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement