Last active
July 13, 2016 15:52
-
-
Save MarounMaroun/97601480b3fe3a21076602224974dad3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def fromS3(bucket: String, path: String): MyObject = { | |
| val AWSCredentials = new BasicAWSCredentials(ACCESS_KEY, SECRET_KEY) | |
| val amazonS3Client = new AmazonS3Client(AWSCredentials) | |
| def readFile(fn: String) = {scala.io.Source.fromInputStream(amazonS3Client.getObject(bucket, path + fn).getObjectContent).getLines}.toList | |
| getMyObject(readFile) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment