Author: tomwhite
Date: Tue Dec 22 18:33:48 2009
New Revision: 893262
URL: http://svn.apache.org/viewvc?rev=893262&view=rev
Log:
HADOOP-6454. Create setup.py for EC2 cloud scripts.
Added:
hadoop/common/trunk/src/contrib/cloud/src/py/hadoop/cloud/data/
hadoop/common/trunk/src/contrib/cloud/src/py/hadoop/cloud/data/hadoop-ec2-init-remote.sh
- copied unchanged from r893256,
hadoop/common/trunk/src/contrib/cloud/src/py/hadoop-ec2-init-remote.sh
hadoop/common/trunk/src/contrib/cloud/src/py/setup.py
Removed:
hadoop/common/trunk/src/contrib/cloud/src/py/VERSION
hadoop/common/trunk/src/contrib/cloud/src/py/hadoop-ec2-init-remote.sh
Modified:
hadoop/common/trunk/CHANGES.txt
hadoop/common/trunk/src/contrib/cloud/src/py/hadoop-ec2 (props changed)
hadoop/common/trunk/src/contrib/cloud/src/py/hadoop/cloud/__init__.py
hadoop/common/trunk/src/contrib/cloud/src/py/hadoop/cloud/cli.py
hadoop/common/trunk/src/contrib/cloud/src/py/hadoop/cloud/service.py
Modified: hadoop/common/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=893262&r1=893261&r2=893262&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Tue Dec 22 18:33:48 2009
@@ -76,6 +76,8 @@
HADOOP-6444. Support additional security group option in hadoop-ec2 script.
(Paul Egan via tomwhite)
+ HADOOP-6454. Create setup.py for EC2 cloud scripts. (tomwhite)
+
OPTIMIZATIONS
BUG FIXES
Propchange: hadoop/common/trunk/src/contrib/cloud/src/py/hadoop-ec2
------------------------------------------------------------------------------
svn:executable = *
Modified: hadoop/common/trunk/src/contrib/cloud/src/py/hadoop/cloud/__init__.py
URL:
http://svn.apache.org/viewvc/hadoop/common/trunk/src/contrib/cloud/src/py/hadoop/cloud/__init__.py?rev=893262&r1=893261&r2=893262&view=diff
==============================================================================
--- hadoop/common/trunk/src/contrib/cloud/src/py/hadoop/cloud/__init__.py
(original)
+++ hadoop/common/trunk/src/contrib/cloud/src/py/hadoop/cloud/__init__.py Tue
Dec 22 18:33:48 2009
@@ -11,4 +11,5 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
-# limitations under the License.
\ No newline at end of file
+# limitations under the License.
+VERSION="0.22.0"
\ No newline at end of file
Modified: hadoop/common/trunk/src/contrib/cloud/src/py/hadoop/cloud/cli.py
URL:
http://svn.apache.org/viewvc/hadoop/common/trunk/src/contrib/cloud/src/py/hadoop/cloud/cli.py?rev=893262&r1=893261&r2=893262&view=diff
==============================================================================
--- hadoop/common/trunk/src/contrib/cloud/src/py/hadoop/cloud/cli.py (original)
+++ hadoop/common/trunk/src/contrib/cloud/src/py/hadoop/cloud/cli.py Tue Dec 22
18:33:48 2009
@@ -16,6 +16,7 @@
from __future__ import with_statement
import ConfigParser
+from hadoop.cloud import VERSION
from hadoop.cloud.cluster import get_cluster
from hadoop.cloud.service import InstanceTemplate
from hadoop.cloud.service import HadoopService
@@ -32,9 +33,6 @@
import os
import sys
-version_file = os.path.join(sys.path[0], "VERSION")
-VERSION = open(version_file, "r").read().strip()
-
DEFAULT_CLOUD_PROVIDER = 'ec2'
DEFAULT_CONFIG_DIR_NAME = '.hadoop-cloud'
Modified: hadoop/common/trunk/src/contrib/cloud/src/py/hadoop/cloud/service.py
URL:
http://svn.apache.org/viewvc/hadoop/common/trunk/src/contrib/cloud/src/py/hadoop/cloud/service.py?rev=893262&r1=893261&r2=893262&view=diff
==============================================================================
--- hadoop/common/trunk/src/contrib/cloud/src/py/hadoop/cloud/service.py
(original)
+++ hadoop/common/trunk/src/contrib/cloud/src/py/hadoop/cloud/service.py Tue
Dec 22 18:33:48 2009
@@ -247,7 +247,8 @@
def _get_default_user_data_file_template(self):
- return os.path.join(sys.path[0], 'hadoop-%s-init-remote.sh' %
+ data_path = os.path.join(os.path.dirname(__file__), 'data')
+ return os.path.join(data_path, 'hadoop-%s-init-remote.sh' %
self.cluster.get_provider_code())
def _get_master(self):
Added: hadoop/common/trunk/src/contrib/cloud/src/py/setup.py
URL:
http://svn.apache.org/viewvc/hadoop/common/trunk/src/contrib/cloud/src/py/setup.py?rev=893262&view=auto
==============================================================================
--- hadoop/common/trunk/src/contrib/cloud/src/py/setup.py (added)
+++ hadoop/common/trunk/src/contrib/cloud/src/py/setup.py Tue Dec 22 18:33:48
2009
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from distutils.core import setup
+
+version = __import__('hadoop.cloud').cloud.VERSION
+
+setup(name='hadoop-cloud',
+ version=version,
+ description='Scripts for running Hadoop on cloud providers',
+ license = 'Apache License (2.0)',
+ url = 'http://hadoop.apache.org/common/',
+ packages=['hadoop', 'hadoop.cloud','hadoop.cloud.providers'],
+ package_data={'hadoop.cloud': ['data/*.sh']},
+ scripts=['hadoop-ec2'],
+ author = 'Apache Hadoop Contributors',
+ author_email = '[email protected]',
+)