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,280 points
24 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,810 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
• 67,120 points
58 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
• 67,120 points
50 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
• 67,120 points
81 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
• 10,110 points
2,040 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
10,435 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,240 points
763 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,810 points
318 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
155 views