You need *way MORE* memory !!
It is certainly very intriguing that your 10 million records table get handled successfully in 4.2 but not in 8.2.
Have in mind that 8.2 requires more memory than 4.2 but not that much and besides that, I dislike 8.2 because it is dropping SAP support for some steps.
So, I would suggest using jvisualvm (or java mission control) to check the usage of memory while extracting. You certainly will view there the amount of memory needed for your extraction. Based on this monitoring you should adjust memory parameters.
For tables, in the order of 10 million, I use 18Gb of memory! some kind of ... "-Xms18g" "-Xmx18g".
BTW, Why are you using "XX:MaxPermSize=..."? It is deprecated in java 8 so you don't need this.
Finally is worth mentioning that you should use pan/kitchen to run transformations/jobs accordingly.
J.