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,140 points
17 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,590 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Serde query understanding

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

answered Dec 28, 2018 in Big Data Hadoop by Omkar
• 65,850 points
41 views
0 votes
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 in Big Data Hadoop by Omkar
• 65,850 points
37 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 in Big Data Hadoop by Omkar
• 65,850 points
68 views
0 votes
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
• 9,070 points
1,677 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
8,145 views
0 votes
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,260 points
571 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,590 points
255 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
127 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.