I'm turning an image to a 2D array of integers. Doing some process on that then I'm trying to emit the array in this way :
collector.emit( new Values ( scaledImageMatrix ) );
then I'm trying to retrieve the data in another bolt like this :
int [][] imageMatrix = input.get("scaled-image-matrix");
but I get the error
incompatible types
[ERROR] found : java.lang.Object
[ERROR] required: int[][]
Any suggestions ?
UPDATE :
I tried this int [][] imageMatrix = (int[][])input.get("scaled-image-matrix");
and I got this error :
java.lang.IllegalArgumentException: Tuple created with wrong number of fields. Expected 1 fields but got 190 fields
Then I should change my question to : How to emit a two dimensional array ?