[ 
https://issues.apache.org/jira/browse/TRAFODION-2449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15946502#comment-15946502
 ] 

ASF GitHub Bot commented on TRAFODION-2449:
-------------------------------------------

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.   


> dtmci - Enhance to include HBase-related info for status 
> ---------------------------------------------------------
>
>                 Key: TRAFODION-2449
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2449
>             Project: Apache Trafodion
>          Issue Type: Improvement
>          Components: dtm
>    Affects Versions: 2.2-incubating
>            Reporter: Oliver Bucaojit
>            Priority: Minor
>         Attachments: status_regions.png, TRAFODION-2449.v1.patch, 
> TRAFODION-2449.v2.patch
>
>
> Request for enhancement
> dtmci 'status trans' does not show information regarding table name, 
> regionserver, or region.  It would be beneficial for troubleshooting and 
> understanding the path taken by a transaction to include HBase related 
> information. 
> Initial idea would be to add a 'detailed' option to specifying the trans id. 
> DTMCI > status trans <transid>, detailed
> Looking at the code, this work would require adding JNI calls from the tm 
> process to the HBaseTxClient class to gather this information.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to