-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfunctionref.html
1582 lines (1014 loc) · 52 KB
/
functionref.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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>RHIPE: R function reference</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="assets/bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="assets/custom/custom.css" rel="stylesheet">
<!-- font-awesome -->
<link href="assets/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<!-- prism -->
<link href="assets/prism/prism.css" rel="stylesheet">
<link href="assets/prism/prism.r.css" rel="stylesheet">
<script type='text/javascript' src='assets/prism/prism.js'></script>
<script type='text/javascript' src='assets/prism/prism.r.js'></script>
<script type="text/javascript" src="assets/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
"HTML-CSS": { scale: 100}
});
</script>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<![endif]-->
<link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
<!-- <link href='http://fonts.googleapis.com/css?family=Lustria' rel='stylesheet' type='text/css'> -->
<link href='http://fonts.googleapis.com/css?family=Bitter' rel='stylesheet' type='text/css'>
<!-- Fav and touch icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="ico/apple-touch-icon-57-precomposed.png">
<!-- <link rel="shortcut icon" href="ico/favicon.png"> -->
</head>
<body>
<div class="container-narrow">
<div class="masthead">
<ul class="nav nav-pills pull-right">
<li class=''><a href='index.html'>Docs</a></li><li class='active'><a href='functionref.html'>Function Ref</a></li><li><a href='https://github.com/delta-rho/RHIPE'>Github <i class='fa fa-github'></i></a></li>
</ul>
<p class="myHeader">RHIPE: R function reference</p>
</div>
<hr>
<div class="container-fluid">
<div class="row-fluid">
<div class="col-md-3 well">
<ul class = "nav nav-list" id="toc">
<li class='nav-header unselectable' data-edit-href='01.Rfunction.Rmd'>Contents</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#package-information'>Package Information</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhchmod'>rhchmod</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhcp'>rhcp</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhdel'>rhdel</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rherrors'>rherrors</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhex'>rhex</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhexists'>rhexists</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhfmt'>rhfmt</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhget'>rhget</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhinit'>rhinit</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhiterator'>rhIterator</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhjobinfo'>rhJobInfo</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhkill'>rhkill</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhls'>rhls</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhload'>rhload</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhmap'>rhmap</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhmapfile'>rhmapfile</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhmkdir'>rhmkdir</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhmv'>rhmv</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhofolder'>rhofolder</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhoptions'>rhoptions</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhput'>rhput</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhread'>rhread</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhsave'>rhsave</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhsaveimage'>rhsave.image</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhstatus'>rhstatus</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhuz'>rhuz</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhwatch'>rhwatch</a>
</li>
<li class='active'>
<a target='_self' class='nav-not-header' href='#rhwrite'>rhwrite</a>
</li>
</ul>
</div>
<div class="col-md-9 tab-content" id="main-content">
<div class='tab-pane active' id='package-information'>
<h3>Package Information</h3>
<p>R and Hadoop Integrated Programming Environment</p>
<p><strong>Author</strong>: Saptarshi Guha</p>
<p><strong>Version</strong>: 0.74.0</p>
<p><strong>Date</strong>: 2014-02-19</p>
<p><strong>License</strong>:</p>
<h4>Description</h4>
<p>RHIPE is a merger of R and Hadoop. R is the widely used, highly acclaimed interactive language and
environment for data analysis. Hadoop consists of the Hadoop Distributed File System (HDFS) and the
MapReduce distributed compute engine. RHIPE allows an analyst to carry out D&R analysis of complex
big data wholly from within R. RHIPE communicates with Hadoop to carry out the big, parallel
computations. </p>
</div>
<div class='tab-pane' id='rhchmod'>
<h3>rhchmod</h3>
<p>Change Permissions of Files on HDFS</p>
<h4>Usage</h4>
<pre><code class="r">rhchmod(path, permissions)
</code></pre>
<h4>Arguments</h4>
<p><strong>path</strong><br>
is the location of the directory to be created. It is expanded using <code>rhabsolute.hdfs.path</code></p>
<p><strong>permissions</strong><br>
a character string such as '777'</p>
<h4>Description</h4>
<p>Change permissions of files on HDFS</p>
<h4>Author</h4>
<p>Ryan Hafen</p>
<h4>See also</h4>
<p><code>rhwrite</code>, <code>rhmkdir</code></p>
</div>
<div class='tab-pane' id='rhcp'>
<h3>rhcp</h3>
<p>Copy files (or folders) on the HDFS</p>
<h4>Usage</h4>
<pre><code class="r">rhcp(ifile, ofile, delete = FALSE)
</code></pre>
<h4>Arguments</h4>
<p><strong>ifile</strong><br>
Absolute path to be copied on the HDFS or the output from rhwatch(.., read=FALSE).</p>
<p><strong>ofile</strong><br>
Absolute path to place the copies on the HDFS.</p>
<p><strong>delete</strong><br>
should we delete `ifile when done?</p>
<h4>Description</h4>
<p>Copies the file (or folder) <code>src</code> on the HDFS to the
destination <code>dest</code> also on the HDFS.</p>
<h4>Author</h4>
<p>Saptarshi Guha</p>
<h4>See also</h4>
<p><code>rhget</code>, <code>rhput</code>, <code>rhdel</code>, <code>rhread</code>, <code>rhwrite</code>, <code>rhsave</code></p>
</div>
<div class='tab-pane' id='rhdel'>
<h3>rhdel</h3>
<p>HDFS File Deletion</p>
<h4>Usage</h4>
<pre><code class="r">rhdel(folder)
</code></pre>
<h4>Arguments</h4>
<p><strong>folder</strong><br>
The absolute path on the hdfs to the directory(s) to be deleted.</p>
<p><strong>Description</strong><br>
This function deletes the folders contained in the character vector <code>folders</code> which are located on
the HDFS. The deletion is recursive, so all subfolders will be deleted too. Nothing is returned.</p>
<h4>Author</h4>
<p>Saptarshi Guha</p>
<h4>See also</h4>
<p><code>rhput</code>, <code>rhls</code>, <code>rhread</code>, <code>rhwrite</code>, <code>rhsave</code>, <code>rhget</code></p>
</div>
<div class='tab-pane' id='rherrors'>
<h3>rherrors</h3>
<p>Retrieves errors from a job when <code>debug=='collect'</code> in <code>rhwatch</code></p>
<h4>Usage</h4>
<pre><code class="r">rherrors(job, prefix = "rhipe_debug", num.file = 1)
</code></pre>
<h4>Arguments</h4>
<p><strong>job</strong><br>
Is the result of rhwatch (when <code>read = FALSE</code>)</p>
<p><strong>prefix</strong><br>
Is the prefix string of the debug files</p>
<p><strong>num.file</strong><br>
Is the number of debug files to read</p>
<h4>Description</h4>
<p>Retrieves errors from a job when debug=='collect' in <code>rhwatch</code></p>
<h4>Author</h4>
<p>Saptarshi Guha</p>
</div>
<div class='tab-pane' id='rhex'>
<h3>rhex</h3>
<p>Execute a MapReduce Job On Hadoop</p>
<h4>Usage</h4>
<pre><code class="r">rhex(conf, async = TRUE, mapred, ...)
</code></pre>
<h4>Arguments</h4>
<p><strong>conf</strong><br>
<code>conf</code> is a list returned from <code>rhwatch</code> describing the MapReduce job.</p>
<p><strong>async</strong><br>
When <code>async</code> is <code>TRUE</code>, the function returns immediately, leaving the job running in the background
on Hadoop.</p>
<p><strong>mapred</strong><br>
See Details.</p>
<p><strong>...</strong><br>
Additional parameters for system call.</p>
<h4>Value</h4>
<p>When <code>async</code> is <code>TRUE</code>, function returns an object of class <code>jobtoken</code>.</p>
<h4>Description</h4>
<p>Submits a MapReduce job (created using <code>rhwatch</code>) to the Hadoop MapReduce framework. The argument
<code>mapred</code> serves the same purpose as the <code>mapred</code> argument to <code>rhwatch</code>. This will override the
settings in the object returned from <code>rhwatch</code>. The function returns when the job ends
(success/failure or because the user terminated (see <code>rhkill</code>)). When <code>async</code> is TRUE, the function
returns immediately, leaving the job running in the background on Hadoop.</p>
<h4>Details</h4>
<p>When <code>async</code> is <code>TRUE</code>, function returns an object of class <code>jobtoken</code>. The generic function
<code>print.jobtoken</code>, displays the start time, duration (in seconds) and percent progress. This object
can be used in calls to <code>rhstatus</code>,<code>rhjoin</code> and <code>rhkill</code>. Otherwise is returns a list of counters
and the job state.</p>
<h4>Author</h4>
<p>Saptarshi Guha</p>
<h4>See also</h4>
<p><code>rhwatch</code>, <code>rhstatus</code>, <code>rhkill</code></p>
</div>
<div class='tab-pane' id='rhexists'>
<h3>rhexists</h3>
<p>Check if File Exists on HDFS</p>
<h4>Usage</h4>
<pre><code class="r">rhexists(path)
</code></pre>
<h4>Arguments</h4>
<p><strong>path</strong><br>
Is the location of the file to be checked. It is expanded using
<code>rhabsolute.hdfs.path</code></p>
<h4>Description</h4>
<p>Check if file exists on HDFS</p>
<h4>Author</h4>
<p>Ryan Hafen</p>
<h4>See also</h4>
<p><code>rhls</code>, <code>rhwrite</code>, <code>rhmkdir</code></p>
</div>
<div class='tab-pane' id='rhfmt'>
<h3>rhfmt</h3>
<p>A function that returns a function to specify input/output formats</p>
<h4>Usage</h4>
<pre><code class="r">rhfmt(type, ...)
</code></pre>
<h4>Arguments</h4>
<p><strong>type</strong><br>
The name of the function handler</p>
<p><strong>...</strong><br>
Arguments passed to the function</p>
<h4>Description</h4>
<p>Returns a function to spec out the input output formats</p>
<h4>Details</h4>
<p>The function returned must take 3 arguments 'lines', direction(input or output), call signature see
<code>rhoptions()$ioformats</code> for examples on how to write your own.</p>
</div>
<div class='tab-pane' id='rhget'>
<h3>rhget</h3>
<p>Copying from the HDFS, moving files from the HDFS to a local directory.</p>
<h4>Usage</h4>
<pre><code class="r">rhget(src, dest)
</code></pre>
<h4>Arguments</h4>
<p><strong>src</strong><br>
Absolute path to file or directory on HDFS to get.</p>
<p><strong>dest</strong><br>
Path to file or directory on local filesystem to create as the new copy.</p>
<h4>Description</h4>
<p>Copies the files (or folder) at <code>src</code>, located on the HDFS to the destination <code>dest</code> located on the
local filesystem. If a file or folder of the same name as <code>dest</code> exists on the local filesystem, it
will be deleted. The <code>dest</code> can contain ~ which will be expanded. The original copy of the file or
folder is left on the HDFS after this operation.</p>
<h4>Author</h4>
<p>Saptarshi Guha</p>
<h4>See also</h4>
<p><code>rhput</code>, <code>rhdel</code>, <code>rhread</code>, <code>rhwrite</code>, <code>rhsave</code></p>
</div>
<div class='tab-pane' id='rhinit'>
<h3>rhinit</h3>
<p>Initializes the RHIPE subsystem</p>
<h4>Usage</h4>
<pre><code class="r">rhinit()
</code></pre>
<h4>Description</h4>
<p>Initializes the RHIPE subsystem</p>
</div>
<div class='tab-pane' id='rhiterator'>
<h3>rhIterator</h3>
<p>Iterates Through the Records of Sequence Files</p>
<h4>Usage</h4>
<pre><code class="r">rhIterator(files, type = "sequence", chunksize = 1000, chunk = "records",
skip = rhoptions()$file.types.remove.regex, mc = lapply,
textual = FALSE)
}
</code></pre>
<h4>Arguments</h4>
<p><strong>files</strong><br>
Path to file or directory containing sequence files. This can also be the output from
<code>rhwatch(read = FALSE)</code>.</p>
<p><strong>type</strong><br>
Is it 'sequence' or 'map'. Ideally should be auto-determined.</p>
<p><strong>chunksize</strong><br>
Number of records or bytes to read. Depends on 'chunk'.</p>
<p><strong>chunk</strong><br>
either "records" or "bytes"</p>
<p><strong>skip</strong><br>
Files to skip while reading the hdfs. Various installs of Hadoop add additional log info to
HDFS output from MapReduce. Attempting to read these files is not what we want to do. To get around
this we specify pieces of filenames to grep and remove from the read. <code>skip</code> is a vector argument
just to have sensible defaults for a number of different systems. You can learn which if any files
need to be skipped by using <code>rhls</code> on the target directory.</p>
<p><strong>mc</strong><br>
Set to lapply by default. User can change this to <code>mclapply</code> for parallel lapply.</p>
<p><strong>textual</strong><br>
If the keys and values are hadoop Text objects</p>
<h4>Description</h4>
<p>Can be used to iterate through the records of a Sequence File (or collection thereof)</p>
</div>
<div class='tab-pane' id='rhjobinfo'>
<h3>rhJobInfo</h3>
<p>Very Detailed Job Information</p>
<h4>Usage</h4>
<pre><code class="r">rhJobInfo(job)
</code></pre>
<h4>Arguments</h4>
<p><strong>job</strong><br>
The parameter <code>job</code> can either be a string with the format <em>job_datetime_id</em>
(e.g. <em>job_201007281701_0274</em>) or the value returned from <code>rhex</code> with the <code>async</code> option set to TRUE.</p>
<h4>Description</h4>
<p>Returns detailed job information across all TaskIDs</p>
</div>
<div class='tab-pane' id='rhkill'>
<h3>rhkill</h3>
<p>Kill A MapReduce Job</p>
<h4>Usage</h4>
<pre><code class="r">rhkill(job)
</code></pre>
<h4>Arguments</h4>
<p><strong>job</strong><br>
The parameter <code>job</code> can either be string with the format <code>job_datetime_id</code> or the value
returned from <code>rhex</code> with the <code>async</code> option set to <code>TRUE</code>.</p>
<p><strong>Description</strong><br>
This kills the MapReduce job with job identifier given by <code>job</code>. The parameter <code>job</code> can
either be string with the format <code>job_datetime_id</code> or the value returned from <code>rhex</code> with the
<code>async</code> option set to <code>TRUE</code>.</p>
<h4>Author</h4>
<p>Saptarshi Guha</p>
<h4>See also</h4>
<p><code>rhstatus</code>, <code>rhwatch</code>, <code>rhjoin</code>, <code>rhex</code></p>
</div>
<div class='tab-pane' id='rhls'>
<h3>rhls</h3>
<p>List Files On HDFS</p>
<h4>Usage</h4>
<pre><code class="r">rhls(folder = NULL, recurse = FALSE, nice = "h")
</code></pre>
<h4>Arguments</h4>
<p><strong>folder</strong><br>
Path of directory on HDFS or output from <code>rhwatch(readback=FALSE)</code></p>
<p><strong>recurse</strong><br>
If <code>TRUE</code> list all files and directories in sub-directories.</p>
<p><strong>nice</strong><br>
One of 'g','m','b' or 'h' (gigabytes, megabytes, bytes, human readable).</p>
<h4>Value</h4>
<p>vector of file and directory names</p>
<h4>Description</h4>
<p>List all files and directories contained in a directory on the HDFS.</p>
<h4>Details</h4>
<p>Returns a data.frame of filesystem information for the files located at <code>path</code>. If <code>recurse</code> is
<code>TRUE</code>, <code>rhls</code> will recursively travel the directory tree rooted at <code>path</code>. The returned object
is a data.frame consisting of the columns: permission, owner, group, size (which is numeric),
modification time, and the file name. <code>path</code> may optionally end in '*' which is the wildcard and
will match any character(s).</p>
<h4>Author</h4>
<p>Saptarshi Guha</p>
<h4>See also</h4>
<p><code>rhput</code>, <code>rhdel</code>, <code>rhread</code>, <code>rhwrite</code>, <code>rhsave</code>, <code>rhget</code></p>
</div>
<div class='tab-pane' id='rhload'>
<h3>rhload</h3>
<p>Load an RData from the HDFS.</p>
<h4>Usage</h4>
<pre><code class="r">rhload(file, envir = parent.frame())
</code></pre>
<h4>Arguments</h4>
<p><strong>file</strong><br>
Path to the .RData file on the HDFS.</p>
<p><strong>envir</strong><br>
Environment in which to load the .RData file.</p>
<p><strong>value</strong>
data from HDFS</p>
<h4>Description</h4>
<p>Calls the function load after fetching an RData file from the HDFS.</p>
<h4>Author</h4>
<p>Saptarshi Guha</p>
<h4>See also</h4>
<p><code>rhsave</code>, <code>rhsaveimage</code></p>
<h4>Details</h4>
<p>This code, will chunk a data frame(or matrix) or list into sub objects, defined by <code>chunks</code> and then
written to the HDFS across <code>numfiles</code> files. Thus if chunks is 10, and <code>numfiles</code> is 20, then a data
frame is divided into sub data frames of rows 10 each and written across 20 files. In order to
improve the R-Java switch, this is buffered, the buffer size defined by <code>passByte</code>(bytes).</p>
</div>
<div class='tab-pane' id='rhmap'>
<h3>rhmap</h3>
<p>Macro to Wrap Boilerplate Around RHIPE Map code}</p>
<h4>Usage</h4>
<pre><code class="r">rhmap(expr = NULL, before = NULL, after = NULL)
</code></pre>
<h4>Arguments</h4>
<p><strong>expr</strong><br>
Any R expression, that operates on current map.keys, map.values and current index (given by
<code>k</code>,<code>r</code>, and <code>.index</code> respectively).</p>
<p><strong>before</strong><br>
An R expression to run before the loop across map.values,map.keys and .index. If map
.values is shortened, make map.keys the same length!</p>
<p><strong>after</strong><br>
An R expression to run after the loop. The results of the loop is contained in <code>result</code></p>
<h4>Description</h4>
<p>Returns an expression corresponding to given input</p>
<h4>See also</h4>
<p><code>rhwatch</code></p>
</div>
<div class='tab-pane' id='rhmapfile'>
<h3>rhmapfile</h3>
<p>Creates a Handle to a Mapfile</p>
<h4>Usage</h4>
<pre><code class="r">rhmapfile(paths)
</code></pre>
<h4>Arguments</h4>
<p><strong>paths</strong><br>
Absolute path to map file on HDFS or the output from <code>rhwatch</code>.</p>
<h4>Description</h4>
<p>Creates a Handle to a Mapfile</p>
</div>
<div class='tab-pane' id='rhmkdir'>
<h3>rhmkdir</h3>
<p>Creates Directories on the HDFS</p>
<h4>Usage</h4>
<pre><code class="r">rhmkdir(path, permissions)
</code></pre>
<h4>Arguments</h4>
<p><strong>path</strong><br>
Is the location of the directory to be created. It is expanded using
<code>rhabsolute.hdfs.path</code></p>
<p><strong>permissions</strong><br>
either of the integer form e.g. 777 or string e.g. rwx. If missing the default is
used.</p>
<p><strong>value</strong> Logical TRUE if success</p>
<h4>Description</h4>
<p>Equivalent of <code>mkdir -p</code> in Unix</p>
<h4>Author</h4>
<p>Saptarshi Guha</p>
<h4>See also</h4>
<p><code>rhcp</code>, <code>rhmv</code>,</p>
</div>
<div class='tab-pane' id='rhmv'>
<h3>rhmv</h3>
<p>Move files (or folders) on the HDFS (delete original)</p>
<h4>Usage</h4>
<pre><code class="r">rhmv(ifile, ofile)
</code></pre>
<h4>Arguments</h4>
<p><strong>ifile</strong><br>
Absolute path to be copied on the HDFS or the output from <code>rhwatch(.., read=FALSE)</code>.</p>
<p><strong>ofile</strong><br>
Absolute path to place the copies on the HDFS.</p>
<h4>Description</h4>
<p>Copies the file (or folder) <code>src</code> on the HDFS to the destination <code>dest</code> also on the HDFS.</p>
<h4>Author</h4>
<p>Saptarshi Guha</p>
<h4>See also</h4>
<p><code>rhget</code>, <code>rhput</code>, <code>rhdel</code>, <code>rhread</code>, <code>rhwrite</code>, <code>rhsave</code></p>
</div>
<div class='tab-pane' id='rhofolder'>
<h3>rhofolder</h3>
<p>Returns the output folder from a previous RHIPE job</p>
<h4>Usage</h4>
<pre><code class="r">rhofolder(job)
</code></pre>
<h4>Arguments</h4>
<p><strong>job</strong> Can be a character indicating the string to a folder, or the result of call to <code>rhwatch</code>.
For the latter, this works only read is FALSE (because if read is TRUE, the output is
returned)</p>
<h4>Description</h4>
<p>Returns the output folder from a previous RHIPE job Take a look at <code>hdfs.getwd</code> for more
information.</p>
<h4>Author</h4>
<p>Saptarshi Guha</p>
</div>
<div class='tab-pane' id='rhoptions'>
<h3>rhoptions</h3>
<p>Get or Set Rhipe Options</p>
<h4>Usage</h4>
<pre><code class="r">rhoptions(li = NULL, ...)
</code></pre>
<h4>Arguments</h4>
<p><strong>li</strong><br>
A list of options. Names of elements indicate the option being modified. Values of elements
indicate the value the option is to take on. If NULL then a list of current rhoptions is returned.<br>
See details.</p>
<p><strong>...</strong><br>
Options maybe assigned values as <code>key=value</code>. See examples.</p>
<p><strong>value</strong>
<code>rhoptions()</code> returns a list of current options.</p>
<h4>Description</h4>
<p>Used to set Rhipe options (called by <code>rhinit</code> for example). Most often called by a user to set a
<em>runner</em> that starts the embedded R Rhipe executable.</p>
<h4>Details</h4>
<p>One may set the following options specific to Rhipe and many options specific to mapred (not listed
here but present in the Hadoop documentation).</p>
<h4>Note</h4>
<p>Default values can be observed by simply typing <code>rhoptions()</code></p>
<p>This is the launcher for the embedded R Rhipe executable used in MapReduce jobs.
Often other options are easiest to set in the <code>mapred</code> argument of <code>rhwatch</code>.</p>
<h4>Author</h4>
<p>Saptarshi Guha</p>
<h4>See also</h4>
<p><code>rhinit</code></p>
</div>
<div class='tab-pane' id='rhput'>
<h3>rhput</h3>
<p>Put a file unto the HDFS</p>
<h4>Usage</h4>
<pre><code class="r">rhput(src, dest, deletedest = TRUE)
</code></pre>
<h4>Arguments</h4>
<p><strong>src</strong><br>
Path to the local file to be copied to the HDFS.</p>
<p><strong>dest</strong><br>
Path to the file on the HDFS. <code>rhput</code> creates the file at dest.</p>
<p><strong>deletedest</strong><br>
If <code>TRUE</code> this function attempts to delete the destination of the HDFS before trying to copy to
that location on the HDFS.</p>
<h4>Description</h4>
<p>Copies the local file called <code>src</code> (not a folder) to the destination <code>dest</code> on the HDFS. Uses
<code>path.expand</code> to expand the <code>src</code> parameter.</p>
<h4>Note</h4>
<p>Local filesystem copy remains after the operation is complete.</p>
<h4>Author</h4>
<p>Saptarshi Guha</p>
<h4>See also</h4>
<p><code>rhget</code>, <code>rhdel</code>, <code>rhread</code>, <code>rhwrite</code>, <code>rhsave</code></p>
</div>
<div class='tab-pane' id='rhread'>
<h3>rhread</h3>
<p>Read Key/Value Pairs From The HDFS.</p>
<h4>Usage</h4>
<pre><code class="r">rhread(files, type = c("sequence"), max = -1L,
skip = rhoptions()$file.types.remove.regex, mc = lapply,
textual = FALSE, verbose = TRUE, ...)
</code></pre>
<h4>Arguments</h4>
<p><strong>files</strong><br>
Path to file or directory containing <code>map</code>, <code>sequence</code>, or <code>text</code> file to be read on the HDFS. This
can also be the output from <code>rhwatch</code> provided <code>readback=FALSE</code>.</p>