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 19C83200C80 for ; Thu, 20 Apr 2017 05:20:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 186DF160B9C; Thu, 20 Apr 2017 03:20:09 +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 36522160BAA for ; Thu, 20 Apr 2017 05:20:08 +0200 (CEST) Received: (qmail 29978 invoked by uid 500); 20 Apr 2017 03:20:07 -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 29969 invoked by uid 99); 20 Apr 2017 03:20:07 -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, 20 Apr 2017 03:20:07 +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 0A52D1A025C for ; Thu, 20 Apr 2017 03:20:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[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 (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id h9FL14Mn-AAr for ; Thu, 20 Apr 2017 03:20:05 +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 5593B5FB2C for ; Thu, 20 Apr 2017 03:20:05 +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 CBBC8E0CBE for ; Thu, 20 Apr 2017 03:20:04 +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 2A30C21B57 for ; Thu, 20 Apr 2017 03:20:04 +0000 (UTC) Date: Thu, 20 Apr 2017 03:20:04 +0000 (UTC) From: "tianyou (JIRA)" To: commits@beam.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Issue Comment Deleted] (BEAM-1789) window can't not use in spark cluster module MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 20 Apr 2017 03:20:09 -0000 [ https://issues.apache.org/jira/browse/BEAM-1789?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:all-tabpanel ] tianyou updated BEAM-1789: -------------------------- Comment: was deleted (was: I change *strong*Window.Bound> fixWindow =3D Window= .> into(FixedWindows.of(size));*strong*) > window can't not use in spark cluster module > -------------------------------------------- > > Key: BEAM-1789 > URL: https://issues.apache.org/jira/browse/BEAM-1789 > Project: Beam > Issue Type: Bug > Components: runner-spark > Reporter: tianyou > Assignee: Amit Sela > > I user beam in spark cluster,The application is blow. > SparkPipelineOptions options =3D PipelineOptionsFactory.as(SparkPipelineO= ptions.class); > options.setRunner(SparkRunner.class); > options.setEnableSparkMetricSinks(false); > options.setStreaming(true); > options.setSparkMaster("spark://10.100.124.205:6066"); > options.setAppName("Beam App Spark"+new Random().nextFloat()); > options.setJobName("Beam Job Spark"+new Random().nextFloat()); > System.out.println("App Name:"+options.getAppName()); > System.out.println("Job Name:"+options.getJobName()); > options.setMaxRecordsPerBatch(100000L); > =20 > // PipelineOptions options =3D PipelineOptionsFactory.create(); > Pipeline p =3D Pipeline.create(options); > =20 > // Duration size =3D Duration.standardMinutes(4); > long duration =3D 60; > if(args!=3Dnull && args.length=3D=3D1){ > duration =3D Integer.valueOf(args[0]); > } > Duration size =3D Duration.standardSeconds(duration); > System.out.println("=E6=97=B6=E9=97=B4=E7=AA=97=E5=8F=A3=E4=B8=BA= :["+duration+"]=E7=A7=92"); > Window.Bound> fixWindow =3D Window.> into( > FixedWindows.of(size) > ); > =20 > String kafkaAddress =3D "10.100.124.208:9093"; > // String kafkaAddress =3D "192.168.100.212:9092"; > =20 > Map kfConsunmerConf =3D new HashMap(); > kfConsunmerConf.put("auto.offset.reset", "latest"); > PCollection kafkaJsonPc =3D p.apply(KafkaIO. read() > .withBootstrapServers(kafkaAddress) > .withTopics(ImmutableList.of("wypxx1")) > .withKeyCoder(StringUtf8Coder.of())=20 > .withValueCoder(StringUtf8Coder.of()) > .updateConsumerProperties(kfConsunmerConf) > .withoutMetadata()=20 > ).apply(Values. create()); > =20 > =20 > PCollection> totalPc =3D kafkaJsonPc.apply( > "count line", > ParDo.of(new DoFn>() { > @ProcessElement > public void processElement(ProcessContext c) { > String line =3D c.element(); > Instant is =3D c.timestamp(); > if(line.length()>2) > line =3D line.substring(0,2); > System.out.println(line + " " + is.toString()); > c.output(KV.of(line, line)); > } > }) > ); > =20 > =20 > PCollection>> itPc =3D totalPc.apply(= fixWindow).apply( > "group by appKey", > GroupByKey.create() > ); > itPc.apply(ParDo.of(new DoFn>, Void= >() { > @ProcessElement > public void processElement(ProcessContext c) { > KV> keyIt =3D c.element(); > String key =3D keyIt.getKey(); > Iterable itb =3D keyIt.getValue(); > Iterator it =3D itb.iterator(); > StringBuilder sb =3D new StringBuilder(); > sb.append(key).append(":["); > while(it.hasNext()){ > sb.append(it.next()).append(","); > } > String str =3D sb.toString(); > str =3D str.substring(0,str.length() -1) + "]"; > System.out.println(str); > String filePath =3D "/data/wyp/sparktest.txt"; > String line =3D "word-->["+key+"]total count=3D"+str+= "--->time+"+c.timestamp().toString(); > System.out.println("writefile----->"+line); > FileUtil.write(filePath, line, true, true); > } > =20 > })); > =20 > p.run().waitUntilFinish(); > When I user submit application to spark cluster.In spark UI,I can see log= of totalPc PCollection of. after one miniter but I can.t see log of itPc= PCollection. > I use local mode spark,It work well. > Please help me to resovle this proplems.Thanks! -- This message was sent by Atlassian JIRA (v6.3.15#6346)