@Test(expected = IllegalStateException.class) public void should_only_write_values_in_columns_order_TDP_3188() throws Exception { final Map<String, String> values = new HashMap<>(); values.put("key", "value"); DataSetRow row = new DataSetRow(new RowMetadata(), values); writer.write(row); }
@Override public void write(DataSetRow row) throws IOException { if (!row.values().isEmpty() && row.getRowMetadata().getColumns().isEmpty()) { throw new IllegalStateException( " If a dataset row has some values it should at least have columns just before writing the result of a non json transformation."); } getRecordsWriter().writeNext(row.order().toArray(DataSetRow.SKIP_TDP_ID)); }
AbstractTransformerWriter implements TransformerWriter { @Override public void write(DataSetRow row) throws IOException { if (!row.values().isEmpty() && row.getRowMetadata().getColumns().isEmpty()) { throw new IllegalStateException( " If a dataset row has some values it should at least have columns just before writing the result of a non json transformation."); } getRecordsWriter().writeNext(row.order().toArray(DataSetRow.SKIP_TDP_ID)); } }
AbstractTransformerWriter implements TransformerWriter { @Override public void write(DataSetRow row) throws IOException { if (!row.values().isEmpty() && row.getRowMetadata().getColumns().isEmpty()) { throw new IllegalStateException( " If a dataset row has some values it should at least have columns just before writing the result of a non json transformation."); } getRecordsWriter().writeNext(row.order().toArray(DataSetRow.SKIP_TDP_ID)); }  }
AbstractTransformerWriter implements TransformerWriter { @Override public void write(DataSetRow row) throws IOException { if (!row.values().isEmpty() && row.getRowMetadata().getColumns().isEmpty()) { throw new IllegalStateException( " If a dataset row has some values it should at least have columns just before writing the result of a non json transformation."); } getRecordsWriter().writeNext(row.order().toArray(DataSetRow.SKIP_TDP_ID)); }  @Override void write(DataSetRow row); }
AbstractTransformerWriter implements TransformerWriter { @Override public void write(DataSetRow row) throws IOException { if (!row.values().isEmpty() && row.getRowMetadata().getColumns().isEmpty()) { throw new IllegalStateException( " If a dataset row has some values it should at least have columns just before writing the result of a non json transformation."); } getRecordsWriter().writeNext(row.order().toArray(DataSetRow.SKIP_TDP_ID)); }  @Override void write(DataSetRow row);  }