Changeset 1665:07f05953d331
- Timestamp:
- 06/19/08 18:38:25 (2 months ago)
- Author:
- hadoopsandholm@…
- Branch:
- default
- Message:
-
added ec2 compatibility client and server
- Location:
- src/grid/hadoop
- Files:
-
- 9 added
- 1 removed
- 5 modified
Legend:
- Unmodified
- Added
- Removed
-
|
r1406
|
r1665
|
|
| 4 | 4 | USER=`id -un` |
| 5 | 5 | GETIP=`cat ${HADOOP_ROOT}/hadoop.conf | grep ipaddress | sed 's/ipaddress //'` |
| 6 | | if [ "$GETIP" == "yes" ]; then |
| 7 | | tycoon -u ${USER} host bid $HOST 0 IPv4Address,$IP:0 |
| 8 | | fi |
| | 6 | #if [ "$GETIP" == "yes" ]; then |
| | 7 | # tycoon -u ${USER} host bid $HOST 0 IPv4Address,$IP:0 |
| | 8 | #fi |
| 9 | 9 | tycoon -u ${USER} host delete_account $HOST ${USER} |
-
|
r1599
|
r1665
|
|
| 2 | 2 | import time |
| 3 | 3 | import sys |
| 4 | | epoch = long(sys.argv[1]) |
| 5 | | print time.ctime(epoch) |
| | 4 | if len(sys.argv) < 2: |
| | 5 | print "-" |
| | 6 | else: |
| | 7 | try: |
| | 8 | epoch = long(sys.argv[1]) |
| | 9 | print time.ctime(epoch) |
| | 10 | except: |
| | 11 | print "-" |
-
|
r1603
|
r1665
|
|
| 1 | 1 | #!/bin/bash |
| 2 | 2 | tycoon_hadoop delete |
| | 3 | python ${HADOOP_INSTALL}/bin/LocalTime.py >${HADOOP_ROOT}/.launchtime |
| 3 | 4 | RET=`${HADOOP_INSTALL}/bin/gethosts $1` |
| 4 | 5 | if [ "$RET" != "OK" ]; then |
-
|
r1603
|
r1665
|
|
| 3 | 3 | MASTER=`tycoon_hadoop get-master` |
| 4 | 4 | if [ "X$MASTER" != "X" ]; then |
| 5 | | IP=`cat ${HADOOP_ROOT}/.hosts | grep $MASTER | awk '{print $1}'` |
| 6 | | TIME=`tycoon -u ${USER} host get_account_status ${IP} bid['expiration'] | tail -n 1 | awk '{print $3}' | sed 's/L.*//'` |
| 7 | | ${HADOOP_INSTALL}/bin/epochtime $TIME |
| | 5 | IP=`cat ${HADOOP_ROOT}/.hosts 2>/dev/null | grep $MASTER | awk '{print $1}'` |
| | 6 | TIME= |
| | 7 | if [ "X${IP}" != "X" ]; then |
| | 8 | TIME=`tycoon -u ${USER} host get_account_status ${IP} bid['expiration'] 2>/dev/null | tail -n 1 | awk '{print $3}' | sed 's/L.*//'` |
| | 9 | fi |
| | 10 | if [ "X${TIME}" == "X" ]; then |
| | 11 | echo "-" |
| | 12 | else |
| | 13 | ${HADOOP_INSTALL}/bin/epochtime $TIME |
| | 14 | fi |
| 8 | 15 | else |
| 9 | 16 | echo "-" |