- 论坛徽章:
- 0
|
我用subprocess执行shell hadoop 命令
commond = "hadoop fs -text /user/gosear/liwei/output/clusterCenter/clusterCenter* > /search/taoyongbo/clusterCenter"
sub = subprocess.Popen(commond , cwd=cwd, stdout=subprocess.PIPE,shell=True,bufsize=4096)
我想把控制台打印出hadoop 执行的过程log如下, 保留到文件里,该如何处理
16/06/28 13:58:27 INFO security.UserGroupInformation: Using the configured user name and password, user name is go2search
16/06/28 13:58:28 INFO hdfs.DFSClient: SMALL_BUFFER_SIZE is 512
16/06/28 13:58:30 INFO lzo.GPLNativeCodeLoader: Loaded native gpl library
16/06/28 13:58:30 INFO lzo.LzoCodec: Successfully loaded & initialized native-lzo library [hadoop-lzo rev 7041408c0d57cb3b6f51d004772ccf5073ecc95e] |
|