Return-Path: X-Original-To: apmail-asterixdb-notifications-archive@minotaur.apache.org Delivered-To: apmail-asterixdb-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E039918D25 for ; Thu, 25 Feb 2016 07:09:51 +0000 (UTC) Received: (qmail 3532 invoked by uid 500); 25 Feb 2016 07:09:51 -0000 Delivered-To: apmail-asterixdb-notifications-archive@asterixdb.apache.org Received: (qmail 3497 invoked by uid 500); 25 Feb 2016 07:09:51 -0000 Mailing-List: contact notifications-help@asterixdb.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.incubator.apache.org Delivered-To: mailing list notifications@asterixdb.incubator.apache.org Received: (qmail 3488 invoked by uid 99); 25 Feb 2016 07:09:51 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Feb 2016 07:09:51 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 547F91A0760 for ; Thu, 25 Feb 2016 07:09:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.126 X-Spam-Level: ** X-Spam-Status: No, score=2.126 tagged_above=-999 required=6.31 tests=[MISSING_HEADERS=1.207, SPF_FAIL=0.919] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id wfSJuGS-EChq for ; Thu, 25 Feb 2016 07:09:50 +0000 (UTC) Received: from unhygienix.ics.uci.edu (unhygienix.ics.uci.edu [128.195.14.130]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTP id AEDE05F400 for ; Thu, 25 Feb 2016 07:09:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by unhygienix.ics.uci.edu (Postfix) with ESMTP id 276832418D5; Wed, 24 Feb 2016 23:05:17 -0800 (PST) Date: Wed, 24 Feb 2016 23:05:17 -0800 From: "abdullah alamoudi (Code Review)" CC: Jenkins , Murtadha Hubail Reply-To: bamousaa@gmail.com X-Gerrit-MessageType: merged Subject: Change in hyracks[master]: Fix Remove File Operator X-Gerrit-Change-Id: I5910409d79e9c1f8e7192a1050b2be0f823e912f X-Gerrit-ChangeURL: X-Gerrit-Commit: c20aa64af7e850d6c2c791d3a2aa05b8cb634759 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.8.4 Message-Id: <20160225070517.276832418D5@unhygienix.ics.uci.edu> abdullah alamoudi has submitted this change and it was merged. Change subject: Fix Remove File Operator ...................................................................... Fix Remove File Operator The operator didn't get the correct path of the folder to be deleted. After the fix, the operator gets the correct path from the IO manager. Change-Id: I5910409d79e9c1f8e7192a1050b2be0f823e912f Reviewed-on: https://asterix-gerrit.ics.uci.edu/659 Tested-by: Jenkins Reviewed-by: Murtadha Hubail --- M hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/file/FileRemoveOperatorDescriptor.java 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Murtadha Hubail: Looks good to me, approved Jenkins: Verified diff --git a/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/file/FileRemoveOperatorDescriptor.java b/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/file/FileRemoveOperatorDescriptor.java index 6e274d5..cf2008c 100644 --- a/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/file/FileRemoveOperatorDescriptor.java +++ b/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/file/FileRemoveOperatorDescriptor.java @@ -23,13 +23,13 @@ import java.io.IOException; import org.apache.commons.io.FileUtils; - import org.apache.hyracks.api.comm.IFrameWriter; import org.apache.hyracks.api.context.IHyracksTaskContext; import org.apache.hyracks.api.dataflow.IOperatorNodePushable; import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider; import org.apache.hyracks.api.dataflow.value.RecordDescriptor; import org.apache.hyracks.api.exceptions.HyracksDataException; +import org.apache.hyracks.api.io.IIOManager; import org.apache.hyracks.api.job.IOperatorDescriptorRegistry; import org.apache.hyracks.dataflow.std.base.AbstractOperatorNodePushable; import org.apache.hyracks.dataflow.std.base.AbstractSingleActivityOperatorDescriptor; @@ -49,6 +49,9 @@ public IOperatorNodePushable createPushRuntime(IHyracksTaskContext ctx, IRecordDescriptorProvider recordDescProvider, int partition, int nPartitions) throws HyracksDataException { final FileSplit split = fileSplitProvider.getFileSplits()[partition]; + final String path = split.getLocalFile().getFile().getPath(); + final int deviceId = split.getIODeviceId(); + final IIOManager ioManager = ctx.getIOManager(); return new AbstractOperatorNodePushable() { @Override @@ -58,7 +61,7 @@ @Override public void initialize() throws HyracksDataException { - File f = split.getLocalFile().getFile(); + File f = ioManager.getAbsoluteFileRef(deviceId, path).getFile(); try { FileUtils.deleteDirectory(f); } catch (IOException e) { -- To view, visit https://asterix-gerrit.ics.uci.edu/659 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5910409d79e9c1f8e7192a1050b2be0f823e912f Gerrit-PatchSet: 2 Gerrit-Project: hyracks Gerrit-Branch: master Gerrit-Owner: abdullah alamoudi Gerrit-Reviewer: Jenkins Gerrit-Reviewer: Murtadha Hubail Gerrit-Reviewer: abdullah alamoudi