解释这句代码jd = get_details(item['jobId'],item['jobHref']) if jd: dct['jd'] = jd else: time.sleep(5) jd = get_details(item['jobId'],item['jobHref']) dct['jd'] = jd
时间: 2023-06-04 10:07:05 浏览: 52
这段代码的意思是首先调用函数 get_details() 来获取指定工作职位的详细信息,如果获取成功,则将获取到的信息存储在 dct['jd'] 中;否则等待 5 秒后再次尝试获取,如果还是获取失败,则 dct['jd'] 的值为 None。
相关问题
class GetKmers: def __init__(self, out_dir, kmer, job_id, chr_dir, chromsize_path, idx_path): """Creates all the possible k-mers for part of the genome. Used a referece file to find the appropriate chromosome, start and end position. Passes through the fasta file of the chromosome and generates all of the possible k-mers. Args: :param out_dir: Directory for saving <chrom>.<jobid>.kmer.gz files :param str kmer: k-mer string such as 'k24' :param int job_id: Reference ID used for finding chrom, start and end :param chr_dir: Path to directory with chromosome fasta files :param chromsize_path: Path to 2 column file of chrom\tsize\n :param idx_path: Path to 4 column file of index\tchrom\tst\tend\n :returns: An object with methods such as get_step_fasta(), get_seq_ar(), write_kmers() and write_regions(). :raises ValueError: if expected chromosome path does not exist """ self.out_dir = out_dir self.kmer = kmer self.job_id = job_id self.chromsize_path = chromsize_path self.chr_dir = chr_dir self.idx_path = idx_path self.chrom, self.start, self.end = self.get_region() self.chrom_path = "{}/{}.fasta".format( self.chr_dir, self.chrom) if not os.path.exists(self.chrom_path): raise ValueError( "{} does not exist".format(self.chrom_path)) elif not os.path.exists(self.idx_path): raise ValueError( "{} does not exist".format(self.idx_path))分析这段代码的作用
这段代码定义了一个名为 GetKmers 的类,用于创建基因组局部区域的所有可能的 k-mer,通过参考文件查找适当的染色体,开始和结束位置。该类具有获取步骤 fasta 文件、获取序列数组、写入 k-mer 和写入区域等方法。其中,参数包括输出文件夹、k-mer 字符串、参考 ID、染色体 fasta 文件夹路径、染色体大小文件路径和索引文件路径等。如果预期的染色体路径或索引文件路径不存在,将引发 ValueError 异常。
#取消任务: jobId【请注意,取消应用程序集群上的作业将停止该集群。】 flink cancel -t yarn-application - Dyarn.application.id=application_1666689812613_0003。。。怎么理解。。。
这个命令是用来取消在YARN应用程序集群上运行的Flink作业。其中,`-t`参数表示指定应用程序集群类型为`yarn-application`,`-Dyarn.application.id`参数则表示指定要取消的应用程序在YARN应用程序集群中的ID为`application_1666689812613_0003`。
需要注意的是,取消该作业将会停止该集群中的所有正在运行的任务,因此请谨慎操作。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)