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 9E5B6200C67 for ; Mon, 15 May 2017 08:25:17 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9CEC7160BC2; Mon, 15 May 2017 06:25:17 +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 E28EA160BC1 for ; Mon, 15 May 2017 08:25:16 +0200 (CEST) Received: (qmail 89629 invoked by uid 500); 15 May 2017 06:25:15 -0000 Mailing-List: contact dev-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@spark.apache.org Received: (qmail 89618 invoked by uid 99); 15 May 2017 06:25:15 -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; Mon, 15 May 2017 06:25:15 +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 A34841A579B for ; Mon, 15 May 2017 06:25:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.103 X-Spam-Level: X-Spam-Status: No, score=-0.103 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=outlook.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id GFIoqTNQNXbq for ; Mon, 15 May 2017 06:25:11 +0000 (UTC) Received: from APC01-HK2-obe.outbound.protection.outlook.com (mail-oln040092255039.outbound.protection.outlook.com [40.92.255.39]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 0AFC75F5FD for ; Mon, 15 May 2017 06:25:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=sb66TvjkcCsN/C7ReRQW7VrWNYbPF5V68vKE0x99A+w=; b=dM/dPQ0mGXcykrPTAKTQfHrJ+a/9j//2wlIZ2GbG0FCXmtC6FaUylkirBU0Mi83EgHxN0Ai/emB/P1Vj4y50F97Iunrnl/ATR8zrVPfo9Ot13qnbuc6II934XTBFBRxWzWsifwrA7HhL2h+noV/rKo5qXn+slcKmnkhIJSW0wc9lkOE3pfXTEZijCZBgunH/YsWgKdTqHOEM3aPmRdDjSAOQUhzbQBSsLoyP0zvf9RtpcbET8osajSjJh184+q4Cb7xTP4sdWcR5x7edxthNTWEYof38rFEzXf/Afy1OHlTIWzjGApYhJWhozPjEeJx55f2bGprPtVtd66WBtLNSog== Received: from HK2APC01FT061.eop-APC01.prod.protection.outlook.com (10.152.248.59) by HK2APC01HT180.eop-APC01.prod.protection.outlook.com (10.152.249.211) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1047.9; Mon, 15 May 2017 06:25:03 +0000 Received: from ME1PR01MB0835.ausprd01.prod.outlook.com (10.152.248.54) by HK2APC01FT061.mail.protection.outlook.com (10.152.249.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1075.5 via Frontend Transport; Mon, 15 May 2017 06:25:02 +0000 Received: from ME1PR01MB0835.ausprd01.prod.outlook.com ([10.169.165.23]) by ME1PR01MB0835.ausprd01.prod.outlook.com ([10.169.165.23]) with mapi id 15.01.1084.027; Mon, 15 May 2017 06:25:02 +0000 From: Deepu Raj To: "dev@spark.apache.org" Subject: Spark Streaming Cassandra Transformation Thread-Topic: Spark Streaming Cassandra Transformation Thread-Index: AQHSzUP7MP5I4Olv20y+znw3ysASEQ== Date: Mon, 15 May 2017 06:25:02 +0000 Message-ID: Accept-Language: en-AU, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spark.apache.org; dkim=none (message not signed) header.d=none;spark.apache.org; dmarc=none action=none header.from=outlook.com; x-incomingtopheadermarker: OriginalChecksum:6E4BFA5A57D264B1ADB61AF2CA2835D472AD7F32BB306E831ACB8B7C8BF07BC2;UpperCasedChecksum:3F952173F2B6A64BA6A077D661A560242037FFB133CF51DC33A789860E6A3483;SizeAsReceived:7873;Count:40 x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;HK2APC01HT180;5:5vkqHbuptYmg5HWFL7jbO2Hpf/qlrpykF9DCcvFDYidNbSl8AQfGHYmtM0TIbRc1XIoOzOW7jkH9YrdFtXdCeZC2OAI55UBzFnOODKwA5xx4Fyng3tRwOTULLyHNy+bPFLWGN8s9uMcwvozBQDid5Q==;24:+fHQOMnaDRnMoZfpNTyECZZx+Dyd0k/4/otaUjbscVffP/wtOi0UW72lHQNHKqLbSFy7MvOMnmyTZ4u9ueofULdvwCGcfkw6gKXxfiBsjc8=;7:GcFL0MS3p3DVn86SKyLaevX5N/U1icmbIWPGQ2eg0vw8JI36JROjlaspRFvfF6j0kBixUbZl0ffkrhA8+VHS9bPAe20DVdhQdMMvGtrVgwLyGBISqhlMTPQZNybgftGQSCFoNhssyMAUz9OOhahIVT3oCVn1xEicuDt9iyXKxX4CeFDTE9Ig1n3mUZpaYEMt4E1FUWCO4ZY1xRu2MoDcl4I+kzUsw+U0DsCAM7hvevaLVb8sP5Vqm40aOeVInopJO5w8RnZOkXo0gdpKkV2UbGv3Of2EzN9Fzy5+UE4UZQvpTjeYkQF7SLoadU7jqWww x-incomingheadercount: 40 x-eopattributedmessage: 0 x-forefront-antispam-report: EFV:NLI;SFV:NSPM;SFS:(7070007)(98901004);DIR:OUT;SFP:1901;SCL:1;SRVR:HK2APC01HT180;H:ME1PR01MB0835.ausprd01.prod.outlook.com;FPR:;SPF:None;LANG:en; x-ms-office365-filtering-correlation-id: 03531347-2c59-4d5d-937b-08d49b5b1d0e x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322274)(1601125374)(1603101448)(1701031045);SRVR:HK2APC01HT180; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(444000031);SRVR:HK2APC01HT180;BCL:0;PCL:0;RULEID:;SRVR:HK2APC01HT180; x-forefront-prvs: 0308EE423E spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-15" Content-ID: <78DE63416708324D830FE1EA88EAE7EA@ausprd01.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 15 May 2017 06:25:02.1055 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2APC01HT180 archived-at: Mon, 15 May 2017 06:25:17 -0000 Hi Team, 1. Can someone please guide on how to change the following transformation = =20 change for the below data in Spark 2.0? {"name":"Michael", "age":30, "state":AZ, "Job": SoftwareDev} {"name":"Andy", "age":30, "state":WA, "Job": Mana} {"name":"Justin", "age":19, , "state":VIC, "Job": DBAdmin} KafkaUtils.createStream[String, String, StringDecoder, StringDecoder]( ssc, kafkaParams, topicMap, StorageLevel.MEMORY_ONLY) .map{ case (_,json) =3D> =20 JsonParser.parse(json).extract[MonthlyCommits]}.saveToCassandra("github_sta= ts","commits_aggr") 2. What is the best way to do this push JSON into Cassandra without using = =20 DF? Thanks, Deepu Raj --=20 Using Opera's mail client: http://www.opera.com/mail/ --------------------------------------------------------------------- To unsubscribe e-mail: dev-unsubscribe@spark.apache.org