本文整理汇总了Python中pythonFrame.myUtils.Util.Util.file_mkdirs方法的典型用法代码示例。如果您正苦于以下问题:Python Util.file_mkdirs方法的具体用法?Python Util.file_mkdirs怎么用?Python Util.file_mkdirs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pythonFrame.myUtils.Util.Util
的用法示例。
在下文中一共展示了Util.file_mkdirs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: hive_shell_exe
# 需要导入模块: from pythonFrame.myUtils.Util import Util [as 别名]
# 或者: from pythonFrame.myUtils.Util.Util import file_mkdirs [as 别名]
def hive_shell_exe(self, sql, log_path):
Util.file_mkdirs(os.path.dirname(log_path))
exec_sql = 'touch %s' % log_path
os.popen(exec_sql)
exec_sql = str('$HIVE_HOME/bin/hive -S -e "%s" > %s' % (sql, log_path))
os.popen(exec_sql)
self.q.put_singal(log_path[os.path.dirname(log_path).__len__()+1:])
示例2: ReportMysql
# 需要导入模块: from pythonFrame.myUtils.Util import Util [as 别名]
# 或者: from pythonFrame.myUtils.Util.Util import file_mkdirs [as 别名]
donateMysql = ReportMysql(ReportMysql.conn_donate_params,q=myQueue)
reportOracle = ReportOracle(myQueue,conn_report_params=ReportOracle.conn_oracle_params)
#reportMysql = ReportMysql(ReportMysql.conn_space_params)
reportMysql = ReportMysql(ReportMysql.conn_formal_params)
if cmp(sys.argv[1], '-Dsave') == 0:
mydate = Util.get_yesterday()
if len(sys.argv) == 3:
mydate = sys.argv[2]
reportOracle.__setattr__("mydate",MyDate(mydate))
donateMysql.__setattr__("mydate",MyDate(mydate))
reportMysql.__setattr__("mydate",MyDate(mydate))
base_log = base_log+ "/" + mydate + "/"
Util.file_mkdirs(os.path.dirname(base_log))
log = Log(base_log+"/stdout.log")
log.begin_log()
hiveQuery = HiveQuery(base_log,myQueue,dt=mydate)
jobs_size = constants.myContants.keys().__len__() + 1
myThread = MyThread(myQueue,constants,jobs_size,monitor,base_log,reportMysql)
myThread.start()
donateMysql.query_all_donate(base_log + "MysqlDonate")
reportOracle.write_rows_file(base_log + "OracleAd")
hiveQuery.query_hive()
myThread.sub_job_join()
fileWrite.checkpoint_save(base_log+"checkpoint.log",copy.deepcopy(monitor))