本文整理了Java中org.apache.hadoop.hive.ql.plan.api.Query.toString
方法的一些代码示例,展示了Query.toString
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.toString
方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.plan.api.Query
类名称:Query
方法名:toString
暂无
代码示例来源:origin: apache/hive
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();
}
代码示例来源:origin: apache/hive
public String toThriftJSONString() throws IOException {
org.apache.hadoop.hive.ql.plan.api.Query q = getQueryPlan();
TMemoryBuffer tmb = new TMemoryBuffer(q.toString().length() * 5);
TJSONProtocol oprot = new TJSONProtocol(tmb);
try {
q.write(oprot);
} catch (TException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return q.toString();
}
return tmb.toString("UTF-8");
}
代码示例来源:origin: apache/drill
public String toThriftJSONString() throws IOException {
org.apache.hadoop.hive.ql.plan.api.Query q = getQueryPlan();
TMemoryBuffer tmb = new TMemoryBuffer(q.toString().length() * 5);
TJSONProtocol oprot = new TJSONProtocol(tmb);
try {
q.write(oprot);
} catch (TException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return q.toString();
}
return tmb.toString("UTF-8");
}
代码示例来源:origin: apache/drill
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();
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
public String toThriftJSONString() throws IOException {
org.apache.hadoop.hive.ql.plan.api.Query q = getQueryPlan();
TMemoryBuffer tmb = new TMemoryBuffer(q.toString().length() * 5);
TJSONProtocol oprot = new TJSONProtocol(tmb);
try {
q.write(oprot);
} catch (TException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return q.toString();
}
return tmb.toString("UTF-8");
}
代码示例来源:origin: org.apache.hadoop.hive/hive-exec
public String toThriftJSONString() throws IOException {
org.apache.hadoop.hive.ql.plan.api.Query q = getQueryPlan();
TMemoryBuffer tmb = new TMemoryBuffer(q.toString().length() * 5);
TJSONProtocol oprot = new TJSONProtocol(tmb);
try {
q.write(oprot);
} catch (TException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return q.toString();
}
return tmb.toString("UTF-8");
}
代码示例来源:origin: org.apache.hadoop.hive/hive-exec
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();
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
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();
}
内容来源于网络,如有侵权,请联系作者删除!