|
@@ -28,7 +28,7 @@ public class EnterpriseGroupAggValue implements Writable {
|
|
|
return flag;
|
|
|
}
|
|
|
|
|
|
- public long getCount(){
|
|
|
+ public long getCount() {
|
|
|
return this.num.get();
|
|
|
}
|
|
|
|
|
@@ -51,6 +51,14 @@ public class EnterpriseGroupAggValue implements Writable {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ public String toString() {
|
|
|
+ return "EnterpriseGroupAggValue{" +
|
|
|
+ "flag=" + flag +
|
|
|
+ ", num=" + num +
|
|
|
+ '}';
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
public void write(DataOutput out) throws IOException {
|
|
|
flag.write(out);
|
|
|
num.write(out);
|
|
@@ -58,9 +66,13 @@ public class EnterpriseGroupAggValue implements Writable {
|
|
|
|
|
|
@Override
|
|
|
public void readFields(DataInput in) throws IOException {
|
|
|
- BooleanWritable booleanWritable = new BooleanWritable();
|
|
|
- LongWritable num = new LongWritable();
|
|
|
- booleanWritable.readFields(in);
|
|
|
+ if (flag == null) {
|
|
|
+ flag = new BooleanWritable();
|
|
|
+ }
|
|
|
+ if (num == null) {
|
|
|
+ num = new LongWritable();
|
|
|
+ }
|
|
|
+ flag.readFields(in);
|
|
|
num.readFields(in);
|
|
|
}
|
|
|
}
|