You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pegasus.apache.org by ji...@apache.org on 2022/06/16 07:34:16 UTC

[incubator-pegasus] 21/25: update postion

This is an automated email from the ASF dual-hosted git repository.

jiashuo pushed a commit to branch add-table-migrator
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git

commit 1c79bbfd62de4532683a6a3a585e3a52aad47aa5
Author: jiashuo <js...@live.com>
AuthorDate: Thu Jun 16 15:09:25 2022 +0800

    update postion
---
 admin-cli/executor/toolkits/tablemigrator/migrator.go | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/admin-cli/executor/toolkits/tablemigrator/migrator.go b/admin-cli/executor/toolkits/tablemigrator/migrator.go
index 1721834f..c647fb5c 100644
--- a/admin-cli/executor/toolkits/tablemigrator/migrator.go
+++ b/admin-cli/executor/toolkits/tablemigrator/migrator.go
@@ -15,8 +15,8 @@ var pendingMutationThreshold = 100000.0
 
 func MigrateTable(client *executor.Client, table string, metaProxyZkAddrs string, metaProxyZkRoot string, targetCluster string, targetAddrs string, threshold float64) error {
 	pendingMutationThreshold = threshold
-	toolkits.LogInfo(fmt.Sprintf("set pendingMutationThreshold = %f means if the pending less the value will "+
-		"reject all write and ready to switch cluster", pendingMutationThreshold))
+	toolkits.LogInfo(fmt.Sprintf("set pendingMutationThreshold = %d means that server will reject all write " +
+		"and ready to switch cluster if the pending less the value", int64(pendingMutationThreshold)))
 	//1. check data version
 	toolkits.LogInfo("check data version")
 	version, err := executor.QueryReplicaDataVersion(client, table)
@@ -103,12 +103,12 @@ func checkUnConfirmedDecree(perfSessions map[string]*aggregate.PerfSession) erro
 
 			if stats[0].Value > pendingMutationThreshold {
 				completed = false
-				toolkits.LogInfo(fmt.Sprintf("%s has pending_mutations_count %f", addr, stats[0].Value))
+				toolkits.LogInfo(fmt.Sprintf("%s has pending_mutations_count %d", addr, int64(stats[0].Value)))
 				break
 			}
 		}
 	}
-	toolkits.LogInfo(fmt.Sprintf("all the node pending_mutations_count has less %f", pendingMutationThreshold))
+	toolkits.LogInfo(fmt.Sprintf("all the node pending_mutations_count has less %d",  int64(pendingMutationThreshold)))
 	time.Sleep(10 * time.Second)
 	return nil
 }
@@ -124,7 +124,7 @@ func checkDuplicatingQPS(perfSessions map[string]*aggregate.PerfSession, tableID
 			for gpid, qps := range stats {
 				if qps > 0 {
 					completed = false
-					toolkits.LogInfo(fmt.Sprintf("%s[%s] still sending pending mutation %f", addr, gpid, qps))
+					toolkits.LogInfo(fmt.Sprintf("%s[%s] still sending pending mutation %d", addr, gpid, int64(qps)))
 					break
 				}
 			}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pegasus.apache.org
For additional commands, e-mail: commits-help@pegasus.apache.org