You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by cr...@apache.org on 2015/01/20 20:13:06 UTC
incubator-samza git commit: SAMZA-512;
support interactive SSH in zopkio integration tests
Repository: incubator-samza
Updated Branches:
refs/heads/master 56fc502aa -> 0ba554afb
SAMZA-512; support interactive SSH in zopkio integration tests
Project: http://git-wip-us.apache.org/repos/asf/incubator-samza/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-samza/commit/0ba554af
Tree: http://git-wip-us.apache.org/repos/asf/incubator-samza/tree/0ba554af
Diff: http://git-wip-us.apache.org/repos/asf/incubator-samza/diff/0ba554af
Branch: refs/heads/master
Commit: 0ba554afb43c45b62304d01cb5c53dba9eee9137
Parents: 56fc502
Author: Chris Riccomini <cr...@criccomi-mn.linkedin.biz>
Authored: Tue Jan 20 11:12:57 2015 -0800
Committer: Chris Riccomini <cr...@criccomi-mn.linkedin.biz>
Committed: Tue Jan 20 11:12:57 2015 -0800
----------------------------------------------------------------------
samza-test/src/main/python/samza_job_yarn_deployer.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/0ba554af/samza-test/src/main/python/samza_job_yarn_deployer.py
----------------------------------------------------------------------
diff --git a/samza-test/src/main/python/samza_job_yarn_deployer.py b/samza-test/src/main/python/samza_job_yarn_deployer.py
index ad73677..e18bc58 100644
--- a/samza-test/src/main/python/samza_job_yarn_deployer.py
+++ b/samza-test/src/main/python/samza_job_yarn_deployer.py
@@ -23,6 +23,7 @@ import requests
import shutil
import tarfile
import zopkio.constants as constants
+import zopkio.runtime as runtime
import templates
from subprocess import PIPE, Popen
@@ -43,6 +44,8 @@ class SamzaJobYarnDeployer(Deployer):
"""
logging.getLogger("paramiko").setLevel(logging.ERROR)
# map from job_id to app_id
+ self.username = runtime.get_username()
+ self.password = runtime.get_password()
self.app_ids = {}
self.default_configs = configs
Deployer.__init__(self)
@@ -74,9 +77,9 @@ class SamzaJobYarnDeployer(Deployer):
exec_file_install_path = os.path.join(install_path, package_id)
for host in nm_hosts:
logger.info('Deploying {0} on host: {1}'.format(package_id, host))
- with get_ssh_client(host) as ssh:
+ with get_ssh_client(host, self.username, self.password) as ssh:
better_exec_command(ssh, "mkdir -p {0}".format(install_path), "Failed to create path: {0}".format(install_path))
- with get_sftp_client(host) as ftp:
+ with get_sftp_client(host, self.username, self.password) as ftp:
def progress(transferred_bytes, total_bytes_to_transfer):
logger.debug("{0} of {1} bytes transferred.".format(transferred_bytes, total_bytes_to_transfer))
ftp.put(executable, exec_file_location, callback=progress)
@@ -190,7 +193,7 @@ class SamzaJobYarnDeployer(Deployer):
# Delete job package on all NMs.
for host in nm_hosts:
- with get_ssh_client(host) as ssh:
+ with get_ssh_client(host, self.username, self.password) as ssh:
better_exec_command(ssh, "rm -rf {0}".format(install_path), "Failed to remove {0}".format(install_path))
# Delete job pacakge directory from local driver box.