Created
March 24, 2012 00:23
-
-
Save florianleibert/2176675 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
//Java Class | |
public class S3InputSupplier implements com.google.common.io.InputSupplier<java.io.InputStream> | |
//contents of the class | |
//Scala code | |
val mapper = new ObjectMapper() | |
val is = new S3InputSupplier(s3, metadataFile) | |
val json = CharStreams.toString(CharStreams.newReaderSupplier(is, Charsets.UTF_8)); | |
mapper.readValue(json, classOf[CombinedGroup]) | |
Error: | |
[error] /Users/florian/airbnb_code/datachef/emr-tools/src/main/scala/com/airbnb/log/LogStagingCleaner.scala:122: type mismatch; | |
[error] found : scala.runtime.StringAdd | |
[error] required: com.google.common.io.InputSupplier[_ <: java.io.InputStream] | |
[error] val json = CharStreams.toString(CharStreams.newReaderSupplier(is, Charsets.UTF_8)); | |
[error] ^ | |
def processVerifiedFiles(verifiedFiles: java.net.URI): scala.collection.mutable.ListBuffer[com.airbnb.s3.MoveFileReport] = { | |
val reports: scala.collection.mutable.ListBuffer[com.airbnb.s3.MoveFileReport] = new scala.collection.mutable.ListBuffer[com.airbnb.s3.MoveFileReport](); | |
LogStagingCleaner.this.s3pathUtil.getChildren(com.airbnb.logging.collector.internals.s3.S3StorageHelper.getS3Bucket(verifiedFiles), com.airbnb.logging.collector.internals.s3.S3StorageHelper.getS3ObjectKey(verifiedFiles), null).foreach[Nothing](((s3object: String) => { | |
val inputSupplier: scala.runtime.StringAdd = scala.this.Predef.any2stringadd(new com.airbnb.s3.S3InputSupplier).this(scala.this.Tuple2.apply[com.amazonaws.services.s3.AmazonS3, String](LogStagingCleaner.this.s3, s3object)); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
def processVerifiedFiles(verifiedFiles: java.net.URI): scala.collection.mutable.ListBuffer[com.airbnb.s3.MoveFileReport] = {
val reports: scala.collection.mutable.ListBuffer[com.airbnb.s3.MoveFileReport] = new scala.collection.mutable.ListBuffercom.airbnb.s3.MoveFileReport;
LogStagingCleaner.this.s3pathUtil.getChildren(com.airbnb.logging.collector.internals.s3.S3StorageHelper.getS3Bucket(verifiedFiles), com.airbnb.logging.collector.internals.s3.S3StorageHelper.getS3ObjectKey(verifiedFiles), null).foreach[Nothing](((s3object: String) => {
val inputSupplier: scala.runtime.StringAdd = scala.this.Predef.any2stringadd(new com.airbnb.s3.S3InputSupplier).this(scala.this.Tuple2.apply[com.amazonaws.services.s3.AmazonS3, String](LogStagingCleaner.this.s3, s3object));