public ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException { TGetSchemasResp schemaResp; TGetSchemasReq schemaReq = new TGetSchemasReq(); schemaReq.setSessionHandle(sessHandle); if (catalog != null) { schemaReq.setCatalogName(catalog); } if (schemaPattern == null) { schemaPattern = "%"; } schemaReq.setSchemaName(schemaPattern); try { schemaResp = client.GetSchemas(schemaReq); } catch (TException e) { throw new SQLException(e.getMessage(), "08S01", e); } Utils.verifySuccess(schemaResp.getStatus()); return new HiveQueryResultSet.Builder(connection) .setClient(client) .setSessionHandle(sessHandle) .setStmtHandle(schemaResp.getOperationHandle()) .build(); }
public ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException { TGetSchemasResp schemaResp; TGetSchemasReq schemaReq = new TGetSchemasReq(); schemaReq.setSessionHandle(sessHandle); if (catalog != null) { schemaReq.setCatalogName(catalog); } if (schemaPattern == null) { schemaPattern = "%"; } schemaReq.setSchemaName(schemaPattern); try { schemaResp = client.GetSchemas(schemaReq); } catch (TException e) { throw new SQLException(e.getMessage(), "08S01", e); } Utils.verifySuccess(schemaResp.getStatus()); return new HiveQueryResultSet.Builder(connection) .setClient(client) .setSessionHandle(sessHandle) .setStmtHandle(schemaResp.getOperationHandle()) .build(); }
@Override public OperationHandle getSchemas(SessionHandle sessionHandle, String catalogName, String schemaName) throws HiveSQLException { try { TGetSchemasReq req = new TGetSchemasReq(sessionHandle.toTSessionHandle()); req.setCatalogName(catalogName); req.setSchemaName(schemaName); TGetSchemasResp resp = cliService.GetSchemas(req); checkStatus(resp.getStatus()); TProtocolVersion protocol = sessionHandle.getProtocolVersion(); return new OperationHandle(resp.getOperationHandle(), protocol); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
@Override public OperationHandle getSchemas(SessionHandle sessionHandle, String catalogName, String schemaName) throws HiveSQLException { try { TGetSchemasReq req = new TGetSchemasReq(sessionHandle.toTSessionHandle()); req.setCatalogName(catalogName); req.setSchemaName(schemaName); TGetSchemasResp resp = cliService.GetSchemas(req); checkStatus(resp.getStatus()); TProtocolVersion protocol = sessionHandle.getProtocolVersion(); return new OperationHandle(resp.getOperationHandle(), protocol); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
@Override public OperationHandle getSchemas(SessionHandle sessionHandle, String catalogName, String schemaName) throws HiveSQLException { try { TGetSchemasReq req = new TGetSchemasReq(sessionHandle.toTSessionHandle()); req.setCatalogName(catalogName); req.setSchemaName(schemaName); TGetSchemasResp resp = cliService.GetSchemas(req); checkStatus(resp.getStatus()); TProtocolVersion protocol = sessionHandle.getProtocolVersion(); return new OperationHandle(resp.getOperationHandle(), protocol); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
@Override public OperationHandle getSchemas(SessionHandle sessionHandle, String catalogName, String schemaName) throws HiveSQLException { try { TGetSchemasReq req = new TGetSchemasReq(sessionHandle.toTSessionHandle()); req.setCatalogName(catalogName); req.setSchemaName(schemaName); TGetSchemasResp resp = cliService.GetSchemas(req); checkStatus(resp.getStatus()); TProtocolVersion protocol = sessionHandle.getProtocolVersion(); return new OperationHandle(resp.getOperationHandle(), protocol); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
public GetSchemas_result getResult(I iface, GetSchemas_args args) throws org.apache.thrift.TException { GetSchemas_result result = new GetSchemas_result(); result.success = iface.GetSchemas(args.req); return result; } }
public GetSchemas_result getResult(I iface, GetSchemas_args args) throws org.apache.thrift.TException { GetSchemas_result result = new GetSchemas_result(); result.success = iface.GetSchemas(args.req); return result; } }
public GetSchemas_result getResult(I iface, GetSchemas_args args) throws org.apache.thrift.TException { GetSchemas_result result = new GetSchemas_result(); result.success = iface.GetSchemas(args.req); return result; } }
public GetSchemas_result getResult(I iface, GetSchemas_args args) throws org.apache.thrift.TException { GetSchemas_result result = new GetSchemas_result(); result.success = iface.GetSchemas(args.req); return result; } }