You are here: Reference Manual > FME服务器引擎 > Configuration File Layout

Configuration File Layout

发动机configuration fileis comprised of several sections, each of which performs a specific set of tasks. The configuration file can contain two components: a global section and zero or more subsections.

一般布局看起来像这样:

global_section.

<GlobalDirectives>

SUB_SECTION <name>

<SubsectionDirectives>

全球部分

The Global section defines all global directives that apply to a single FME Engine session. A session is defined as the period of time when an FME Engine is started up, performs some number of translations, and is shut down.

The Global section has the following general form:

global_section.\

[FME_WORKING_DIR \]

[FME_MAPPING_DIR \]

[FME_RESULT_LIFETIME \]

[FME_PURGE_INTERVAL \]

[AUTO_DIR_PREFIX \]

[auto_file_prefix \]

[接收0 \

[FME_SHARED_RESOURCE_DIR

[fme_server_log_file \]

[MACRO_DEF FME_DATA_REPOSITORY \]

[FME_ENGINE_MEMORY_REDLINE \]

[SUCCESS_RESPONSE \]

[FAILURE_RESPONSE \]

全局指令在下表中描述。重要的是要记住,小节指令会覆盖全球指令。

Global_section指令

Description

fme_working_dir.

Specifies the directory path into which the FME Server writes all translation results unless thefme_working_dir.在特定工作的小节中指定。

Default:Current Working Directory

Note:When changing the directory, you must also change the corresponding directive in the properties files of any web application services you use. For example, if you use the Data Download service, you must update the结果_DIR.directive in the properties file for that service. The web application properties files are located at<FMEServerDir>\Utilities\tomcat\webapps\<WebApp>\WEB-INF\conf.

WARNING:Take care to ensure that thefme_working_dir.值设置为适当的目录。此位置是FME引擎写入的翻译结果。这很重要 - 您可以定期设置FME引擎,并递归地删除此目录中的所有文件超过特定年龄(指定FME_RESULT_LIFETIME). When thefme_working_dir.is set to the wrong directory, the FME Server deletes files in this directory instead of writing the translation results here.

FME_MAPPING_DIR

Specifies the FME Server’s repositoryrootdirectory path, where workspaces run by the FME Engine during translations are contained.

Default:Current Working Directory

FME_RESULT_LIFETIME

Specifies how long, in seconds, translation results are held. The FME Engine periodically checks for, and recursively deletes, all files older than this amount from thefme_working_dir.as a housekeeping measure. The frequency of this automatic deletion check is set by the value ofFME_PURGE_INTERVAL, described next. Whenever automatic file deletion is performed, it occurs after a translation.

Default:If value is zero or directive is absent, results are never deleted – lifetime is infinite.

FME_PURGE_INTERVAL

Specifies, in seconds, the automatic deletion checking period. The FME Engine checks for files older thanFME_RESULT_LIFETIME并删除任何它发现。此检查是在的FME_PURGE_INTERVALperiod. Note that the FME Engine decides whether or not to do the check only after each translation. It does not set a timer to trigger the check. This means that the check can occur at the interval set, but may also occur at longer intervals depending on how frequently translations are made.

Default:If this directive is absent, the default is 0 – checks after each translation if there are translation results to purge.

auto_dir_prefix 和auto_file_prefix

The FME Engine configuration file uses the two pseudo-variables:S

!FME_AUTO_DIR_NAME!

!FME_AUTO_FILE_NAME!

to represent unique names for translation result directories and files respectively. By default, the names have this form:

FME_

例如:

FME_a03508997017636

You can change the defaultFME_prefix to a site-specific value. Site-specific prefixes are defined using theAUTO_DIR_PREFIXdirective to set the prefix of directory names, and the一个UTO_FILE_PREFIX指令设置文件名的前缀。指令具有以下语法:

AUTO_DIR_PREFIX

一个UTO_FILE_PREFIX

The most useful application of these directives is to set the filename prefix with the一个UTO_FILE_PREFIXdirective. Doing so allows the names of translation result files to better reflect the originating organization.

When either of these directives is present, the specifiedvalue is used instead ofFME_. When absent, the prefix defaults to theFME_default value.

For example, if一个UTO_FILE_PREFIXNoodle_was specified, the translation result filenames would take this form:

Noodle_

请注意,未假定前缀值中的尾随下划线字符。如果希望您的前缀具有其中一个字符,则必须将其明确包含它作为前缀值的一部分。

You can specify either or both of these directives in the global section and/or in any subsection of the configuration file. When specified in the global section, the prefix is used by all subsections that don't themselves specify one. Subsections that do specify a prefix use that one instead, and do not use any global prefix that was specified.

Default:When the directive is absent, a prefix ofFME_用来。

receip_timeout

This timeout is measured in milliseconds. When the FME Engine doesn’t receive any translation requests within this period of time, the FME Engine shuts itself down. The FME Server system then starts a new FME Engine instance.

Under most operating conditions this value is set to its recommended default of zero. This setting means that the FME Engine waits indefinitely for requests and never shuts down due to a lack of incoming requests.

但是,您可以使用此指令在环境中指定有限的超时时段,其中网络监视器关闭了在预设时间内保持不活动的连接。完成FME引擎正在侦听接收请求的连接时,FME引擎不再响应并进入挂起状态。

Setting this directive to a non-zero value lets the FME Engine terminate itself after the specified time. The FME Engine effectively breaks out of the hung state, allowing the FME Server system to start a new FME Engine instance that can respond, once again, to requests.

FME_SHARED_RESOURCE_DIR

指定一个或多个根目录的文件路径。这些目录由FME引擎使用,获取不同类型的共享资源,例如自定义格式,变压器和坐标系定义。使用分号分隔多个共享目录文件路径。

Default: \ server \资源\共享

FME_SERVER_LOG_FILE

Specifies the file path to the FME Engine’s log file. This log file contains a dump of the Engine’s configuration file and other information relating to the overall operation of the FME Engine. Note that this file does not log individual translation request processing, which is logged separately in individual translation log files.

For each FME Engine and, therefore, for each fmeEngineConfig.txt, you need to specify a different fmeEngine.log filename.

You can use the pseudo variable !FME_INSTANCE_NAME! to create a log file named for the instance name like this:\Logs\fmeEngine_!FME_INSTANCE_NAME!.log

This directive includes an additional parameter that follows the file path. The parameter’s value can be真的或者FALSE,指示日志文件是否应附加到每个FME引擎启动的时间。真的means the file is appended to andFALSEmeans it is overwritten.

Default:\Logs\fmeEngine.log FALSE

MACRO_DEF FME_DATA_REPOSITORY

Specifies the directory used by FME Server’s Web User Interface for temporarily uploading data. In a distributed environment, this directory must be accessible to the web server and to the FME Engines. Specifying a UNC path is recommended.

FME_ENGINE_MEMORY_
REDLINE

The automatic resource manager determines the optimal total memory the FME Engine process should use. It also dynamically allocates this total memory optimally to the algorithms within FME requesting it.

FME_ENGINE_MEMORY_REDLINE指令是对FME引擎的提示,即在消耗内存时的攻击性。它介于0到1之间的值(0.5是默认值)。对于更具侵略性的内存使用情况,应使用高于0.5的值。对于更安亚搏在线全的内存使用情况,应使用低于0.5的值。过于激进的风险是内存或机器延迟的过程。保守的风险是,该过程需要更长时间才能完成。

Default:0.5

Response Messages

SUCCESS_RESPONSE

FAILURE_RESPONSE

TheSUCCESS_RESPONSEFAILURE_RESPONSE指令在全球范围内规定。它们定义了FME引擎返回的消息字符串,以便分别成功和翻译失败。这些指令提供了FME引擎将结果传送回客户端的机制。

这些响应消息的内容仅对客户端有意义。FME引擎只需将邮件传递回客户端,然后以其选择的任何方式处理它。该消息可以包括预定义的伪变量和其他几个指令。

Special-Purpose Directives

In addition to the common Global section directives listed in the preceding table, the following special-purpose directive are also available when required. It’s important to remember that the subsection directives override the global directives.

Special Purpose
Directives

SDE30_PERM_CONNECT

定义与ESRI SDE服务器的永久连接。在FME引擎执行第一个翻译之前,此连接会提升。然后通过发动机保持连接,因此随后的翻译不需要建立新的SDE连接。

Take care when using this directive because SDE connections are a valuable resource and you should use them sparingly. In general, it’s good practice to first use the FME Engine without any permanent connection. You may consider a permanent connection later, if you find that connecting and disconnecting to SDE is too expensive.

The name of the host computer on which the SDE server is running.

Default:Site-specific

<实例>

The SDE instance to which the FME Engine is to connect.

Default:港口:5151

The database on the instance that is to be connected. When the SDE is on databases such as Oracle the value specified is not used. Although you can specify any value, the convention is to specify the value NOTUSED for the database.

Default:Site-specific

The user account used to log in to the SDE.

Default:Site-specific

<密码>

The user password of the user account.

Default:Site-specific

Subsections

Subsections are optional and when present their directives override global directives. When a subsection is present it’s named with a keyword by which client applications can reference it. You can define multiple subsections for various purposes.

在FME服务器环境中,每个服务(如数据下载,数据流,WF,WMS等)都有自己的小节。

If a job request — including one from an FME Server service — specifies a subsection, the FME Engine runs that job using the directives in the specified subsection. The following table shows the FME Server Web Services and the corresponding subsections used by the FME Engine when running a job request from that service.

Note:Subsection directives take precedence over global directives.

FME Server Service

FME Engine SUB_SECTION

Data Download Service

FILE_DOWNLOAD_SERVICE

Data Streaming Service

STREAM_DOWNLOAD_SERVICE

OGC WFS服务

WFS_SERVICE

OGC WMS Service

WMS_SERVICE

FME Server Console

server_console_client.

FMEServerJobSubmitter transformer
(default subsection)

SERVER_JOB_SUBMITTER

职位提交者服务

JOB_SUBMITTER_SERVICE

REST Service

REST_SERVICE

FME服务器调度程序

SERVER_SCHEDULER

每个子部分都可以指定FME引擎在处理翻译请求之前和之后的操作。小节还可以定义翻译成功和失败响应消息的转换响应消息,也可以定义FME工作区宏值。

In addition to their own directives, subsections can use a number of directives available to the Global section to override the global values for that particular subsection.

By specifying a subsection by name in the translation request, clients can cause the operations defined by the subsection to be performed by the FME Engine for the translation being requested.

Each subsection has the following general form:

sub_section <关键字> \

[ \]

[FME_TRANSFORMATION_LOG_DIR \]

[MACRO_DEF \]*

[PRE_COMMAND \]*

[POST_COMMAND \]*

[POST_COMMAND_ALL \]*

[POST_COMMAND_SUCCESS \]*

[POST_COMMAND_FAILURE \]*

[SUCCESS_RESPONSE \]

[FAILURE_RESPONSE \]

The subsection directives, which override global directives, are described in the following table.

SUB_SECTION Directives

Description

sub_section <关键词>

识别正在定义的子部分。您可以定义的小节数没有限制。用一个唯一的识别每个子部分– it cannot begin withFME_.

全球指令< >

The following global directives are also available to subsections where you can redefine them to have different values:

fme_working_dir.

FME_MAPPING_DIR

AUTO_DIR_PREFIX

一个UTO_FILE_PREFIX

SUCCESS_RESPONSE

FAILURE_RESPONSE

Redefined directives override the global value for the particular subsection for which they are defined.

FME_TRANSFORMATION_LOG_DIR <瞧gfile-dirpath>

Specifies the path to the default directory containing the per-translation log files generated by the FME Engine for that subsection.

Default:\Logs\

MACRO_DEF >

Defines a macro value that is supplied to the FME workspace when the translation is performed. The first parameterspecifies the name of the macro.

一个ll the tokens up to the next directive or the end of theSUB_SECTIONdefinition form the value for.

You can nest macro references.

When defined, macros are available for use in pre- and post-commands, and in success and failure response strings, using the pseudo-variable (!macroName!) syntax.

Some FME Engine subsections define a specific macro calledFME_SERVER_DEST_DIRwhose value is set as a path to a unique, system-generated directory. The intention is that this directory is used as an output location for translation result files. Workspace authors can reference this value as a published parameter and use it as a well-defined location for destination datasets.

Pre- and Post-Commands

ThePRE_COMMANDPOST_COMMAND指令定义命令放在一个FME引擎configuration file subsection that are performed before or after the translation is run.

There’s no limit to the number of pre- or post-commands you can define in aSUB_SECTION. The commands are run in the order specified in the SUB_SECTION. Any command capable of being run from a command line from the operating system on which the FME Engine is running can be specified as a pre- or post-command1When running FME Server on a Windows computer, some operating system commands may not work. This situation happens because Windows makes a distinction between some of its operating system commands being true OS commands (that is, inherent to the OS) and some being programs accessible to the OS. To ensure that a pre- or post-command works in a Windows environment, use the following syntax:cmd.exe /c For example:POST_COMMAND cmd.exe /c copy file_a file_b.

These commands may take additional directives to more accurately define how successive commands are handled upon failure.

一个vailablePRE_POST_COMMANDs在这里列出:

PRE_COMMAND

定义了一个操作系统命令的s set to runFME引擎执行翻译。

POST_COMMAND

Seepost_command_success..

post_command_success.

定义要运行的操作系统命令afterFME引擎执行翻译。This command only runs when the FME translation is successful.

post_command_failure.

定义了一个操作系统命令的s set to runafterFME引擎执行翻译。This command only runs if the FME translation fails.

POST_COMMAND_ALL

定义了一个操作系统命令的s set to runafterFME引擎执行翻译。此命令不管FME翻译成功或失败状态如何运行。

此外,Pre-和后命令都可以采用可选指令,该指令指示FME引擎在预先或后命令失败时如何行为。可用指令包括以下内容:

!abort_with_error!

When the pre- or post-command fails, the entire translation is stopped at that point. No further processing is performed, including any subsequent pre- or post-commands.

!continue_warn!

When the pre- or post-command fails, the translation continues and a warning is given.

!CONTINUE_NO_WARN!

When the pre- or post-command fails, the translation continues however no warning is given.

Response Messages

SUCCESS_RESPONSE

FAILURE_RESPONSE

TheSUCCESS_RESPONSEFAILURE_RESPONSEdirectives define the message string that’s returned by the FME Engine for successful and failed translations respectively. These directives provide the mechanism by which the FME Engine communicates results back to the client.

这些响应消息的内容仅对客户端有意义。FME引擎只需将邮件传递回客户端,然后以其选择的任何方式处理它。该消息可以包括预定义的伪变量和其他几个指令。