//String fileName = file;
TupleListIterator tupleListIterator = (TupleListIterator) iterationData[1];
MetadataWrapper metadataWrapper = tupleListIterator.getMetadataWrapper();
TupleMetadata tupleMetadata = (TupleMetadata) metadataWrapper.getMetadata();
Tuple tuple;
try {
mOutputBlockWriter = getOutput(OUTPUT_DATA);
BlockWriter meanOut = getOutput(MEAN);
mMetadataOutputBlockWriter = getOutput(METADATA);
List<ResponsePAZ> responses=new ArrayList<ResponsePAZ>();
int i=0;
parametersMap = new HashMap<String,String>();
while((tuple= (Tuple)tupleListIterator.nextValue())!= null){
System.out.println("in iteration tuple");
ResponsePAZ response= new ResponsePAZ();
response.setName(tuple.getString(tupleMetadata,NAME));
response.setGain(tuple.getDouble(tupleMetadata,GAIN));
response.setGainFreq(tuple.getDouble(tupleMetadata,GAIN_FREQUENCY));
Blob zerosB=tuple.getBlob(tupleMetadata,ZEROS);
Blob polesB=tuple.getBlob(tupleMetadata,POLES);
response.setZeros(zerosB.getBytes(1, (int) zerosB.length()));
response.setPoles(polesB.getBytes(1, (int) polesB.length()));
responses.add(response);
JSONSerializer serializer = new JSONSerializer();
parametersMap.put("response"+i, URLEncoder.encode(serializer.serialize(response),"UTF-8"));