Inside the PysPark session , I want to copy file from S3 to Hadoop Cluster local directory while doing this got following error. Please help.

file_system.copyToLocal(false, java_path_src, java_path_dst)

Parameters-

 java_path_src - s3://sandbox/metadata/2018-06-07T183915/test.jsonl
 java_path_dst - /home/hadoop/output/

Error-

py4j.protocol.Py4JError: An error occurred while calling o144.copyToLocal. Trace:
py4j.Py4JException: Method copyToLocal([class org.apache.hadoop.fs.Path, class org.apache.hadoop.fs.Path]) 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)
0

There are 0 best solutions below