@Override public void serialize(T obj, DataOutputStream out) throws IOException { if (compact) JsonUtil.writeValue(out, obj); else JsonUtil.writeValueIndent(out, obj); } }
private void mockUpOldTableExtJson(String tableId, Map<String, String> tableExdProperties) throws IOException { String path = TableExtDesc.concatResourcePath(tableId, null); ByteArrayOutputStream os = new ByteArrayOutputStream(); JsonUtil.writeValueIndent(os, tableExdProperties); os.flush(); InputStream is = new ByteArrayInputStream(os.toByteArray()); getStore().putResource(path, is, System.currentTimeMillis()); os.close(); is.close(); } }
@Override public void serialize(T obj, DataOutputStream out) throws IOException { JsonUtil.writeValueIndent(out, obj); } }
public void saveTableExd(String tableId, Map<String, String> tableExdProperties) throws IOException { if (tableId == null) { throw new IllegalArgumentException("tableId couldn't be null"); } TableDesc srcTable = srcTableMap.get(tableId); if (srcTable == null) { throw new IllegalArgumentException("Couldn't find Source Table with identifier: " + tableId); } String path = TableDesc.concatExdResourcePath(tableId); ByteArrayOutputStream os = new ByteArrayOutputStream(); JsonUtil.writeValueIndent(os, tableExdProperties); os.flush(); InputStream is = new ByteArrayInputStream(os.toByteArray()); getStore().putResource(path, is, System.currentTimeMillis()); os.close(); is.close(); srcTableExdMap.putLocal(tableId, tableExdProperties); }
@Override public void serialize(T obj, DataOutputStream out) throws IOException { JsonUtil.writeValueIndent(out, obj); } }
@Override public void serialize(T obj, DataOutputStream out) throws IOException { if (compact) JsonUtil.writeValue(out, obj); else JsonUtil.writeValueIndent(out, obj); } }
public void saveTableExd(String tableId, Map<String, String> tableExdProperties) throws IOException { if (tableId == null) { throw new IllegalArgumentException("tableId couldn't be null"); } TableDesc srcTable = srcTableMap.get(tableId); if (srcTable == null) { throw new IllegalArgumentException("Couldn't find Source Table with identifier: " + tableId); } String path = TableDesc.concatExdResourcePath(tableId); ByteArrayOutputStream os = new ByteArrayOutputStream(); JsonUtil.writeValueIndent(os, tableExdProperties); os.flush(); InputStream is = new ByteArrayInputStream(os.toByteArray()); getStore().putResource(path, is, System.currentTimeMillis()); os.close(); is.close(); srcTableExdMap.putLocal(tableId, tableExdProperties); }