Examples of TGetInfoResp


Examples of org.apache.hive.service.cli.thrift.TGetInfoResp

  }

  public String getDatabaseProductVersion() throws SQLException {

    TGetInfoReq req = new TGetInfoReq(sessHandle, GetInfoType.CLI_DBMS_VER.toTGetInfoType());
    TGetInfoResp resp;
    try {
      resp = client.GetInfo(req);
    } catch (TException e) {
      throw new SQLException(e.getMessage(), "08S01", e);
    }
    Utils.verifySuccess(resp.getStatus());

    return resp.getInfoValue().getStringValue();
  }
View Full Code Here

Examples of org.apache.hive.service.cli.thrift.TGetInfoResp

  public int getDatabaseMinorVersion() throws SQLException {
    return Utils.getVersionPart(getDatabaseProductVersion(), 1);
  }

  public String getDatabaseProductName() throws SQLException {
    TGetInfoResp resp = getServerInfo(GetInfoType.CLI_DBMS_NAME.toTGetInfoType());
    return resp.getInfoValue().getStringValue();
  }
View Full Code Here

Examples of org.apache.hive.service.cli.thrift.TGetInfoResp

  public String getDatabaseProductVersion() throws SQLException {
    if (dbVersion != null) { //lazy-caching of the version.
      return dbVersion;
    }

    TGetInfoResp resp = getServerInfo(GetInfoType.CLI_DBMS_VER.toTGetInfoType());
    this.dbVersion = resp.getInfoValue().getStringValue();
    return dbVersion;
  }
View Full Code Here

Examples of org.apache.hive.service.cli.thrift.TGetInfoResp

    System.out.println("DriverVersion: " + meta.getDriverVersion());
  }

  private TGetInfoResp getServerInfo(TGetInfoType type) throws SQLException {
    TGetInfoReq req = new TGetInfoReq(sessHandle, type);
    TGetInfoResp resp;
    try {
      resp = client.GetInfo(req);
    } catch (TException e) {
      throw new SQLException(e.getMessage(), "08S01", e);
    }
    Utils.verifySuccess(resp.getStatus());
    return resp;
  }
View Full Code Here

Examples of org.apache.hive.service.cli.thrift.TGetInfoResp

  public String getDatabaseProductVersion() throws SQLException {
    if (dbVersion != null) { //lazy-caching of the version.
      return dbVersion;
    }

    TGetInfoResp resp = getServerInfo(GetInfoType.CLI_DBMS_VER.toTGetInfoType());
    this.dbVersion = resp.getInfoValue().getStringValue();
    return dbVersion;
  }
View Full Code Here

Examples of org.apache.hive.service.cli.thrift.TGetInfoResp

    System.out.println("DriverVersion: " + meta.getDriverVersion());
  }

  private TGetInfoResp getServerInfo(TGetInfoType type) throws SQLException {
    TGetInfoReq req = new TGetInfoReq(sessHandle, type);
    TGetInfoResp resp;
    try {
      resp = client.GetInfo(req);
    } catch (TException e) {
      throw new SQLException(e.getMessage(), "08S01", e);
    }
    Utils.verifySuccess(resp.getStatus());
    return resp;
  }
View Full Code Here

Examples of org.apache.hive.service.cli.thrift.TGetInfoResp

  public int getDatabaseMinorVersion() throws SQLException {
    return Utils.getVersionPart(getDatabaseProductVersion(), 1);
  }

  public String getDatabaseProductName() throws SQLException {
    TGetInfoResp resp = getServerInfo(GetInfoType.CLI_DBMS_NAME.toTGetInfoType());
    return resp.getInfoValue().getStringValue();
  }
View Full Code Here

Examples of org.apache.hive.service.cli.thrift.TGetInfoResp

  }

  public String getDatabaseProductVersion() throws SQLException {

    TGetInfoReq req = new TGetInfoReq(sessHandle, GetInfoType.CLI_DBMS_VER.toTGetInfoType());
    TGetInfoResp resp;
    try {
      resp = client.GetInfo(req);
    } catch (TException e) {
      throw new SQLException(e.getMessage(), "08S01", e);
    }
    Utils.verifySuccess(resp.getStatus());

    return resp.getInfoValue().getStringValue();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.