[ISSUE #4785] Enable misspell check GitHub Action (#4786)

* Enable misspell check GitHub Action

* Fix typo
This commit is contained in:
Aaron Ai
2022-08-08 09:28:41 +08:00
committed by GitHub
parent b145062308
commit 61b14c3f4e
41 changed files with 111 additions and 94 deletions
+17
View File
@@ -0,0 +1,17 @@
name: Misspell Check
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches: [master, develop]
jobs:
misspell-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install misspell
run: |
curl -L -o ./install-misspell.sh https://git.io/misspell
sh ./install-misspell.sh
- name: Run misspell
run: find . -type f -print0 | xargs -0 bin/misspell -error -i transfered,derivate
@@ -80,35 +80,35 @@ public class AclUtilsTest {
@Test
public void isScopeArray() {
String[] adderss = StringUtils.split("12.12.12.12", ".");
boolean isScope = AclUtils.isScope(adderss, 4);
String[] address = StringUtils.split("12.12.12.12", ".");
boolean isScope = AclUtils.isScope(address, 4);
Assert.assertTrue(isScope);
isScope = AclUtils.isScope(adderss, 3);
isScope = AclUtils.isScope(address, 3);
Assert.assertTrue(isScope);
adderss = StringUtils.split("12.12.1222.1222", ".");
isScope = AclUtils.isScope(adderss, 4);
address = StringUtils.split("12.12.1222.1222", ".");
isScope = AclUtils.isScope(address, 4);
Assert.assertFalse(isScope);
isScope = AclUtils.isScope(adderss, 3);
isScope = AclUtils.isScope(address, 3);
Assert.assertFalse(isScope);
// IPv6 test
adderss = StringUtils.split("1050:0000:0000:0000:0005:0600:300c:326b", ":");
isScope = AclUtils.isIPv6Scope(adderss, 8);
address = StringUtils.split("1050:0000:0000:0000:0005:0600:300c:326b", ":");
isScope = AclUtils.isIPv6Scope(address, 8);
Assert.assertTrue(isScope);
isScope = AclUtils.isIPv6Scope(adderss, 4);
isScope = AclUtils.isIPv6Scope(address, 4);
Assert.assertTrue(isScope);
adderss = StringUtils.split("1050:9876:0000:0000:0005:akkg:300c:326b", ":");
isScope = AclUtils.isIPv6Scope(adderss, 8);
address = StringUtils.split("1050:9876:0000:0000:0005:akkg:300c:326b", ":");
isScope = AclUtils.isIPv6Scope(address, 8);
Assert.assertFalse(isScope);
isScope = AclUtils.isIPv6Scope(adderss, 4);
isScope = AclUtils.isIPv6Scope(address, 4);
Assert.assertTrue(isScope);
adderss = StringUtils.split(AclUtils.expandIP("1050::0005:akkg:300c:326b", 8), ":");
isScope = AclUtils.isIPv6Scope(adderss, 8);
address = StringUtils.split(AclUtils.expandIP("1050::0005:akkg:300c:326b", 8), ":");
isScope = AclUtils.isIPv6Scope(address, 8);
Assert.assertFalse(isScope);
isScope = AclUtils.isIPv6Scope(adderss, 4);
isScope = AclUtils.isIPv6Scope(address, 4);
Assert.assertTrue(isScope);
}
@@ -2334,7 +2334,7 @@ public class AdminBrokerProcessor implements NettyRequestProcessor {
TopicConfig topicConfig = this.brokerController.getTopicConfigManager().getTopicConfigTable().get(requestHeader.getTopic());
if (topicConfig == null) {
LOGGER.error("No topic in this broker, client: {} topic: {}", ctx.channel().remoteAddress(), requestHeader.getTopic());
//be care of the response code, should set "not-exist" explictly
//be care of the response code, should set "not-exist" explicitly
response.setCode(ResponseCode.TOPIC_NOT_EXIST);
response.setRemark("No topic in this broker. topic: " + requestHeader.getTopic());
return response;
@@ -146,7 +146,7 @@ public class TraceDataEncoder {
if (ctx == null) {
return null;
}
//build message trace of the transfering entity content bean
//build message trace of the transferring entity content bean
TraceTransferBean transferBean = new TraceTransferBean();
StringBuilder sb = new StringBuilder(256);
switch (ctx.getTraceType()) {
@@ -34,7 +34,7 @@ public interface TraceDispatcher {
void start(String nameSrvAddr, AccessChannel accessChannel) throws MQClientException;
/**
* Append the transfering data
* Append the transferring data
* @param ctx data information
* @return
*/
@@ -20,7 +20,7 @@ import java.util.HashSet;
import java.util.Set;
/**
* Trace transfering bean
* Trace transferring bean
*/
public class TraceTransferBean {
private String transData;
@@ -38,9 +38,9 @@ public class MessageDecoder {
// public final static int MSG_ID_LENGTH = 8 + 8;
public final static Charset CHARSET_UTF8 = StandardCharsets.UTF_8;
public final static int MESSAGE_MAGIC_CODE_POSTION = 4;
public final static int MESSAGE_FLAG_POSTION = 16;
public final static int MESSAGE_PHYSIC_OFFSET_POSTION = 28;
public final static int MESSAGE_MAGIC_CODE_POSITION = 4;
public final static int MESSAGE_FLAG_POSITION = 16;
public final static int MESSAGE_PHYSIC_OFFSET_POSITION = 28;
public final static int MESSAGE_STORE_TIMESTAMP_POSITION = 56;
public final static int MESSAGE_MAGIC_CODE = -626843481;
public static final char NAME_VALUE_SEPARATOR = 1;
@@ -20,12 +20,12 @@ import java.util.concurrent.atomic.AtomicLong;
public class StatisticsItemFormatter {
public String format(StatisticsItem statItem) {
final String seperator = "|";
final String separator = "|";
StringBuilder sb = new StringBuilder();
sb.append(statItem.getStatKind()).append(seperator);
sb.append(statItem.getStatObject()).append(seperator);
sb.append(statItem.getStatKind()).append(separator);
sb.append(statItem.getStatObject()).append(separator);
for (AtomicLong acc : statItem.getItemAccumulates()) {
sb.append(acc.get()).append(seperator);
sb.append(acc.get()).append(separator);
}
sb.append(statItem.getInvokeTimes());
return sb.toString();
@@ -27,7 +27,7 @@ public class StatisticsItemScheduledIncrementPrinter extends StatisticsItemSched
public static final int TPS_INITIAL_DELAY = 0;
public static final int TPS_INTREVAL = 1000;
public static final String SEPERATOR = "|";
public static final String SEPARATOR = "|";
/**
* last snapshots of all scheduled items
@@ -175,11 +175,11 @@ public class StatisticsItemScheduledIncrementPrinter extends StatisticsItemSched
for (StatisticsBrief brief : briefInterceptor.getStatisticsBriefs()) {
long max = brief.getMax();
long tp999 = Math.min(brief.tp999(), max);
//sb.append(SEPERATOR).append(brief.getTotal());
sb.append(SEPERATOR).append(max);
//sb.append(SEPERATOR).append(brief.getMin());
sb.append(SEPERATOR).append(String.format("%.2f", brief.getAvg()));
sb.append(SEPERATOR).append(tp999);
//sb.append(SEPARATOR).append(brief.getTotal());
sb.append(SEPARATOR).append(max);
//sb.append(SEPARATOR).append(brief.getMin());
sb.append(SEPARATOR).append(String.format("%.2f", brief.getAvg()));
sb.append(SEPARATOR).append(tp999);
}
return sb.toString();
}
@@ -227,9 +227,9 @@ public class StatisticsItemScheduledIncrementPrinter extends StatisticsItemSched
StringBuilder sb = new StringBuilder();
for (int i = 0; i < briefs.length; i++) {
ItemSampleBrief brief = briefs[i];
sb.append(SEPERATOR).append(brief.getMax());
//sb.append(SEPERATOR).append(brief.getMin());
sb.append(SEPERATOR).append(String.format("%.2f", brief.getAvg()));
sb.append(SEPARATOR).append(brief.getMax());
//sb.append(SEPARATOR).append(brief.getMin());
sb.append(SEPARATOR).append(String.format("%.2f", brief.getAvg()));
}
return sb.toString();
}
@@ -62,7 +62,7 @@ public class StatisticsItemScheduledPrinter extends FutureHolder {
public interface InitialDelay {
/**
* Get inital delay value
* Get initial delay value
* @return
*/
long get();
@@ -131,7 +131,7 @@ public class ServiceProvider {
LOG.warn("No resource file with name [{}] found.", name);
}
} catch (Exception e) {
LOG.error("Error occured when looking for resource file " + name, e);
LOG.error("Error occurred when looking for resource file " + name, e);
}
return services;
}
@@ -45,7 +45,7 @@ public class IOTinyUtilsTest {
}
@After
public void destory() {
public void destroy() {
File file = new File(testRootDir);
UtilAll.deleteFile(file);
}
@@ -95,7 +95,7 @@ public class BrokerContainerStartupTest {
}
@After
public void destory() {
public void destroy() {
for (File file : TMP_FILE_LIST) {
UtilAll.deleteFile(file);
}
@@ -338,7 +338,7 @@ public class BrokerContainerTest {
}
@After
public void destory() {
public void destroy() {
for (File file : TMP_FILE_LIST) {
UtilAll.deleteFile(file);
}
+1 -1
View File
@@ -87,5 +87,5 @@ case $1 in
echo "Send shutdown request to mqproxy(${pid}) OK"
;;
*)
echo "Useage: mqshutdown broker | namesrv | controller | proxy"
echo "Usage: mqshutdown broker | namesrv | controller | proxy"
esac
@@ -108,7 +108,7 @@ public class SelectorParser implements SelectorParserConstants {
}
// ----------------------------------------------------------------------------
// Grammer
// Grammar
// ----------------------------------------------------------------------------
final public BooleanExpression JmsSelector() throws ParseException {
Expression left = null;
@@ -193,7 +193,7 @@ TOKEN [IGNORE_CASE] :
}
// ----------------------------------------------------------------------------
// Grammer
// Grammar
// ----------------------------------------------------------------------------
BooleanExpression JmsSelector() :
{
@@ -80,7 +80,7 @@ public class NettyRemotingServer extends NettyRemotingAbstract implements Remoti
private DefaultEventExecutorGroup defaultEventExecutorGroup;
/**
* NettyRemotingServer may holds multiple SubRemotingServer, each server will be stored in this container wih a
* NettyRemotingServer may holds multiple SubRemotingServer, each server will be stored in this container with a
* ListenPort key.
*/
private ConcurrentMap<Integer/*Port*/, NettyRemotingAbstract> remotingServerTable = new ConcurrentHashMap<Integer, NettyRemotingAbstract>();
@@ -711,7 +711,7 @@ public class CommitLog implements Swappable {
private boolean isMappedFileMatchedRecover(final MappedFile mappedFile) {
ByteBuffer byteBuffer = mappedFile.sliceByteBuffer();
int magicCode = byteBuffer.getInt(MessageDecoder.MESSAGE_MAGIC_CODE_POSTION);
int magicCode = byteBuffer.getInt(MessageDecoder.MESSAGE_MAGIC_CODE_POSITION);
if (magicCode != MESSAGE_MAGIC_CODE) {
return false;
}
@@ -815,7 +815,7 @@ public class DefaultMessageStore implements MessageStore {
continue;
}
this.storeStatsService.getGetMessageTransferedMsgCount().add(1);
this.storeStatsService.getGetMessageTransferredMsgCount().add(1);
getResult.addMessage(selectResult, cqUnit.getQueueOffset(), cqUnit.getBatchNum());
status = GetMessageStatus.FOUND;
nextPhyFileStartOffset = Long.MIN_VALUE;
@@ -60,13 +60,13 @@ public class StoreStatsService extends ServiceThread {
new ConcurrentHashMap<>(128);
private final LongAdder getMessageTimesTotalFound = new LongAdder();
private final LongAdder getMessageTransferedMsgCount = new LongAdder();
private final LongAdder getMessageTransferredMsgCount = new LongAdder();
private final LongAdder getMessageTimesTotalMiss = new LongAdder();
private final LinkedList<CallSnapshot> putTimesList = new LinkedList<CallSnapshot>();
private final LinkedList<CallSnapshot> getTimesFoundList = new LinkedList<CallSnapshot>();
private final LinkedList<CallSnapshot> getTimesMissList = new LinkedList<CallSnapshot>();
private final LinkedList<CallSnapshot> transferedMsgCountList = new LinkedList<CallSnapshot>();
private final LinkedList<CallSnapshot> transferredMsgCountList = new LinkedList<CallSnapshot>();
private volatile LongAdder[] putMessageDistributeTime;
private volatile LongAdder[] lastPutMessageDistributeTime;
private long messageStoreBootTimestamp = System.currentTimeMillis();
@@ -265,7 +265,7 @@ public class StoreStatsService extends ServiceThread {
sb.append("\tgetFoundTps: " + this.getGetFoundTps() + "\r\n");
sb.append("\tgetMissTps: " + this.getGetMissTps() + "\r\n");
sb.append("\tgetTotalTps: " + this.getGetTotalTps() + "\r\n");
sb.append("\tgetTransferedTps: " + this.getGetTransferedTps() + "\r\n");
sb.append("\tgetTransferredTps: " + this.getGetTransferredTps() + "\r\n");
return sb.toString();
}
@@ -361,16 +361,16 @@ public class StoreStatsService extends ServiceThread {
return sb.toString();
}
private String getGetTransferedTps() {
private String getGetTransferredTps() {
StringBuilder sb = new StringBuilder();
sb.append(this.getGetTransferedTps(10));
sb.append(this.getGetTransferredTps(10));
sb.append(" ");
sb.append(this.getGetTransferedTps(60));
sb.append(this.getGetTransferredTps(60));
sb.append(" ");
sb.append(this.getGetTransferedTps(600));
sb.append(this.getGetTransferredTps(600));
return sb.toString();
}
@@ -475,15 +475,15 @@ public class StoreStatsService extends ServiceThread {
return Double.toString(found + miss);
}
private String getGetTransferedTps(int time) {
private String getGetTransferredTps(int time) {
String result = "";
this.samplingLock.lock();
try {
CallSnapshot last = this.transferedMsgCountList.getLast();
CallSnapshot last = this.transferredMsgCountList.getLast();
if (this.transferedMsgCountList.size() > time) {
if (this.transferredMsgCountList.size() > time) {
CallSnapshot lastBefore =
this.transferedMsgCountList.get(this.transferedMsgCountList.size() - (time + 1));
this.transferredMsgCountList.get(this.transferredMsgCountList.size() - (time + 1));
result += CallSnapshot.getTPS(lastBefore, last);
}
@@ -518,7 +518,7 @@ public class StoreStatsService extends ServiceThread {
result.put("getFoundTps", this.getGetFoundTps());
result.put("getMissTps", this.getGetMissTps());
result.put("getTotalTps", this.getGetTotalTps());
result.put("getTransferedTps", this.getGetTransferedTps());
result.put("getTransferredTps", this.getGetTransferredTps());
result.put("putLatency99", String.format("%.2f", this.findPutMessageEntireTimePX(0.99)));
result.put("putLatency999", String.format("%.2f", this.findPutMessageEntireTimePX(0.999)));
@@ -571,10 +571,10 @@ public class StoreStatsService extends ServiceThread {
this.getTimesMissList.removeFirst();
}
this.transferedMsgCountList.add(new CallSnapshot(System.currentTimeMillis(),
this.getMessageTransferedMsgCount.longValue()));
if (this.transferedMsgCountList.size() > (MAX_RECORDS_OF_SAMPLING + 1)) {
this.transferedMsgCountList.removeFirst();
this.transferredMsgCountList.add(new CallSnapshot(System.currentTimeMillis(),
this.getMessageTransferredMsgCount.longValue()));
if (this.transferredMsgCountList.size() > (MAX_RECORDS_OF_SAMPLING + 1)) {
this.transferredMsgCountList.removeFirst();
}
} finally {
@@ -586,11 +586,11 @@ public class StoreStatsService extends ServiceThread {
if (System.currentTimeMillis() > (this.lastPrintTimestamp + printTPSInterval * 1000)) {
this.lastPrintTimestamp = System.currentTimeMillis();
log.info("[STORETPS] put_tps {} get_found_tps {} get_miss_tps {} get_transfered_tps {}",
log.info("[STORETPS] put_tps {} get_found_tps {} get_miss_tps {} get_transferred_tps {}",
this.getPutTps(printTPSInterval),
this.getGetFoundTps(printTPSInterval),
this.getGetMissTps(printTPSInterval),
this.getGetTransferedTps(printTPSInterval)
this.getGetTransferredTps(printTPSInterval)
);
final LongAdder[] times = this.resetPutMessageDistributeTime();
@@ -620,8 +620,8 @@ public class StoreStatsService extends ServiceThread {
return getMessageTimesTotalMiss;
}
public LongAdder getGetMessageTransferedMsgCount() {
return getMessageTransferedMsgCount;
public LongAdder getGetMessageTransferredMsgCount() {
return getMessageTransferredMsgCount;
}
public LongAdder getPutMessageFailedTimes() {
@@ -449,7 +449,7 @@ public class BatchConsumeQueue implements ConsumeQueueInterface, FileQueueLifeCy
final int maxRetries = 30;
boolean canWrite = this.messageStore.getRunningFlags().isCQWriteable();
if (request.getMsgBaseOffset() < 0 || request.getBatchSize() < 0) {
log.warn("[NOTIFYME]unexpected dispacth request in batch consume queue topic:{} queue:{} offset:{}", topic, queueId, request.getCommitLogOffset());
log.warn("[NOTIFYME]unexpected dispatch request in batch consume queue topic:{} queue:{} offset:{}", topic, queueId, request.getCommitLogOffset());
return;
}
for (int i = 0; i < maxRetries && canWrite; i++) {
@@ -22,7 +22,7 @@ import java.util.Iterator;
public interface ReferredIterator<T> extends Iterator<T> {
/**
* Release the refered resources.
* Release the referred resources.
*/
void release();
@@ -45,7 +45,7 @@ public class BrokerStats {
this.msgPutTotalTodayMorning =
this.defaultMessageStore.getStoreStatsService().getPutMessageTimesTotal();
this.msgGetTotalTodayMorning =
this.defaultMessageStore.getStoreStatsService().getGetMessageTransferedMsgCount().longValue();
this.defaultMessageStore.getStoreStatsService().getGetMessageTransferredMsgCount().longValue();
log.info("yesterday put message total: {}", msgPutTotalTodayMorning - msgPutTotalYesterdayMorning);
log.info("yesterday get message total: {}", msgGetTotalTodayMorning - msgGetTotalYesterdayMorning);
@@ -88,6 +88,6 @@ public class BrokerStats {
}
public long getMsgGetTotalTodayNow() {
return this.defaultMessageStore.getStoreStatsService().getGetMessageTransferedMsgCount().longValue();
return this.defaultMessageStore.getStoreStatsService().getGetMessageTransferredMsgCount().longValue();
}
}
@@ -60,7 +60,7 @@ public class BatchPutMessageTest {
}
@After
public void destory() {
public void destroy() {
messageStore.shutdown();
messageStore.destroy();
@@ -378,7 +378,7 @@ public class MappedFileQueueTest {
}
@After
public void destory() {
public void destroy() {
File file = new File("target/unit_test_store");
UtilAll.deleteFile(file);
}
@@ -53,7 +53,7 @@ public class MappedFileTest {
}
@After
public void destory() {
public void destroy() {
File file = new File("target/unit_test_store");
UtilAll.deleteFile(file);
}
@@ -48,7 +48,7 @@ public class StoreCheckpointTest {
}
@After
public void destory() {
public void destroy() {
File file = new File("target/checkpoint_test");
UtilAll.deleteFile(file);
}
@@ -52,7 +52,7 @@ public class BrokerStatsManagerTest {
}
@After
public void destory() {
public void destroy() {
brokerStatsManager.shutdown();
}
@@ -24,7 +24,7 @@ import java.util.Map.Entry;
import java.util.Properties;
public class FileUtil {
private static String lineSeperator = System.getProperty("line.separator");
private static String lineSeparator = System.getProperty("line.separator");
private String filePath = "";
private String fileName = "";
@@ -53,7 +53,7 @@ public class FileUtil {
public void appendFile(String content) {
File file = openFile();
String newContent = lineSeperator + content;
String newContent = lineSeparator + content;
writeFile(file, newContent, true);
}
@@ -71,7 +71,7 @@ public class FileUtil {
StringBuilder sb = new StringBuilder();
for (Entry<Object, Object> keyEnty : properties.entrySet()) {
sb.append(keyEnty.getKey()).append("=").append((String) keyEnty.getValue())
.append(lineSeperator);
.append(lineSeparator);
}
return sb.toString();
}
@@ -40,18 +40,18 @@ public class VerifyUtils {
public static Collection<Object> getFilterdMessage(Collection<Object> sendMsgs,
Collection<Object> recvMsgs) {
Collection<Object> recvMsgsSync = Collections.synchronizedCollection(recvMsgs);
Collection<Object> filterdMsgs = new ArrayList<Object>();
Collection<Object> filteredMsgs = new ArrayList<Object>();
int filterNum = 0;
for (Object msg : recvMsgsSync) {
if (sendMsgs.contains(msg)) {
filterdMsgs.add(msg);
filteredMsgs.add(msg);
} else {
filterNum++;
}
}
logger.info(String.format("[%s] messages is filterd!", filterNum));
return filterdMsgs;
logger.info(String.format("[%s] messages is filtered!", filterNum));
return filteredMsgs;
}
public static int verifyUserProperty(Collection<Object> sendMsgs, Collection<Object> recvMsgs) {
@@ -47,7 +47,7 @@ public class BaseBroadCastIT extends BaseConf {
return consumer;
}
public void printSeperator() {
public void printSeparator() {
for (int i = 0; i < 3; i++) {
logger.info(
"<<<<<<<<================================================================================>>>>>>>>");
@@ -38,7 +38,7 @@ public class BroadCastNormalMsgNotRecvIT extends BaseBroadCastIT {
@Before
public void setUp() {
printSeperator();
printSeparator();
topic = initTopic();
logger.info(String.format("use topic: %s;", topic));
producer = getProducer(nsAddr, topic);
@@ -39,7 +39,7 @@ public class BroadCastNormalMsgRecvCrashIT extends BaseBroadCastIT {
@Before
public void setUp() {
printSeperator();
printSeparator();
topic = initTopic();
logger.info(String.format("use topic: %s;", topic));
producer = getProducer(nsAddr, topic);
@@ -40,7 +40,7 @@ public class BroadCastNormalMsgRecvFailIT extends BaseBroadCastIT {
@Before
public void setUp() {
printSeperator();
printSeparator();
topic = initTopic();
logger.info(String.format("use topic: %s;", topic));
producer = getProducer(nsAddr, topic);
@@ -39,7 +39,7 @@ public class BroadCastNormalMsgRecvStartLaterIT extends BaseBroadCastIT {
@Before
public void setUp() {
printSeperator();
printSeparator();
topic = initTopic();
logger.info(String.format("use topic: %s;", topic));
producer = getProducer(nsAddr, topic);
@@ -39,7 +39,7 @@ public class BroadCastNormalMsgTwoDiffGroupRecvIT extends BaseBroadCastIT {
@Before
public void setUp() {
printSeperator();
printSeparator();
topic = initTopic();
logger.info(String.format("use topic: %s;", topic));
producer = getProducer(nsAddr, topic);
@@ -39,7 +39,7 @@ public class NormalMsgTwoSameGroupConsumerIT extends BaseBroadCastIT {
@Before
public void setUp() {
printSeperator();
printSeparator();
topic = initTopic();
logger.info(String.format("use topic: %s;", topic));
producer = getProducer(nsAddr, topic);
@@ -167,7 +167,7 @@ public class DefaultMQAdminExtImpl implements MQAdminExt, MQAdminExtInner {
boolean registerOK = mqClientInstance.registerAdminExt(this.defaultMQAdminExt.getAdminExtGroup(), this);
if (!registerOK) {
this.serviceState = ServiceState.CREATE_JUST;
throw new MQClientException("The adminExt group[" + this.defaultMQAdminExt.getAdminExtGroup() + "] has created already, specifed another name please." + FAQUrl.suggestTodo(FAQUrl.GROUP_NAME_DUPLICATE_URL), null);
throw new MQClientException("The adminExt group[" + this.defaultMQAdminExt.getAdminExtGroup() + "] has created already, specified another name please." + FAQUrl.suggestTodo(FAQUrl.GROUP_NAME_DUPLICATE_URL), null);
}
mqClientInstance.start();
@@ -228,7 +228,7 @@ public class ClusterListSubCommand implements SubCommand {
KVTable kvTable = defaultMQAdminExt.fetchBrokerRuntimeStats(next1.getValue());
isBrokerActive = Boolean.parseBoolean(kvTable.getTable().get("brokerActive"));
String putTps = kvTable.getTable().get("putTps");
String getTransferedTps = kvTable.getTable().get("getTransferedTps");
String getTransferredTps = kvTable.getTable().get("getTransferredTps");
sendThreadPoolQueueSize = kvTable.getTable().get("sendThreadPoolQueueSize");
pullThreadPoolQueueSize = kvTable.getTable().get("pullThreadPoolQueueSize");
@@ -259,7 +259,7 @@ public class ClusterListSubCommand implements SubCommand {
}
{
String[] tpss = getTransferedTps.split(" ");
String[] tpss = getTransferredTps.split(" ");
if (tpss.length > 0) {
out = Double.parseDouble(tpss[0]);
}
@@ -210,13 +210,13 @@ public class ExportMetricsCommand implements SubCommand {
double normalInTps = 0;
double normalOutTps = 0;
String putTps = kvTable.getTable().get("putTps");
String getTransferedTps = kvTable.getTable().get("getTransferedTps");
String getTransferredTps = kvTable.getTable().get("getTransferredTps");
String[] inTpss = putTps.split(" ");
if (inTpss.length > 0) {
normalInTps = Double.parseDouble(inTpss[0]);
}
String[] outTpss = getTransferedTps.split(" ");
String[] outTpss = getTransferredTps.split(" ");
if (outTpss.length > 0) {
normalOutTps = Double.parseDouble(outTpss[0]);
}