* the {@link TableDescriptor}.
* @throws IOException
*/
public static void setTableDescriptor(Job job, TableDescriptor tableDescriptor) throws IOException {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
TIOStreamTransport transport = new TIOStreamTransport(outputStream);
TJSONProtocol protocol = new TJSONProtocol(transport);
try {
tableDescriptor.write(protocol);
} catch (TException e) {
throw new IOException(e);
}
transport.close();
Configuration configuration = job.getConfiguration();
configuration.set(BLUR_TABLE_DESCRIPTOR, new String(outputStream.toByteArray()));
setOutputPath(job, new Path(tableDescriptor.getTableUri()));
}