由于试验的需要,需要调整大量的参数,索性就采用Python写个脚本去执行hadoop命令。
------------------------------------------------------------------------------------------------------------------------------
Python,今天是第一次接触,按照例子写了一个执行命令。
#!/usr/bin/python
import sys
import subprocess
import os
import commands
from datetime import datetime
from datetime import timedelta
import time
import re
import math
import cmd
# This following script aim to do experiments in hadoop.
# ###############################################################################################################
# global variables
# ###############################################################################################################
logger = open('./logger.out', 'w')
logger_e