上一個主題: 手動啟動及停止 MultiController下一個主題: LocalController 配置選項


LocalController 配置

LocalController 是叢集中的每部伺服器上都會安裝的重要服務。

LocalController 會執行下列主要功能:

在 GUI 安裝期間,您只能配置安裝基本 LocalController 所需的必要選項。 但您可以手動編輯 LC 或 LocalConfig-lc.xml 檔案。

範例 LocalConfig-lc.xml 檔案 (基本配置)

<LocalConfig>
      <Names>
            <Name name="mainClass">com.torokina.tim.lc.Main</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="myAddress">127.0.0.1</Name>
            <Name name="appName">CAMM-Local-Controller</Name>
            <Name name="appShortName">LC</Name>
            <Name name="lcPort">29598</Name>
            <Name name="heartbeatFrequency">15</Name>
            <Name name="heartbeatTimeout">180</Name>
      </Names>
      <Paths>
            <Path name="dsLocalConfig">${basedir}/DS/LocalConfig-ds.xml</Path>
      </Paths>
</LocalConfig>

範例 LocalConfig-lc.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-lc.xml 檔案 (LocalController 執行時期)

<?xml version="1.0" encoding="UTF-8"?>
<Runtime>
   <Names>
      <Name name="mainClass">com.torokina.tim.lc.Main</Name>
      <Name name="primaryMcAddress">127.0.0.1</Name>
      <Name name="secondaryMcAddress"/>
      <Name name="primaryMcPort">29599</Name>
      <Name name="secondaryMcPort">-1</Name>
      <Name name="myAddress">127.0.0.1</Name>
      <Name name="appName">CAMM-Local-Controller</Name>
      <Name name="appShortName">LC</Name>
      <Name name="lcPort">29598</Name>
      <Name name="heartbeatFrequency">15</Name>
      <Name name="heartbeatTimeout">180</Name>
      <Name name="mcPort">29599</Name>
      <Name name="manageable">996</Name>
   </Names>
   <Paths>
      <Path name="dsLocalConfig">${basedir}/DS/LocalConfig-ds.xml</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>