-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathItem.java
More file actions
51 lines (40 loc) · 960 Bytes
/
Copy pathItem.java
File metadata and controls
51 lines (40 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.Writable;
public class Item implements Writable{
private String fileName;
private int count;
public Item() {
}
public Item(String fileName, int count) {
this.fileName = fileName;
this.count = count;
}
@Override
public void readFields(DataInput arg0) throws IOException {
// Auto-generated method stub
fileName = arg0.readUTF();
count = arg0.readInt();
}
@Override
public void write(DataOutput arg0) throws IOException {
// Auto-generated method stub
arg0.writeUTF(fileName);
arg0.writeInt(count);
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
}