Github user bucaojit commented on a diff in the pull request:

    
https://github.com/apache/incubator-trafodion/pull/1028#discussion_r108588665
  
    --- Diff: 
core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/HBaseTxClient.java
 ---
    @@ -1264,64 +1265,40 @@ public HashMapArray callRequestRegionInfo() throws 
IOException {
               TransactionState ts = mapTransactionStates.get(id);
               final Set<TransactionRegionLocation> regions = 
ts.getParticipatingRegions();
     
    -          // TableName
               Iterator<TransactionRegionLocation> it = regions.iterator();
    -          tablename = 
it.next().getRegionInfo().getTable().getNameAsString();
    -          while(it.hasNext()){
    -              tablename = tablename + ";" + 
it.next().getRegionInfo().getTable().getNameAsString();
    -          }
    -          hm.addElement(tnum, "TableName", tablename);
    -
    -          // Encoded Region Name
    -          Iterator<TransactionRegionLocation> it2 = regions.iterator();
    -          encoded_region_name = 
it2.next().getRegionInfo().getEncodedName();
    -          while(it2.hasNext()){
    -              encoded_region_name = encoded_region_name + ";" + 
it2.next().getRegionInfo().getTable().getNameAsString();
    -          }
    -          hm.addElement(tnum, "EncodedRegionName", encoded_region_name);
    -
    -          // Region Name
    -          Iterator<TransactionRegionLocation> it3 = regions.iterator();
    -          region_name = it3.next().getRegionInfo().getRegionNameAsString();
    -          while(it3.hasNext()){
    -              region_name = region_name + ";" + 
it3.next().getRegionInfo().getTable().getNameAsString();
    -          }
    -          hm.addElement(tnum, "RegionName", region_name);
    -
    -          // Region Offline
    -          Iterator<TransactionRegionLocation> it4 = regions.iterator();
    -          boolean is_offline_bool = it4.next().getRegionInfo().isOffline();
    -          is_offline = String.valueOf(is_offline_bool);
    -          hm.addElement(tnum, "RegionOffline", is_offline);
    -
    -          // Region ID
    -          Iterator<TransactionRegionLocation> it5 = regions.iterator();
    -          region_id = 
String.valueOf(it5.next().getRegionInfo().getRegionId());
    -          while(it5.hasNext()){
    -              region_id = region_id + ";" + 
it5.next().getRegionInfo().getRegionId();
    -          }
    -          hm.addElement(tnum, "RegionID", region_id);
    -
    -          // Hostname
    -          Iterator<TransactionRegionLocation> it6 = regions.iterator();
    -          thn = String.valueOf(it6.next().getHostname());
    -          hostname = thn.substring(0, thn.length()-1);
    -          while(it6.hasNext()){
    -              thn = String.valueOf(it6.next().getHostname());
    -              hostname = hostname + ";" + thn.substring(0, thn.length()-1);
    -          }
    -          hm.addElement(tnum, "Hostname", hostname);
    -
    -          // Port
    -          Iterator<TransactionRegionLocation> it7 = regions.iterator();
    -          port = String.valueOf(it7.next().getPort());
    -          while(it7.hasNext()){
    -              port = port + ";" + String.valueOf(it7.next().getPort());
    -          }
    -          hm.addElement(tnum, "Port", port);
    +          
    +          while(it.hasNext()) {
    +              TransactionRegionLocation trl = it.next();
    +              tablename = trl.getRegionInfo().getTable().getNameAsString();
    +              if(tablename.contains("_MD_"))
    --- End diff --
    
    Good point here.  I will change the check to "TRAFODION._DTM_."  
    
    I decided to not include the metadata and include the explicit tables.  
When testing with the metadata tables included it would print about 9 metadata 
regions and I was more interested in seeing the table I was inserting or 
deleting from.  I started working on a 'status regions detail' that will add 
the metadata as well but I was hitting a character limit with so many regions 
when testing.  Message limit for the TM message CTmTxMessage looks to be around 
4k.   


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to