<commit_before>/**
 * Copyright 2011 <NAME>
 * Licensed under the GPL Version 3 license
 */

package cassandra_mapreduce;


import java.io.File;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.SortedMap;
import org.apache.log4j.Logger;
import org.apache.cassandra.db.IColumn;
import org.apache.cassandra.hadoop.ColumnFamilyInputFormat;
import org.apache.cassandra.hadoop.ColumnFamilyOutputFormat;
import org.apache.cassandra.hadoop.ConfigHelper;
import org.apache.cassandra.avro.Column;
import org.apache.cassandra.avro.ColumnOrSuperColumn;
import org.apache.cassandra.avro.Mutation;
import org.apache.cassandra.thrift.SlicePredicate;
import org.apache.cassandra.utils.ByteBufferUtil;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;

import utils.Files;

/** 
 * @author <NAME>
 */

public class MapReduceCassandraDB extends Configured implements Tool
{
    private static final Logger logger = Logger.getLogger(MapReduceCassandraDB.class);

    static final String KEYSPACE = "Keyspace1";
    static final String COLUMN_FAMILY = "Standard1";
    private static final String CONF_COLUMN_NAME = "value";
    private static final String OUTPUT_PATH_PREFIX = "/tmp/wikipedia";
    static final int RING_DELAY = 30000; // this is enough for testing a single server node; may need more for a real cluster
    static final String OUTPUT_COLUMN_FAMILY = "output_phase1";
    static final String OUTPUT_COLUMN_FAMILY2 = "output_phase2";

    public static void main(String[] args) throws Exception
    {
    	//Delete old results if any<commit_msg>import clean up<commit_after>/**
 * Copyright 2011 <NAME>
 * Licensed under the GPL Version 3 license
 */

package cassandra_mapreduce;


import java.io.File;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.SortedMap;
import org.apache.log4j.Logger;
import org.apache.cassandra.db.IColumn;
import org.apache.cassandra.hadoop.ColumnFamilyInputFormat;
import org.apache.cassandra.hadoop.ColumnFamilyOutputFormat;
import org.apache.cassandra.hadoop.ConfigHelper;
import org.apache.cassandra.avro.Column;
import org.apache.cassandra.avro.ColumnOrSuperColumn;
import org.apache.cassandra.avro.Mutation;
import org.apache.cassandra.thrift.SlicePredicate;
import org.apache.cassandra.utils.ByteBufferUtil;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;

import utils.Files;

/** 
 * @author <NAME>
 */

public class MapReduceCassandraDB extends Configured implements Tool
{
    private static final Logger logger = Logger.getLogger(MapReduceCassandraDB.class);

    static final String KEYSPACE = "Keyspace1";
    static final String COLUMN_FAMILY = "Standard1";
    private static final String CONF_COLUMN_NAME = "value";
    private static final String OUTPUT_PATH_PREFIX = "/tmp/wikipedia";
    static final int RING_DELAY = 30000; // this is enough for testing a single server node; may need more for a real cluster
    static final String OUTPUT_COLUMN_FAMILY = "output_phase1";
    static final String OUTPUT_COLUMN_FAMILY2 = "output_phase2";

    public static void main(String[] args) throws Exception
    {
    	//Delete old results if any
{'fraction_non_alphanumeric': 0.09537712895377129, 'fraction_numerical': 0.007785888077858881, 'mean_word_length': 5.054491899852724, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1881946', 'n_tokens_mistral': 1288, 'n_tokens_neox': 1263, 'n_words': 303}