title: py4j.Py4JException: Method splits([]) does not exist
body: <p>I get the following error when executing my spark job:</p>
  
  <pre><code>py4j.protocol.Py4JError: An error occurred while calling o191.splits. Trace:
  py4j.Py4JException: Method splits([]) does not exist
          at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:318)
          at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:326)
          at py4j.Gateway.invoke(Gateway.java:272)
          at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
          at py4j.commands.CallCommand.execute(CallCommand.java:79)
          at py4j.GatewayConnection.run(GatewayConnection.java:214)
          at java.lang.Thread.run(Thread.java:748)
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>points = df.rdd.map(lambda x: ( (x['col1'], x['col2'], x['col3']), x[i + '_func']))
  points.cache()
  dim = points.first()[1].size
  print points._jrdd.splits().size()
  </code></pre>
  
  <p>The last line throws the above-provided exception. How can I solve this error?
  This code worked well in Spark 1.6. Now I am working with Spark 2.2 and I get this error. The version of Python is 2.7.12 (the same as previously).</p>