Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: install cluster optimize logical #60

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions pkg/cluster/spec/ts_meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,10 @@ func (i *TSMetaInstance) SetDefaultConfig(instanceConf map[string]any) map[strin
instanceConf = make(map[string]any, 20)
}
var metaPeerAddrs []string
var tsMetaSpec *TSMetaSpec
for _, metaSpec := range i.topo.TSMetaServers {
if i.Host == metaSpec.Host && i.Port == metaSpec.ClientPort {
tsMetaSpec = metaSpec
}
metaPeerAddrs = append(metaPeerAddrs, utils.JoinHostPort(metaSpec.Host, metaSpec.PeerPort))
}
var tsMetaSpec = i.InstanceSpec.(*TSMetaSpec)
instanceConf["common.meta-join"] = metaPeerAddrs
instanceConf["meta.bind-address"] = utils.JoinHostPort(i.Host, tsMetaSpec.RaftPort)
instanceConf["meta.http-bind-address"] = utils.JoinHostPort(i.Host, tsMetaSpec.ClientPort)
Expand Down
7 changes: 1 addition & 6 deletions pkg/cluster/spec/ts_sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,7 @@ func (i *TSSqlInstance) SetDefaultConfig(instanceConf map[string]any) map[string
}
instanceConf["common.meta-join"] = metaPeerAddrs

var tsSqlSpec *TSSqlSpec
for _, sqlSpec := range i.topo.TSSqlServers {
if i.Host == sqlSpec.Host {
tsSqlSpec = sqlSpec
}
}
var tsSqlSpec = i.InstanceSpec.(*TSSqlSpec)
instanceConf["http.bind-address"] = utils.JoinHostPort(i.Host, tsSqlSpec.Port)
instanceConf["http.flight-enabled"] = false // enabled at ts-data
instanceConf["logging.path"] = tsSqlSpec.LogDir
Expand Down
8 changes: 1 addition & 7 deletions pkg/cluster/spec/ts_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,17 +196,11 @@ func (i *TSStoreInstance) SetDefaultConfig(instanceConf map[string]any) map[stri
}
instanceConf["common.meta-join"] = metaPeerAddrs

var tsStoreSpec *TSStoreSpec
for _, storeSpec := range i.topo.TSStoreServers {
if i.Host == storeSpec.Host && i.Port == storeSpec.SelectPort {
tsStoreSpec = storeSpec
}
}
var tsStoreSpec = i.InstanceSpec.(*TSStoreSpec)
instanceConf["data.store-ingest-addr"] = utils.JoinHostPort(i.Host, tsStoreSpec.IngestPort)
instanceConf["data.store-select-addr"] = utils.JoinHostPort(i.Host, tsStoreSpec.SelectPort)
instanceConf["data.store-data-dir"] = tsStoreSpec.DataDir
instanceConf["data.store-wal-dir"] = tsStoreSpec.DataDir
//instanceConf["data.store-meta-dir"] = tsStoreSpec.DataDir
instanceConf["logging.path"] = tsStoreSpec.LogDir

instanceConf["gossip.bind-address"] = i.Host
Expand Down
Loading