You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by nareshpr <gi...@git.apache.org> on 2017/03/20 09:50:31 UTC

[GitHub] incubator-carbondata pull request #675: [CARBONDATA-796]Drop database comman...

GitHub user nareshpr opened a pull request:

    https://github.com/apache/incubator-carbondata/pull/675

    [CARBONDATA-796]Drop database command clears all carbonfiles from carbon.store/dbfolder

    When user trigger drop database command, Carbon is deleted all the files from <carbon.store>/database/ folder without check whether any file exist
    eg., create database db1;
    create table db1.test1(id int, name string) stored as 'carbondata';
    drop database db1; --> This command clears all the files in <carbon.store>/database/ folder.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nareshpr/incubator-carbondata dropdbcascade

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-carbondata/pull/675.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 #675
    
----
commit 8bf6a62089d4c2618aa6575419ae46b3aad9f952
Author: nareshpr <pr...@gmail.com>
Date:   2017-03-20T09:48:30Z

    drop database command clears all carbonfiles from carbon.store/dbfolder

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata pull request #675: [CARBONDATA-796]Drop database comman...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-carbondata/pull/675


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata issue #675: [CARBONDATA-796]Drop database command clear...

Posted by gvramana <gi...@git.apache.org>.
Github user gvramana commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/675
  
    LGTM


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata pull request #675: [CARBONDATA-796]Drop database comman...

Posted by gvramana <gi...@git.apache.org>.
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/675#discussion_r106865916
  
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/CarbonHiveCommands.scala ---
    @@ -0,0 +1,42 @@
    +/*
    + * 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.spark.sql.hive.execution.command
    +
    +import org.apache.spark.sql.{CarbonEnv, Row, SparkSession}
    +import org.apache.spark.sql.execution.command.{CarbonDropTableCommand, DropDatabaseCommand, RunnableCommand}
    +
    +case class CarbonDropDatabaseCommand(command: DropDatabaseCommand)
    +  extends RunnableCommand {
    +
    +  override val output = command.output
    +
    +  override def run(sparkSession: SparkSession): Seq[Row] = {
    +    val dbName = command.databaseName
    +    val rows = command.run(sparkSession)
    --- End diff --
    
    write comment, 
    Drops hive database and 
    if database contains tables and cascade is false, this function will fail.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata issue #675: [CARBONDATA-796]Drop database command clear...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/675
  
    Build Failed  with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1238/



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata issue #675: [CARBONDATA-796]Drop database command clear...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/675
  
    Build Failed  with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1236/



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata issue #675: [CARBONDATA-796]Drop database command clear...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/675
  
    Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1239/



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---