apache spark java compatibility