小编pag*_*off的帖子

按字段分组并在最大日期聚合

我有mongo类型的文件-

{
    "_id" : ObjectId("77f02ee61df85c423b6a4e79"),
    "client" : "1"
    "type" : "type1",
    "hierarchy" : "hier1",
    "creationDate" : ISODate("2015-09-09T13:06:44Z"),
    "model" : "m1"
},
{
    "_id" : ObjectId("77f02ee61df85c423b6a4e80"),
    "client" : "1"
    "type" : "type1",
    "hierarchy" : "hier1",
    "creationDate" : ISODate("2015-09-10T14:06:44Z"),
    "model" : "m2"
},
{
    "_id" : ObjectId("77f02ee61df85c423b6a4e81"),
    "client" : "1"
    "type" : "type1",
    "hierarchy" : "hier2",
    "creationDate" : ISODate("2015-09-10T13:06:44Z"),
    "model" : "m3"
},
{
    "_id" : ObjectId("77f02ee61df85c423b6a4e82"),
    "client" : "2"
    "type" : "type2",
    "hierarchy" : "hier2",
    "creationDate" : ISODate("2015-09-10T14:06:44Z"),
    "model" …
Run Code Online (Sandbox Code Playgroud)

mongodb aggregation-framework

1
推荐指数
1
解决办法
5349
查看次数

将值放在 Hbase 中同一系列的多个列中

我正在寻找一个 Hbase put 命令,该命令可以将值插入到 Hbase 表中相同行键的同一列族中的多个列中。假设我有一个名为“employee”的 hbase 表,其中包含 1 个列族“data”

我正在应用以下命令,但它会引发错误。

PUT 'employee' 'data:column1', 'column1_val', 'data:column2', 'column_val2'
ERROR: no method 'add' for arguments (org.jruby.java.proxies.ArrayJavaProxy,org.jruby.RubyNil,org.jruby.RubyString,org.jruby.java.proxies.ArrayJavaProxy) on Java::OrgApacheHadoopHbaseClient::Put available overloads:
Run Code Online (Sandbox Code Playgroud)

但是,如果我为每个列值插入尝试单独的 put 命令,它工作正常。

PUT 'employee' 'data:column1', 'column1_val'
PUT 'employee' 'data:column2', 'column2_val'
Run Code Online (Sandbox Code Playgroud)

有没有办法在单个 put 命令中将值插入属于同一列族的多个列?

hadoop hbase

1
推荐指数
1
解决办法
5560
查看次数

标签 统计

aggregation-framework ×1

hadoop ×1

hbase ×1

mongodb ×1