I need a curve-fitting mechanism where a series of (x, y) coordinates have to be put into a order 2 curve in a Mapper module of Map/Reduce code.

f(y) = a x^2+ b *x + c

Ideally, I would like to see that the curve is linear. That is need to verify, a = 0.

I have some links listed here: