Advertisement
NLinker

new etl

Nov 12th, 2013
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.46 KB | None | 0 0
  1.     val tempDir = util.Files.createTempDir()
  2.     val ops = for {
  3.       jobResolved <- Resolver.resolve(job)
  4.       extractor   <- Try(Extractor(jobResolved))
  5.       handler     <- Try(Handler(jobResolved, tempDir))
  6.     } yield extractor.apply(handler)
  7.     ops match {
  8.       case Success(seq) => {
  9.         logger.debug("Created new reporting files: ", seq)
  10.         ...
  11.       }
  12.       case Failure(exn) => {
  13.         logger.error("Unable to process the job: ", ex)
  14.         ...
  15.       }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement