From issues-return-29815-archive-asf-public=cust-asf.ponee.io@carbondata.apache.org Thu Jan 4 10:10:23 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 E0B14180657 for ; Thu, 4 Jan 2018 10:10:23 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D0A4C160C2B; Thu, 4 Jan 2018 09:10:23 +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 22ADA160C28 for ; Thu, 4 Jan 2018 10:10:22 +0100 (CET) Received: (qmail 26835 invoked by uid 500); 4 Jan 2018 09:10:22 -0000 Mailing-List: contact issues-help@carbondata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@carbondata.apache.org Delivered-To: mailing list issues@carbondata.apache.org Received: (qmail 26825 invoked by uid 99); 4 Jan 2018 09:10:22 -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, 04 Jan 2018 09:10:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1BE46DFDE6; Thu, 4 Jan 2018 09:10:22 +0000 (UTC) From: jackylk To: issues@carbondata.apache.org Reply-To: issues@carbondata.apache.org References: In-Reply-To: Subject: [GitHub] carbondata pull request #1757: [CARBONDATA-1977][PARTITION] Fix aggregation ... Content-Type: text/plain Message-Id: <20180104091022.1BE46DFDE6@git1-us-west.apache.org> Date: Thu, 4 Jan 2018 09:10:22 +0000 (UTC) Github user jackylk commented on a diff in the pull request: https://github.com/apache/carbondata/pull/1757#discussion_r159605621 --- Diff: processing/src/main/java/org/apache/carbondata/processing/loading/events/LoadEvents.java --- @@ -0,0 +1,152 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.carbondata.processing.loading.events; + +import java.util.Map; + +import org.apache.carbondata.core.metadata.CarbonTableIdentifier; +import org.apache.carbondata.events.Event; +import org.apache.carbondata.processing.loading.model.CarbonLoadModel; + +public class LoadEvents { + /** + * Class for handling operations before start of a load process. + * Example usage: For validation purpose + */ + public static class LoadTablePreExecutionEvent extends Event { + private CarbonTableIdentifier carbonTableIdentifier; + private CarbonLoadModel carbonLoadModel; + private String factPath; + private boolean isDataFrameDefined; + private Map optionsFinal; + // userProvidedOptions are needed if we need only the load options given by user + private Map userProvidedOptions; + private boolean isOverWriteTable; + + public LoadTablePreExecutionEvent(CarbonTableIdentifier carbonTableIdentifier, + CarbonLoadModel carbonLoadModel, String factPath, boolean isDataFrameDefined, + Map optionsFinal, Map userProvidedOptions, + boolean isOverWriteTable) { + this.carbonTableIdentifier = carbonTableIdentifier; + this.carbonLoadModel = carbonLoadModel; + this.factPath = factPath; + this.isDataFrameDefined = isDataFrameDefined; + this.optionsFinal = optionsFinal; + this.userProvidedOptions = userProvidedOptions; + this.isOverWriteTable = isOverWriteTable; + } + + public CarbonTableIdentifier getCarbonTableIdentifier() { + return carbonTableIdentifier; + } + + public CarbonLoadModel getCarbonLoadModel() { + return carbonLoadModel; + } + + public String getFactPath() { + return factPath; + } + + public boolean isDataFrameDefined() { + return isDataFrameDefined; + } + + public Map getOptionsFinal() { + return optionsFinal; + } + + public Map getUserProvidedOptions() { + return userProvidedOptions; + } + + public boolean isOverWriteTable() { + return isOverWriteTable; + } + } + + /** + * Class for handling operations after data load completion and before final + * commit of load operation. Example usage: For loading pre-aggregate tables --- End diff -- I remember, we will move all command execution out of event listener, right? Otherwise, metadata and data process may be wrong ---