Produced by Araxis Merge on 10/4/2017 8:38:10 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | solr-smart-client.zip\solr-smart-client\tools\zookeeper | create-node.js | Mon Aug 28 19:30:59 2017 UTC |
| 2 | solr-smart-client.zip\solr-smart-client\tools\zookeeper | create-node.js | Wed Oct 4 13:26:22 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 88 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | 'use stric t'; | |
| 2 | ||
| 3 | var zookee per = requ ire('node- zookeeper- client'); | |
| 4 | ||
| 5 | var argv = require(' yargs') | |
| 6 | .usage(' Usage: $0 --zookeepe r-connecti on <connec t-string> --node-pat h <node-pa th>') | |
| 7 | .option( 'z', { | |
| 8 | alias: 'zookeepe r-connecti on', | |
| 9 | default: ' IP ', | |
| 10 | descri be: 'zooke eper conne ction stri ng (single or comma- delimited list)', | |
| 11 | type: 'string' | |
| 12 | }) | |
| 13 | .option( 'n', { | |
| 14 | alias: 'node-pat h', | |
| 15 | defaul t: '/test/ state.json ', | |
| 16 | descri be: 'Path of the nod e to creat e', | |
| 17 | type: 'string' | |
| 18 | }) | |
| 19 | .alias(' ?', 'help' ) | |
| 20 | .help('h elp') | |
| 21 | .argv; | |
| 22 | ||
| 23 | var zooKee perConnect ion = argv ['zookeepe r-connecti on']; | |
| 24 | var nodePa th = argv[ 'node-path ']; | |
| 25 | ||
| 26 | var client = zookeep er.createC lient(zooK eeperConne ction); | |
| 27 | ||
| 28 | client.on( 'state', f unction(st ate) { | |
| 29 | if (state == = zookeepe r.State.SY NC_CONNECT ED) { | |
| 30 | consol e.log('ses sionId: %s ', client. getSession Id().toStr ing('hex') ); | |
| 31 | clie nt.mkdirp( nodePath, function(e rror) { | |
| 32 | client .close(); | |
| 33 | ||
| 34 | if (er ror) { | |
| 35 | console. log(error) ; | |
| 36 | process. exit(1); | |
| 37 | } | |
| 38 | ||
| 39 | consol e.log('Cre ated %s', nodePath); | |
| 40 | proces s.exit(); | |
| 41 | }); | |
| 42 | } | |
| 43 | }); | |
| 44 | ||
| 45 | client.con nect(); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.