@Override public void readFields(DataInput in) throws IOException { sid.readFields(in); value.readFields(in); string.readFields(in); lastUpdateTime.readFields(in); jobflowSid.readFields(in); cacheFileSid.readFields(in); }
@Override public void write(DataOutput out) throws IOException { sid.write(out); value.write(out); string.write(out); lastUpdateTime.write(out); jobflowSid.write(out); cacheFileSid.write(out); }
@Override public int hashCode() { int prime = 31; int result = 1; result += prime * result + sid.hashCode(); result += prime * result + value.hashCode(); result += prime * result + string.hashCode(); result += prime * result + lastUpdateTime.hashCode(); result += prime * result + jobflowSid.hashCode(); result += prime * result + cacheFileSid.hashCode(); return result; }
/** * {@link WritableSlot}を経由した{@link Writable}の永続化。 * * @throws Exception テストに失敗した場合 */ @SuppressWarnings("deprecation") @Test public void loadStore() throws Exception { WritableSlot slot = new WritableSlot(); IntOption value = new IntOption(100); IntOption copy = new IntOption(); slot.store(value); slot.loadTo(copy); assertThat(copy, is(value)); value.modify(200); slot.store(value); slot.loadTo(copy); assertThat(copy, is(value)); }
@Override public void emit(IntOption option) throws IOException { startCell(); if (emitNull(option)) { return; } lineBuffer.append(option.get()); }
@SuppressWarnings("deprecation") private void fill0(IntOption option, boolean doRecover) throws CsvFormatException { if (lineBuffer.hasRemaining()) { try { int value = Integer.parseInt(lineBuffer.toString()); option.modify(value); } catch (NumberFormatException e) { if (doRecover && trimWhitespaces()) { fill0(option, false); return; } throw new CsvFormatException( createStatusInLine(Reason.INVALID_CELL_FORMAT, "int value"), e); } } else { option.setNull(); } }
@Override public void readFields(DataInput in) throws IOException { tempSid.readFields(in); sid.readFields(in); versionNo.readFields(in); rgstDate.readFields(in); updtDate.readFields(in); duplicateFlg.readFields(in); textdata1.readFields(in); intdata2.readFields(in); datedata2.readFields(in); }
@Override public void write(DataOutput out) throws IOException { tempSid.write(out); sid.write(out); versionNo.write(out); rgstDate.write(out); updtDate.write(out); duplicateFlg.write(out); textdata1.write(out); intdata2.write(out); datedata2.write(out); }
@Override public int hashCode() { int prime = 31; int result = 1; result += prime * result + tempSid.hashCode(); result += prime * result + sid.hashCode(); result += prime * result + versionNo.hashCode(); result += prime * result + rgstDate.hashCode(); result += prime * result + updtDate.hashCode(); result += prime * result + duplicateFlg.hashCode(); result += prime * result + textdata1.hashCode(); result += prime * result + intdata2.hashCode(); result += prime * result + datedata2.hashCode(); return result; }