【发布时间】:2014-12-09 13:29:28
【问题描述】:
当我尝试将数据存储查询与这样的过滤器一起使用时:
Query billQuery = new Query("Bill");
billQuery.setFilter(new Query.FilterPredicate("payedOn", Query.FilterOperator.GREATER_THAN, new Date()));
并尝试运行:
new MapReduceSpecification.Builder, List>>>(new DatastoreInput(billQuery, mapShardCount),
new SimpleCounter("BillID"), new CountReducer(), new InMemoryOutput>())
.setKeyMarshaller(Marshallers.getStringMarshaller())
.setValueMarshaller(Marshallers.getLongMarshaller())
.setJobName("MapReduceTest count")
.setNumReducers(reduceShardCount)
.build();
我得到了这个例外:
<strong>java.lang.IllegalArgumentException: payedOn: com.google.appengine.api.datastore.Entity is not a supported property type.</strong>
其中“paidOn”是数据存储实体中具有日期值的属性。
这个 ewxample 与 [example] 中的非常相似:
所以我想我做错了什么,但我不知道,这是一个标准的数据存储查询。 有什么建议么?
【问题讨论】:
标签: java google-app-engine mapreduce