tephra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From poornachandra <...@git.apache.org>
Subject [GitHub] incubator-tephra pull request #29: TEPHRA-212 Perform writes to prune state ...
Date Wed, 01 Feb 2017 00:23:17 GMT
Github user poornachandra commented on a diff in the pull request:

    https://github.com/apache/incubator-tephra/pull/29#discussion_r98803604
  
    --- Diff: tephra-hbase-compat-1.1-base/src/main/java/org/apache/tephra/hbase/txprune/HBaseTransactionPruningPlugin.java
---
    @@ -219,13 +219,20 @@ public void destroy() {
        */
       protected void createPruneTable(TableName stateTable) throws IOException {
         try (Admin admin = this.connection.getAdmin()) {
    +      if (admin.tableExists(stateTable)) {
    +        LOG.debug("Not creating pruneStateTable {} since it already exists.",
    +                  stateTable.getNameWithNamespaceInclAsString());
    +        return;
    +      }
    +
           HTableDescriptor htd = new HTableDescriptor(stateTable);
           htd.addFamily(new HColumnDescriptor(DataJanitorState.FAMILY).setMaxVersions(1));
           admin.createTable(htd);
           LOG.info("Created pruneTable {}", stateTable.getNameWithNamespaceInclAsString());
         } catch (TableExistsException ex) {
    -      // Expected if the prune state table already exists
    -      LOG.debug("Not creating pruneStateTable since it already exists. {}", ex.getMessage());
    +      // Expected if the prune state table is being created at the same time by another
client
    +      LOG.debug("Not creating pruneStateTable {} since it already exists. {}",
    +                stateTable.getNameWithNamespaceInclAsString(), ex.getMessage());
    --- End diff --
    
    Log the throwable


---
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.
---

Mime
View raw message