Redian新闻
>
mongodb自带的map/reduce跟hadoop的有什么关联吗?
avatar
mongodb自带的map/reduce跟hadoop的有什么关联吗?# Java - 爪哇娇娃
r*h
1
id value
1 a
1 b
1 c
want something like
id value
1 a,b,c
Any single SQL statement can do this? (MySQL doesn't count...)
Thanks.
avatar
p*2
2
从功能上来说。是不是一般的处理用mongodb的也可以呀?
avatar
z*y
3
try this one
Create function [dbo].[myFun]
(@P1 int)
returns varchar(1000)
as
begin
declare @aa varchar(1000);
set @aa ='';
select @aa = [value] + ',' + @aa from myTable
where id = @P1 order by [value] desc;
return @aa;
end
select top 1 [id] , [dbo].[myFun]([id]) from myTable where [id] = 1;

【在 r******h 的大作中提到】
: id value
: 1 a
: 1 b
: 1 c
: want something like
: id value
: 1 a,b,c
: Any single SQL statement can do this? (MySQL doesn't count...)
: Thanks.

avatar
p*3
4
不知道啊
avatar
B*g
5
sql server solution. http://www.mitbbs.com/article_t/Database/31141059.html
need oracle? kao gu yourself.

【在 r******h 的大作中提到】
: id value
: 1 a
: 1 b
: 1 c
: want something like
: id value
: 1 a,b,c
: Any single SQL statement can do this? (MySQL doesn't count...)
: Thanks.

avatar
z*e
6
是吧,其关系就跟hbase和mongodb一样
avatar
t*e
8
没有关系。Mongo做Hadoop的data source也不会快过HBase,没有data proximity。
avatar
p*2
10

我是说mongo自带的map/reduce feature。如果简单的应用是不是就不用上hadoop了?

【在 t*******e 的大作中提到】
: 没有关系。Mongo做Hadoop的data source也不会快过HBase,没有data proximity。
avatar
l*m
11
mongo的mr是用的js, 还没有用v8, 十分慢

【在 p*****2 的大作中提到】
:
: 我是说mongo自带的map/reduce feature。如果简单的应用是不是就不用上hadoop了?

avatar
z*e
12
mongodb真是nosql里面的一块奇芭
既然都用c写了,怎么mapreduce还用其它的引擎?

【在 l*******m 的大作中提到】
: mongo的mr是用的js, 还没有用v8, 十分慢
avatar
l*m
13
人手不够吧。先搞个js version, c 慢慢搞。他的query是基于c的, 比较快,但有内
存限制。反正十分恶心。只适合作ad hoc 小databases

【在 z****e 的大作中提到】
: mongodb真是nosql里面的一块奇芭
: 既然都用c写了,怎么mapreduce还用其它的引擎?

avatar
t*e
14
主要是index都放memory里面。data size没什么限制,但index size的限制影响可执行
的ad hoc queries数量。

【在 l*******m 的大作中提到】
: 人手不够吧。先搞个js version, c 慢慢搞。他的query是基于c的, 比较快,但有内
: 存限制。反正十分恶心。只适合作ad hoc 小databases

avatar
g*g
15
mongo就是对RDBMS过来的上手比较容易,scale一上来一堆恶心东西。
avatar
p*2
16
看来就是适合startup呀。scale小的时候用起来可能不错。
avatar
p*2
17
cassandra的query一般怎么搞呀?
avatar
p*c
18
CQL或者自己写mapreduce吧
CQL也比较狗血

【在 p*****2 的大作中提到】
: cassandra的query一般怎么搞呀?
avatar
w*z
19
C* is like a big hash table. you need to query by row key , then do column
slice based on column name. Columns are stored sorted on the disk. it is
called SStable .

【在 p*****2 的大作中提到】
: cassandra的query一般怎么搞呀?
avatar
w*z
20
cql is bad.

【在 p***c 的大作中提到】
: CQL或者自己写mapreduce吧
: CQL也比较狗血

avatar
p*c
21
嗯,这个我知道,用了下,不称手
只能query key?那不是非常原始?

【在 w**z 的大作中提到】
: cql is bad.
avatar
w*z
22
you need to design schema that way, otherwise C* is not for you . cql is
misleading, if you don't understand how c* stores data, it will bite you.

【在 p***c 的大作中提到】
: 嗯,这个我知道,用了下,不称手
: 只能query key?那不是非常原始?

avatar
p*c
23
Thanks for the tip. 有推荐的视频文章之类的么?最近正在挑后台平台

.

【在 w**z 的大作中提到】
: you need to design schema that way, otherwise C* is not for you . cql is
: misleading, if you don't understand how c* stores data, it will bite you.

avatar
w*z
24
datastax has decent documentation.

【在 p***c 的大作中提到】
: Thanks for the tip. 有推荐的视频文章之类的么?最近正在挑后台平台
:
: .

avatar
p*c
25
Thanks
我就是在datastax上找了几个例子,试了下cql,就发现文档不行,还得google菜发现
spec变了,syntax也变了,我靠,浪费了生命中宝贵半小时。文档或者教程都不清楚
,各个版本之间文档也不太准确,说实话文档support上比10gen的差

【在 w**z 的大作中提到】
: datastax has decent documentation.
avatar
w*z
26
there is mail list and IRC . You can ask question there.

【在 p***c 的大作中提到】
: Thanks
: 我就是在datastax上找了几个例子,试了下cql,就发现文档不行,还得google菜发现
: spec变了,syntax也变了,我靠,浪费了生命中宝贵半小时。文档或者教程都不清楚
: ,各个版本之间文档也不太准确,说实话文档support上比10gen的差

avatar
g*g
27
cql is actually too high level for many jobs, and it makes you think like
SQL.
Try astyanax, a low level API that's pretty easy to pick up. When I started
with Cassandra, cql didn't even exist, the only alternative was cli.

【在 p***c 的大作中提到】
: Thanks
: 我就是在datastax上找了几个例子,试了下cql,就发现文档不行,还得google菜发现
: spec变了,syntax也变了,我靠,浪费了生命中宝贵半小时。文档或者教程都不清楚
: ,各个版本之间文档也不太准确,说实话文档support上比10gen的差

avatar
p*c
28
Thanks,will check it out

started

【在 g*****g 的大作中提到】
: cql is actually too high level for many jobs, and it makes you think like
: SQL.
: Try astyanax, a low level API that's pretty easy to pick up. When I started
: with Cassandra, cql didn't even exist, the only alternative was cli.

avatar
p*c
29
Thanks, you guys are more helpful, hahaha

【在 w**z 的大作中提到】
: there is mail list and IRC . You can ask question there.
avatar
t*e
30
NoSQL一般都不是general purpose OLTP。Mongo算是不错的,比较类似SQL。优点是非
常快,但看看实际的use cases,大都是用来archive data。一般没特殊要求还是
relational最可靠。

【在 p*****2 的大作中提到】
: 看来就是适合startup呀。scale小的时候用起来可能不错。
avatar
w*z
31
yes, astyanax is the best Java client lib. it is backed by netflix. the
only drawback is you have to live with what N is using. I don't think they
are using 1.2 yet . so you might not get the support for the latest feature
. but in most cases , it is ok. Cannot go wrong following big guys. if you
are going to deploy C* in AWS, N has the best tools for that also. Check
out their github, you will be amazed .

started

【在 g*****g 的大作中提到】
: cql is actually too high level for many jobs, and it makes you think like
: SQL.
: Try astyanax, a low level API that's pretty easy to pick up. When I started
: with Cassandra, cql didn't even exist, the only alternative was cli.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。