Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3001F2004A1 for ; Thu, 24 Aug 2017 14:41:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2E5D816AD75; Thu, 24 Aug 2017 12:41:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 74D2316AD72 for ; Thu, 24 Aug 2017 14:41:05 +0200 (CEST) Received: (qmail 94716 invoked by uid 500); 24 Aug 2017 12: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 94705 invoked by uid 99); 24 Aug 2017 12:41:04 -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; Thu, 24 Aug 2017 12:41:04 +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 0A385C0A89 for ; Thu, 24 Aug 2017 12:41:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, 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 o4FuVuNg3Fxz for ; Thu, 24 Aug 2017 12:41:03 +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 6E9205FBEA for ; Thu, 24 Aug 2017 12: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 387D2E0D57 for ; Thu, 24 Aug 2017 12: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 7526B25386 for ; Thu, 24 Aug 2017 12:41:00 +0000 (UTC) Date: Thu, 24 Aug 2017 12:41:00 +0000 (UTC) From: "Sean Owen (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SPARK-21797) spark cannot read partitioned data in S3 that are partly in glacier MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 24 Aug 2017 12:41:06 -0000 [ https://issues.apache.org/jira/browse/SPARK-21797?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D161= 39986#comment-16139986 ]=20 Sean Owen commented on SPARK-21797: ----------------------------------- Sure, but in all events, this is an operation that is fine with Spark, but = not fine with something between the AWS SDK and AWS. It's not something Spa= rk can fix. If source data is in S3, there's no way to avoid copying it from S3. Interm= ediate data produced by Spark can't live on S3 as it's too eventually consi= stent. Some final result could. And yeah you pay to read/write S3 so in som= e use cases might be more economical to keep intensely read/written data cl= ose to the compute workers for a time, rather than write/read to S3 between= several closely related jobs. > spark cannot read partitioned data in S3 that are partly in glacier > ------------------------------------------------------------------- > > Key: SPARK-21797 > URL: https://issues.apache.org/jira/browse/SPARK-21797 > Project: Spark > Issue Type: Bug > Components: Spark Core > Affects Versions: 2.2.0 > Reporter: Boris Cl=C3=A9men=C3=A7on=20 > Labels: glacier, partitions, read, s3 > > I have a dataset in parquet in S3 partitioned by date (dt) with oldest da= te stored in AWS Glacier to save some money. For instance, we have... > {noformat} > s3://my-bucket/my-dataset/dt=3D2017-07-01/ [in glacier] > ... > s3://my-bucket/my-dataset/dt=3D2017-07-09/ [in glacier] > s3://my-bucket/my-dataset/dt=3D2017-07-10/ [not in glacier] > ... > s3://my-bucket/my-dataset/dt=3D2017-07-24/ [not in glacier] > {noformat} > I want to read this dataset, but only a subset of date that are not yet i= n glacier, eg: > {code:java} > val from =3D "2017-07-15" > val to =3D "2017-08-24" > val path =3D "s3://my-bucket/my-dataset/" > val X =3D spark.read.parquet(path).where(col("dt").between(from, to)) > {code} > Unfortunately, I have the exception > {noformat} > java.io.IOException: com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.ser= vices.s3.model.AmazonS3Exception: The operation is not valid for the object= 's storage class (Service: Amazon S3; Status Code: 403; Error Code: Invalid= ObjectState; Request ID: C444D508B6042138) > {noformat} > I seems that spark does not like partitioned dataset when some partitions= are in Glacier. I could always read specifically each date, add the column= with current date and reduce(_ union _) at the end, but not pretty and it = should not be necessary. > Is there any tip to read available data in the datastore even with old da= ta in glacier? -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org