Changeset 2320

Show
Ignore:
Timestamp:
08/11/09 00:21:49
Author:
douglm
Message:

Renamed bwcrawler to indexer. Seems to have disturbed svn

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/douglm/deployment/indexer/shellscr/resources/bwrun.bat

    r2271 r2320  
    1 :: Run the bedework dump/restore program 
    2 :: First arg defines the action, dump, restore etc 
    3 :: Second arg should be the filename 
     1:: Run the bedework indexer program 
    42 
    53:: JAVA_HOME needs to be defined 
     
    2018SET cp=@CP@ 
    2119 
    22 SET DUMPCMD="%JAVA_HOME%/bin/java" -cp %cp% @DUMP-CLASS@ 
    23 SET RESTORECMD="%JAVA_HOME%/bin/java" -cp %cp% @RESTORE-CLASS@ 
    24 SET SCHEMACMD="%JAVA_HOME%/bin/java" -cp %cp% org.hibernate.tool.hbm2ddl.SchemaExport 
     20SET RUNCMD="%JAVA_HOME%/bin/java" -cp %cp% org.bedework.indexer.BwIndexApp 
    2521 
    26 SET APPNAME=@BW-APP-NAME@ 
     22SET APPNAME=indexer 
    2723 
    2824ECHO. 
     
    3329 
    3430:branch 
    35   if "%1" == "dump" GOTO dump 
    36   if "%1" == "restore" GOTO restore 
    37   if "%1" == "restore-for-quickstart" GOTO restore-for-quickstart 
    38   if "%1" == "backup" GOTO backup 
    39   if "%1" == "initdb" GOTO initdb 
    40   if "%1" == "newsys" GOTO newsys 
    41   if "%1" == "drop" GOTO drop 
    42   if "%1" == "drop-export" GOTO drop-export 
    43   if "%1" == "schema" GOTO schema 
    44   if "%1" == "schema-export" GOTO schema-export 
     31  if "%1" == "reindex" GOTO reindex 
     32  if "%1" == "start" GOTO start 
    4533 
    4634:usage 
    4735  ECHO   Usage: 
    4836  ECHO. 
    49   ECHO     schema-export [--haltonerror] 
    50   ECHO        Create a schema from the xml schema. 
    51   ECHO        Also create the database tables, indexes etc. 
     37  ECHO     reindex [(-ndebug | -debug)] 
     38  ECHO        Reindex the system then process queue events 
    5239  ECHO. 
    53   ECHO     initdb [--indexroot={lucene-index-root}] 
    54   ECHO        Populate the database using the provided initial data. 
    55   ECHO. 
    56   ECHO     newsys <root-user> [-ndebug] 
    57   ECHO        Create a new empty system based on the build configuration with a 
    58   ECHO        single root user 
    59   ECHO. 
    60   ECHO     dump {filename} 
    61   ECHO        Dump the database in xml format suitable for restore. 
    62   ECHO. 
    63   ECHO     restore {filename} 
    64   ECHO        Restore the database from an xml formatted dump. 
    65   ECHO. 
    66   ECHO     backup {directory} {prefix} 
    67   ECHO        Dump the database in xml format suitable for restore. 
    68   ECHO        Files will have a name built from the prefix and the current date/time. 
    69   ECHO. 
    70   ECHO     drop [--haltonerror] 
    71   ECHO        Create a file in the current directory with sql drop statements 
    72   ECHO. 
    73   ECHO     drop-export [--haltonerror] 
    74   ECHO        Drop tables in the database. Note this may not work if the schema 
    75   ECHO        was changed. 
    76   ECHO. 
    77   ECHO     schema [--haltonerror] 
    78   ECHO        Create a schema from the xml schema. Placed in a file in the 
    79   ECHO        current directory 
     40  ECHO     start [(-ndebug | -debug)] 
     41  ECHO        Process queue events 
    8042  ECHO. 
    8143 
     
    8345 
    8446 
    85 :dump 
    86   ECHO   Dumping data: 
     47:reindex 
     48  ECHO   Reindexing data: 
    8749  ECHO. 
    88   ECHO   %DUMPCMD% -appname %APPNAME% -f %2 %3 %4 %5 %6 %7 %8 %9 
    89   %DUMPCMD% -appname %APPNAME% -f %2 %3 %4 %5 %6 %7 %8 %9 
     50  ECHO   %RUNCMD% -appname %APPNAME% -reindex %2 %3 %4 %5 %6 %7 %8 %9 
     51  %RUNCMD% -appname %APPNAME% -reindex %2 %3 %4 %5 %6 %7 %8 %9 
    9052  GOTO end 
    9153  :: 
    92 :restore 
    93   ECHO   Restoring data: 
     54:start 
     55  ECHO   Indexing data: 
    9456  ECHO. 
    95   ECHO   %RESTORECMD% -appname %APPNAME% -f %2 %3 %4 %5 %6 %7 %8 %9 
    96   %RESTORECMD% -appname %APPNAME% -f %2 %3 %4 %5 %6 %7 %8 %9 
    97   GOTO end 
    98   :: 
    99 :restore-for-quickstart 
    100   ECHO   Restoring data for quickstart: 
    101   ECHO. 
    102   ECHO   %RESTORECMD% -appname %APPNAME% -onlyusers "public-user,caladmin,douglm,agrp_*" -f %2 %3 %4 %5 %6 %7 %8 %9 
    103   %RESTORECMD% -appname %APPNAME% -onlyusers "public-user,caladmin,douglm,agrp_*" -f %2 %3 %4 %5 %6 %7 %8 %9 
    104   GOTO end 
    105   :: 
    106 :backup 
    107   :: first strip out delimeters from date and time 
    108   echo %date% > temp.txt 
    109   for /f "tokens=1-4 delims=/ " %%a in (temp.txt) do ( 
    110     set dname=%%a 
    111     set mm=%%b 
    112     set dd=%%c 
    113     set yy=%%d 
    114   ) 
    115   echo %time% > temp.txt 
    116   for /f "tokens=1-3 delims=: " %%a in (temp.txt) do ( 
    117     set hh=%%a 
    118     set mn=%%b 
    119     set ss=%%c 
    120   ) 
    121   echo %hh%%mn%%ss% > temp.txt 
    122   for /f "tokens=1-2 delims=. " %%a in (temp.txt) do ( 
    123     set tm=%%a 
    124     set ms=%%b 
    125   ) 
    126   SET TARGET=%2\%3%yy%%mm%%dd%_%tm%%ms%.xml 
    127  
    128   :: now backup the data 
    129   ECHO   Backing up data into: 
    130   ECHO   %TARGET% 
    131   ECHO. 
    132   ECHO   %DUMPCMD% -appname %APPNAME% -f %TARGET% 
    133   %DUMPCMD% -appname %APPNAME% -f %TARGET% 
    134   GOTO end 
    135   :: 
    136  
    137 :initdb 
    138   ECHO   Initializing the database: 
    139   ECHO. 
    140   ECHO   %RESTORECMD% -appname %APPNAME% -f ./data/initbedework.xml -initSyspars %2 %3 %4 %5 %6 %7 %8 %9 
    141   %RESTORECMD% -appname %APPNAME% -f ./data/initbedework.xml -initSyspars %2 %3 %4 %5 %6 %7 %8 %9 
    142   GOTO end 
    143   :: 
    144  
    145 :newsys 
    146   ECHO   Creating new system database: 
    147   ECHO. 
    148   ECHO   %RESTORECMD% -appname %APPNAME% -newSystem -rootid %2 %3 %4 %5 %6 %7 %8 %9 
    149   %RESTORECMD% -appname %APPNAME% -newSystem -rootid %2 %3 %4 %5 %6 %7 %8 %9 
    150   GOTO end 
    151   :: 
    152  
    153 :drop 
    154   ECHO   Creating drop sql 
    155   ECHO. 
    156   ECHO   %SCHEMACMD% --text --drop --format --delimiter="@SCHEMA-DELIMITER@" --config=./classes/hibernate.cfg.xml --output=schema.sql 
    157   %SCHEMACMD% --text --drop --format --delimiter="@SCHEMA-DELIMITER@" --config=./classes/hibernate.cfg.xml --output=schema.sql 
    158   GOTO end 
    159   :: 
    160 :drop-export 
    161   ECHO   Exporting drop sql: 
    162   ECHO. 
    163   ECHO   %SCHEMACMD% --drop --format --delimiter="@SCHEMA-DELIMITER@" --config=./classes/hibernate.cfg.xml --output=schema.sql 
    164   %SCHEMACMD% --drop --format --delimiter="@SCHEMA-DELIMITER@" --config=./classes/hibernate.cfg.xml --output=schema.sql 
    165   GOTO end 
    166   :: 
    167 :schema 
    168   ECHO   Creating the schema: 
    169   ECHO. 
    170   ECHO   %SCHEMACMD% --text --create --format --delimiter="@SCHEMA-DELIMITER@" --config=./classes/hibernate.cfg.xml --output=schema.sql 
    171   %SCHEMACMD% --text --create --format --delimiter="@SCHEMA-DELIMITER@" --config=./classes/hibernate.cfg.xml --output=schema.sql 
    172   GOTO end 
    173   :: 
    174 :schema-export 
    175   ECHO   Exporting the schema: 
    176   ECHO. 
    177   ECHO   %SCHEMACMD% --create --format --delimiter="@SCHEMA-DELIMITER@" --config=./classes/hibernate.cfg.xml --output=schema.sql 
    178   %SCHEMACMD% --create --format --delimiter="@SCHEMA-DELIMITER@" --config=./classes/hibernate.cfg.xml --output=schema.sql 
     57  ECHO   %RUNCMD% -appname %APPNAME% -start %2 %3 %4 %5 %6 %7 %8 %9 
     58  %RUNCMD% -appname %APPNAME% -start %2 %3 %4 %5 %6 %7 %8 %9 
    17959  GOTO end 
    18060  :: 
  • branches/douglm/deployment/indexer/shellscr/resources/bwrun.sh

    r2310 r2320  
    11#!/bin/sh 
    22 
    3 # Run the bedework crawler program 
     3# Run the bedework indexer program 
    44 
    55# JAVA_HOME needs to be defined 
     
    1616mkdir $TEMPDIR 
    1717 
    18 RUNCMD="$JAVA_HOME/bin/java -Djava.io.tmpdir="$TEMPDIR" -cp $cp org.bedework.bwcrawler.BwCrawlApp" 
     18RUNCMD="$JAVA_HOME/bin/java -Djava.io.tmpdir="$TEMPDIR" -cp $cp org.bedework.indexer.BwIndexApp" 
    1919 
    20 APPNAME=bwcrawler 
     20APPNAME=indexer 
    2121 
    2222