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 92373200C48 for ; Thu, 6 Apr 2017 19:22:45 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 90D0E160B91; Thu, 6 Apr 2017 17:22:45 +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 D8ACA160B81 for ; Thu, 6 Apr 2017 19:22:44 +0200 (CEST) Received: (qmail 43440 invoked by uid 500); 6 Apr 2017 17:22:44 -0000 Mailing-List: contact commits-help@beam.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@beam.apache.org Delivered-To: mailing list commits@beam.apache.org Received: (qmail 43427 invoked by uid 99); 6 Apr 2017 17:22:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Apr 2017 17:22:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 8437B18396C for ; Thu, 6 Apr 2017 17:22:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id wudjgCrSiiLu for ; Thu, 6 Apr 2017 17:22:42 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 70E4F5FAE7 for ; Thu, 6 Apr 2017 17:22:42 +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 0DF35E0629 for ; Thu, 6 Apr 2017 17:22:42 +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 BE77424067 for ; Thu, 6 Apr 2017 17:22:41 +0000 (UTC) Date: Thu, 6 Apr 2017 17:22:41 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: commits@beam.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (BEAM-1856) HDFSFileSink class do not use the same configuration in master and slave MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 06 Apr 2017 17:22:45 -0000 [ https://issues.apache.org/jira/browse/BEAM-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15959361#comment-15959361 ] ASF GitHub Bot commented on BEAM-1856: -------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/beam/pull/2399 > HDFSFileSink class do not use the same configuration in master and slave > ------------------------------------------------------------------------ > > Key: BEAM-1856 > URL: https://issues.apache.org/jira/browse/BEAM-1856 > Project: Beam > Issue Type: Bug > Components: sdk-java-extensions > Affects Versions: 0.6.0 > Reporter: yangping wu > Assignee: yangping wu > Fix For: First stable release > > > I have a code snippet as follow: > {code} > Read.Bounded> from = Read.from(HDFSFileSource.from(options.getInputFile(), TextInputFormat.class, LongWritable.class, Text.class)); > PCollection> data = p.apply(from); > data.apply(MapElements.via(new SimpleFunction, String>() { > @Override > public String apply(KV input) { > return input.getValue() + "\t" + input.getValue(); > } > })).apply(Write.to(HDFSFileSink.toText(options.getOutputFile()))); > {code} > and submit job like this: > {code} > spark-submit --class org.apache.beam.examples.WordCountHDFS --master yarn-client \ > ./target/word-count-beam-bundled-0.1.jar \ > --runner=SparkRunner \ > --inputFile=hdfs://master/tmp/input/ \ > --outputFile=/tmp/output/ > {code} > Then {{HDFSFileSink.validate}} function will check whether the local filesystem (not HDFS) exists {{/tmp/output/}} directory. > But the final result will store in {{hdfs://master/tmp/output/}} directory in HDFS filesystem. > The reason is {{HDFSFileSink}} class do not use the same configuration in master thread and slave thread. -- This message was sent by Atlassian JIRA (v6.3.15#6346)