org.apache.hadoop.hive.ql.plan.api.Query.toString()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(123)

本文整理了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

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();
}

相关文章