MultiController 是叢集中最重要的部份。 它不僅包含集中的授權檔案,也維護叢集中各元件的活動訊號。
此外,叢集中的 LocalController、Engine 與 Presenter 的配置,也位於 MultiController 的儲存庫中。
MultiController 會在 TCP 連接埠號碼 29599 上接聽來自叢集成員的活動訊號作業。
在 GUI 安裝期間,您只能配置安裝基本 MultiController 所需的必要選項。 但您可以手動編輯 MC 或 LocalConfig-mc.xml 檔案。
範例 LocalConfig-mc.xml 檔案 (基本配置)
<?xml version="1.0" encoding="UTF-8"?> <LocalConfig> <Description>Configuration for Multi Controller</Description> <Names> <Name name="mainClass">com.torokina.tim.mc.Main</Name> <Name name="appName">CAMM-Multi-Controller</Name> <Name name="appShortName">MC</Name> <Name name="primaryMcAddress">127.0.0.1</Name> <Name name="secondaryMcAddress"></Name> <Name name="primaryMcPort">29599</Name> <Name name="secondaryMcPort">-1</Name>< <Name name="myMode">primary</Name> <Name name="myAddress">127.0.0.1</Name> <Name name="mcPort">29599</Name> <Name name="otherMcAddress"></Name> <Name name="otherMcPort">-1</Name> <Name name="heartbeatFrequency">15</Name> <Name name="heartbeatTimeout">180</Name> <Name name="repositoryFrequency">15</Name> </Names> <Paths> <Path name="license">${tim.base}/license.lic</Path> </Paths> <LocalConfig>
範例 LocalConfig-mc.xml 檔案 (隱藏的記錄與清除配置)
<Logging> <LogLevel>INFO</LogLevel> <LogDirectory>${logbase}</LogDirectory> <ObjectLogging> <ObjectToLog> <ObjectName>com.torokina.tim.config</ObjectName> <ObjectLogLevel>TRACE</ObjectLogLevel> </ObjectToLog> </ObjectLogging> </Logging> <CleanUps> <CleanUp> <CleanUpName>clean-temporary-directory</CleanUpName> <CleanUpAction>delete</CleanUpAction> <CleanUpTarget>${tmp}</CleanUpTarget> <Parameter> <ParameterName>expire</ParameterName> <ParameterValue>3d</ParameterValue> </Parameter> </CleanUp> <CleanUp> <CleanUpName>archive-log-directory</CleanUpName> <CleanUpAction>archive</CleanUpAction> <CleanUpTarget>${logbase}</CleanUpTarget> <Parameter> <ParameterName>expire</ParameterName> <ParameterValue>3d</ParameterValue> </Parameter> </CleanUp> <CleanUp> <CleanUpName>clean-log-directory</CleanUpName> <CleanUpAction>delete</CleanUpAction> <CleanUpTarget>${logbase}</CleanUpTarget> <Parameter> <ParameterName>expire</ParameterName> <ParameterValue>7d</ParameterValue> </Parameter> </CleanUp> </CleanUps>
在 LocalConfig-mc.xml 檔案中以正確的 XML 結構指定以下任何欄位,以便覆寫預設的內容。 例如,下列配置會將預設的記錄層級變更為「最精細」。
將預設記錄層級變更為最精細
<?xml version="1.0" encoding="UTF-8"?> <LocalConfig> ... ... <Logging> <LogLevel>FINEST</LogLevel> <LogDirectory>${logbase}</LogDirectory> </Logging> ... ... </LocalConfig>
範例 LocalConfig-mc.xml (MultiController 執行時期) 檔案
<?xml version="1.0" encoding="UTF-8"?> <Runtime> <Names> <Name name="mainClass">com.torokina.tim.mc.Main</Name> <Name name="appName">CAMM-Multi-Controller</Name> <Name name="appShortName">MC</Name> <Name name="primaryMcAddress">127.0.0.1</Name> <Name name="secondaryMcAddress"/> <Name name="primaryMcPort">29599</Name> <Name name="secondaryMcPort">-1</Name> <Name name="myMode">primary</Name> <Name name="myAddress">127.0.0.1</Name> <Name name="mcPort">29599</Name> <Name name="otherMcAddress"/> <Name name="otherMcPort">-1</Name> <Name name="heartbeatFrequency">15</Name> <Name name="heartbeatTimeout">180</Name> <Name name="repositoryFrequency">15</Name> <Name name="lcPort">29598</Name> <Name name="manageable">469</Name> </Names> <Paths> <Path name="license">${tim.base}/license.lic</Path> <Path name="apphome">${tim.base}/${appShortName}</Path> <Path name="runtimeConfig">${apphome}/runtime.xml</Path> <Path name="tmp">${apphome}/tmp</Path> <Path name="logbase">${apphome}/logs</Path> <Path name="basedir">${tim.base}</Path> </Paths> </Runtime>
runtime.xml 檔案會與隱藏的配置合併,然後啟動 MultiController 元件。
Copyright © 2014 CA.
All rights reserved.
|
|