From issues-return-200826-archive-asf-public=cust-asf.ponee.io@spark.apache.org Tue Sep 4 03:41:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id CD50E180663 for ; Tue, 4 Sep 2018 03:41:04 +0200 (CEST) Received: (qmail 48696 invoked by uid 500); 4 Sep 2018 01:41:04 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 48687 invoked by uid 99); 4 Sep 2018 01:41:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2018 01:41:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 63A35C2BA1 for ; Tue, 4 Sep 2018 01:41:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 4bWvOVNEtcJq for ; Tue, 4 Sep 2018 01:41:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 2BADD5F3EB for ; Tue, 4 Sep 2018 01:41:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 3A407E0DAA for ; Tue, 4 Sep 2018 01:41:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 51E772183F for ; Tue, 4 Sep 2018 01:41:00 +0000 (UTC) Date: Tue, 4 Sep 2018 01:41:00 +0000 (UTC) From: "Hyukjin Kwon (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SPARK-25293) Dataframe write to csv saves part files in outputDireotry/task-xx/part-xxx instead of directly saving in outputDir MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SPARK-25293?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D166= 02528#comment-16602528 ]=20 Hyukjin Kwon commented on SPARK-25293: -------------------------------------- [~omkar999], would you be able to test this and see if the issue still exis= ts in the upper Spark version? > Dataframe write to csv saves part files in outputDireotry/task-xx/part-xx= x instead of directly saving in outputDir > -------------------------------------------------------------------------= ----------------------------------------- > > Key: SPARK-25293 > URL: https://issues.apache.org/jira/browse/SPARK-25293 > Project: Spark > Issue Type: Bug > Components: EC2, Java API, Spark Shell, Spark Submit > Affects Versions: 2.0.2 > Reporter: omkar puttagunta > Priority: Major > > [https://stackoverflow.com/questions/52108335/why-spark-dataframe-writes-= part-files-to-temporary-in-instead-directly-creating] > {quote}Running Spark 2.0.2 in Standalone Cluster Mode; 2 workers and 1 ma= ster node on AWS EC2 > {quote} > Simple Test; reading pipe delimited file and writing data to csv. Command= s below are executed in spark-shell with master-url set > {{val df =3D spark.sqlContext.read.option("delimiter","|").option("quote"= ,"\u0000").csv("/home/input-files/") val emailDf=3Ddf.filter("_c3=3D'EML'")= emailDf.repartition(100).write.csv("/opt/outputFile/")}} > After executing the cmds above in spark-shell with master url set. > {quote}In=C2=A0{{worker1}}=C2=A0-> Each part file is created in\{{/opt/ou= tputFile/_temporary/task-xxxxx-xxx/part-xxx-xxx}} > In=C2=A0{{worker2}}=C2=A0->=C2=A0{{/opt/outputFile/part-xxx}}=C2=A0=3D> = part files are generated directly under outputDirectory specified during wr= ite. > {quote} > *Same thing happens with coalesce(100) or without specifying repartition/= coalesce!!! Tried with Java also!* > *_Quesiton_* > 1) why=C2=A0{{worker1}}=C2=A0{{/opt/outputFile/}}=C2=A0output directory d= oesn't have=C2=A0{{part-xxxx}}=C2=A0files just like in=C2=A0{{worker2}}? wh= y=C2=A0{{_temporary}}=C2=A0directory is created and=C2=A0{{part-xxx-xx}}=C2= =A0files reside in the=C2=A0\{{task-xxx}}directories? -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org