Revision: 19941 http://sourceforge.net/p/gate/code/19941 Author: ian_roberts Date: 2017-01-10 14:51:51 +0000 (Tue, 10 Jan 2017) Log Message: ----------- Added a bash script to run the index repair tool, which will be built into the mimir-cloud WAR file
Added Paths: ----------- mimir/trunk/mimir-cloud/web-app/WEB-INF/utils/ mimir/trunk/mimir-cloud/web-app/WEB-INF/utils/log4j.properties mimir/trunk/mimir-cloud/web-app/WEB-INF/utils/truncate-index.sh Added: mimir/trunk/mimir-cloud/web-app/WEB-INF/utils/log4j.properties =================================================================== --- mimir/trunk/mimir-cloud/web-app/WEB-INF/utils/log4j.properties (rev 0) +++ mimir/trunk/mimir-cloud/web-app/WEB-INF/utils/log4j.properties 2017-01-10 14:51:51 UTC (rev 19941) @@ -0,0 +1,5 @@ +log4j.rootLogger=INFO, stdout +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} [truncate-index] %p %c{1}.%M(%L) | %m%n + Added: mimir/trunk/mimir-cloud/web-app/WEB-INF/utils/truncate-index.sh =================================================================== --- mimir/trunk/mimir-cloud/web-app/WEB-INF/utils/truncate-index.sh (rev 0) +++ mimir/trunk/mimir-cloud/web-app/WEB-INF/utils/truncate-index.sh 2017-01-10 14:51:51 UTC (rev 19941) @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Simple script to run the index repair tool - you may need to edit the command +# line to increase or decrease the -Xmx for your system. +# +# IT IS HIGHLY RECOMMENDED TO BACK UP YOUR INDEX BEFORE ATTEMPTING TO REPAIR IT! +# The repair process is potentially destructive, particularly if it crashes part +# way through (e.g. running out of memory). If this happens you will have to +# restore the index from your backup, fix the problem (e.g. a higher -Xmx) and +# try again. +# +# Usage: +# +# bash truncate-index.sh [-p /path/to/extra/plugin ...] /path/to/index-NNNNN.mimir +# +# The script will automatically include the plugins that are bundled inside +# this WAR file (in WEB-INF/mimir-plugins), if your index refers to classes +# from any other mimir plugins that you have referenced via local configuration +# then you must load those plugins yourself with appropriate -p options. +# +# The final option on the command line should be the path to the top-level +# directory of the Mimir index you want to repair (i.e. the directory that +# contains config.xml, mimir-collection-*.zip and all the token-N and mention-N +# subdirectories). +# + +DIR="`dirname $0`" + +if [ -z "$JAVA_HOME" ]; then + echo "JAVA_HOME not set" + exit 1 +fi + +# enumerate all the mimir-plugins +plugins=() +for plug in "$DIR"/../mimir-plugins/* ; do + plugins=( "${plugins[@]}" -p "$plug" ) +done + +"$JAVA_HOME/bin/java" -Xmx2G -classpath "$DIR:$DIR/../lib/*" gate.mimir.util.TruncateIndex "${plugins[@]}" "$@" Property changes on: mimir/trunk/mimir-cloud/web-app/WEB-INF/utils/truncate-index.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______________________________________________ GATE-cvs mailing list GATE-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gate-cvs