CommandLine cmdline = parser.parse(options, args);
SQS_CMD cmd = SQS_CMD.valueOf(cmdline.getArgs()[0].toUpperCase());
AlertJanitor janitor = new AlertJanitor();
janitor.initalize(PathUtil.S3N, new Configuration());
String queue = janitor.resolveQueueUrl(cmdline.getArgs()[1]);
switch(cmd) {
case LOG:
janitor.writeLogs(queue, new Path(cmdline.getArgs()[2]));
break;
case PURGE:
janitor.clearAll(queue);
break;
default:
usage();
}
}