You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ni...@apache.org on 2019/06/25 03:50:54 UTC
[kylin] branch 2.6.x updated: KYLIN-3980 Cube planner cuboid id
error when dimensions too many
This is an automated email from the ASF dual-hosted git repository.
nic pushed a commit to branch 2.6.x
in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/2.6.x by this push:
new fc3f5f2 KYLIN-3980 Cube planner cuboid id error when dimensions too many
fc3f5f2 is described below
commit fc3f5f290d5551d65aff5606a84085ee6fdd1a72
Author: liapan <li...@ebay.com>
AuthorDate: Sun May 5 11:22:46 2019 +0800
KYLIN-3980 Cube planner cuboid id error when dimensions too many
---
.../kylin/rest/request/JobOptimizeRequest.java | 23 +++++++++++++++++++---
.../kylin/rest/response/CuboidTreeResponse.java | 2 ++
2 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/server-base/src/main/java/org/apache/kylin/rest/request/JobOptimizeRequest.java b/server-base/src/main/java/org/apache/kylin/rest/request/JobOptimizeRequest.java
index 51e8e7c..71c4dd5 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/request/JobOptimizeRequest.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/request/JobOptimizeRequest.java
@@ -18,17 +18,34 @@
package org.apache.kylin.rest.request;
+import com.google.common.base.Function;
+import com.google.common.collect.FluentIterable;
+import com.google.common.collect.Sets;
+import javax.annotation.Nullable;
+
import java.util.Set;
public class JobOptimizeRequest {
- private Set<Long> cuboidsRecommend;
+ private Set<String> cuboidsRecommend;
public Set<Long> getCuboidsRecommend() {
- return cuboidsRecommend;
+ return Sets.newHashSet(FluentIterable.from(cuboidsRecommend).transform(new Function<String, Long>() {
+ @Nullable
+ @Override
+ public Long apply(@Nullable String cuboid) {
+ return Long.valueOf(cuboid);
+ }
+ }));
}
public void setCuboidsRecommend(Set<Long> cuboidsRecommend) {
- this.cuboidsRecommend = cuboidsRecommend;
+ this.cuboidsRecommend = Sets.newHashSet(FluentIterable.from(cuboidsRecommend).transform(new Function<Long, String>() {
+ @Nullable
+ @Override
+ public String apply(@Nullable Long cuboid) {
+ return Long.toString(cuboid);
+ }
+ }));
}
}
\ No newline at end of file
diff --git a/server-base/src/main/java/org/apache/kylin/rest/response/CuboidTreeResponse.java b/server-base/src/main/java/org/apache/kylin/rest/response/CuboidTreeResponse.java
index b416084..f1ee229 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/response/CuboidTreeResponse.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/response/CuboidTreeResponse.java
@@ -21,6 +21,7 @@ package org.apache.kylin.rest.response;
import java.io.Serializable;
import java.util.List;
+import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.Lists;
@@ -40,6 +41,7 @@ public class CuboidTreeResponse implements Serializable {
public static class NodeInfo {
@JsonProperty("cuboid_id")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;
@JsonProperty("name")
private String name;