我正在尝试使用命令yum install contextBroker更新Orion ContextBroker.不幸的是我收到以下错误:
加载的插件:fastermirror,refresh-packagekit,安全加载
来自缓存主机文件的镜像速度
错误:无法检索存储库的metalink:epel.请验证其路径,然后重试
怎么可能出错?
我在SpagoBI下使用groovy脚本.我想使用聚合.我想要例如执行以下聚合:
db.myCollection.aggregate(
   [
      {
        $group : {
           _id : { day: { $dayOfMonth: "$recvTime" } }
        }
      }
   ]
)
Run Code Online (Sandbox Code Playgroud)
我试过了:
DBObject projectFields = new BasicDBObject('$dayOfMonth',"recvTime");
DBObject project=new BasicDBObject('$project',projectFields)
DBObject groupFields = new BasicDBObject( "_id",project);
DBObject group = new BasicDBObject('$group', groupFields);
iterable = db.getCollection('myCollection').aggregate(group)  
Run Code Online (Sandbox Code Playgroud)
我收到了这个错误:
An unexpected error occured while executing dataset: { "serverUsed" : "192.168.1.160:27017" , "errmsg" : "exception: invalid operator '$project'" , "code" : 15999 , "ok" : 0.0}
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
更新:在Mongo shell中执行的查询
db['cygnus_/kurapath_enocean_power_enocean'].aggregate(
...    [
...       {
... …Run Code Online (Sandbox Code Playgroud) 我需要将大文件(至少14MB)从FIWARE Lab的Cosmos实例传输到我的后端.
我使用Spring RestTemplate作为此处描述的Hadoop WebHDFS REST API的客户端接口,但我遇到了IO异常:
Exception in thread "main" org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://cosmos.lab.fiware.org:14000/webhdfs/v1/user/<user.name>/<path>?op=open&user.name=<user.name>":Truncated chunk ( expected size: 14744230; actual size: 11285103); nested exception is org.apache.http.TruncatedChunkException: Truncated chunk ( expected size: 14744230; actual size: 11285103)
    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:580)
    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:545)
    at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:466)
Run Code Online (Sandbox Code Playgroud)
这是生成异常的实际代码:
RestTemplate restTemplate = new RestTemplate();
restTemplate.setRequestFactory(new HttpComponentsClientHttpRequestFactory());
restTemplate.getMessageConverters().add(new ByteArrayHttpMessageConverter()); 
HttpEntity<?> entity = new HttpEntity<>(headers);
UriComponentsBuilder builder = 
    UriComponentsBuilder.fromHttpUrl(hdfs_path)
        .queryParam("op", "OPEN")
        .queryParam("user.name", user_name);
ResponseEntity<byte[]> response =
    restTemplate
        .exchange(builder.build().encode().toUri(), HttpMethod.GET, entity, byte[].class);
FileOutputStream …Run Code Online (Sandbox Code Playgroud) 按照我之前的问题如何在MapViewer小部件中显示OrionContextBroker中的实体我使用Rush配置了我的上下文代理实例,我使用https://ngsiproxy.lab.fi-ware.org作为NGSI代理.
我启动orionContextBroker实例,如下所示:contextBroker -rush localhost:5001,一切似乎都正常工作(我可以插入/查询数据等),但是当MapViewerWidget被加载时,我从OrionInstance日志中获取此消息:
INFO@17:32:53  clientSocketHttp.cpp[152]: Starting transaction to ngsiproxy.lab.fi-ware.org:443/callbacks/19:32:59-1:19:33:01-1
WARNING@17:32:53  clientSocketHttp.cpp[342]: Notification failure for localhost:5001 (curl_easy_perform failed: Couldn't connect to server)
INFO@17:32:53  clientSocketHttp.cpp[359]: Transaction ended
Run Code Online (Sandbox Code Playgroud)
谢谢!
我最近看到FIWARE Lab中对Cosmos的WebHDFS的访问受到了OAuth2的保护.我知道我必须向请求添加OAuth2令牌才能继续使用WebHDFS,但是:
如果没有令牌,API始终会返回:
$ curl -X GET "http://cosmos.lab.fi-ware.org:14000/webhdfs/v1/user/gtorodelvalle?op=liststatus&user.name=gtorodelvalle"
Auth-token not found in request header
Run Code Online (Sandbox Code Playgroud) 在当前版本的Orion Context Broker,0.23.0中,新增功能之一是它支持根据属性值(NGSI v2)过滤实体.我正在执行GET操作,如http://telefonicaid.github.io/fiware-orion/api/v2/所示,我获得的是整套实体,没有过滤操作.有关如何使用新的REST API NGSI v2的明确示例,请您帮我解决这个问题吗?
非常感谢你提前
我已在FILAB中部署了Orion实例,并已配置了Cygnus inyector,以便在Cosmos中存储信息。
但是...让我们想象一下这样一种场景,其中实体的数量急剧增加。在这种假设的情况下,仅Orion GE的一个实例是不够的,因此有必要部署更多实例。
比例程序是什么?考虑到最大配额为:
VM实例:5个VCPU:10个硬盘:100 GB内存:10240 MB公用IP:1
我知道配额可能会更改,但是免费帐户限额是多少?
Cosmos头节点中的硬盘限制是多少?(理论上为5GB配额)
是否可以通过单个公共IP部署更多Orion Context Broker实例,还是有必要要求多个公共IP?怎么样?
总而言之,我要求提供有关拟议方案的扩展程序和免费帐户限制(可能的最大配额)的信息。
先感谢您。亲切的问候。
拉蒙
这个问题非常类似于Orion CB Entity在通过IDAS注册设备时的缺失属性,但在那里没有找到明确的答案.
我一直在尝试使用IDWare通过IDAS将UL2.0送到在Fiware-Lab环境中工作的Orion CB:
我有一个FI-WARE Lab帐户,生成了令牌.修改了config.ini文件:
[user]
# Please, configure here your username at FIWARE Cloud and a valid Oauth2.0 TOKEN for your user (you can use get_token.py to obtain a valid TOKEN).
username=MY_USERNAME
token=MY_TOKEN
[contextbroker]
host=130.206.80.40
port=1026
OAuth=no
# Here you need to specify the ContextBroker database you are querying.
# Leave it blank if you want the general database or the IDAS service if you are looking for IoT devices …Run Code Online (Sandbox Code Playgroud) 考虑到 Orion Context Broker 的“生产”使用,我想知道 Orion Context Broker 在消息传递方面提供了什么样的保证——无论是从生产者还是消费者的角度来看?特别是,要记住各种可能的故障场景(CB 故障/重启、网络瞬时故障、消费者故障/重启等),以及 CB 中资源拥塞的可能性。几个例子:
1)如果上下文更新操作成功,是否保证后续查询将返回最新数据(例如,即使CB在确认更新请求后立即失败,然后重新启动)?
2)如果消费者订阅了某些上下文信息,是否保证它将收到所有相关更新——恰好一次,至少一次,甚至根本没有?(例如,CB 和消费者之间出现暂时性网络故障的情况)
3)如果消费者更新了其订阅,是否能保证后续更新能够准确反映它?(例如,如果CB在确认订阅请求后立即失败,然后重新启动)
4)如果消费者订阅了上下文更改(“onchange”,无限制),并且生产者有多个后续更新影响同一属性,是否保证每个更改都将被发送(或者可能会跳过某些更改) -- 例如,由于 CB 在某个时间段内需要发送太多通知),按任何特定顺序?
ETC...
谢谢!
当尝试使用STH来存储和检索发送到OCB的数据时,我在进行订阅时遇到问题.
我的问题是订阅创建顺利.当我按以下方式创建订阅时:
POST /v1/contextSubscriptions HTTP/1.1
Host: <cb_host>:1026
Content-Type: application/json
Fiware-Service: myService
Fiware-ServicePath: /myServicePath
Cache-Control: no-cache
{
  "entities": [
    {
      "type": "cameraSimple",
      "isPattern": "true",
      "id": "sensor03"
    }
  ],
  "attributes": [ 
    "class" 
    ],
  "reference": "http://<cb_host>:8666/notify",
  "duration": "P1M",
  "notifyConditions": [
    {
      "type": "ONCHANGE",
      "condValues": [
        "class"
        ]
    }
  ],
    "throttling": "PT5S"
}
Run Code Online (Sandbox Code Playgroud)
我收到以下答案:
{
  "subscribeResponse": {
    "subscriptionId": "588b4f38e2066a50fa98df9b",
    "duration": "P1M",
    "throttling": "PT5S"
  }
}
Run Code Online (Sandbox Code Playgroud)
但是在Fiware服务器上,我看到有关运行容器的终端中的条件的错误,以及有关属性的另一个错误:
orion               | ERROR@14:06:10  safeMongo.cpp[302]: Runtime Error (field 'conditions' was supposed to be an array but type=4 in BSONObj …Run Code Online (Sandbox Code Playgroud) fiware ×10
fiware-orion ×6
epel ×1
groovy ×1
hadoop ×1
httpclient ×1
mongodb ×1
rpm ×1
webhdfs ×1
yum ×1