Skip to content

bbandlamudi/corb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

For more information see http://marklogic.github.com/corb/

Running Corb
-—————-

The entry point is the main method in the com.marklogic.developer.corb.Manager class.

Corb needs one or more of the following parameters as (If specified in more then one place command line argument takes precedence over VM argument which take precedence over corb.properties)
1) command-line arguments
2) VM arguments ex: -DXCC-CONNECTION-URI=xcc://admin:admin@localhost:8202 or
3) corb.properties in class path

XCC-CONNECTION-URI
COLLECTION-NAME (can be empty string)
XQUERY-MODULE (provide filesystem path if not contained in the corb package)
THREAD-COUNT (number of worker threads; default = 1)
URIS-MODULE (alternate URI selection module, replacing provided Corb default).
MODULE-ROOT (assumes ‘/’ if not provided)
MODULES-DATABASE (uses the XCC-CONNECTION-URI if not provided; use 0 for filesystem)
INSTALL (default is true; set to ‘false’ or ‘0’ to skip installation)
PROCESS-TASK (Java Class that implements com.marklogic.developer.Task or extends com.marklogic.developer.AbstractTask- can be used in place or in addition to XQUERY-MODULE)
POST-BATCH-XQUERY-MODULE (XQuery module, if specified, will be run after batch processing is completed)
POST-BATCH-TASK (Java Class that implements com.marklogic.developer.Task or extends com.marklogic.developer.AbstractTask- can be used in place or in addition to POST-BATCH-XQUERY-MODULE)
EXPORT-FILE-DIR (export directory for com.marklogic.developer.corb.ExportToFileTask or similar tasks)

Optional properties only supported via corb.proeprties file
-—-
EXPORT_FILE_NAME (shared file to export all the tasks used by com.marklogic.developer.corb.ExportBatchToFileTask- NOT full path to file)
EXPORT-FILE-TOP-CONTENT (used by PostBatchUpdateFileTask to insert content at the top to EXPORT_FILE_NAME after batch process is complete, if it finds the text @URIS_BATCH_REF it replaces it by batch reference sent by URIS_MODULE)
EXPORT-FILE-BOTTOM-CONTENT (used by PostBatchUpdateFileTask to append content to EXPORT_FILE_NAME after batch process is complete)

Internal properties
-——-
URIS_BATCH_REF (This is not a user specified property. URIS-MODULE can optionally send this a batch reference which can be used by post batch hooks)

Running from command line:
Usage 1:
com.marklogic.developer.corb.Manager XCC-CONNECTION-URI [COLLECTION-NAME [XQUERY-MODULE [ THREAD-COUNT [ URIS-MODULE [ MODULE-ROOT [ MODULES-DATABASE [ INSTALL [ PROCESS-TASK [ POST-BATCH-XQUERY-MODULE [ POST-BATCH-TASK [ EXPORT-FILE-DIR ] ] ] ] ] ] ] ] ] ] ]

Usage 2:
-DXCC-CONNECTION-URI=xcc://user:password@host:port/[ database ] -DXQUERY-MODULE=module-name.xqy -DTHREAD-COUNT=10 -DURIS-MODULE=get-uris.xqy -DPOST-BATCH-XQUERY-MODULE=post-batch.xqy -D… com.marklogic.developer.corb.Manager

Usage 3:
com.marklogic.developer.corb.Manager (Note: Looks for corb.properties file in the class path)

Sample corb.properties
--
XCC-CONNECTION-URI=xcc://user:password@localhost:8202/
XQUERY-MODULE=SampleCorbJob.xqy
THREAD-COUNT=10
URIS-MODULE=get-uris.xqy
POST-BATCH-XQUERY-MODULE=post-batch.xqy
#XQUERY-MODULE=get-document.xqy
#PROCESS-TASK=com.marklogic.developer.corb.ExportToFileTask
#EXPORT-FILE-DIR=/temp/export
#POST-BATCH-TASK=com.marklogic.corb.test.PostBatchTask

About

Content reprocessing in bulk

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 95.0%
  • XQuery 4.5%
  • Shell 0.5%