Mock PackedAvroSource for testing purposes

7 views
Skip to first unread message

Serega Sheypak

unread,
Jul 29, 2015, 1:15:33 PM7/29/15
to cascading-user
Hi, I can't mock PackedAvroSource, don't understand the right way to do it.

Here is an exception:
unable to resolve argument selector: [{1}:'bytes'], with incoming: [{1}:0]
it happens when I try to access 'byte field in map taken from avro. 

Here is a test code snippet

test("Downey and Los Angeles do not interact and have correct areas"){
    JobTest(classOf[PackedAvroSourceJob].getName)
      .arg("input", "input")
      .arg("output", "output")

      .source(PackedAvroSource[ByteBuffer]("input"), createInput)
      .sink(PackedAvroSource[ByteBuffer]("output")) { buffer: mutable.Buffer[(Byte)] =>
      println("hERE!!!")
    }
      .run
  }
What is the right way to pass schema 'bytes to that PackedAvroSource?
Reply all
Reply to author
Forward
0 new messages