From commits-return-57738-archive-asf-public=cust-asf.ponee.io@beam.apache.org Fri Feb 2 09:37:13 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id D1DAD180608 for ; Fri, 2 Feb 2018 09:37:13 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C1BB4160C49; Fri, 2 Feb 2018 08:37:13 +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 17D1C160C41 for ; Fri, 2 Feb 2018 09:37:12 +0100 (CET) Received: (qmail 315 invoked by uid 500); 2 Feb 2018 08:37:12 -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 306 invoked by uid 99); 2 Feb 2018 08:37:12 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Feb 2018 08:37:12 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id B76A3C04AB for ; Fri, 2 Feb 2018 08:37:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -102.31 X-Spam-Level: X-Spam-Status: No, score=-102.31 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id fTpTiwozvo4D for ; Fri, 2 Feb 2018 08:37:07 +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 BFDA35F5FB for ; Fri, 2 Feb 2018 08:37:06 +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 02B8CE02F1 for ; Fri, 2 Feb 2018 08:37:00 +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 7AD8E21E84 for ; Fri, 2 Feb 2018 08:37:00 +0000 (UTC) Date: Fri, 2 Feb 2018 08:37:00 +0000 (UTC) From: "Dawid Wysakowicz (JIRA)" To: commits@beam.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (BEAM-2995) can't read/write hdfs in Flink CLUSTER(Standalone) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/BEAM-2995?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dawid Wysakowicz reassigned BEAM-2995: -------------------------------------- Assignee: Dawid Wysakowicz (was: Aljoscha Krettek) > can't read/write hdfs in Flink CLUSTER(Standalone) > -------------------------------------------------- > > Key: BEAM-2995 > URL: https://issues.apache.org/jira/browse/BEAM-2995 > Project: Beam > Issue Type: Bug > Components: runner-flink > Affects Versions: 2.2.0 > Reporter: huangjianhuang > Assignee: Dawid Wysakowicz > Priority: Major > > i just write a simple demo like: > {code:java} > Configuration conf = new Configuration(); > conf.set("fs.default.name", "hdfs://localhost:9000"); > //other codes > p.apply("ReadLines", TextIO.read().from("hdfs://localhost:9000/tmp/words")) > .apply(TextIO.write().to("hdfs://localhost:9000/tmp/hdfsout")); > {code} > it works in flink local model with cmd: > {code:java} > mvn exec:java -Dexec.mainClass=com.joe.FlinkWithHDFS -Pflink-runner -Dexec.args="--runner=FlinkRunner --filesToStage=target/flinkBeam-2.2.0-SNAPSHOT-shaded.jar" > {code} > but not works in CLUSTER mode: > {code:java} > mvn exec:java -Dexec.mainClass=com.joe.FlinkWithHDFS -Pflink-runner -Dexec.args="--runner=FlinkRunner --filesToStage=target/flinkBeam-2.2.0-SNAPSHOT-shaded.jar --flinkMaster=localhost:6123 " > {code} > it seems the flink cluster regard the hdfs as local file system. > The input log from flink-jobmanger.log is: > {code:java} > 2017-09-27 20:17:37,962 INFO org.apache.flink.runtime.jobmanager.JobManager - Successfully ran initialization on master in 136 ms. > 2017-09-27 20:17:37,968 INFO org.apache.beam.sdk.io.FileBasedSource - {color:red}Filepattern hdfs://localhost:9000/tmp/words2 matched 0 files with total size 0{color} > 2017-09-27 20:17:37,968 INFO org.apache.beam.sdk.io.FileBasedSource - Splitting filepattern hdfs://localhost:9000/tmp/words2 into bundles of size 0 took 0 ms and produced 0 files a > nd 0 bundles > {code} > The output error message is : > {code:java} > Caused by: java.lang.ClassCastException: {color:red}org.apache.beam.sdk.io.hdfs.HadoopResourceId cannot be cast to org.apache.beam.sdk.io.LocalResourceId{color} > at org.apache.beam.sdk.io.LocalFileSystem.create(LocalFileSystem.java:77) > at org.apache.beam.sdk.io.FileSystems.create(FileSystems.java:256) > at org.apache.beam.sdk.io.FileSystems.create(FileSystems.java:243) > at org.apache.beam.sdk.io.FileBasedSink$Writer.open(FileBasedSink.java:922) > at org.apache.beam.sdk.io.FileBasedSink$Writer.openUnwindowed(FileBasedSink.java:884) > at org.apache.beam.sdk.io.WriteFiles.finalizeForDestinationFillEmptyShards(WriteFiles.java:909) > at org.apache.beam.sdk.io.WriteFiles.access$900(WriteFiles.java:110) > at org.apache.beam.sdk.io.WriteFiles$2.processElement(WriteFiles.java:858) > {code} > can somebody help me, i've try all the way just can't work it out [cry] > https://issues.apache.org/jira/browse/BEAM-2457 -- This message was sent by Atlassian JIRA (v7.6.3#76005)