/** * Instantiates a new lens jdbc connection. * * @param uri the uri * @param info the info */ public LensJdbcConnection(String uri, Properties info) { LensConnectionParams params = JDBCUtils.parseUrl(uri); connection = new LensConnection(params); // TODO: should we prompt here? connection.open(""); }
/** * Instantiates a new lens jdbc connection. * * @param uri the uri * @param info the info */ public LensJdbcConnection(String uri, Properties info) { LensConnectionParams params = JDBCUtils.parseUrl(uri); connection = new LensConnection(params); // TODO: should we prompt here? connection.open(""); }
/** * Builds the. * * @return the lens connection */ public LensConnection build() { LensConnectionParams params = new LensConnectionParams(); if (baseUrl != null && !baseUrl.isEmpty()) { params.setBaseUrl(baseUrl); } if (database != null && !database.isEmpty()) { params.setDbName(database); } if (user != null && !user.isEmpty()) { params.getSessionVars().put("user.name", user); } if (password != null && !password.isEmpty()) { params.getSessionVars().put("user.pass", password); } return new LensConnection(params); }
/** * Builds the. * * @return the lens connection */ public LensConnection build() { LensConnectionParams params = new LensConnectionParams(); if (baseUrl != null && !baseUrl.isEmpty()) { params.setBaseUrl(baseUrl); } if (database != null && !database.isEmpty()) { params.setDbName(database); } if (user != null && !user.isEmpty()) { params.getSessionVars().put("user.name", user); } if (password != null && !password.isEmpty()) { params.getSessionVars().put("user.pass", password); } return new LensConnection(params); }
private void connectToLensServer() { log.debug("Connecting to lens server {}", new LensConnectionParams(conf)); connection = new LensConnection(new LensConnectionParams(conf)); connection.open(password); log.debug("Successfully connected to server {}", connection); pathValidator = new PathValidator(connection.getLensConnectionParams().getSessionConf()); Preconditions.checkNotNull(pathValidator, "Error in initializing Path Validator."); }
private void connectToLensServer() { log.debug("Connecting to lens server {}", new LensConnectionParams(conf)); connection = new LensConnection(new LensConnectionParams(conf)); connection.open(password); log.debug("Successfully connected to server {}", connection); pathValidator = new PathValidator(connection.getLensConnectionParams().getSessionConf()); Preconditions.checkNotNull(pathValidator, "Error in initializing Path Validator."); }