-
Notifications
You must be signed in to change notification settings - Fork 0
/
IApplication-htmlname.html
199 lines (146 loc) · 7.67 KB
/
IApplication-htmlname.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<!DOCTYPE html>
<html lang="en">
<head>
<title>IApplication文档解析</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
<link href="zsneoks.github.com/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="木大 Atom Feed" />
<link href="zsneoks.github.com/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="木大 RSS Feed" />
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<!--[if lte IE 7]>
<link rel="stylesheet" type="text/css" media="all" href="./css/ie.css"/>
<script src="./js/IE8.js" type="text/javascript"></script><![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" media="all" href="./css/ie6.css"/><![endif]-->
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href=".">木大 </a></h1>
<nav><ul>
<li class="active"><a href="./category/Ganga.html">Ganga</a></li>
<li ><a href="./category/linux.html">linux</a></li>
<li ><a href="./category/关于.html">关于</a></li>
<li ><a href="./category/测试.html">测试</a></li>
<li ><a href="./category/物理.html">物理</a></li>
</ul></nav>
</header><!-- /#banner -->
<section id="content" class="body">
<article>
<header>
<h1 class="entry-title">
<a href="IApplication-htmlname.html" rel="bookmark"
title="Permalink to IApplication文档解析">IApplication文档解析</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2012-06-25T00:00:00">
一 25 六月 2012
</abbr>
<address class="vcard author">
By <a class="url fn" href="./author/木大.html">木大</a>
</address>
<p>In <a href="./category/Ganga.html">Ganga</a>. </p>
<p>tags: <a href="./tag/ganga.html">ganga</a><a href="./tag/物理.html">物理</a></p>
</footer><!-- /.post-info -->
<p>类图如下:</p>
<p><img alt="Iapp类图" src="static/images/Iapp.png" title="Iapp类图" /></p>
<p>是所有app对象的基类。子类在GPI中给出程序逻辑并从功能上实现配置操作。app配置是作业提交的第一步。</p>
<p>实现配置方法的基本规则:</p>
<p>一般configure()和master_configure()方法会在作业提交的时候调用,所以原则上你</p>
<p>方法文档:</p>
<h3>1.master_configure(self)</h3>
<ul>
<li>配置app的共享(主要)方面。</li>
<li>调用一次,splitting情况下也会调用</li>
<li>返回元组(modified_flag, appconfig)
<ul>
<li> -appconfig(或appextra): 结构任意。由特定app运行时handler处理</li>
<li> -modified_flag: 如果configure()时对象self被改变了则为true</li>
</ul></li>
<li>如果方法未实现则忽略掉</li>
</ul>
<h3>2.config(self,master_aapconfig)</h3>
<ul>
<li>配置app的特定方面。与方法1有类似语义并且返回元组(modified_flag,appconfig).</li>
<li>具体子类必须实现,否则作业提交(submission)会失败。</li>
<li>参数master_configure是方法1的返回</li>
<li>splitting情况下每个子作业对象调用一次。即有多少子作业就会调用多少次。</li>
<li>无spliting情况下则会调用一次.</li>
<li>从Ganga4.0.x开始,方法1被忽略。</li>
</ul>
<h3>3.postprocess(self)</h3>
<ul>
<li>作业运行完后执行(即在报告作业状态为completed时)</li>
<li>默认未做任何事</li>
<li>可能抛出一个异常PostprocessStatusUpdate('faild').这种情况下作业状态是'failed'.但postprocess_failed()钩子不被调用。</li>
</ul>
<h3>4.postprocess_failed(self)</h3>
<ul>
<li>如字义作业报告为失败时调用。默认未做事</li>
</ul>
<h3>5.transion_update(self,new_status)</h3>
<ul>
<li>在parent作业改变状态之前调用</li>
</ul>
</div><!-- /.entry-content -->
<div class="comments">
<h2>Comments !</h2>
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_identifier = "IApplication-htmlname.html";
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://zsneoks.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
</div>
</article>
</section>
<section id="extras" class="body">
<div class="blogroll">
<h2>blogroll</h2>
<ul>
<li><a href="http://docs.notmyidea.org/alexis/pelican/">Pelican</a></li>
<li><a href="http://python.org">Python.org</a></li>
<li><a href="http://jinja.pocoo.org">Jinja2</a></li>
</ul>
</div><!-- /.blogroll -->
<div class="social">
<h2>social</h2>
<ul>
<li><a href="zsneoks.github.com/feeds/all.atom.xml" type="application/atom+xml" rel="alternate">atom feed</a></li>
<li><a href="zsneoks.github.com/feeds/all.rss.xml" type="application/rss+xml" rel="alternate">rss feed</a></li>
<li><a href="http://twitter.com/zsneoks">twitter</a></li>
<li><a href="http://lastfm.com/user/zsneoks">lastfm</a></li>
<li><a href="http://github.com/zsneoks">github</a></li>
</ul>
</div><!-- /.social -->
</section><!-- /#extras -->
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://pelican.notmyidea.org/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
</address><!-- /#about -->
<p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
</footer><!-- /#contentinfo -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-32881388-1");
pageTracker._trackPageview();
} catch(err) {}</script>
<script type="text/javascript">
var disqus_shortname = 'zsneoks';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
</body>
</html>