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 C2409200B32 for ; Thu, 23 Jun 2016 16:15:58 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C0CEE160A35; Thu, 23 Jun 2016 14:15:58 +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 0109D160A59 for ; Thu, 23 Jun 2016 16:15:57 +0200 (CEST) Received: (qmail 61259 invoked by uid 500); 23 Jun 2016 14:15:57 -0000 Mailing-List: contact commits-help@carbondata.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@carbondata.incubator.apache.org Delivered-To: mailing list commits@carbondata.incubator.apache.org Received: (qmail 61231 invoked by uid 99); 23 Jun 2016 14:15:57 -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, 23 Jun 2016 14:15:57 +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 A8D121812C8 for ; Thu, 23 Jun 2016 14:15:56 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id LWAjR17lTepZ for ; Thu, 23 Jun 2016 14:15:55 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 690E960E26 for ; Thu, 23 Jun 2016 14:15:52 +0000 (UTC) Received: (qmail 60976 invoked by uid 99); 23 Jun 2016 14:15:51 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jun 2016 14:15:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 15E04E943A; Thu, 23 Jun 2016 14:15:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jbonofre@apache.org To: commits@carbondata.incubator.apache.org Date: Thu, 23 Jun 2016 14:16:31 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [43/56] [abbrv] incubator-carbondata git commit: [Bug] add property CARBON_TIMESTAMP_FORMAT for CarbonExample(#696) archived-at: Thu, 23 Jun 2016 14:15:58 -0000 [Bug] add property CARBON_TIMESTAMP_FORMAT for CarbonExample(#696) [Bug] add property CARBON_TIMESTAMP_FORMAT for CarbonExample(#696) Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/398250c7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/398250c7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/398250c7 Branch: refs/heads/master Commit: 398250c71645583d8b93b859fa28eaa3591d1f4b Parents: 91951ac Author: Jay Authored: Mon Jun 20 15:48:13 2016 +0800 Committer: david Committed: Mon Jun 20 15:48:13 2016 +0800 ---------------------------------------------------------------------- .../main/scala/org/carbondata/examples/CarbonExample.scala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/398250c7/examples/src/main/scala/org/carbondata/examples/CarbonExample.scala ---------------------------------------------------------------------- diff --git a/examples/src/main/scala/org/carbondata/examples/CarbonExample.scala b/examples/src/main/scala/org/carbondata/examples/CarbonExample.scala index 77907ab..20b2eae 100644 --- a/examples/src/main/scala/org/carbondata/examples/CarbonExample.scala +++ b/examples/src/main/scala/org/carbondata/examples/CarbonExample.scala @@ -17,8 +17,8 @@ package org.carbondata.examples -import org.apache.spark.{SparkConf, SparkContext} - +import org.carbondata.core.constants.CarbonCommonConstants +import org.carbondata.core.util.CarbonProperties import org.carbondata.examples.util.InitForExamples object CarbonExample { @@ -26,6 +26,10 @@ object CarbonExample { val cc = InitForExamples.createCarbonContext("CarbonExample") val testData = InitForExamples.currentPath + "/src/main/resources/data.csv" + // Specify timestamp format based on raw data + CarbonProperties.getInstance() + .addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT, "yyyy/mm/dd") + cc.sql("DROP TABLE IF EXISTS t3") cc.sql("""