Source:
<code>public int run(String[] args) throws Exception { Configuration conf = getConf(); if (! checkConfParameters()) { logger.error("Problem with configuration, aborting."); System.exit(1); } String cqlQuery = makeCqlUpdateQuery(); logger.info("CQL Query to be run: " + cqlQuery); Job job = new Job(conf, "CassandraXSVLoader"); job.setJarByClass(CassandraXSVLoader.class); job.setMapperClass(Mapper.class); FileInputFormat.addInputPath(job, new Path(conf.get(INPUT_PATH_PROP))); job.setReducerClass(ReducerToCassandra.class); job.setMapOutputKeyClass(LongWritable.class); job.setMapOutputValueClass(Text.class); job.setOutputKeyClass(Map.class); job.setOutputValueClass(List.class); ConfigHelper.setOutputColumnFamily( job.getConfiguration(), quoteIdentifier(conf.get(OUTPUT_KEYSPACE_PROP)), quoteIdentifier(conf.get(OUTPUT_COLUMN_FAMILY_PROP))); CqlConfigHelper.setOutputCql(job.getConfiguration(), cqlQuery); ConfigHelper.setOutputPartitioner(job.getConfiguration(), "Murmur3Partitioner"); ConfigHelper.setOutputInitialAddress( job.getConfiguration(), conf.get(CASSANDRA_HOST_PROP)); CqlConfigHelper.setUserNameAndPassword( job.getConfiguration(), conf.get(CASSANDRA_USER_PROP), conf.get(CASSANDRA_PASSWD_PROP)); if ((conf.getInt(CASSANDRA_NODES, 0) > 0) && (conf.getInt(BATCH_SIZE_PROP, 0) > 0)) { conf.setInt(ColumnFamilyOutputFormat.BATCH_THRESHOLD, conf.getInt(BATCH_SIZE_PROP, 0)); conf.setInt(ColumnFamilyOutputFormat.QUEUE_SIZE, conf.getInt(BATCH_SIZE_PROP, 0) * conf.getInt(CASSANDRA_NODES, 0) + 1); } job.setOutputFormatClass(CqlOutputFormat.class); <START> <END> job.waitForCompletion(true); return 0; }</code><technical_language>explaining is this needed</technical_language>

Target:
public int run(String[] args) throws Exception { Configuration conf = getConf(); if (! checkConfParameters()) { logger.error("Problem with configuration, aborting."); System.exit(1); } String cqlQuery = makeCqlQuery(); logger.info("CQL Query to be run: " + cqlQuery); Job job = new Job(conf, "CassandraXSVLoader"); job.setJarByClass(CassandraXSVLoader.class); job.setMapperClass(Mapper.class); FileInputFormat.addInputPath(job, new Path(conf.get(INPUT_PATH_PROP))); job.setReducerClass(ReducerToCassandra.class); job.setMapOutputKeyClass(LongWritable.class); job.setMapOutputValueClass(Text.class); job.setOutputKeyClass(Map.class); job.setOutputValueClass(List.class); job.setOutputFormatClass(CqlOutputFormat.class); ConfigHelper.setOutputColumnFamily( job.getConfiguration(), quoteIdentifier(conf.get(OUTPUT_KEYSPACE_PROP)), quoteIdentifier(conf.get(OUTPUT_COLUMN_FAMILY_PROP))); CqlConfigHelper.setOutputCql(job.getConfiguration(), cqlQuery); ConfigHelper.setOutputPartitioner(job.getConfiguration(), "Murmur3Partitioner"); ConfigHelper.setOutputInitialAddress( job.getConfiguration(), conf.get(CASSANDRA_HOST_PROP)); CqlConfigHelper.setUserNameAndPassword( job.getConfiguration(), conf.get(CASSANDRA_USER_PROP), conf.get(CASSANDRA_PASSWD_PROP)); if ((conf.getInt(CASSANDRA_NODES, 0) > 0) && (conf.getInt(BATCH_SIZE_PROP, 0) > 0)) { conf.setInt(ColumnFamilyOutputFormat.BATCH_THRESHOLD, conf.getInt(BATCH_SIZE_PROP, 0)); conf.setInt(ColumnFamilyOutputFormat.QUEUE_SIZE, conf.getInt(BATCH_SIZE_PROP, 0) * conf.getInt(CASSANDRA_NODES, 0) + 1); } job.waitForCompletion(true); return 0; }