@brown-ds/distribution 0.0.48 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/distribution/all/mr.js +1 -1
- package/package.json +1 -1
package/distribution/all/mr.js
CHANGED
|
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
|
|
|
6
6
|
|
|
7
7
|
If you notice any issues with using this file, please contact the TAs.
|
|
8
8
|
*/
|
|
9
|
-
const distribution=require('../../dist'+'ribution'),id=distribution['util']['id'];function mr(
|
|
9
|
+
const distribution=require('../../dist'+'ribution'),id=distribution['util']['id'];function mr(_0x25fd4b){const _0x2e9d09={'gid':_0x25fd4b['gid']||'global'};function _0x2b94c5(_0x41aa83,_0x5882c1){const _0x3d7958=id['getSID'](_0x41aa83),_0x2c98d8={'mapper':_0x41aa83['map'],'reducer':_0x41aa83['reduce'],'map':function(_0x13da64,_0x96326c,_0x52508f,_0x4c64e4){if(_0x13da64['length']==-0x1f2b*0x1+-0x17de+0x3709)_0x4c64e4(null,{});else{const _0xadd485=[];let _0x2de1e9=0x1063*0x1+-0xad1*-0x1+-0x1b34;_0x13da64['forEach'](_0x47427a=>{distribution[_0x96326c]['store']['get'](_0x47427a,(_0x1643c8,_0x179075)=>{_0x2de1e9++;const _0x746072=this['mapper'](_0x47427a,_0x179075);Array['isArray'](_0x746072)?_0xadd485['push'](..._0x746072):_0xadd485['push'](_0x746072),_0x2de1e9==_0x13da64['length']&&distribution['local']['store']['put'](_0xadd485,_0x52508f+'_map',(_0x505369,_0x427025)=>{_0x4c64e4(_0x505369,_0xadd485);});});});}},'shuffle':function(_0x485683,_0x52a07d,_0x18715d){distribution['local']['store']['get'](_0x52a07d+'_map',(_0x379ccc,_0x4e5c28)=>{if(!_0x379ccc){let _0x59dc81=-0x23a2+0x1309+0x1099;_0x4e5c28['forEach'](_0x7e8d6b=>{const [_0x9e7f61]=Object['keys'](_0x7e8d6b);distribution[_0x485683]['mem']['put'](_0x7e8d6b[_0x9e7f61],{'key':_0x9e7f61,'action':'append'},(_0xee1926,_0x1eb4ff)=>{_0x59dc81++,_0x59dc81==_0x4e5c28['length']&&_0x18715d(null,_0x4e5c28);});});}else _0x18715d(_0x379ccc,{});});},'reduce':function(_0x3d4f5e,_0xd8c090,_0x31e966){distribution['local']['mem']['get']({'key':null,'gid':_0x3d4f5e},(_0x1f9175,_0x27a433)=>{let _0x4c4c0d=[],_0x560707=0x16f1+0x2331+-0x3a22;_0x27a433['length']==0x5*0x48f+-0x25ca+0x1*0xeff&&_0x31e966(null,null),_0x27a433['forEach'](_0x5c8bf2=>distribution['local']['mem']['get']({'key':_0x5c8bf2,'gid':_0x3d4f5e},(_0x450cc5,_0x46b259)=>{const _0x56c1db=this['reducer'](_0x5c8bf2,_0x46b259);_0x4c4c0d=_0x4c4c0d['concat'](_0x56c1db),_0x560707++,_0x560707==_0x27a433['length']&&_0x31e966(null,_0x4c4c0d);}));});}},_0x474ad0=function(_0x437781,_0x3ee4c8){const _0x51ef25={};return Object['keys'](_0x3ee4c8)['forEach'](_0x30d20e=>{_0x51ef25[_0x30d20e]=[];}),_0x437781['forEach'](_0x110627=>{const _0x570353=id['getID'](_0x110627),_0x36c0ec=id['naiveHash'](_0x570353,Object['keys'](_0x3ee4c8));_0x51ef25[_0x36c0ec]['push'](_0x110627);}),_0x51ef25;};distribution[_0x2e9d09['gid']]['routes']['put'](_0x2c98d8,'mr-'+_0x3d7958,(_0x574c15,_0xd4f7c5)=>{distribution['local']['groups']['get'](_0x2e9d09['gid'],(_0x26ea36,_0x18dfa7)=>{const _0x299848=_0x474ad0(_0x41aa83['keys'],_0x18dfa7);let _0x1148e8=0xf81+-0x2*0x74b+-0xeb;const _0x5b36e9=Object['keys'](_0x18dfa7)['length'],_0x237707={'service':'mr-'+_0x3d7958,'method':'map'};for(const _0xf35548 in _0x18dfa7){_0x237707['node']=_0x18dfa7[_0xf35548];const _0x22d5bf=[_0x299848[_0xf35548],_0x2e9d09['gid'],_0x3d7958];distribution['local']['comm']['send'](_0x22d5bf,_0x237707,(_0xb90796,_0xad07e0)=>{++_0x1148e8;if(_0x1148e8==_0x5b36e9){const _0x385a0e={'service':'mr-'+_0x3d7958,'method':'shuffle'};distribution[_0x2e9d09['gid']]['comm']['send']([_0x2e9d09['gid'],_0x3d7958],_0x385a0e,(_0x30d7e9,_0x1e99fd)=>{const _0x2936fa={'service':'mr-'+_0x3d7958,'method':'reduce'};distribution[_0x2e9d09['gid']]['comm']['send']([_0x2e9d09['gid'],_0x3d7958],_0x2936fa,(_0x268e02,_0x183165)=>{let _0x219824=[];for(const _0x2fbb50 of Object['values'](_0x183165)){_0x2fbb50!==null&&(_0x219824=_0x219824['concat'](_0x2fbb50));}_0x5882c1(null,_0x219824);return;distribution[_0x2e9d09['gid']]['routes']['rem']('mr-'+_0x3d7958,(_0x32a27f,_0x35cda5)=>{});});});}});}});});}return{'exec':_0x2b94c5};};module['exports']=mr;
|
|
10
10
|
/* eslint-enable */
|