import org.apache.hadoop.util.ToolRunner;
public class JRubyJobRunner extends Configured implements Tool {
public int run(String[] args) throws Exception {
CommandLineParser parser = new GnuParser();
Options options = new Options();
options.addOption(new Option("script", true, "ruby script"));
options
.addOption(new Option("dslfile", true, "hadoop ruby DSL script"));
CommandLine commandLine = parser.parse(options, args);
JobConf conf = new JobConf(getConf(), JRubyJobRunner.class);
conf.setJobName("ruby.runner");
if (commandLine.hasOption("script")) {
conf.set("mapred.ruby.script", commandLine.getOptionValue("script",