@Override public void readFields(DataInput in) throws IOException { super.readFields(in); // First clear the map. Otherwise we will just accumulate // entries every time this method is called. this.instance.clear(); // Read the number of entries in the map int entries = in.readInt(); // Then read each key/value pair for (int i = 0; i < entries; i++) { Writable key = (Writable) ReflectionUtils.newInstance(getClass( in.readByte()), getConf()); key.readFields(in); Writable value = (Writable) ReflectionUtils.newInstance(getClass( in.readByte()), getConf()); value.readFields(in); instance.put(key, value); } }
@Override public void readFields(DataInput in) throws IOException { super.readFields(in); // First clear the map. Otherwise we will just accumulate // entries every time this method is called. this.instance.clear(); // Read the number of entries in the map int entries = in.readInt(); // Then read each key/value pair for (int i = 0; i < entries; i++) { Writable key = (Writable) ReflectionUtils.newInstance(getClass( in.readByte()), getConf()); key.readFields(in); Writable value = (Writable) ReflectionUtils.newInstance(getClass( in.readByte()), getConf()); value.readFields(in); instance.put(key, value); } } }
/** {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public void readFields(DataInput in) throws IOException { super.readFields(in); // First clear the map. Otherwise we will just accumulate // entries every time this method is called. this.instance.clear(); // Read the number of entries in the map int entries = in.readInt(); // Then read each key/value pair for (int i = 0; i < entries; i++) { Writable key = (Writable) ReflectionUtils.newInstance(getClass( in.readByte()), getConf()); key.readFields(in); Writable value = (Writable) ReflectionUtils.newInstance(getClass( in.readByte()), getConf()); value.readFields(in); instance.put(key, value); } } }
@Override public void readFields(DataInput in) throws IOException { super.readFields(in); // First clear the map. Otherwise we will just accumulate // entries every time this method is called. this.instance.clear(); // Read the number of entries in the map int entries = in.readInt(); // Then read each key/value pair for (int i = 0; i < entries; i++) { Writable key = (Writable) ReflectionUtils.newInstance(getClass( in.readByte()), getConf()); key.readFields(in); Writable value = (Writable) ReflectionUtils.newInstance(getClass( in.readByte()), getConf()); value.readFields(in); instance.put(key, value); } }
/** {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public void readFields(DataInput in) throws IOException { super.readFields(in); // First clear the map. Otherwise we will just accumulate // entries every time this method is called. this.instance.clear(); // Read the number of entries in the map int entries = in.readInt(); // Then read each key/value pair for (int i = 0; i < entries; i++) { Writable key = (Writable) ReflectionUtils.newInstance(getClass( in.readByte()), getConf()); key.readFields(in); Writable value = (Writable) ReflectionUtils.newInstance(getClass( in.readByte()), getConf()); value.readFields(in); instance.put(key, value); } } }
@Override public void readFields(DataInput in) throws IOException { super.readFields(in); // First clear the map. Otherwise we will just accumulate // entries every time this method is called. this.instance.clear(); // Read the number of entries in the map int entries = in.readInt(); // Then read each key/value pair for (int i = 0; i < entries; i++) { Writable key = (Writable) ReflectionUtils.newInstance(getClass( in.readByte()), getConf()); key.readFields(in); Writable value = (Writable) ReflectionUtils.newInstance(getClass( in.readByte()), getConf()); value.readFields(in); instance.put(key, value); } } }
@Override public void readFields(DataInput in) throws IOException { super.readFields(in); // First clear the map. Otherwise we will just accumulate // entries every time this method is called. this.instance.clear(); // Read the number of entries in the map int entries = in.readInt(); // Then read each key/value pair for (int i = 0; i < entries; i++) { Writable key = (Writable) ReflectionUtils.newInstance(getClass( in.readByte()), getConf()); key.readFields(in); Writable value = (Writable) ReflectionUtils.newInstance(getClass( in.readByte()), getConf()); value.readFields(in); instance.put(key, value); } } }