You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2013/04/09 02:22:26 UTC
svn commit: r1465841 - in /incubator/mesos/trunk: hadoop/TUTORIAL.sh
src/launcher/launcher.cpp
Author: vinodkone
Date: Tue Apr 9 00:22:26 2013
New Revision: 1465841
URL: http://svn.apache.org/r1465841
Log:
Fixed Hadoop tutorial to use gzip2 compression to
build the executor bundle.
Review: https://reviews.apache.org/r/10286
Modified:
incubator/mesos/trunk/hadoop/TUTORIAL.sh
incubator/mesos/trunk/src/launcher/launcher.cpp
Modified: incubator/mesos/trunk/hadoop/TUTORIAL.sh
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/hadoop/TUTORIAL.sh?rev=1465841&r1=1465840&r2=1465841&view=diff
==============================================================================
--- incubator/mesos/trunk/hadoop/TUTORIAL.sh (original)
+++ incubator/mesos/trunk/hadoop/TUTORIAL.sh Tue Apr 9 00:22:26 2013
@@ -550,7 +550,7 @@ __EOF__
# can be agnostic to the Hadoop version.
execute "cd .." \
"mv ${hadoop} hadoop" \
- "tar -cjf hadoop.tar.gz hadoop"
+ "tar -czf hadoop.tar.gz hadoop"
# Start JobTracker.
cat <<__EOF__
Modified: incubator/mesos/trunk/src/launcher/launcher.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/launcher/launcher.cpp?rev=1465841&r1=1465840&r2=1465841&view=diff
==============================================================================
--- incubator/mesos/trunk/src/launcher/launcher.cpp (original)
+++ incubator/mesos/trunk/src/launcher/launcher.cpp Tue Apr 9 00:22:26 2013
@@ -300,10 +300,18 @@ int ExecutorLauncher::fetchExecutors()
return -1;
}
- // Extract any .tgz, tar.gz, or zip files.
+ // Extract any .tgz, tar.gz, tar.bz2 or zip files.
if (strings::endsWith(resource, ".tgz") ||
strings::endsWith(resource, ".tar.gz")) {
- string command = "tar xzf '" + resource + "'";
+ string command = "tar zxf '" + resource + "'";
+ cout << "Extracting resource: " + command << endl;
+ int code = os::system(command);
+ if (code != 0) {
+ cerr << "Failed to extract resource: tar exit code " << code << endl;
+ return -1;
+ }
+ } else if (strings::endsWith(resource, ".tar.bz2")) {
+ string command = "tar jxf '" + resource + "'";
cout << "Extracting resource: " + command << endl;
int code = os::system(command);
if (code != 0) {