[
https://issues.apache.org/jira/browse/TRAFODION-2449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15945716#comment-15945716
]
ASF GitHub Bot commented on TRAFODION-2449:
-------------------------------------------
Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/1028#discussion_r108504021
--- 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 --
This test might be "good enough" but it is not sharp if your intent is to
exclude just metadata tables. I might, for example, create a table X_MD_YZ.
Even "._MD." isn't good enough because I can use a delimited identifier and
create a table "X._MD_.YZ". I'm curious why we want to exclude metadata tables
at all?
> 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)