Permalink
Browse files

completed package rename

  • Loading branch information...
piccolbo committed Sep 11, 2012
1 parent 8a8eeae commit 38ebe1b0779a8edbb1328284377d31e4f019e2d2
View
@@ -1 +1 @@
-rmr_1.3.1.tar.gz
+rmr2_*.tar.gz
View
@@ -1,4 +1,4 @@
-useDynLib(rmr)
+useDynLib(rmr2)
export(mapreduce)
export(from.dfs, to.dfs)
export(equijoin)
View
@@ -60,10 +60,10 @@ make.csv.output.format = function(...) function(kv, con) {
typed.bytes.reader = function(data, nobjs) {
if(is.null(data)) NULL
else
- .Call("typed_bytes_reader", data, nobjs, PACKAGE = "rmr")}
+ .Call("typed_bytes_reader", data, nobjs, PACKAGE = "rmr2")}
typed.bytes.writer = function(objects) {
- .Call("typed_bytes_writer", objects, PACKAGE = "rmr")}
+ .Call("typed_bytes_writer", objects, PACKAGE = "rmr2")}
make.typed.bytes.input.format = function() {
obj.buffer = list()
View
@@ -78,7 +78,7 @@ rmr.sample = function(input, output = NULL, method = c("any", "Bernoulli"), ...)
## dev support
reload = function() {
- detach("package:rmr", unload=T)
+ detach("package:rmr2", unload=T)
library.dynam.unload("rmr2",system.file(package="rmr2"))
library(rmr2)}
View
@@ -141,31 +141,31 @@ rmr.stream = function(
input.reader =
function()
- rmr:::make.keyval.reader(
+ rmr2:::make.keyval.reader(
input.format$mode,
input.format$format,
keyval.length = keyval.length)
output.writer =
function()
- rmr:::make.keyval.writer(
+ rmr2:::make.keyval.writer(
output.format$mode,
output.format$format)
default.reader =
function()
- rmr:::make.keyval.reader(
+ rmr2:::make.keyval.reader(
default.input.format$mode,
default.input.format$format,
keyval.length = keyval.length)
default.writer =
function()
- rmr:::make.keyval.writer(
+ rmr2:::make.keyval.writer(
default.output.format$mode,
default.output.format$format)
')
map.line = '
- rmr:::map.loop(
+ rmr2:::map.loop(
map = map,
keyval.reader = input.reader(),
keyval.writer =
@@ -175,13 +175,13 @@ rmr.stream = function(
default.writer()},
profile = profile.nodes)'
reduce.line = '
- rmr:::reduce.loop(
+ rmr2:::reduce.loop(
reduce = reduce,
keyval.reader = default.reader(),
keyval.writer = output.writer(),
profile = profile.nodes)'
combine.line = '
- rmr:::reduce.loop(
+ rmr2:::reduce.loop(
reduce = combine,
keyval.reader = default.reader(),
keyval.writer = default.writer(),
View
@@ -24,6 +24,6 @@ unit.test(
if(is.null(x)) list()
else as.list(x)})
isTRUE(all.equal(l,
- rmr:::typed.bytes.reader(rmr:::typed.bytes.writer(l), length(l) + 5)$objects,
+ rmr2:::typed.bytes.reader(rmr2:::typed.bytes.writer(l), length(l) + 5)$objects,
check.attributes = FALSE))},
generators = list(tdgg.list()))
View
@@ -22,33 +22,33 @@ library(quickcheck)
unit.test(
function(ss) {
ss = paste("v", ss, sep = "")
- ss == eval(parse(text = paste("rmr:::qw(", paste(ss, collapse = ","), ")")))},
+ ss == eval(parse(text = paste("rmr2:::qw(", paste(ss, collapse = ","), ")")))},
list(tdgg.character()))
# Make.single.arg
unit.test(
function(l) {
f = function(...) list(...)
- g = rmr:::Make.single.arg(f)
+ g = rmr2:::Make.single.arg(f)
identical(do.call(f, l), g(l))},
list(tdgg.list()))
# Make.multi.arg
unit.test(
function(l) {
f = function(x) x
- g = rmr:::Make.multi.arg(f)
+ g = rmr2:::Make.multi.arg(f)
identical(do.call(g, l), f(l))},
list(tdgg.list()))
# Make.single.or.multi.arg
unit.test(
function(l, arity) {
f = if(arity == "single") identity else c
- g = rmr:::Make.single.or.multi.arg(f, from = arity)
+ g = rmr2:::Make.single.or.multi.arg(f, from = arity)
identical(g(l), do.call(g, l))},
list(tdgg.list(),
- tdgg.select(rmr:::qw(single, multi))))
+ tdgg.select(rmr2:::qw(single, multi))))
#%:% TODO
# all.predicate TODO
@@ -58,7 +58,7 @@ unit.test(
# unit.test(
# function(l){
-# fl = rmr:::make.fast.list()
+# fl = rmr2:::make.fast.list()
# lapply(l, fl)
# print(x=as.list(do.call(c, l)))
# print(x=fl())
@@ -1,6 +1,6 @@
library(rmr2)
## @knitr getting-data.IO.formats
-rmr:::IO.formats
+rmr2:::IO.formats
## @knitr end
## @knitr getting-data.make.input.format.csv
make.input.format("csv")
View
@@ -18,7 +18,7 @@ library(rmr2)
#has.rows
unit.test(
function(x) {
- is.null(nrow(x)) == !rmr:::has.rows(x)},
+ is.null(nrow(x)) == !rmr2:::has.rows(x)},
list(tdgg.any()))
#all.have rows TODO
View
@@ -67,4 +67,4 @@ for(be in c("local", "hadoop")) {
## @knitr kmeans.end
# would love to take this step but kmeans in randomized in a way that makes it hard to be completely reprodubile
-#stopifnot(rmr:::cmp(out[['hadoop']], out[['local']]))
+#stopifnot(rmr2:::cmp(out[['hadoop']], out[['local']]))
View
@@ -21,8 +21,8 @@ for (be in c("local", "hadoop")) {
## keyval compare
kv.cmp = function(kv1, kv2) {
- kv1 = rmr:::split.keyval(kv1)
- kv2 = rmr:::split.keyval(kv2)
+ kv1 = rmr2:::split.keyval(kv1)
+ kv2 = rmr2:::split.keyval(kv2)
o1 = order(unlist(keys(kv1)))
o2 = order(unlist(keys(kv2)))
isTRUE(all.equal(keys(kv1)[o1], keys(kv2)[o2], tolerance=1e-4, check.attributes=FALSE)) &&
@@ -34,7 +34,7 @@ for (be in c("local", "hadoop")) {
function(kv) {
kv.cmp(kv,
from.dfs(to.dfs(kv)))},
- generators = list(rmr:::tdgg.keyval()),
+ generators = list(rmr2:::tdgg.keyval()),
sample.size = 10)
## csv
@@ -69,7 +69,7 @@ for (be in c("local", "hadoop")) {
else {
kv1 = from.dfs(mapreduce(input = to.dfs(kv)))
kv.cmp(kv, kv1)}},
- generators = list(rmr:::tdgg.keyval()),
+ generators = list(rmr2:::tdgg.keyval()),
sample.size = 10)
##put in a reduce for good measure
@@ -79,7 +79,7 @@ for (be in c("local", "hadoop")) {
kv1 = from.dfs(mapreduce(input = to.dfs(kv),
reduce = to.reduce(identity)))
kv.cmp(kv, kv1)}},
- generators = list(rmr:::tdgg.keyval()),
+ generators = list(rmr2:::tdgg.keyval()),
sample.size = 10)
# for(fmt in c("json", "sequence.typedbytes")) {
@@ -42,9 +42,9 @@ wordcount =
combine = T)}
## @knitr end
-rmr:::hdfs.put("/etc/passwd", "/tmp/wordcount-test")
+rmr2:::hdfs.put("/etc/passwd", "/tmp/wordcount-test")
rmr.options(backend = "local")
out.local = from.dfs(wordcount("/tmp/wordcount-test", pattern = " +"))
rmr.options(backend = "hadoop")
out.hadoop = from.dfs(wordcount("/tmp/wordcount-test", pattern = " +"))
-stopifnot(rmr:::cmp(out.hadoop, out.local))
+stopifnot(rmr2:::cmp(out.hadoop, out.local))

0 comments on commit 38ebe1b

Please sign in to comment.