garage-education / hadoop-map-reduce

7 stars 5 forks source link

GPA Calculator Using Map Reduce #9

Open MoustafaAMahmoud opened 3 years ago

MoustafaAMahmoud commented 3 years ago

This issue is an initial thread discussion about GPA Calculator. This thread continues the initial conversation on our Youtube account.

The current information provided are:

Input columns:

Name ID Year Term Subject
amgad 1 4 first [math(3.4);oop(4),OS(4.4),algorithms (5)]

Transformation Logic: Not clear yet. Output: GPA value

amgad-melad commented 3 years ago

GPA.pdf

TawfikYasser commented 2 years ago

Hi @moustafaalaa

This is my solution for the GPA problem, please review if you have time 😃

Input Sample

Amgad 10 2020 First CS401 3 5 4
Ahmed 20 2020 First CS401 3 5 3
Ali 30 2020 First CS401 3 5 3.5
Mona 40 2020 First CS401 3 5 4.5
Amgad 10 2020 First CS402 3 5 4.5
Ahmed 20 2020 First CS402 3 5 2.5
Ali 30 2020 First CS402 3 5 3
Mona 40 2020 First CS402 3 5 4
Amgad 10 2020 First CS403 3 5 3.5
Ahmed 20 2020 First CS403 3 5 4.5
Ali 30 2020 First CS403 3 5 4
Mona 40 2020 First CS403 3 5 2

Desired Output

Ahmed   3.3333333
Ali 3.5
Amgad   4.0
Mona    3.5

--

Main Class

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.FloatWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;

import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException, InterruptedException, ClassNotFoundException {
        if(args.length != 2){
            System.err.println("GPA Calculator <Input-Path> <Output-Dir>");
            System.exit(2);
        }
        Configuration conf = new Configuration();
        FileSystem fs = FileSystem.get(conf);
        boolean exists = fs.exists(new Path(args[1]));
        if(exists) {
            fs.delete(new Path(args[1]), true);
        }
        Job job = Job.getInstance(conf, "GPA Calculator");
        job.setJarByClass(Main.class);
        job.setMapperClass(MapClass.class);
        job.setReducerClass(ReduceClass.class);
        job.setMapOutputKeyClass(Text.class);
        job.setMapOutputValueClass(ValuePair.class);
        job.setOutputKeyClass(Text.class);
        job.setOutputValueClass(FloatWritable.class);
        FileInputFormat.addInputPath(job, new Path(args[0]));
        FileOutputFormat.setOutputPath(job, new Path(args[1]));
        System.exit(job.waitForCompletion(true) ? 0 : 1);
    }
}

Mapper Class


import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
public class MapClass extends Mapper<Object, Text, Text, ValuePair>{
    private final Text studentName = new Text();
    @Override
    protected void map(Object key, Text value, Context context) throws IOException, InterruptedException {
        StringTokenizer record = new StringTokenizer(value.toString());
        List<String> infoList = new ArrayList<>();
        while (record.hasMoreTokens()){
            infoList.add(record.nextToken());
        }
        studentName.set(infoList.get(0));
        context.write(studentName, new ValuePair(Float.parseFloat(infoList.get(infoList.size()-3)), Float.parseFloat(infoList.get(infoList.size()-1))));

    }
}

Reducer Class


import org.apache.hadoop.io.FloatWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class ReduceClass extends Reducer<Text, ValuePair, Text, FloatWritable> {
    private ValuePair theValue = new ValuePair();
    float first = 0;
    float second = 0;
    float sum = 0;
    float sumCredits = 0;
    float gpa = 0;
    private List<Float> credits = new ArrayList<>();
    private FloatWritable result = new FloatWritable();
    @Override
    protected void reduce(Text key, Iterable<ValuePair> values, Context context) throws IOException, InterruptedException {
        while (values.iterator().hasNext()){
            theValue = values.iterator().next();
            first = theValue.getHours();
            second = theValue.getScore();
            credits.add(first);
            sum += (first * second);
        }
        for(Float d : credits)
            sumCredits += d;
        gpa = sum / sumCredits;
        result.set(gpa);
        credits.clear();
        first = 0;
        second = 0;
        sum = 0;
        sumCredits = 0;
        gpa = 0;
        context.write(key, result);
    }
}

ValuePair Class

import org.apache.hadoop.io.FloatWritable;
import org.apache.hadoop.io.WritableComparable;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.Objects;

public class ValuePair implements WritableComparable<ValuePair> {
    private FloatWritable hours;
    private FloatWritable score;

    public ValuePair(FloatWritable hours, FloatWritable score) {
        set(hours, score);
    }

    public ValuePair() {
        set(new FloatWritable(), new FloatWritable());
    }

    public ValuePair(float hours, float score) {
        set(new FloatWritable(hours), new FloatWritable(score));
    }

    public void set(FloatWritable hours, FloatWritable score) {
        this.hours = hours;
        this.score = score;
    }

    @Override
    public void readFields(DataInput in) throws IOException {
        hours.readFields(in);
        score.readFields(in);
    }

    @Override
    public void write(DataOutput out) throws IOException {
        hours.write(out);
        score.write(out);
    }

    public float getHours() {
        return hours.get();
    }

    public float getScore() {
        return score.get();
    }

    @Override
    public String toString() {
        return hours + " " + score;
    }

    @Override
    public int compareTo(ValuePair tp) {
        int cmp = hours.compareTo(tp.hours);

        if (cmp != 0) {
            return cmp;
        }

        return score.compareTo(tp.score);
    }

    @Override
    public int hashCode(){
        return Objects.hash(hours.hashCode() + score.hashCode());
    }

    @Override
    public boolean equals(Object o)
    {
        if(o instanceof ValuePair)
        {
            ValuePair tp = (ValuePair) o;
            return hours.equals(tp.hours) && score.equals(tp.score);
        }
        return false;
    }
}

Job Metadata

Job Output Log ``` 2022-02-13 23:04:38,874 INFO [main] org.apache.hadoop.security.SecurityUtil: Updating Configuration 2022-02-13 23:04:38,956 WARN [main] org.apache.hadoop.metrics2.impl.MetricsConfig: Cannot locate configuration: tried hadoop-metrics2-reducetask.properties,hadoop-metrics2.properties 2022-02-13 23:04:39,100 INFO [main] org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Scheduled Metric snapshot period at 10 second(s). 2022-02-13 23:04:39,100 INFO [main] org.apache.hadoop.metrics2.impl.MetricsSystemImpl: ReduceTask metrics system started 2022-02-13 23:04:39,188 INFO [main] org.apache.hadoop.mapred.YarnChild: Executing with tokens: [Kind: mapreduce.job, Service: job_1644760974297_0010, Ident: (org.apache.hadoop.mapreduce.security.token.JobTokenIdentifier@799f10e1)] 2022-02-13 23:04:39,241 INFO [main] org.apache.hadoop.mapred.YarnChild: Sleeping for 0ms before retrying again. Got null now. 2022-02-13 23:04:39,543 INFO [main] org.apache.hadoop.mapred.YarnChild: mapreduce.cluster.local.dir for child: /home/tawfik/Softy/hadoop/tmp/nm-local-dir/usercache/tawfik/appcache/application_1644760974297_0010 2022-02-13 23:04:39,873 INFO [main] org.apache.hadoop.mapred.YarnChild: /************************************************************ [system properties] os.name: Linux os.version: 5.13.0-28-generic java.home: /home/tawfik/Softy/java/jre java.runtime.version: 1.8.0_221-b11 java.vendor: Oracle Corporation java.version: 1.8.0_221 java.vm.name: Java HotSpot(TM) 64-Bit Server VM java.class.path: /home/tawfik/Softy/hadoop/tmp/nm-local-dir/usercache/tawfik/appcache/application_1644760974297_0010/container_1644760974297_0010_01_000003:/home/tawfik/Softy/hadoop/etc/*:/home/tawfik/Softy/hadoop/etc/hadoop/*:/home/tawfik/Softy/hadoop/lib/*:/home/tawfik/Softy/hadoop/share/hadoop/common/hadoop-common-3.2.2-tests.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/hadoop-nfs-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/hadoop-kms-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/hadoop-common-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jetty-servlet-9.4.20.v20190813.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/paranamer-2.3.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/hadoop-annotations-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/token-provider-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/commons-net-3.6.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/httpclient-4.5.13.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/kerb-server-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/guava-27.0-jre.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/kerb-crypto-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/curator-framework-2.13.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/commons-logging-1.1.3.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/checker-qual-2.5.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/kerby-config-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/kerby-xdr-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/kerb-common-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/avro-1.7.7.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jsch-0.1.55.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/commons-codec-1.11.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/curator-recipes-2.13.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jsr305-3.0.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/gson-2.2.4.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jcip-annotations-1.0-1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jsp-api-2.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/kerb-admin-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/kerby-util-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/commons-io-2.5.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/commons-compress-1.19.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/json-smart-2.3.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/kerb-identity-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jetty-util-9.4.20.v20190813.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jackson-mapper-asl-1.9.13.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jackson-core-asl-1.9.13.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/htrace-core4-4.1.0-incubating.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/slf4j-api-1.7.25.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jaxb-impl-2.2.3-1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jackson-annotations-2.9.10.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/error_prone_annotations-2.2.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jackson-xc-1.9.13.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/commons-collections-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/snappy-java-1.0.5.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jetty-security-9.4.20.v20190813.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/kerb-simplekdc-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/asm-5.0.4.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/audience-annotations-0.5.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/kerb-client-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jsr311-api-1.1.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/stax2-api-3.1.4.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/commons-text-1.4.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jettison-1.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jersey-core-1.19.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/metrics-core-3.2.4.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/failureaccess-1.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/nimbus-jose-jwt-7.9.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jaxb-api-2.2.11.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/animal-sniffer-annotations-1.17.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/commons-math3-3.1.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/dnsjava-2.1.7.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/javax.servlet-api-3.1.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/log4j-1.2.17.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/re2j-1.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jackson-databind-2.9.10.4.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/netty-3.10.6.Final.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jetty-http-9.4.20.v20190813.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/kerby-asn1-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/curator-client-2.13.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jetty-xml-9.4.20.v20190813.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jetty-webapp-9.4.20.v20190813.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jersey-servlet-1.19.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/kerb-util-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/protobuf-java-2.5.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/accessors-smart-1.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jersey-server-1.19.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/commons-beanutils-1.9.4.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jetty-io-9.4.20.v20190813.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/kerb-core-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jackson-jaxrs-1.9.13.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/zookeeper-3.4.13.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/javax.activation-api-1.2.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jersey-json-1.19.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/j2objc-annotations-1.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/kerby-pkix-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/commons-lang3-3.7.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jackson-core-2.9.10.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/hadoop-auth-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jul-to-slf4j-1.7.25.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/jetty-server-9.4.20.v20190813.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/commons-configuration2-2.1.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/httpcore-4.4.13.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/woodstox-core-5.0.3.jar:/home/tawfik/Softy/hadoop/share/hadoop/common/lib/commons-cli-1.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-common-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-core-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-app-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-shuffle-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-nativetask-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-plugins-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.2.2-tests.jar:/home/tawfik/Softy/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-uploader-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-examples-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/mapreduce/lib-examples/hsqldb-2.3.4.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/hadoop-hdfs-native-client-3.2.2-tests.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/hadoop-hdfs-rbf-3.2.2-tests.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/hadoop-hdfs-client-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/hadoop-hdfs-rbf-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/hadoop-hdfs-client-3.2.2-tests.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/hadoop-hdfs-native-client-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/hadoop-hdfs-httpfs-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/hadoop-hdfs-3.2.2-tests.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/hadoop-hdfs-nfs-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/hadoop-hdfs-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jetty-servlet-9.4.20.v20190813.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/paranamer-2.3.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/hadoop-annotations-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/okhttp-2.7.5.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/token-provider-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/commons-net-3.6.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/httpclient-4.5.13.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/kerb-server-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/guava-27.0-jre.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/kerb-crypto-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/okio-1.6.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/curator-framework-2.13.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/commons-logging-1.1.3.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/checker-qual-2.5.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/kerby-config-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/kerby-xdr-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/kerb-common-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/avro-1.7.7.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jsch-0.1.55.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/commons-codec-1.11.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/curator-recipes-2.13.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jsr305-3.0.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/gson-2.2.4.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jcip-annotations-1.0-1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/kerb-admin-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/kerby-util-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/commons-io-2.5.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/commons-compress-1.19.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/json-smart-2.3.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/kerb-identity-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jetty-util-9.4.20.v20190813.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jackson-mapper-asl-1.9.13.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jackson-core-asl-1.9.13.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/htrace-core4-4.1.0-incubating.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/leveldbjni-all-1.8.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jaxb-impl-2.2.3-1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jackson-annotations-2.9.10.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/error_prone_annotations-2.2.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jackson-xc-1.9.13.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/commons-collections-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/snappy-java-1.0.5.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jetty-security-9.4.20.v20190813.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/kerb-simplekdc-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/asm-5.0.4.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/audience-annotations-0.5.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/kerb-client-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jsr311-api-1.1.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/stax2-api-3.1.4.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/commons-text-1.4.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jettison-1.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jersey-core-1.19.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/json-simple-1.1.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/failureaccess-1.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/nimbus-jose-jwt-7.9.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jaxb-api-2.2.11.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/animal-sniffer-annotations-1.17.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/commons-math3-3.1.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/dnsjava-2.1.7.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/javax.servlet-api-3.1.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/commons-daemon-1.0.13.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/log4j-1.2.17.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/netty-all-4.1.48.Final.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/re2j-1.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jackson-databind-2.9.10.4.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/netty-3.10.6.Final.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jetty-http-9.4.20.v20190813.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/kerby-asn1-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/curator-client-2.13.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jetty-xml-9.4.20.v20190813.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jetty-webapp-9.4.20.v20190813.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jersey-servlet-1.19.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/kerb-util-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/protobuf-java-2.5.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jetty-util-ajax-9.4.20.v20190813.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/accessors-smart-1.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jersey-server-1.19.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/commons-beanutils-1.9.4.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jetty-io-9.4.20.v20190813.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/kerb-core-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jackson-jaxrs-1.9.13.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/zookeeper-3.4.13.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/javax.activation-api-1.2.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jersey-json-1.19.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/j2objc-annotations-1.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/kerby-pkix-1.0.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/commons-lang3-3.7.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jackson-core-2.9.10.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/hadoop-auth-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/jetty-server-9.4.20.v20190813.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/commons-configuration2-2.1.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/httpcore-4.4.13.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/woodstox-core-5.0.3.jar:/home/tawfik/Softy/hadoop/share/hadoop/hdfs/lib/commons-cli-1.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/hadoop-yarn-server-tests-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/hadoop-yarn-services-api-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/hadoop-yarn-server-nodemanager-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/hadoop-yarn-server-router-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/hadoop-yarn-common-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/hadoop-yarn-server-resourcemanager-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/hadoop-yarn-api-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/hadoop-yarn-applications-unmanaged-am-launcher-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/hadoop-yarn-client-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/hadoop-yarn-server-sharedcachemanager-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/hadoop-yarn-submarine-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/hadoop-yarn-server-applicationhistoryservice-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/hadoop-yarn-registry-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/hadoop-yarn-server-common-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/hadoop-yarn-services-core-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/hadoop-yarn-server-web-proxy-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/hadoop-yarn-applications-distributedshell-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/hadoop-yarn-server-timeline-pluginstorage-3.2.2.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/javax.inject-1.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/bcpkix-jdk15on-1.60.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/jackson-jaxrs-json-provider-2.9.10.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/jersey-client-1.19.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/aopalliance-1.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/swagger-annotations-1.5.4.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/bcprov-jdk15on-1.60.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/jersey-guice-1.19.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/guice-4.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/json-io-2.5.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/jackson-jaxrs-base-2.9.10.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/HikariCP-java7-2.4.12.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/geronimo-jcache_1.0_spec-1.0-alpha-1.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/metrics-core-3.2.4.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/mssql-jdbc-6.2.1.jre7.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/guice-servlet-4.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/objenesis-1.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/ehcache-3.3.1.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/java-util-1.9.0.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/fst-2.50.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/jackson-module-jaxb-annotations-2.9.10.jar:/home/tawfik/Softy/hadoop/share/hadoop/yarn/lib/snakeyaml-1.16.jar::/share/hadoop/mapreduce/*:/share/hadoop/mapreduce/lib/*:job.jar/job.jar:job.jar/classes/:job.jar/lib/*:/home/tawfik/Softy/hadoop/tmp/nm-local-dir/usercache/tawfik/appcache/application_1644760974297_0010/container_1644760974297_0010_01_000003/job.jar java.io.tmpdir: /home/tawfik/Softy/hadoop/tmp/nm-local-dir/usercache/tawfik/appcache/application_1644760974297_0010/container_1644760974297_0010_01_000003/tmp user.dir: /home/tawfik/Softy/hadoop/tmp/nm-local-dir/usercache/tawfik/appcache/application_1644760974297_0010/container_1644760974297_0010_01_000003 user.name: tawfik ************************************************************/ 2022-02-13 23:04:39,874 INFO [main] org.apache.hadoop.conf.Configuration.deprecation: session.id is deprecated. Instead, use dfs.metrics.session-id 2022-02-13 23:04:40,379 INFO [main] org.apache.hadoop.mapreduce.lib.output.FileOutputCommitter: File Output Committer Algorithm version is 2 2022-02-13 23:04:40,379 INFO [main] org.apache.hadoop.mapreduce.lib.output.FileOutputCommitter: FileOutputCommitter skip cleanup _temporary folders under output directory:false, ignore cleanup failures: false 2022-02-13 23:04:40,399 INFO [main] org.apache.hadoop.mapred.Task: Using ResourceCalculatorProcessTree : [ ] 2022-02-13 23:04:40,459 INFO [main] org.apache.hadoop.mapred.ReduceTask: Using ShuffleConsumerPlugin: org.apache.hadoop.mapreduce.task.reduce.Shuffle@42463763 2022-02-13 23:04:40,461 WARN [main] org.apache.hadoop.metrics2.impl.MetricsSystemImpl: ReduceTask metrics system already initialized! 2022-02-13 23:04:40,896 INFO [main] org.apache.hadoop.conf.Configuration.deprecation: mapred.skip.on is deprecated. Instead, use mapreduce.job.skiprecords 2022-02-13 23:04:41,078 INFO [main] org.apache.hadoop.mapred.Task: Task:attempt_1644760974297_0010_r_000000_0 is done. And is in the process of committing 2022-02-13 23:04:41,090 INFO [main] org.apache.hadoop.mapred.Task: Task attempt_1644760974297_0010_r_000000_0 is allowed to commit now 2022-02-13 23:04:41,107 INFO [main] org.apache.hadoop.mapreduce.lib.output.FileOutputCommitter: Saved output of task 'attempt_1644760974297_0010_r_000000_0' to hdfs://localhost/GPAOUT 2022-02-13 23:04:41,153 INFO [main] org.apache.hadoop.mapred.Task: Task 'attempt_1644760974297_0010_r_000000_0' done. 2022-02-13 23:04:41,159 INFO [main] org.apache.hadoop.mapred.Task: Final Counters for attempt_1644760974297_0010_r_000000_0: Counters: 35 File System Counters FILE: Number of bytes read=189 FILE: Number of bytes written=235174 FILE: Number of read operations=0 FILE: Number of large read operations=0 FILE: Number of write operations=0 HDFS: Number of bytes read=0 HDFS: Number of bytes written=43 HDFS: Number of read operations=5 HDFS: Number of large read operations=0 HDFS: Number of write operations=2 HDFS: Number of bytes read erasure-coded=0 Map-Reduce Framework Combine input records=0 Combine output records=0 Reduce input groups=4 Reduce shuffle bytes=189 Reduce input records=12 Reduce output records=4 Spilled Records=12 Shuffled Maps =1 Failed Shuffles=0 Merged Map outputs=1 GC time elapsed (ms)=56 CPU time spent (ms)=1050 Physical memory (bytes) snapshot=193409024 Virtual memory (bytes) snapshot=2638069760 Total committed heap usage (bytes)=167772160 Peak Reduce Physical memory (bytes)=193409024 Peak Reduce Virtual memory (bytes)=2638069760 Shuffle Errors BAD_ID=0 CONNECTION=0 IO_ERROR=0 WRONG_LENGTH=0 WRONG_MAP=0 WRONG_REDUCE=0 File Output Format Counters Bytes Written=43 2022-02-13 23:04:41,160 INFO [main] org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Stopping ReduceTask metrics system... 2022-02-13 23:04:41,161 INFO [main] org.apache.hadoop.metrics2.impl.MetricsSystemImpl: ReduceTask metrics system stopped. 2022-02-13 23:04:41,161 INFO [main] org.apache.hadoop.metrics2.impl.MetricsSystemImpl: ReduceTask metrics system shutdown complete. ```

Thanks.