trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prashanth-vasudev <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #1075: This is a large contribution of chan...
Date Mon, 08 May 2017 17:41:58 GMT
Github user prashanth-vasudev commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/1075#discussion_r115295938
  
    --- Diff: core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TmDDL.java
---
    @@ -80,11 +80,29 @@ public TmDDL (Configuration config, Connection connection) throws
IOException {
     
           boolean tDDLTableExists = admin.tableExists(tablename);
     
    -      if (tDDLTableExists==false && dtmid ==0) {
    -            HTableDescriptor desc = new HTableDescriptor(tablename);
    -            desc.addFamily(new HColumnDescriptor(TDDL_FAMILY));
    -            admin.createTable(desc);
    -      }
    +      boolean loopExit = false;
    +      do
    +      {
    +        try {
    +           if (tDDLTableExists==false) {
    +              if (dtmid == 0){
    +                 HTableDescriptor desc = new HTableDescriptor(tablename);
    +                 desc.addFamily(new HColumnDescriptor(TDDL_FAMILY));
    +                 admin.createTable(desc);
    +              }
    +              else {
    +                 Thread.sleep(3000);  // Sleep 3 seconds to allow table creation
    +              }
    +           }
    --- End diff --
    
    Waiting for the table to show up is good. If after few waits, if the table does not show
up, may be we can add a error out condition.


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