CT_Comm_Line_DFU.xml 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
  4. <book>
  5. <bookinfo>
  6. <title>Client Tools Overview</title>
  7. <author>
  8. <firstname>Boca Raton</firstname>
  9. <surname>Documentation Team</surname>
  10. <affiliation>
  11. <orgname>Lexis Nexis</orgname>
  12. </affiliation>
  13. </author>
  14. <pubdate>Sept. 2011</pubdate>
  15. </bookinfo>
  16. <chapter id="Command_Line_DFU">
  17. <title><emphasis role="bold">Command Line DFU</emphasis></title>
  18. <sect1 id="Command_Line_InterfaceDFU" role="nobrk">
  19. <title>Command Line Interface</title>
  20. <sect2 id="DFUPlusexe">
  21. <title><emphasis>dfuplus.exe</emphasis></title>
  22. <para><emphasis role="bold">dfuplus </emphasis><emphasis>
  23. </emphasis><emphasis role="bold">action=</emphasis><emphasis>operation
  24. </emphasis><emphasis role="bold">[</emphasis><emphasis> @filename
  25. </emphasis><emphasis role="bold">| </emphasis><emphasis>options
  26. </emphasis><emphasis role="bold">]</emphasis></para>
  27. <informaltable colsep="0" frame="none" rowsep="0">
  28. <tgroup cols="2">
  29. <colspec align="left" colwidth="85.40pt" />
  30. <colspec />
  31. <tbody>
  32. <row>
  33. <entry><emphasis>operation</emphasis></entry>
  34. <entry>One of the following actions: spray, despray, copy,
  35. remove, rename, list, add, addsuper, removesuper, listsuper,
  36. savexml, status, abort, resubmit, monitor</entry>
  37. </row>
  38. <row>
  39. <entry><emphasis>@filename</emphasis></entry>
  40. <entry>Optional. The name of a file containing necessary
  41. <emphasis>options</emphasis>. If omitted and no command line
  42. <emphasis>options</emphasis> are specified, the appropriate
  43. <emphasis>options</emphasis> must be in the dfuplus.ini
  44. file.</entry>
  45. </row>
  46. <row>
  47. <entry><emphasis>options</emphasis></entry>
  48. <entry>Optional. A space-delimited list of optional items
  49. (listed below) appropriate to the
  50. <emphasis>operation</emphasis> being executed. If omitted and
  51. no <emphasis>@filename</emphasis> is specified, the
  52. appropriate <emphasis>options</emphasis> must be in the
  53. dfuplus.ini file.</entry>
  54. </row>
  55. </tbody>
  56. </tgroup>
  57. </informaltable>
  58. <para>The <emphasis role="bold">dfuplus.exe</emphasis> application
  59. accepts command line parameters to send to the Distributed File
  60. Utility (DFU) engine via the ESP server. These
  61. <emphasis>options</emphasis> can be specified on the command line, in
  62. the <emphasis>@filename</emphasis>, in the dfuplus.ini file, or any
  63. combination. Command line <emphasis>options</emphasis> override any in
  64. the nominated <emphasis>@filename</emphasis>, which in turn override
  65. any in the dfuplus.ini file.</para>
  66. <sect3>
  67. <title>General Options:</title>
  68. <para>The following <emphasis>options </emphasis>are common to every
  69. <emphasis>operation</emphasis>:</para>
  70. <informaltable colsep="0" frame="none" rowsep="0">
  71. <tgroup cols="2">
  72. <colspec align="left" colwidth="125.40pt" />
  73. <colspec />
  74. <tbody>
  75. <row>
  76. <entry><emphasis>server</emphasis></entry>
  77. <entry>The URL (http:// or https://) and/or IP address of
  78. the ESP server. The port may also be included.</entry>
  79. </row>
  80. <row>
  81. <entry><emphasis>username</emphasis></entry>
  82. <entry>A userid with authorized access to the
  83. <emphasis>server</emphasis>.</entry>
  84. </row>
  85. <row>
  86. <entry><emphasis>password</emphasis></entry>
  87. <entry>The password authorizing access for the
  88. <emphasis>username</emphasis>.</entry>
  89. </row>
  90. <row>
  91. <entry><emphasis>overwrite</emphasis></entry>
  92. <entry>Optional. A boolean flag (0 | 1) indicating whether
  93. to overwrite any existing file of the same name. If omitted,
  94. the default is 0.</entry>
  95. </row>
  96. <row>
  97. <entry><emphasis>replicate</emphasis></entry>
  98. <entry><para>Optional. A boolean flag (1 | 0) indicating
  99. whether to replicate the file. If omitted, the default is
  100. 1.</para><para><emphasis role="bold">This option is only
  101. available on systems where replication has been
  102. enabled.</emphasis></para></entry>
  103. </row>
  104. <row>
  105. <entry><emphasis>autorecover</emphasis></entry>
  106. <entry>Optional. The number of times to attempt recovery of
  107. a failed <emphasis>operation</emphasis>. If omitted, the
  108. default is 0.</entry>
  109. </row>
  110. <row>
  111. <entry><emphasis><emphasis>nowait</emphasis></emphasis></entry>
  112. <entry>Optional. A boolean flag (0 | 1) indicating whether
  113. to return immediately without waiting for completion of the
  114. <emphasis>operation</emphasis>. If omitted, the default is
  115. 0.</entry>
  116. </row>
  117. <row>
  118. <entry><emphasis><emphasis>connect</emphasis></emphasis></entry>
  119. <entry>Optional. The number of simultaneous connections to
  120. limit the <emphasis>operation </emphasis>to. If omitted, the
  121. default is 25.</entry>
  122. </row>
  123. <row>
  124. <entry><emphasis><emphasis>throttle</emphasis></emphasis></entry>
  125. <entry>Optional. The transfer speed (in Mbits/second) to
  126. restrict the <emphasis>operation</emphasis> to. If omitted,
  127. the default is the best system speed in Linux and
  128. multiple-destination Windows, or the NIC speed of a
  129. single-destination Windows box.</entry>
  130. </row>
  131. <row>
  132. <entry><emphasis><emphasis><emphasis>norecover</emphasis>
  133. </emphasis></emphasis></entry>
  134. <entry>Optional. A boolean flag (0 | 1) indicating whether
  135. to create or recover the <emphasis>operation</emphasis> from
  136. recovery information. If omitted, the default is 0.</entry>
  137. </row>
  138. <row>
  139. <entry><emphasis><emphasis><emphasis>nosplit</emphasis>
  140. </emphasis></emphasis></entry>
  141. <entry>Optional. A boolean flag (0 | 1) indicating whether
  142. to split file parts to multiple target parts. If omitted,
  143. the default is 0.</entry>
  144. </row>
  145. <row>
  146. <entry>compress</entry>
  147. <entry>Optional. A boolean flag (0 | 1) indicating whether
  148. to compress the target file.</entry>
  149. </row>
  150. <row>
  151. <entry>push</entry>
  152. <entry>Optional. A boolean flag (0 | 1) indicating whether
  153. to override push/pull default.</entry>
  154. </row>
  155. <row>
  156. <entry>encrypt=&lt;password&gt;</entry>
  157. <entry>Optional. Specifies to encrypt the target filename
  158. using the supplied password.</entry>
  159. </row>
  160. <row>
  161. <entry>decrypt=&lt;password&gt;</entry>
  162. <entry>Optional. Specifies to decrypt the source filename
  163. using the supplied password.</entry>
  164. </row>
  165. <row>
  166. <entry>jobname=&lt;jobname&gt;</entry>
  167. <entry>Specify a jobname for the DFU operation's
  168. workunit.</entry>
  169. </row>
  170. <row>
  171. <entry>transferbuffersize=nnn</entry>
  172. <entry>Optional. Overrides the DFU Server's buffer size
  173. value (default is 64k)</entry>
  174. </row>
  175. </tbody>
  176. </tgroup>
  177. </informaltable>
  178. </sect3>
  179. <?hard-pagebreak ?>
  180. <sect3>
  181. <title>dfuplus.ini</title>
  182. <para>Any <emphasis>options</emphasis> can be specified in a file
  183. called dfuplus.ini. If your operating system is case-sensitive, make
  184. sure the filename is in lowercase. Options that rarely change can be
  185. put in the dfuplus.ini file. For example:</para>
  186. <programlisting>server=http://10.150.50.12:8010
  187. username=rlor
  188. password=password
  189. overwrite=1
  190. replicate=1</programlisting>
  191. <para>In all the examples below, we'll assume dfuplus.ini has the
  192. above content.</para>
  193. <para><informaltable colsep="1" frame="all" rowsep="0">
  194. <tgroup cols="2">
  195. <colspec colwidth="49.50pt" />
  196. <colspec />
  197. <tbody>
  198. <row>
  199. <entry><graphic fileref="../../images/caution.png"
  200. scale="noin" /></entry>
  201. <entry>We do not recommend storing your password in the
  202. ini file (which is clear text). The password is included
  203. in the ini file for these examples to simplify the example
  204. code.</entry>
  205. </row>
  206. </tbody>
  207. </tgroup>
  208. </informaltable></para>
  209. </sect3>
  210. <sect3>
  211. <title>Spray Operations:</title>
  212. <para>The <emphasis role="bold">spray</emphasis>
  213. <emphasis>operation</emphasis> copies a file from the landing zone,
  214. distributing it across all the nodes of the destination HPCC.</para>
  215. <para>These <emphasis>options </emphasis>are used by the <emphasis
  216. role="bold">spray</emphasis> <emphasis>operation</emphasis>:</para>
  217. <para><informaltable colsep="0" frame="none" rowsep="0">
  218. <tgroup cols="2">
  219. <colspec align="left" colwidth="122.50pt" />
  220. <colspec />
  221. <tbody>
  222. <row>
  223. <entry>srcip</entry>
  224. <entry>Optional. The IP address of the source machine. If
  225. omitted, the information must be supplied by the
  226. <emphasis>srcxml</emphasis> parameter.</entry>
  227. </row>
  228. <row>
  229. <entry>srcfile</entry>
  230. <entry>Optional. The path to the source file. This may
  231. contain wildcard characters (* and ?) to include multiple
  232. source files in the spray to a single
  233. <emphasis>dstname</emphasis>. If omitted, the information
  234. must be supplied by the <emphasis>srcxml</emphasis>
  235. parameter.</entry>
  236. </row>
  237. <row>
  238. <entry>srcxml</entry>
  239. <entry>The name of the XML file containing the information
  240. required for the <emphasis>srcip</emphasis> and
  241. <emphasis>srcfile</emphasis> parameters. This file may
  242. have been obtained by previous use of the savexml
  243. <emphasis>operation</emphasis>. This option provides the
  244. feature of combining multiple source files into a single
  245. resulting logical file in the HPCC.</entry>
  246. </row>
  247. <row>
  248. <entry>dstname</entry>
  249. <entry>The logical name of the destination file.</entry>
  250. </row>
  251. <row>
  252. <entry>dstcluster</entry>
  253. <entry>The name of the destination cluster.</entry>
  254. </row>
  255. <row>
  256. <entry>prefix</entry>
  257. <entry>Optional. Both of the following (separated by a
  258. comma):</entry>
  259. </row>
  260. <row>
  261. <entry><emphasis
  262. role="bold">filename{:</emphasis><emphasis>length</emphasis><emphasis
  263. role="bold">}</emphasis></entry>
  264. <entry>Prepends the filename (optionally limited to
  265. <emphasis>length</emphasis> characters) to the
  266. data.</entry>
  267. </row>
  268. <row>
  269. <entry><emphasis
  270. role="bold">filesize{:[B|L][1-8]}</emphasis></entry>
  271. <entry>Prepends the size of the file to the data.
  272. Optionally, you can specify the format of that integer
  273. (<emphasis role="bold">B</emphasis> specifies big endian,
  274. <emphasis role="bold">L</emphasis> specifies little
  275. endian) and the size of integer to contain it (<emphasis
  276. role="bold">1</emphasis> to <emphasis
  277. role="bold">8</emphasis> bytes). If format and size are
  278. omitted, the default is L4.</entry>
  279. </row>
  280. <row>
  281. <entry><emphasis>format</emphasis></entry>
  282. <entry>Optional. One of the following values: <emphasis
  283. role="bold">fixed csv delimited xml recfmv
  284. recfmb</emphasis> If omitted, the default is
  285. fixed.</entry>
  286. </row>
  287. <row>
  288. <entry><emphasis role="bold">fixed</emphasis>
  289. <emphasis>format</emphasis> options:</entry>
  290. </row>
  291. <row>
  292. <entry><emphasis>recordsize</emphasis></entry>
  293. <entry>The fixed size of each record, in bytes.</entry>
  294. </row>
  295. <row>
  296. <entry><emphasis role="bold">csv/delimited</emphasis>
  297. <emphasis>format </emphasis>options:</entry>
  298. </row>
  299. <row>
  300. <entry><emphasis>encoding</emphasis></entry>
  301. <entry>Optional. One of the following: ascii, utf8, utf8n,
  302. utf16, utf16le, utf16be, utf32, utf32le, utf32be ; If
  303. omitted, the default is ascii.</entry>
  304. </row>
  305. <row>
  306. <entry><emphasis>maxrecordsize</emphasis></entry>
  307. <entry>Optional. The maximum size of each record, in
  308. bytes. If omitted, the default is 8192.</entry>
  309. </row>
  310. <row>
  311. <entry><emphasis>separator</emphasis></entry>
  312. <entry>Optional. The field delimiter. If omitted, the
  313. default is a comma (\,).</entry>
  314. </row>
  315. <row>
  316. <entry><emphasis>terminator</emphasis></entry>
  317. <entry>Optional. The record delimiter. If omitted, the
  318. default is line feed or carriage return line feed
  319. (\r,\r\n).</entry>
  320. </row>
  321. <row>
  322. <entry><emphasis>quote</emphasis></entry>
  323. <entry>Optional. The string quote character. If omitted,
  324. the default is single quote (’).</entry>
  325. </row>
  326. <row>
  327. <entry><emphasis role="bold">xml</emphasis>
  328. <emphasis>format </emphasis>options:</entry>
  329. </row>
  330. <row>
  331. <entry><emphasis>rowtag</emphasis></entry>
  332. <entry>The XML tag identifying each record.</entry>
  333. </row>
  334. <row>
  335. <entry><emphasis>encoding</emphasis></entry>
  336. <entry>Optional. One of the following: utf8 utf8n utf16
  337. utf16le utf16be utf32 utf32le utf32beIf omitted, the
  338. default is utf8.</entry>
  339. </row>
  340. <row>
  341. <entry><emphasis>maxrecordsize</emphasis></entry>
  342. <entry>Optional. The maximum size of each record, in
  343. bytes. If omitted, the default is 8192.</entry>
  344. </row>
  345. </tbody>
  346. </tgroup>
  347. </informaltable></para>
  348. <para>Examples:</para>
  349. <programlisting>//fixed spray example:
  350. dfuplus action=spray srcip=10.150.50.14
  351. srcfile=c:\import\timezones.txt dstname=RTTEMP::timezones.txt
  352. dstcluster=thor format=fixed recordsize=155
  353. //fixed spray example using a srcxml file:
  354. dfuplus action=spray srcxml=c:\import\flattimezones.xml
  355. dstname=RTTEMP::timezones.txt dstcluster=thor recordsize=155
  356. //csv spray example:
  357. dfuplus action=spray srcip=10.150.50.14
  358. srcfile=c:\import\timezones.csv dstname=RTTEMP::timezones.csv
  359. dstcluster=thor format=csv
  360. //the spray.xml file contains:
  361. &lt;File directory="c:\import\"
  362. group="thor"
  363. modified="2004-04-27T14:58:38"
  364. name="zip"
  365. numparts="2"
  366. partmask="zip._$P$_of_$N$"&gt;
  367. &lt;Attr job="zip1"
  368. owner="rtaylor"
  369. recordSize="5"
  370. replicated="1"
  371. workunit="D20040427-111857"/&gt;
  372. &lt;Part modified="2004-04-27T14:58:40"
  373. node="10.150.51.29"
  374. num="1"
  375. size="165"/&gt;
  376. &lt;Part modified="2004-04-27T14:58:40"
  377. node="10.150.51.29"
  378. num="2"
  379. size="165"/&gt;
  380. &lt;/File&gt;
  381. //fixed spray example using the above spray.xml file to
  382. combine
  383. // multiple source files into a single logical file
  384. // in this case, zip._1_of_3, zip._2_of_3, and zip._3_of_3
  385. into zip1:
  386. dfuplus action=spray srcxml=spray.xml
  387. dstcluster=thordstname=RTTEMP::myzip1 recordsize=5
  388. //xml spray example:
  389. dfuplus action=spray srcip=10.150.50.14
  390. srcfile=c:\import\timezones.xml dstname=RTTEMP::timezones.xml
  391. dstcluster=thor format=xml rowtag=area
  392. //Multiple spray all .JPG and .BMP files under
  393. // c:\import on 10.150.51.26 to single logical file
  394. LE::imagedb:
  395. dfuplus action=spray srcip=10.150.51.26
  396. srcfile=c:\import\*.jpg,c:\import\*.bmp
  397. dstcluster=le_thor dstname=LE::imagedb overwrite=1
  398. prefix=FILENAME,FILESIZE nosplit=1
  399. //this would result in a RECORD structure like this:
  400. imageRecord := RECORD
  401. STRING filename;
  402. DATA image; //first 4 bytes contain the length of the image data
  403. END;</programlisting>
  404. </sect3>
  405. <sect3>
  406. <title>Despray Operations:</title>
  407. <para>The <emphasis role="bold">despray</emphasis>
  408. <emphasis>operation</emphasis> combines file parts from all the
  409. nodes of the cluster into a single file on the landing zone.</para>
  410. <para>These <emphasis>options </emphasis>are used by the <emphasis
  411. role="bold">despray</emphasis> operation:</para>
  412. <informaltable colsep="0" frame="none" rowsep="0">
  413. <tgroup cols="2">
  414. <colspec align="left" colwidth="122.50pt" />
  415. <colspec />
  416. <tbody>
  417. <row>
  418. <entry><emphasis>srcname</emphasis></entry>
  419. <entry>The logical name of the source file. This may contain
  420. wildcard characters (* and ?) to include multiple source
  421. files in the despray to a single
  422. <emphasis>dstfile</emphasis>.</entry>
  423. </row>
  424. <row>
  425. <entry><emphasis>dstip</emphasis></entry>
  426. <entry>Optional. The IP address of the destination machine.
  427. If omitted, the information must be supplied by the
  428. <emphasis>dstxml</emphasis> parameter.</entry>
  429. </row>
  430. <row>
  431. <entry><emphasis>dstfile</emphasis></entry>
  432. <entry>Optional. The path to the destination file. This may
  433. contain wildcard characters (* and ?) to despray a single
  434. <emphasis>srcname</emphasis>to multiple
  435. <emphasis>dstfiles</emphasis>. If omitted, the information
  436. must be supplied by the <emphasis>dstxml</emphasis>
  437. parameter.</entry>
  438. </row>
  439. <row>
  440. <entry><emphasis>dstxml</emphasis></entry>
  441. <entry>The name of the XML file containing the information
  442. required for the <emphasis>dstip</emphasis> and
  443. <emphasis>dstfile</emphasis> parameters. This file may have
  444. been obtained by previous use of the savexml
  445. <emphasis>operation</emphasis>. This option provides the
  446. feature of splitting a single resulting logical file in the
  447. cluster into multiple destination files.</entry>
  448. </row>
  449. <row>
  450. <entry><emphasis>splitprefix</emphasis></entry>
  451. <entry>Optional. Both of the following (separated by a
  452. comma):</entry>
  453. </row>
  454. <row>
  455. <entry><emphasis
  456. role="bold">filename{:</emphasis><emphasis>length</emphasis><emphasis
  457. role="bold">}</emphasis></entry>
  458. <entry>Uses the prepended filename (see the
  459. <emphasis>prefix</emphasis> option to the spray
  460. <emphasis>operation</emphasis>) to split out the data into
  461. separate files.</entry>
  462. </row>
  463. <row>
  464. <entry><emphasis
  465. role="bold">filesize{:[B|L][1-8]}</emphasis></entry>
  466. <entry>Uses the prepended size of the file (see the
  467. <emphasis>prefix</emphasis> option to the spray
  468. <emphasis>operation</emphasis>) to split out the data into
  469. separate files.</entry>
  470. </row>
  471. </tbody>
  472. </tgroup>
  473. </informaltable>
  474. <para>Examples:</para>
  475. <programlisting>dfuplus action=despray dstip=10.150.50.14
  476. dstfile=c:\import\despray\timezones.txt srcname=RTTEMP::timezones.txt
  477. //the spray.xml file contains:
  478. &lt;File directory="c:\import\"
  479. group="thor"
  480. modified="2004-04-27T14:58:38"
  481. name="zip"
  482. numparts="2"
  483. partmask="zip._$P$_of_$N$"&gt;
  484. &lt;Attr job="zip1"
  485. owner="rtaylor"
  486. recordSize="5"
  487. replicated="1"
  488. workunit="D20040427-111857"/&gt;
  489. &lt;Part modified="2004-04-27T14:58:40"
  490. node="10.150.51.29"
  491. num="1"
  492. size="165"/&gt;
  493. &lt;Part modified="2004-04-27T14:58:40"
  494. node="10.150.51.29"
  495. num="2"
  496. size="165"/&gt;
  497. &lt;/File&gt;
  498. //despray example using the above spray.xml file to split a single
  499. // logical file into multiple destination files
  500. // in this case, zip._1_of_3, zip._2_of_3, and zip._3_of_3 from zip1:
  501. dfuplus action=despray dstxml=spray.xml dstcluster=thor
  502. srcname=RTTEMP::myzip1
  503. //from a RECORD structure that looks like this:
  504. imageRecord := RECORD
  505. STRING filename;
  506. DATA image; //first 4 bytes contain the length of the image data
  507. END;
  508. //you can despray into its component files like this:
  509. dfuplus action=dspray srcname=le::imagedb
  510. dstip=10.150.51.26 dstfile=c:\export\
  511. splitprefix=FILENAME,FILESIZE
  512. </programlisting>
  513. </sect3>
  514. <sect3>
  515. <title>Copy Operations:</title>
  516. <para>The <emphasis role="bold">copy</emphasis>
  517. <emphasis>operation</emphasis> copies a logical file (all file parts
  518. from all the nodes of the cluster), typically from one cluster to
  519. another. It appropriately handles re-distributing the file parts if
  520. the source and destination clusters do not have the same number of
  521. nodes. It may also be used to copy files from other HPCC
  522. environments (using the <emphasis>srcdali</emphasis> option).</para>
  523. <para>These <emphasis>options </emphasis>are used by the <emphasis
  524. role="bold">copy</emphasis> <emphasis>operation</emphasis>:</para>
  525. <informaltable colsep="0" frame="none" rowsep="0">
  526. <tgroup cols="2">
  527. <colspec align="left" colwidth="122.40pt" />
  528. <colspec />
  529. <tbody>
  530. <row>
  531. <entry><emphasis><emphasis>srcname</emphasis></emphasis></entry>
  532. <entry>The logical name of the source file.</entry>
  533. </row>
  534. <row>
  535. <entry><emphasis>dstname</emphasis></entry>
  536. <entry>The logical name of the destination file.</entry>
  537. </row>
  538. <row>
  539. <entry><emphasis><emphasis>dstcluster</emphasis>
  540. </emphasis></entry>
  541. <entry>The name of the destination cluster.</entry>
  542. </row>
  543. <row>
  544. <entry><emphasis><emphasis>srcdali</emphasis></emphasis></entry>
  545. <entry>Optional. The IP address of the source Dali server,
  546. if different from the destination Dali (associated with the
  547. ESP Server specified in the <emphasis>server</emphasis>
  548. option).</entry>
  549. </row>
  550. <row>
  551. <entry><emphasis>srcusername</emphasis></entry>
  552. <entry>Optional. The username to use to access the
  553. <emphasis>srcdali</emphasis>. If omitted, the General
  554. Options <emphasis>username</emphasis> is used.</entry>
  555. </row>
  556. <row>
  557. <entry><emphasis><emphasis>srcpassword</emphasis>
  558. </emphasis></entry>
  559. <entry>Optional. The password to use to access the
  560. <emphasis>srcdali</emphasis>. If omitted, the General
  561. Options <emphasis>password</emphasis> is used.</entry>
  562. </row>
  563. </tbody>
  564. </tgroup>
  565. </informaltable>
  566. <para>Example:</para>
  567. <programlisting>dfuplus action=copy srcname=RTTEMP::timezones.txt
  568. dstname=srcname=RTTEMP::COPY::timezones.txt dstcluster=thor</programlisting>
  569. </sect3>
  570. <sect3>
  571. <title>Remove Operations:</title>
  572. <para>The <emphasis role="bold">remove</emphasis> operation deletes
  573. a logical file from the system data store, optionally leavingthe
  574. physical files in place.</para>
  575. <para>These <emphasis>options </emphasis>are used by the <emphasis
  576. role="bold">remove</emphasis> <emphasis>operation</emphasis>:</para>
  577. <para><informaltable colsep="0" frame="none" rowsep="0">
  578. <tgroup cols="2">
  579. <colspec align="left" colwidth="122.40pt" />
  580. <colspec />
  581. <tbody>
  582. <row>
  583. <entry><emphasis><emphasis><emphasis>name</emphasis></emphasis></emphasis></entry>
  584. <entry>The logical name of the file to remove.</entry>
  585. </row>
  586. </tbody>
  587. </tgroup>
  588. </informaltable> Example:</para>
  589. <programlisting>dfuplus action=remove name=RTTEMP::timezones.txt</programlisting>
  590. <para></para>
  591. </sect3>
  592. <sect3>
  593. <title>Rename Operations:</title>
  594. <para>The <emphasis role="bold">rename</emphasis> operation renames
  595. a logical file in the system data store.</para>
  596. <para>These <emphasis>options </emphasis>are used by the <emphasis
  597. role="bold">rename</emphasis> <emphasis>operation</emphasis>:</para>
  598. <informaltable colsep="0" frame="none" rowsep="0">
  599. <tgroup cols="2">
  600. <colspec align="left" colwidth="122.40pt" />
  601. <colspec />
  602. <tbody>
  603. <row>
  604. <entry><emphasis><emphasis><emphasis><emphasis>srcname</emphasis></emphasis></emphasis></emphasis></entry>
  605. <entry>The logical name of the source file.</entry>
  606. </row>
  607. <row>
  608. <entry><emphasis><emphasis>dstname</emphasis></emphasis></entry>
  609. <entry>The logical name of the destination file.</entry>
  610. </row>
  611. </tbody>
  612. </tgroup>
  613. </informaltable>
  614. <para>Example:</para>
  615. <programlisting>dfuplus action=rename srcname=RTTEMP::timezones.txt dstname=RTTEMP::NewTimezones.txt</programlisting>
  616. </sect3>
  617. <sect3>
  618. <title>List Operations:</title>
  619. <para>The <emphasis role="bold">list</emphasis> operation produces a
  620. list of logical files in the system data store.</para>
  621. <para>These <emphasis>options </emphasis>are used by the <emphasis
  622. role="bold">list</emphasis> <emphasis>operation</emphasis>:</para>
  623. <para><informaltable colsep="0" frame="none" rowsep="0">
  624. <tgroup cols="2">
  625. <colspec align="left" colwidth="122.40pt" />
  626. <colspec />
  627. <tbody>
  628. <row>
  629. <entry><emphasis><emphasis><emphasis><emphasis>name</emphasis></emphasis></emphasis></emphasis></entry>
  630. <entry>The mask defining the logical file names to
  631. list.</entry>
  632. </row>
  633. </tbody>
  634. </tgroup>
  635. </informaltable></para>
  636. <para>Example:</para>
  637. <programlisting>dfuplus action=list name=*</programlisting>
  638. </sect3>
  639. <sect3>
  640. <title>Add Operations:</title>
  641. <para>The <emphasis role="bold">add</emphasis> operation adds a new
  642. logical file to the system data store.</para>
  643. <para>These <emphasis>options </emphasis>are used by the <emphasis
  644. role="bold">add</emphasis> <emphasis>operation</emphasis>:</para>
  645. <para><informaltable colsep="0" frame="none" rowsep="0">
  646. <tgroup cols="2">
  647. <colspec colwidth="122.40pt" />
  648. <colspec />
  649. <tbody>
  650. <row>
  651. <entry><emphasis><emphasis><emphasis><emphasis><emphasis>srcxml</emphasis>
  652. </emphasis></emphasis></emphasis></emphasis></entry>
  653. <entry>The logical name of the source XML file map
  654. (typically from a previous savexml operation).</entry>
  655. </row>
  656. <row>
  657. <entry><emphasis><emphasis>dstname</emphasis></emphasis></entry>
  658. <entry>The logical name of the destination file.</entry>
  659. </row>
  660. </tbody>
  661. </tgroup>
  662. </informaltable></para>
  663. <para>These <emphasis>options </emphasis>are used by the <emphasis
  664. role="bold">add</emphasis> <emphasis>operation </emphasis>to add
  665. files from a remote Dali:</para>
  666. <informaltable colsep="0" frame="none" rowsep="0">
  667. <tgroup cols="2">
  668. <colspec align="left" colwidth="122.40pt" />
  669. <colspec />
  670. <tbody>
  671. <row>
  672. <entry><emphasis><emphasis>dstname</emphasis></emphasis></entry>
  673. <entry>The logical name of the destination file.</entry>
  674. </row>
  675. <row>
  676. <entry><emphasis>srcname</emphasis></entry>
  677. <entry>The logical name of the source file.</entry>
  678. </row>
  679. <row>
  680. <entry><emphasis><emphasis>srcdali</emphasis>
  681. </emphasis></entry>
  682. <entry>The IP address of the source Dali server.</entry>
  683. </row>
  684. <row>
  685. <entry><emphasis>srcusername</emphasis></entry>
  686. <entry>Optional. The username to use to access the
  687. <emphasis>srcdali</emphasis>. If omitted, the General
  688. Options <emphasis>username</emphasis> is used.</entry>
  689. </row>
  690. <row>
  691. <entry><emphasis><emphasis>srcpassword</emphasis>
  692. </emphasis></entry>
  693. <entry>Optional. The password to use to access the
  694. <emphasis>srcdali</emphasis>. If omitted, the General
  695. Options <emphasis>password</emphasis> is used.</entry>
  696. </row>
  697. </tbody>
  698. </tgroup>
  699. </informaltable>
  700. <para>Example:</para>
  701. <programlisting>dfuplus action=add srcxml=flattimezones.xml dstname=flattimezones.txt</programlisting>
  702. <para></para>
  703. </sect3>
  704. <sect3>
  705. <title>Addsuper Operations:</title>
  706. <para>The <emphasis role="bold">addsuper</emphasis> operation adds
  707. subfiles to an existing superfile (see the <emphasis>SuperFile
  708. Management </emphasis>section of the <emphasis>Service Library
  709. Reference</emphasis>).</para>
  710. <para>These <emphasis>options </emphasis>are used by the <emphasis
  711. role="bold">addsuper</emphasis>
  712. <emphasis>operation</emphasis>:</para>
  713. <informaltable colsep="0" frame="none" rowsep="0">
  714. <tgroup cols="2">
  715. <colspec align="left" colwidth="122.40pt" />
  716. <colspec />
  717. <tbody>
  718. <row>
  719. <entry><emphasis><emphasis><emphasis>superfile</emphasis>
  720. </emphasis></emphasis></entry>
  721. <entry>The logical name of the superfile.</entry>
  722. </row>
  723. <row>
  724. <entry><emphasis><emphasis>subfiles</emphasis></emphasis></entry>
  725. <entry>A comma-delimited list of the logical names of files
  726. to add to the superfile. There must be no spaces between the
  727. names.</entry>
  728. </row>
  729. <row>
  730. <entry><emphasis>before</emphasis></entry>
  731. <entry>Optional. The logical name of the subfile to follow
  732. the added <emphasis>subfiles</emphasis>. If omitted, the
  733. <emphasis>subfiles</emphasis> are added to the end.</entry>
  734. </row>
  735. </tbody>
  736. </tgroup>
  737. </informaltable>
  738. <para>Example:</para>
  739. <programlisting>dfuplus action=addsuper superfile=mysuper subfiles=file1,file2</programlisting>
  740. </sect3>
  741. <sect3>
  742. <title>Removesuper Operations:</title>
  743. <para>The <emphasis role="bold">removesuper</emphasis> operation
  744. removes subfiles to an existing superfile (see the
  745. <emphasis>SuperFile Management </emphasis>section of the
  746. <emphasis>Service Library Reference</emphasis>).</para>
  747. <para>These <emphasis>options </emphasis>are used by the <emphasis
  748. role="bold">removesuper</emphasis>
  749. <emphasis>operation</emphasis>:</para>
  750. <informaltable colsep="0" frame="none" rowsep="0">
  751. <tgroup cols="2">
  752. <colspec align="left" colwidth="122.40pt" />
  753. <colspec />
  754. <tbody>
  755. <row>
  756. <entry><emphasis><emphasis><emphasis>superfile</emphasis>
  757. </emphasis></emphasis></entry>
  758. <entry>The logical name of the superfile.</entry>
  759. </row>
  760. <row>
  761. <entry><emphasis><emphasis>subfiles</emphasis></emphasis></entry>
  762. <entry>Optional. A comma-delimited list of the logical names
  763. of files to remove from the superfile. There must be no
  764. spaces between the names. If omitted, all files are removed
  765. from the superfile.</entry>
  766. </row>
  767. <row>
  768. <entry><emphasis>delete</emphasis></entry>
  769. <entry>Optional. A boolean flag (1 | 0) indicating whether
  770. to physically delete the <emphasis>subfiles</emphasis> in
  771. addition to removing them from the superfile. If omitted,
  772. the default is 1—physically delete.</entry>
  773. </row>
  774. </tbody>
  775. </tgroup>
  776. </informaltable>
  777. <para>Example:</para>
  778. <programlisting>dfuplus action=removesuper superfile=mysuper subfiles=file1,file2</programlisting>
  779. </sect3>
  780. <sect3>
  781. <title>Listsuper Operations:</title>
  782. <para>The <emphasis role="bold">listsuper</emphasis> operation lists
  783. the subfiles in an existing superfile (see the <emphasis>SuperFile
  784. Management </emphasis>section of the <emphasis>Service Library
  785. Reference</emphasis>).</para>
  786. <para>These <emphasis>options </emphasis>are used by the <emphasis
  787. role="bold">listsuper</emphasis>
  788. <emphasis>operation</emphasis>:</para>
  789. <para><informaltable colsep="0" frame="none" rowsep="0">
  790. <tgroup cols="2">
  791. <colspec colwidth="122.40pt" />
  792. <colspec />
  793. <tbody>
  794. <row>
  795. <entry><emphasis><emphasis><emphasis>superfile</emphasis>
  796. </emphasis></emphasis></entry>
  797. <entry>The logical name of the superfile.</entry>
  798. </row>
  799. </tbody>
  800. </tgroup>
  801. </informaltable></para>
  802. <para>Example:</para>
  803. <programlisting>dfuplus action=listsuper superfile=mysuper</programlisting>
  804. </sect3>
  805. <sect3>
  806. <title>Status Operations:</title>
  807. <para>The <emphasis role="bold">status</emphasis> operation returns
  808. the current operational status of a workunit.</para>
  809. <para>These <emphasis>options </emphasis>are used by the <emphasis
  810. role="bold">status</emphasis> <emphasis>operation</emphasis>:</para>
  811. <para><informaltable colsep="0" frame="none" rowsep="0">
  812. <tgroup cols="2">
  813. <colspec colwidth="122.40pt" />
  814. <colspec />
  815. <tbody>
  816. <row>
  817. <entry><emphasis><emphasis><emphasis>wuid</emphasis>
  818. </emphasis></emphasis></entry>
  819. <entry>The workunit identifier of the workunit.</entry>
  820. </row>
  821. </tbody>
  822. </tgroup>
  823. </informaltable>Example:</para>
  824. <programlisting>dfuplus action=status wuid=W20050309-093020</programlisting>
  825. <para></para>
  826. </sect3>
  827. <sect3>
  828. <title>Abort Operations:</title>
  829. <para>The <emphasis role="bold">abort</emphasis> operation aborts
  830. execution of a workunit.</para>
  831. <para>These <emphasis>options </emphasis>are used by the <emphasis
  832. role="bold">abort</emphasis> <emphasis>operation</emphasis>:</para>
  833. <para><informaltable colsep="0" frame="none" rowsep="0">
  834. <tgroup cols="2">
  835. <colspec colwidth="122.40pt" />
  836. <colspec />
  837. <tbody>
  838. <row>
  839. <entry><emphasis><emphasis><emphasis>wuid</emphasis>
  840. </emphasis></emphasis></entry>
  841. <entry>The workunit identifier of the workunit.</entry>
  842. </row>
  843. </tbody>
  844. </tgroup>
  845. </informaltable></para>
  846. <para>Example:</para>
  847. <programlisting>dfuplus action=abort wuid=W20050309-093020</programlisting>
  848. <para></para>
  849. </sect3>
  850. <sect3>
  851. <title>Resubmit Operations:</title>
  852. <para>The <emphasis role="bold">resubmit</emphasis> operation
  853. re-submits a workunit.</para>
  854. <para>These <emphasis>options </emphasis>are used by the <emphasis
  855. role="bold">resubmit</emphasis>
  856. <emphasis>operation</emphasis>:</para>
  857. <para><informaltable colsep="0" frame="none" rowsep="0">
  858. <tgroup cols="2">
  859. <colspec colwidth="122.40pt" />
  860. <colspec />
  861. <tbody>
  862. <row>
  863. <entry><emphasis><emphasis><emphasis>wuid</emphasis>
  864. </emphasis></emphasis></entry>
  865. <entry>The workunit identifier of the workunit.</entry>
  866. </row>
  867. </tbody>
  868. </tgroup>
  869. </informaltable></para>
  870. <para>Example:</para>
  871. <programlisting>dfuplus action=resubmit wuid=W20050309-093020</programlisting>
  872. <para></para>
  873. </sect3>
  874. <sect3>
  875. <title>Savexml Operations:</title>
  876. <para>The <emphasis role="bold">savexml</emphasis> operation saves
  877. the logical file map to an XML file.</para>
  878. <para>These <emphasis>options </emphasis>are used by the <emphasis
  879. role="bold">savexml</emphasis>
  880. <emphasis>operation</emphasis>:</para>
  881. <para><emphasis>srcname</emphasis> The logical name of the source
  882. file.</para>
  883. <para></para>
  884. <informaltable colsep="0" frame="none" rowsep="0">
  885. <tgroup cols="2">
  886. <colspec colwidth="122.40pt" />
  887. <colspec />
  888. <tbody>
  889. <row>
  890. <entry><emphasis>srcname</emphasis></entry>
  891. <entry>The logical name of the source file.</entry>
  892. </row>
  893. <row>
  894. <entry><emphasis><emphasis>dstxml</emphasis>
  895. </emphasis></entry>
  896. <entry>Optional. The logical name of the destination XML
  897. file. If omitted, the XML result is sent to stdout.</entry>
  898. </row>
  899. </tbody>
  900. </tgroup>
  901. </informaltable>
  902. <para>Example:</para>
  903. <programlisting>dfuplus action=savexml srcname=RTTEMP::timezones.txt
  904. dstxml=flattimezones.xml
  905. // this results in the following XML file:
  906. &lt;File directory="c:\thordata\rttemp"
  907. group="thor"
  908. modified="2004-06-18T14:17:16"
  909. name="timezones.txt"
  910. numparts="3"
  911. partmask="timezones.txt._$P$_of_$N$"&gt;
  912. &lt;Attr job="timezones.txt"
  913. owner="rtaylor"
  914. recordSize="155"
  915. replicated="1"
  916. size="51305"
  917. workunit="D20040618-101716"/&gt;
  918. &lt;OrigName&gt;rttemp::timezones.txt&lt;/OrigName&gt;
  919. &lt;Part modified="2004-06-18T14:17:18"
  920. node="10.150.50.15"
  921. num="1"
  922. size="17050"/&gt;
  923. &lt;Part modified="2004-06-18T14:17:17"
  924. node="10.150.50.18"
  925. num="2"
  926. size="17050"/&gt;
  927. &lt;Part modified="2004-06-18T14:17:17"
  928. node="10.150.50.16"
  929. num="3"
  930. size="17205"/&gt;
  931. &lt;/File&gt;</programlisting>
  932. </sect3>
  933. <sect3>
  934. <title>Monitor Operations:</title>
  935. <para>The <emphasis role="bold">monitor</emphasis> operation
  936. initiates a DFU workunit to monitor the appearance of a physical or
  937. logical file and trigger an event when that file appears.</para>
  938. <para>These <emphasis>options </emphasis>are used by the <emphasis
  939. role="bold">monitor</emphasis>
  940. <emphasis>operation</emphasis>:</para>
  941. <para><informaltable colsep="0" frame="none" rowsep="0">
  942. <tgroup cols="2">
  943. <colspec colwidth="85.55pt" />
  944. <colspec />
  945. <tbody>
  946. <row>
  947. <entry><emphasis>event</emphasis></entry>
  948. <entry>The name of the user-defined event to trigger. This
  949. is used as the first parameter of the ECL EVENT
  950. function.</entry>
  951. </row>
  952. <row>
  953. <entry><emphasis>lfn</emphasis></entry>
  954. <entry>Optional. The name of the logical file in the DFU
  955. to look for. Using this option precludes using the
  956. <emphasis>ip</emphasis>, <emphasis>file</emphasis>, and
  957. <emphasis>sub</emphasis> options.</entry>
  958. </row>
  959. <row>
  960. <entry><emphasis>ip</emphasis></entry>
  961. <entry>Optional. The IP address or name of the server on
  962. which the physical file will reside. This may be omitted
  963. if the <emphasis>file</emphasis> option contains a full
  964. URL.</entry>
  965. </row>
  966. <row>
  967. <entry><emphasis>file</emphasis></entry>
  968. <entry>Optional. The fully qualified path of the physical
  969. file to look for. This may contain wildcard characters (*
  970. and ?).</entry>
  971. </row>
  972. <row>
  973. <entry><emphasis>sub</emphasis></entry>
  974. <entry>Optional. Specifies searching subdirectories for
  975. the physical file if the <emphasis>file</emphasis> option
  976. contains wildcard characters (* and ?).</entry>
  977. </row>
  978. <row>
  979. <entry><emphasis>shotlimit</emphasis></entry>
  980. <entry>Optional. The number of arrival events to generate
  981. before marking the DFU workunit as complete. A value of
  982. negative one (-1) indicates continuing until the workunit
  983. is manually aborted. If omitted, the default value is one
  984. (1).</entry>
  985. </row>
  986. </tbody>
  987. </tgroup>
  988. </informaltable></para>
  989. <para><emphasis role="bold">Note the following caveats and
  990. restrictions:</emphasis></para>
  991. <para>1) If a matching file already exists when the DFU Monitoring
  992. job is started, that file will <emphasis
  993. role="underline">not</emphasis> generate an event. It will only
  994. generate an event once the file has been deleted and
  995. recreated.</para>
  996. <para>2) If a file is created and then deleted (or deleted then
  997. re-created) between polling intervals, it will not be seen by the
  998. monitor and will not trigger an event.</para>
  999. <para>3) Events are only generated on the polling interval.</para>
  1000. <para>4) Note that the <emphasis>event</emphasis> is generated if
  1001. the physical file has been created since the last polling interval.
  1002. Therefore, the <emphasis>event</emphasis> may occur before the file
  1003. is closed and the data all written. To ensure the file is not
  1004. subsequently read before it is complete you should use a technique
  1005. that will preclude this possibillity, such as using a separate
  1006. 'flag' file instead of the file, itself or renaming the file once it
  1007. has been created and completely written.</para>
  1008. <para>5) The EVENT function’s subtype parameter (its 2nd parameter)
  1009. when monitoring physical files is the full URL of the file, with an
  1010. absolute IP rather than DNS/netbios name of the file. This parameter
  1011. cannot be retrieved but can only be used for matching a particular
  1012. value in this.</para>
  1013. <para>Example:</para>
  1014. <programlisting>dfuplus action=monitor event=MyEvent ip=edata10 file=/dz/arr.txt
  1015. dfuplus action=monitor event=MyEvent ip=10.150.10.75
  1016. file=c:\dz\* shotlimit=-1 sub=1
  1017. dfuplus action=monitor event=MyEvent file=//10.15.13.21/dz/*.txt
  1018. dfuplus action=monitor event=MyEvent lfn=RTTEMP::OUT::MyFile</programlisting>
  1019. </sect3>
  1020. </sect2>
  1021. </sect1>
  1022. </chapter>
  1023. </book>