return tmb.toString("UTF-8");
}
public String toBinaryString() throws IOException {
org.apache.hadoop.hive.ql.plan.api.Query q = getQueryPlan();
TMemoryBuffer tmb = new TMemoryBuffer(q.toString().length() * 5);
TBinaryProtocol oprot = new TBinaryProtocol(tmb);
try {
q.write(oprot);
} catch (TException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return q.toString();
}
byte[] buf = new byte[tmb.length()];
tmb.read(buf, 0, tmb.length());
return new String(buf);
// return getQueryPlan().toString();
}