To avoid overwriting files, configure the File/Hadoop Event XML Input and Output
adapter to only read and write files in the sandbox base directory. If the adapter is
running in unmanaged mode, update the controller.xml file to change the
directory in which the File/Hadoop Event XML Input and Output adapter reads and writes files
to the adapter sandbox base directory.
Procedure
- In the controller.xml file, configure the following
parameters:
- For AdapterSandboxBase, set the path of the sandbox
base directory.
- For EnableSandboxing, set the value to true.
For
example,
<Controller>
<ControlPort>
<MinPort>19082</MinPort>
<MaxPort></MaxPort>
</ControlPort>
<Statistics_Update_Interval>5000</Statistics_Update_Interval>
<MonitorInterval>3000</MonitorInterval>
<AdapterSandboxBase><sanbox_base_directory_file_path></AdapterSandboxBase>
<EnableSandboxing>true</EnableSandboxing>
</Controller>
- Set the environment variable STREAMING_SANDBOX_ENABLE to
TRUE.
For the File/Hadoop Event XML Input adapter, the file path configured in the
File Input Transporter will redirect all file access to the subfolder of the
directory configured in
AdapterSandboxBase. For the
File/Hadoop Event XML Output adapter, the file path configured in the File
Output Transporter will redirect all file access to the subfolder of the
directory configured in
AdapterSandboxBase.
Note For both
the File/Hadoop Event XML Input and Output adapter, the sandbox base
directory does not redicrect files to and from a Hadoop Distributed File
System (HDFS).