You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by kunal642 <gi...@git.apache.org> on 2017/07/12 19:42:24 UTC

[GitHub] carbondata pull request #1168: [CARBONDATA-1229] restrict drop when loading ...

GitHub user kunal642 opened a pull request:

    https://github.com/apache/carbondata/pull/1168

    [CARBONDATA-1229] restrict drop when loading is in progress

    This PR will restrict the table from getting dropped if a load is in progres
    
    


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

    $ git pull https://github.com/kunal642/carbondata restrict_table_drop

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

    https://github.com/apache/carbondata/pull/1168.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 #1168
    
----
commit 8110fa618de33963af62c3c667b31f59a591936e
Author: kunal642 <ku...@gmail.com>
Date:   2017-07-12T19:25:56Z

    restrict drop when loading is in progress

----


---
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] carbondata issue #1168: [CARBONDATA-1229] restrict drop when loading is in p...

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

    https://github.com/apache/carbondata/pull/1168
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/3235/



---
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] carbondata issue #1168: [CARBONDATA-1229] restrict drop when loading is in p...

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

    https://github.com/apache/carbondata/pull/1168
  
    Can one of the admins verify this patch?


---
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] carbondata issue #1168: [CARBONDATA-1229] restrict drop when loading is in p...

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

    https://github.com/apache/carbondata/pull/1168
  
    Build Success with Spark 1.6, Please check CI http://144.76.159.231:8080/job/ApacheCarbonPRBuilder/638/



---
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] carbondata issue #1168: [CARBONDATA-1229] restrict drop when loading is in p...

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

    https://github.com/apache/carbondata/pull/1168
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/3056/



---
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] carbondata issue #1168: [CARBONDATA-1229] restrict drop when loading is in p...

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

    https://github.com/apache/carbondata/pull/1168
  
    @kunal642 can you please rebase


---
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] carbondata issue #1168: [CARBONDATA-1229] restrict drop when loading is in p...

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

    https://github.com/apache/carbondata/pull/1168
  
    Build Success with Spark 1.6, Please check CI http://144.76.159.231:8080/job/ApacheCarbonPRBuilder/467/



---
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] carbondata issue #1168: [CARBONDATA-1229] restrict drop when loading is in p...

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

    https://github.com/apache/carbondata/pull/1168
  
    Build Success with Spark 1.6, Please check CI http://144.76.159.231:8080/job/ApacheCarbonPRBuilder/640/



---
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] carbondata issue #1168: [CARBONDATA-1229] restrict drop when loading is in p...

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

    https://github.com/apache/carbondata/pull/1168
  
    @jackylk done


---
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] carbondata issue #1168: [CARBONDATA-1229] restrict drop when loading is in p...

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

    https://github.com/apache/carbondata/pull/1168
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/3233/



---
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] carbondata issue #1168: [CARBONDATA-1229] restrict drop when loading is in p...

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

    https://github.com/apache/carbondata/pull/1168
  
    Build Success with Spark 1.6, Please check CI http://144.76.159.231:8080/job/ApacheCarbonPRBuilder/639/



---
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] carbondata issue #1168: [CARBONDATA-1229] restrict drop when loading is in p...

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

    https://github.com/apache/carbondata/pull/1168
  
    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] carbondata issue #1168: [CARBONDATA-1229] restrict drop when loading is in p...

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

    https://github.com/apache/carbondata/pull/1168
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/3234/



---
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] carbondata pull request #1168: [CARBONDATA-1229] restrict drop when loading ...

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

    https://github.com/apache/carbondata/pull/1168


---
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] carbondata pull request #1168: [CARBONDATA-1229] restrict drop when loading ...

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

    https://github.com/apache/carbondata/pull/1168#discussion_r127120097
  
    --- Diff: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala ---
    @@ -738,27 +739,26 @@ private[sql] case class DropTableCommand(ifExistsSet: Boolean, databaseNameOp: O
         val dbName = getDB.getDatabaseName(databaseNameOp, sqlContext)
         val identifier = TableIdentifier(tableName, Option(dbName))
         val carbonTableIdentifier = new CarbonTableIdentifier(dbName, tableName, "")
    -    val carbonLock = CarbonLockFactory.getCarbonLockObj(carbonTableIdentifier.getDatabaseName,
    -        carbonTableIdentifier.getTableName + CarbonCommonConstants.UNDERSCORE +
    -        LockUsage.DROP_TABLE_LOCK)
    -    val storePath = CarbonEnv.get.carbonMetastore.storePath
    -    var isLocked = false
    +    val locksToBeAcquired = List(LockUsage.METADATA_LOCK, LockUsage.DROP_TABLE_LOCK)
    +    val carbonLocks: scala.collection.mutable.ListBuffer[ICarbonLock] = ListBuffer()
    +    val catalog = CarbonEnv.get.carbonMetastore
    +    val storePath = catalog.storePath
         try {
    -      isLocked = carbonLock.lockWithRetries()
    -      if (isLocked) {
    -        logInfo("Successfully able to get the lock for drop.")
    -      }
    -      else {
    -        LOGGER.audit(s"Dropping table $dbName.$tableName failed as the Table is locked")
    -        sys.error("Table is locked for deletion. Please try after some time")
    +      locksToBeAcquired foreach {
    --- End diff --
    
    These 2 locks are not acquired in any other flow


---
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] carbondata pull request #1168: [CARBONDATA-1229] restrict drop when loading ...

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

    https://github.com/apache/carbondata/pull/1168#discussion_r127108842
  
    --- Diff: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala ---
    @@ -738,27 +739,26 @@ private[sql] case class DropTableCommand(ifExistsSet: Boolean, databaseNameOp: O
         val dbName = getDB.getDatabaseName(databaseNameOp, sqlContext)
         val identifier = TableIdentifier(tableName, Option(dbName))
         val carbonTableIdentifier = new CarbonTableIdentifier(dbName, tableName, "")
    -    val carbonLock = CarbonLockFactory.getCarbonLockObj(carbonTableIdentifier.getDatabaseName,
    -        carbonTableIdentifier.getTableName + CarbonCommonConstants.UNDERSCORE +
    -        LockUsage.DROP_TABLE_LOCK)
    -    val storePath = CarbonEnv.get.carbonMetastore.storePath
    -    var isLocked = false
    +    val locksToBeAcquired = List(LockUsage.METADATA_LOCK, LockUsage.DROP_TABLE_LOCK)
    +    val carbonLocks: scala.collection.mutable.ListBuffer[ICarbonLock] = ListBuffer()
    +    val catalog = CarbonEnv.get.carbonMetastore
    +    val storePath = catalog.storePath
         try {
    -      isLocked = carbonLock.lockWithRetries()
    -      if (isLocked) {
    -        logInfo("Successfully able to get the lock for drop.")
    -      }
    -      else {
    -        LOGGER.audit(s"Dropping table $dbName.$tableName failed as the Table is locked")
    -        sys.error("Table is locked for deletion. Please try after some time")
    +      locksToBeAcquired foreach {
    --- End diff --
    
    Is these two locks are acquired in same order in loading?


---
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] carbondata issue #1168: [CARBONDATA-1229] restrict drop when loading is in p...

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

    https://github.com/apache/carbondata/pull/1168
  
    Can one of the admins verify this patch?


---
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] carbondata issue #1168: [CARBONDATA-1229] restrict drop when loading is in p...

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

    https://github.com/apache/carbondata/pull/1168
  
    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.
---