private void loadPropertiesFile() throws IOException { KylinConfig cfg = KylinConfig.getInstanceFromEnv(); this.isRemote = cfg.getRunAsRemoteCommand(); this.port = cfg.getRemoteHadoopCliPort(); this.hostname = cfg.getRemoteHadoopCliHostname(); this.username = cfg.getRemoteHadoopCliUsername(); this.password = cfg.getRemoteHadoopCliPassword(); }
public CliCommandExecutor getCliCommandExecutor() throws IOException { CliCommandExecutor exec = new CliCommandExecutor(); if (getRunAsRemoteCommand()) { exec.setRunAtRemote(getRemoteHadoopCliHostname(), getRemoteHadoopCliUsername(), getRemoteHadoopCliPassword()); } return exec; }
public void downloadToLocal() throws IOException { String localArchive = "../examples/test_case_data/minicluster/hbase-export.tar.gz"; if (kylinConfig.getRunAsRemoteCommand()) { SSHClient ssh = new SSHClient(kylinConfig.getRemoteHadoopCliHostname(), kylinConfig.getRemoteHadoopCliUsername(), kylinConfig.getRemoteHadoopCliPassword()); try { ssh.scpFileToLocal(backupArchive, localArchive); } catch (Exception e) { e.printStackTrace(); } } else { FileUtils.copyFile(new File(backupArchive), new File(localArchive)); } }
private void loadPropertiesFile() throws IOException { KylinConfig cfg = KylinConfig.getInstanceFromEnv(); this.isRemote = cfg.getRunAsRemoteCommand(); this.hostname = cfg.getRemoteHadoopCliHostname(); this.username = cfg.getRemoteHadoopCliUsername(); this.password = cfg.getRemoteHadoopCliPassword(); }
public void uploadTarballToRemote() throws IOException { cli.execute("mkdir -p /tmp/hbase-export/"); @SuppressWarnings("unused") SSHClient ssh = new SSHClient(kylinConfig.getRemoteHadoopCliHostname(), kylinConfig.getRemoteHadoopCliUsername(), kylinConfig.getRemoteHadoopCliPassword()); try { // ssh.scpFileToRemote("../examples/test_case_data/minicluster/hbase-export.tar.gz", importFolder); } catch (Exception e) { e.printStackTrace(); } cli.execute("tar -xzf /tmp/hbase-export/hbase-export.tar.gz --directory=" + importFolder); }
public CliCommandExecutor getCliCommandExecutor() throws IOException { CliCommandExecutor exec = new CliCommandExecutor(); if (getRunAsRemoteCommand()) { exec.setRunAtRemote(getRemoteHadoopCliHostname(), getRemoteHadoopCliUsername(), getRemoteHadoopCliPassword()); } return exec; }