GitHub user lionelcao opened a pull request:
https://github.com/apache/carbondata/pull/1317 [CARBONDATA-1316] drop partition Drop partition function You can merge this pull request into a Git repository by running: $ git pull https://github.com/lionelcao/carbondata carbon_910_015 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/carbondata/pull/1317.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1317 ---- commit 4037acb2453f21ba20e8f719989c32e9b8f79c9d Author: lionelcao <[hidden email]> Date: 2017-09-04T07:38:44Z drop partition ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at [hidden email] or file a JIRA ticket with INFRA. --- |
Github user QiangCai commented on the issue:
https://github.com/apache/carbondata/pull/1317 please describe your modification --- |
In reply to this post by qiuchenjian-2
Github user QiangCai commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1317#discussion_r137161410 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala --- @@ -320,7 +322,143 @@ case class AlterTableSplitPartitionCommand(splitPartitionModel: AlterTableSplitP } } -case class CreateTable(cm: TableModel, createDSTable: Boolean = true) extends RunnableCommand +case class AlterTableDropPartition(alterTableDropPartitionModel: AlterTableDropPartitionModel) --- End diff -- please comment different points between different partition type in drop partition command. --- |
In reply to this post by qiuchenjian-2
Github user lionelcao commented on the issue:
https://github.com/apache/carbondata/pull/1317 Refer to below guidance for illustration of drop partition function: https://github.com/apache/carbondata/blob/master/docs/partition-guide.md#drop-a-partition --- |
In reply to this post by qiuchenjian-2
Github user QiangCai commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1317#discussion_r137916597 --- Diff: integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/AlterTableLoadPartitionRDD.scala --- @@ -104,20 +103,20 @@ class AlterTableSplitPartitionRDD[K, V]( true ) - val splitStatus = if (rows.isEmpty) { + val loadStatus = if (rows.isEmpty) { LOGGER.info("After repartition this split, NO target rows to write back.") true } else { + val segmentProperties = PartitionUtils.getSegmentProperties(identifier, + segmentId, partitionIds.toList, oldPartitionIdList, partitionInfo) + val processor = new RowResultProcessor( + carbonTable, + carbonLoadModel, + segmentProperties, + tempStoreLoc, + bucketId + ) --- End diff -- move to last line --- |
In reply to this post by qiuchenjian-2
Github user QiangCai commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1317#discussion_r137916622 --- Diff: integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/DataManagementFunc.scala --- @@ -305,6 +305,27 @@ object DataManagementFunc { futureList.add(future) } + def executeDroppingPartition(sqlContext: SQLContext, + carbonLoadModel: CarbonLoadModel, + executor: ExecutorService, + storePath: String, --- End diff -- we can get storePath from carbonLoadModel --- |
In reply to this post by qiuchenjian-2
Github user QiangCai commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1317#discussion_r137916682 --- Diff: integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/PartitionDropper.scala --- @@ -0,0 +1,130 @@ +/* + * 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.spark.rdd + +import java.io.IOException + +import org.apache.spark.sql.execution.command.DropPartitionCallableModel +import org.apache.spark.util.PartitionUtils + +import org.apache.carbondata.common.logging.LogServiceFactory +import org.apache.carbondata.core.metadata.schema.partition.PartitionType +import org.apache.carbondata.spark.{AlterPartitionResultImpl, PartitionFactory} + +object PartitionDropper { + + val logger = LogServiceFactory.getLogService(PartitionDropper.getClass.getName) + + def triggerPartitionDrop(dropPartitionCallableModel: DropPartitionCallableModel): Unit = { + val sc = dropPartitionCallableModel.sqlContext.sparkContext --- End diff -- better to remove sc from DropPartitionCallableModel. suggest to package the parameters of AlterTableLoadPartitionRDD and CarbonScanPartitionRDD --- |
In reply to this post by qiuchenjian-2
Github user QiangCai commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1317#discussion_r137916743 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala --- @@ -320,7 +322,143 @@ case class AlterTableSplitPartitionCommand(splitPartitionModel: AlterTableSplitP } } -case class CreateTable(cm: TableModel, createDSTable: Boolean = true) extends RunnableCommand +case class AlterTableDropPartition(alterTableDropPartitionModel: AlterTableDropPartitionModel) + extends RunnableCommand with DataProcessCommand with SchemaProcessCommand { + val LOGGER = LogServiceFactory.getLogService(this.getClass.getName) --- End diff -- why to add so many attribute? --- |
In reply to this post by qiuchenjian-2
Github user QiangCai commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1317#discussion_r137916764 --- Diff: processing/src/main/java/org/apache/carbondata/processing/spliter/CarbonDataSpliterUtil.java --- @@ -0,0 +1,40 @@ +/* + * 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.spliter; + +import java.util.List; + +import org.apache.carbondata.common.CarbonIterator; +import org.apache.carbondata.common.logging.LogService; +import org.apache.carbondata.common.logging.LogServiceFactory; +import org.apache.carbondata.core.scan.result.BatchResult; + +public final class CarbonDataSpliterUtil { --- End diff -- please remove it if no need. --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1317 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/13/ --- |
In reply to this post by qiuchenjian-2
Github user lionelcao commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1317#discussion_r138692030 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala --- @@ -320,7 +322,143 @@ case class AlterTableSplitPartitionCommand(splitPartitionModel: AlterTableSplitP } } -case class CreateTable(cm: TableModel, createDSTable: Boolean = true) extends RunnableCommand +case class AlterTableDropPartition(alterTableDropPartitionModel: AlterTableDropPartitionModel) + extends RunnableCommand with DataProcessCommand with SchemaProcessCommand { + val LOGGER = LogServiceFactory.getLogService(this.getClass.getName) --- End diff -- The variables could only get from sparkSession and both processSchema and processData will use those variables. --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1317 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/121/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1317 Build Failed with Spark 1.6, Please check CI http://144.76.159.231:8080/job/ApacheCarbonPRBuilder1/19/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1317 SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/755/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1317 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/139/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1317 Build Failed with Spark 1.6, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/13/ --- |
In reply to this post by qiuchenjian-2
Github user chenliang613 commented on the issue:
https://github.com/apache/carbondata/pull/1317 retest this please --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1317 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/201/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1317 Build Failed with Spark 1.6, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/78/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1317 SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/833/ --- |
Free forum by Nabble | Edit this page |