# need to make sure we're running in a folder where we have write permissions, # otherwise we won't be able to write the manifest file os.chdir('/mnt/src/cronjobs/') exclist = [] daylist = [] loglist = [] for line in sys.stdin: if len(line.strip().split('\t')) < 3: continue (excCode, logType, dayCode) = line.strip().split('\t') #print "Syncing %s %s %s" % (excCode, logType, dayCode) exclist.append(SynchUtil.getCheckExcList(excCode)[0]) loglist.append(SynchUtil.getCheckLogList(logType)[0]) daylist.append(SynchUtil.getCheckDayList(dayCode)[0]) idxlist = [] for i in range(len(exclist)): print "Syncing %s %s %s" % (exclist[i], loglist[i], daylist[i]) ConcatLzoSynch.runLogSync(exclist[i], loglist[i], daylist[i]) idxlist.add(SynchUtil.getHdfsPath(exclist[i], loglist[i], daylist[i])) for toidx in idxlist: ConcatLzoSynch.runIndexer(toidx)
# need to make sure we're running in a folder where we have write permissions, # otherwise we won't be able to write the manifest file os.chdir('/local/src/cronjobs/') exclist = SynchUtil.getCheckExcList(sys.argv[1]) loglist = SynchUtil.getCheckLogList(sys.argv[2]) daylist = SynchUtil.getCheckDayList(sys.argv[3]) idxlist = [] for onex in exclist: for logtype in loglist: for daycode in daylist: # This is now done by Java code ##if not SynchUtil.nfsFilesExist(onex, logtype, daycode): # print "No NFS files for %s %s %s" % (onex, logtype, daycode) # continue print "Running ConcatLogSynch for %s %s %s" % (onex, logtype, daycode) runLogSync(onex, logtype, daycode) idxlist.append(SynchUtil.getHdfsPath(onex, logtype, daycode)) for toidx in idxlist: pass #RunIndexer.runIndexer(toidx)
exclist = [] daylist = [] loglist = [] for line in sys.stdin: if len(line.strip().split('\t')) < 3: continue (excCode, logType, dayCode) = line.strip().split('\t') #print "Syncing %s %s %s" % (excCode, logType, dayCode) exclist.append(SynchUtil.getCheckExcList(excCode)[0]) loglist.append(SynchUtil.getCheckLogList(logType)[0]) daylist.append(SynchUtil.getCheckDayList(dayCode)[0]) idxlist = [] for i in range(len(exclist)): print "Syncing %s %s %s" % (exclist[i], loglist[i], daylist[i]) ConcatLzoSynch.runLogSync(exclist[i], loglist[i], daylist[i]) idxlist.add(SynchUtil.getHdfsPath(exclist[i], loglist[i], daylist[i])) for toidx in idxlist: ConcatLzoSynch.runIndexer(toidx)
sys.exit(1) # need to make sure we're running in a folder where we have write permissions, # otherwise we won't be able to write the manifest file os.chdir('/local/src/cronjobs/') exclist = SynchUtil.getCheckExcList(sys.argv[1]) loglist = SynchUtil.getCheckLogList(sys.argv[2]) daylist = SynchUtil.getCheckDayList(sys.argv[3]) idxlist = [] for onex in exclist: for logtype in loglist: for daycode in daylist: # This is now done by Java code ##if not SynchUtil.nfsFilesExist(onex, logtype, daycode): # print "No NFS files for %s %s %s" % (onex, logtype, daycode) # continue print "Running ConcatLogSynch for %s %s %s" % (onex, logtype, daycode) runLogSync(onex, logtype, daycode) idxlist.append(SynchUtil.getHdfsPath(onex, logtype, daycode)) for toidx in idxlist: pass #RunIndexer.runIndexer(toidx)