@Override public GetInfoValue getInfo(GetInfoType getInfoType) throws HiveSQLException { acquire(true, true); try { switch (getInfoType) { case CLI_SERVER_NAME: return new GetInfoValue("Hive"); case CLI_DBMS_NAME: return new GetInfoValue("Apache Hive"); case CLI_DBMS_VER: return new GetInfoValue(HiveVersionInfo.getVersion()); case CLI_MAX_COLUMN_NAME_LEN: return new GetInfoValue(128); case CLI_MAX_SCHEMA_NAME_LEN: return new GetInfoValue(128); case CLI_MAX_TABLE_NAME_LEN: return new GetInfoValue(128); case CLI_ODBC_KEYWORDS: return new GetInfoValue(ParseUtils.getKeywords(ODBC_KEYWORDS)); case CLI_TXN_CAPABLE: default: throw new HiveSQLException("Unrecognized GetInfoType value: " + getInfoType.toString()); } } finally { release(true, true); } }
@Override public GetInfoValue getInfo(SessionHandle sessionHandle, GetInfoType infoType) throws HiveSQLException { try { // FIXME extract the right info type TGetInfoReq req = new TGetInfoReq(sessionHandle.toTSessionHandle(), infoType.toTGetInfoType()); TGetInfoResp resp = cliService.GetInfo(req); checkStatus(resp.getStatus()); return new GetInfoValue(resp.getInfoValue()); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
@Override public GetInfoValue getInfo(GetInfoType getInfoType) throws HiveSQLException { acquire(true); try { switch (getInfoType) { case CLI_SERVER_NAME: return new GetInfoValue("Hive"); case CLI_DBMS_NAME: return new GetInfoValue("Apache Hive"); case CLI_DBMS_VER: return new GetInfoValue(HiveVersionInfo.getVersion()); case CLI_MAX_COLUMN_NAME_LEN: return new GetInfoValue(128); case CLI_MAX_SCHEMA_NAME_LEN: return new GetInfoValue(128); case CLI_MAX_TABLE_NAME_LEN: return new GetInfoValue(128); case CLI_TXN_CAPABLE: default: throw new HiveSQLException("Unrecognized GetInfoType value: " + getInfoType.toString()); } } finally { release(true); } }
@Override public GetInfoValue getInfo(GetInfoType getInfoType) throws HiveSQLException { acquire(true); try { switch (getInfoType) { case CLI_SERVER_NAME: return new GetInfoValue("Hive"); case CLI_DBMS_NAME: return new GetInfoValue("Apache Hive"); case CLI_DBMS_VER: return new GetInfoValue(HiveVersionInfo.getVersion()); case CLI_MAX_COLUMN_NAME_LEN: return new GetInfoValue(128); case CLI_MAX_SCHEMA_NAME_LEN: return new GetInfoValue(128); case CLI_MAX_TABLE_NAME_LEN: return new GetInfoValue(128); case CLI_TXN_CAPABLE: default: throw new HiveSQLException("Unrecognized GetInfoType value: " + getInfoType.toString()); } } finally { release(true); } }
@Override public GetInfoValue getInfo(GetInfoType getInfoType) throws HiveSQLException { acquire(true); try { switch (getInfoType) { case CLI_SERVER_NAME: return new GetInfoValue("Hive"); case CLI_DBMS_NAME: return new GetInfoValue("Apache Hive"); case CLI_DBMS_VER: return new GetInfoValue(HiveVersionInfo.getVersion()); case CLI_MAX_COLUMN_NAME_LEN: return new GetInfoValue(128); case CLI_MAX_SCHEMA_NAME_LEN: return new GetInfoValue(128); case CLI_MAX_TABLE_NAME_LEN: return new GetInfoValue(128); case CLI_TXN_CAPABLE: default: throw new HiveSQLException("Unrecognized GetInfoType value: " + getInfoType.toString()); } } finally { release(true); } }
@Override public GetInfoValue getInfo(GetInfoType getInfoType) throws HiveSQLException { acquire(true); try { switch (getInfoType) { case CLI_SERVER_NAME: return new GetInfoValue("Hive"); case CLI_DBMS_NAME: return new GetInfoValue("Apache Hive"); case CLI_DBMS_VER: return new GetInfoValue(HiveVersionInfo.getVersion()); case CLI_MAX_COLUMN_NAME_LEN: return new GetInfoValue(128); case CLI_MAX_SCHEMA_NAME_LEN: return new GetInfoValue(128); case CLI_MAX_TABLE_NAME_LEN: return new GetInfoValue(128); case CLI_TXN_CAPABLE: default: throw new HiveSQLException("Unrecognized GetInfoType value: " + getInfoType.toString()); } } finally { release(true); } }
@Override public GetInfoValue getInfo(GetInfoType getInfoType) throws HiveSQLException { acquire(true, true); try { switch (getInfoType) { case CLI_SERVER_NAME: return new GetInfoValue("Hive"); case CLI_DBMS_NAME: return new GetInfoValue("Apache Hive"); case CLI_DBMS_VER: return new GetInfoValue(HiveVersionInfo.getVersion()); case CLI_MAX_COLUMN_NAME_LEN: return new GetInfoValue(128); case CLI_MAX_SCHEMA_NAME_LEN: return new GetInfoValue(128); case CLI_MAX_TABLE_NAME_LEN: return new GetInfoValue(128); case CLI_ODBC_KEYWORDS: return new GetInfoValue(ParseUtils.getKeywords(ODBC_KEYWORDS)); case CLI_TXN_CAPABLE: default: throw new HiveSQLException("Unrecognized GetInfoType value: " + getInfoType.toString()); } } finally { release(true, true); } }
@Override public GetInfoValue getInfo(SessionHandle sessionHandle, GetInfoType infoType) throws HiveSQLException { try { // FIXME extract the right info type TGetInfoReq req = new TGetInfoReq(sessionHandle.toTSessionHandle(), infoType.toTGetInfoType()); TGetInfoResp resp = cliService.GetInfo(req); checkStatus(resp.getStatus()); return new GetInfoValue(resp.getInfoValue()); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
@Override public GetInfoValue getInfo(SessionHandle sessionHandle, GetInfoType infoType) throws HiveSQLException { try { // FIXME extract the right info type TGetInfoReq req = new TGetInfoReq(sessionHandle.toTSessionHandle(), infoType.toTGetInfoType()); TGetInfoResp resp = cliService.GetInfo(req); checkStatus(resp.getStatus()); return new GetInfoValue(resp.getInfoValue()); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
@Override public GetInfoValue getInfo(SessionHandle sessionHandle, GetInfoType infoType) throws HiveSQLException { try { // FIXME extract the right info type TGetInfoReq req = new TGetInfoReq(sessionHandle.toTSessionHandle(), infoType.toTGetInfoType()); TGetInfoResp resp = cliService.GetInfo(req); checkStatus(resp.getStatus()); return new GetInfoValue(resp.getInfoValue()); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
@Override public GetInfoValue getInfo(SessionHandle sessionHandle, GetInfoType infoType) throws HiveSQLException { try { // FIXME extract the right info type TGetInfoReq req = new TGetInfoReq(sessionHandle.toTSessionHandle(), infoType.toTGetInfoType()); TGetInfoResp resp = cliService.GetInfo(req); checkStatus(resp.getStatus()); return new GetInfoValue(resp.getInfoValue()); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
@Override public GetInfoValue getInfo(SessionHandle sessionHandle, GetInfoType infoType) throws HiveSQLException { try { // FIXME extract the right info type TGetInfoReq req = new TGetInfoReq(sessionHandle.toTSessionHandle(), infoType.toTGetInfoType()); TGetInfoResp resp = cliService.GetInfo(req); checkStatus(resp.getStatus()); return new GetInfoValue(resp.getInfoValue()); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }