Por favor, gostaria de saber a causa do seguinte erro e se alguém também teve este problema. Ao executar o comando “dataframe_final.write.json('entrega_pedidos')” obtenho o seguinte erro:
---------------------------------------------------------------------------
Py4JJavaError Traceback (most recent call last)
<ipython-input-98-f44d39422e59> in <module>
----> 1 dataframe_final.write.json('entrega_pedidos')
~\AppData\Local\Continuum\anaconda3\lib\site-packages\pyspark\sql\readwriter.py in json(self, path, mode, compression, dateFormat, timestampFormat, lineSep, encoding)
814 compression=compression, dateFormat=dateFormat, timestampFormat=timestampFormat,
815 lineSep=lineSep, encoding=encoding)
--> 816 self._jwrite.json(path)
817
818 @since(1.4)
~\AppData\Local\Continuum\anaconda3\lib\site-packages\py4j\java_gateway.py in __call__(self, *args)
1255 answer = self.gateway_client.send_command(command)
1256 return_value = get_return_value(
-> 1257 answer, self.gateway_client, self.target_id, self.name)
1258
1259 for temp_arg in temp_args:
~\AppData\Local\Continuum\anaconda3\lib\site-packages\pyspark\sql\utils.py in deco(*a, **kw)
61 def deco(*a, **kw):
62 try:
---> 63 return f(*a, **kw)
64 except py4j.protocol.Py4JJavaError as e:
65 s = e.java_exception.toString()
~\AppData\Local\Continuum\anaconda3\lib\site-packages\py4j\protocol.py in get_return_value(answer, gateway_client, target_id, name)
326 raise Py4JJavaError(
327 "An error occurred while calling {0}{1}{2}.\n".
--> 328 format(target_id, ".", name), value)
329 else:
330 raise Py4JError(
Py4JJavaError: An error occurred while calling o324.json.
: org.apache.spark.SparkException: Job aborted.
at org.apache.spark.sql.execution.datasources.FileFormatWriter$.write(FileFormatWriter.scala:198)
at org.apache.spark.sql.execution.datasources.InsertIntoHadoopFsRelationCommand.run(InsertIntoHadoopFsRelationCommand.scala:159)
at org.apache.spark.sql.execution.command.DataWritingCommandExec.sideEffectResult$lzycompute(commands.scala:104)
Caused by: java.io.IOException: (null) entry in command string: null chmod 0644
C:\Users\marcelob\Spark\Alura\Arquivos\entrega_pedidos\_temporary\0\_temporary\attempt_20191011084330_0120_m_000000_3728\part-00000-886b3727-37bb-4617-9fff-6eed70001075-c000.json
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:770)