-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0be74a
commit e647495
Showing
6 changed files
with
27 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
function [status]=deploy_hadoop_mapreduce_job(setting) | ||
function deploy_hadoop_mapreduce_job(setting) | ||
% Submit a mapreduce job with a specific configuration setting. | ||
|
||
% Authors: Pooyan Jamshidi ([email protected]) | ||
|
@@ -22,9 +22,9 @@ | |
extrastr = ' '; | ||
|
||
% clean hdfs for the job | ||
if strcmp(status,'deployed') | ||
undeploy_storm_topology(deployment_id); | ||
end | ||
% if strcmp(status,'deployed') | ||
% undeploy_storm_topology(deployment_id); | ||
% end | ||
|
||
% prepare the connection | ||
ssh2_conn = ssh2_config(hadoop_.ip,hadoop_.username,hadoop_.password); | ||
|
@@ -45,11 +45,12 @@ | |
% added to the path | ||
config_str=''; | ||
for i=1:length(options_) | ||
config_str=[config_str extrastr options_{1,i} '=' num2str(setting(i)) ';']; | ||
config_str=[config_str options_{1,i} '=' num2str(setting(i)) ';']; | ||
end | ||
config_str=config_str(1:end-1); % taking out the last ; | ||
|
||
cli='java -jar CommandLineTool.jar'; | ||
cmd=[cli extrastr '-jar' extrastr application_.jar_file extrastr '-params' extrastr config_str extrastr '-class' extrastr application_.class extrastr '-args' extrastr application_.args extrastr '-applicationReplication' extrastr replication_]; | ||
cli=['java -jar' extrastr application_.cli_file]; | ||
cmd=[cli extrastr '-jar' extrastr application_.jar_file extrastr '-params' extrastr '"' config_str '"' extrastr '-class' extrastr application_.class extrastr '-args' extrastr application_.args extrastr '-applicationReplication' extrastr int2str(replication_)]; | ||
[ssh2_conn, response] = ssh2_command(ssh2_conn,cmd); | ||
|
||
ssh2_conn = ssh2_close(ssh2_conn); %will call ssh2.m and run command and then close connection | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function numberOfCols=number_of_cols(filename) | ||
fid = fopen(filename); | ||
allText = textscan(fid,'%s','delimiter','\n'); | ||
v=cell2mat(allText{1,1}(1)); | ||
numberOfCols=length(find(v==','))+1; | ||
fclose(fid); | ||
end |