Understanding LongWritable

0 votes

How I can understand LongWritable type? What is it? Can anybody link to a schema or other helpful page.

Oct 29, 2018 in Big Data Hadoop by Neha
• 6,300 points
2,139 views

1 answer to this question.

0 votes

Hadoop needs to be able to serialise data in and out of Java types via DataInput and DataOutputobjects (IO Streams usually). The Writable classes do this by implementing two methods `write(DataOuput) and readFields(DataInput).

Specifically LongWritable is a Writable class that wraps a java long.

Most of the time (especially just starting out) you can mentally replace LongWritable -> Long i.e. it's just a number. If you get to defining your own datatypes you will start to become every familiar with implementing the writable interface:

Which looks some thing like:

public interface Writable {

       public void write(DataOutput out) throws IOException;

       public void readFields(DataInput in) throws IOException;
}
answered Oct 29, 2018 by Frankie
• 9,830 points

Related Questions In Big Data Hadoop

+2 votes
1 answer
–1 vote
1 answer

Serde query understanding

In the query mentioned in your question, ...READ MORE

answered Dec 29, 2018 in Big Data Hadoop by Omkar
• 69,210 points
1,159 views
–1 vote
1 answer

Pig code in Eclipse shows error :LongWritable cannot be resolved to a type

To rectify this errors, you need to ...READ MORE

answered Jan 2, 2019 in Big Data Hadoop by Omkar
• 69,210 points
1,501 views
0 votes
1 answer

expected org.apache.hadoop.io.IntWritable, received org.apache.hadoop.io.LongWritable

Hey George!  This error comes whenever you use ...READ MORE

answered Jan 25, 2019 in Big Data Hadoop by Omkar
• 69,210 points
966 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
10,618 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
104,944 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,390 points
4,296 views
0 votes
1 answer
0 votes
1 answer

Understanding Hadoop Master Node, Slave Node and Data Node.

The NameNode and the JobTracker are single ...READ MORE

answered Sep 6, 2018 in Big Data Hadoop by Frankie
• 9,830 points
2,481 views
0 votes
1 answer

Understanding Hyperledger transaction verification

 HL v0.x, the consensus process 'validates' transactions ...READ MORE

answered Jun 7, 2018 in Blockchain by Christine
• 15,790 points
892 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP