Set up and Run the Connector
You can set up the connector using the instructions in Run the Connector. SimpleSynchronize.jar
must be in the connector directory, and you must set the following parameters in connectorLibJava.cfg
:
JavaConnectorClass=myconnector.SimpleSynchronize
This example connector uses a folder on the file system to represent a repository. In the connector's configuration file you can set a parameter named Directory
that specifies the location of this folder. The default value, which applies if you do not set the parameter, is the data
folder in the same directory as the connector. Create the data
folder and add two or three files to it.
synchronize.log
:
00-Always: Starting SYNCHRONIZE for task 'MYTASK1' 30-Normal: MYTASK1: Queuing Add: data\file1.txt 30-Normal: MYTASK1: Queuing Add: data\file2.txt 70-Error: MYTASK1: INGESTION: Send error: ACI error: Cannot Connect 30-Normal: MYTASK1: INGESTION: Pending:0 Sending:0 Done:0 Failed:2 70-Error: MYTASK1: Ingestion failed for data\file1.txt 70-Error: MYTASK1: Ingestion failed for data\file2.txt 00-Always: Finished SYNCHRONIZE for task 'MYTASK1'
data
folder a “Queuing Add” message is logged automatically by the Ingester.Add
method.
The default [Ingestion]
section in the connector's configuration file points to a CFS listening on port 7000. If a CFS is listening on this port when you run the connector, the log messages are different:
00-Always: Starting SYNCHRONIZE for task 'MYTASK1' 30-Normal: MYTASK1: Queuing Add: data\file1.txt 30-Normal: MYTASK1: Queuing Add: data\file2.txt 30-Normal: MYTASK1: INGESTION: Pending:0 Sending:0 Done:2 Failed:0 30-Normal: MYTASK1: Document data\file1.txt, ingest Add succeeded! 30-Normal: MYTASK1: Document data\file2.txt, ingest Add succeeded! 00-Always: Finished SYNCHRONIZE for task 'MYTASK1'
This time ingestion succeeds and the ingest result handler is called for each document that was successfully ingested.