use of org.apache.ignite.internal.visor.tx.TxVerboseInfo in project ignite by apache.
the class TxCommands method printTxInfoResult.
/**
* Prints result of --tx --info command to output.
*
* @param res Response.
*/
private void printTxInfoResult(Map<ClusterNode, VisorTxTaskResult> res) {
String lb = null;
Map<Integer, String> usedCaches = new HashMap<>();
Map<Integer, String> usedCacheGroups = new HashMap<>();
VisorTxInfo firstInfo = null;
TxVerboseInfo firstVerboseInfo = null;
Set<TransactionState> states = new HashSet<>();
for (Map.Entry<ClusterNode, VisorTxTaskResult> entry : res.entrySet()) {
for (VisorTxInfo info : entry.getValue().getInfos()) {
assert info.getTxVerboseInfo() != null;
if (lb == null)
lb = info.getLabel();
if (firstInfo == null) {
firstInfo = info;
firstVerboseInfo = info.getTxVerboseInfo();
}
usedCaches.putAll(info.getTxVerboseInfo().usedCaches());
usedCacheGroups.putAll(info.getTxVerboseInfo().usedCacheGroups());
states.add(info.getState());
}
}
String indent = "";
logger.info("");
logger.info(indent + "Transaction detailed info:");
printTransactionDetailedInfo(res, usedCaches, usedCacheGroups, firstInfo, firstVerboseInfo, states, indent + DOUBLE_INDENT);
}
use of org.apache.ignite.internal.visor.tx.TxVerboseInfo in project ignite by apache.
the class TxCommands method printTransactionMappings.
/**
* Prints transaction mappings for specific cluster node to output.
*
* @param indent Indent.
* @param entry Entry.
*/
private void printTransactionMappings(String indent, Map.Entry<ClusterNode, VisorTxTaskResult> entry) {
for (VisorTxInfo info : entry.getValue().getInfos()) {
TxVerboseInfo verboseInfo = info.getTxVerboseInfo();
if (verboseInfo != null) {
logger.info(indent + "Mapping [type=" + verboseInfo.txMappingType() + "]:");
printTransactionMapping(indent + DOUBLE_INDENT, info, verboseInfo);
} else {
logger.info(indent + "Mapping [type=HISTORICAL]:");
logger.info(indent + DOUBLE_INDENT + "State: " + info.getState());
}
}
}
Aggregations