public Boolean install(String schemaName, String nodeName, String dbName, String host, String dialect, String user, String password) {
return install(schemaName, getOrAddNode(nodeName, dbName, host, dialect, user, password).getName());
}
private Node getOrAddNode(String nodeName, String dbName, String host, String dialect, String user, String password) {
Node node;
try {
node = hive.getNode(nodeName);
} catch (NoSuchElementException e) {
node = new Node(nodeName, dbName, host, DialectTools.stringToDialect(dialect));
node.setUsername(user);
node.setPassword(password);
try {
hive.addNode(node);
} catch (HiveLockableException e1) {
throw new HiveRuntimeException("Hive was locked read-only.", e1);
}