MapReduce programme not producing any outputs

2017-11-04T01:51:22

I am currently trying to parse the hour from some twitter data. The timestamp in twitter is in epochseconds, and I am using a mapreduce programme to extract and sum the hour of the day that each tweet was posted. My java code compiles, and the hadoop job runs, however I get a blank output. After looking at the details of the hadoop job, it is telling me that merged map outputs = 0. I have tried everything and have no idea why this is not working. Even if I have not parsed the date correctly, I should still get a return of all of the tweets being recorded under time = 23, and this is the final else in my list of if else statements. I have put the code below:

public class TweetHourMapper extends Mapper<Object, Text, Text, IntWritable> {
    private Text hour = new Text();
    private IntWritable count = new IntWritable(1);
    public void map(Object key, Text value, Context context) throws IOException, InterruptedException {
        String[] fields = value.toString().split(";");
        if (fields.length == 4) {
            String date = fields[0];
            Long aDate = Long.parseLong(date);
            Calendar calendar = Calendar.getInstance();
            calendar.setTimeInMillis(aDate);
            int time = calendar.get(Calendar.HOUR);
            if (time == 0) {
                hour.set("0");
                context.write(hour, count);
                //Below this i have a list of if else statements writing out if the    time== the particular hour. 

Copyright License:
Author:「Vishal」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/47101764/mapreduce-programme-not-producing-any-outputs

About “MapReduce programme not producing any outputs” questions

I am currently trying to parse the hour from some twitter data. The timestamp in twitter is in epochseconds, and I am using a mapreduce programme to extract and sum the hour of the day that each tw...
Function ScoreAverage(ByVal Sname As String, ByVal test1 As Integer, ByVal test2 As Integer, ByVal test3 As Integer) Dim average As Integer average = (test1 + test2 + test3) / 3 If av...
I am getting Array index bound of exception in Map programme. Below is the data and mapreduce programme. Data: 1,raja,10,10000 2,jyo,10,10000 3,tej,11,20000 4,tej1,11,20000 MapReduce Programm...
I am trying to sort a series of integers which is in the following order: A 2 B 9 C 4 .... .... Z 42 Following is the Mapper and Reducer code: public static class MapClass extends
So far, I have three MapReduce jobs chained together in Google App Engine. Between each MapReduce job, I yield the ouputs and pass that output on to the next MapReduce job. Now, I would like to pa...
Hi Guys i am new to hadoop, i am struggling with issue related to reducer. I have simple wordcount programme which not returning expected output expected output: this 1 hadoop 2 output: this 1
How can I test a Hadoop mapreduce application generally before it's ready for production. The testing perspectives that I can think of for now are: Unit test This is to make sure the methods in m...
I created a mapreduce program to take World Indicator Data to show the results of the specific indicator I wanted to analyze. (I.E. CO2 Emissions). The data is laid out in a long line that includes...
I can use Wireshark to check the computer network and packages, and I got GDB debugger to check debug of the programme that I own the source, is there any tools for me to check the programme that I...
I am writing some python script that opens a .csv file, defines the dataframe, run some analysis (e.g. aggregate data, splitting columns, finding averages etc..) and plot the output of the analysis...

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.