The index server takes the following options:
./glite-jp-indexd [option]
+ -s, --ps-server primary storage server address (http://hostname:port)
-d, --debug don't run as daemon, additional diagnostics
+ -q, --query-type hist/cont/both (default history)
-n, --noauth don't check user identity with result owner
-m, --mysql database connect string
-p, --port port to listen
-o, --logfile file to store logs
-which can be substituted (if both set, command line option has priority)
+some of which can be substituted (if both set, command line option has priority)
with env. variables:
+GLITE_JPIS_PS - location of JP-PS server (required parameter)
+ (for example http://umbar.ics.muni.cz:8901)
GLITE_JPIS_DEBUG - if set to "0" don't daemonize (default - deamonize)
GLITE_JPIS_PORT - used port (default 8902)
GLITE_JPIS_DB - database connection string
GLITE_JPIS_PIDFILE - pid file (default for root /var/run/glite-jp-indexd.log
non-root user ~/glite-jp-indexd.pid)
-
-Parameter which is now configurable only through env. variable is:
-
-GLITE_JPIS_PS - location of JP-PS server (required parameter)
- (for example http://umbar.ics.muni.cz:8901)
-
Other parameters will be configurable in close future. Its
current hard-coded values are in org.glite.jp.index/src/conf.[ch]
#include "db_ops.h"
-static const char *get_opt_string = "s:dc:k:C:V:nm:p:i:o:";
+static const char *get_opt_string = "s:dq:c:k:C:V:nm:p:i:o:";
static struct option opts[] = {
{"is-server", 1, NULL, 's'},
{"debug", 0, NULL, 'd'},
+ {"query-type", 1, NULL, 'q'},
// {"cert", 1, NULL, 'c'},
// {"key", 1, NULL, 'k'},
// {"CAdir", 1, NULL, 'C'},
fprintf(stderr,"usage: %s [option]\n"
"\t-s, --ps-server\t primary storage server address (http://hostname:port)\n"
"\t-d, --debug\t don't run as daemon, additional diagnostics\n"
+ "\t-q, --query-type hist/cont/both (default history)\n"
// "\t-k, --key\t private key file\n"
// "\t-c, --cert\t certificate file\n"
// "\t-C, --CAdir\t trusted certificates directory\n"
int glite_jp_get_conf(int argc, char **argv, char *config_file, glite_jp_is_conf **configuration)
{
- char *env, *ps = NULL;
+ char *env, *ps = NULL, *qt = NULL;;
int opt;
glite_jp_is_conf *conf;
while ((opt = getopt_long(argc,argv,get_opt_string,opts,NULL)) != EOF) switch (opt) {
case 's': ps = optarg; break;
case 'd': conf->debug = 1; break;
+ case 'q': qt = optarg; break;
// case 'c': server_cert = optarg; break;
// case 'k': server_key = optarg; break;
// case 'C': cadir = optarg; break;
conf->feeds[0]->query[0][0].op = GLITE_JP_QUERYOP_GREATER;
conf->feeds[0]->query[0][0].value = strdup("0");
- conf->feeds[0]->history = 1;
- conf->feeds[0]->continuous = 0;
+ if (qt && !strcmp(qt,"both")) {
+ conf->feeds[0]->history = 1;
+ conf->feeds[0]->continuous = 1;
+ }
+ else if (qt && !strcmp(qt,"continuous")) {
+ conf->feeds[0]->history = 0;
+ conf->feeds[0]->continuous = 1;
+ }
+ else {
+ conf->feeds[0]->history = 1;
+ conf->feeds[0]->continuous = 0;
+ }
conf->feeds[1] = NULL;