You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by GitBox <gi...@apache.org> on 2019/12/19 07:54:08 UTC

[GitHub] [kylin] zhoukangcn opened a new pull request #1008: KYLIN-4227: add segment build callback

zhoukangcn opened a new pull request #1008: KYLIN-4227: add segment build callback
URL: https://github.com/apache/kylin/pull/1008
 
 
   see: https://issues.apache.org/jira/browse/KYLIN-4227

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [kylin] zhoukangcn commented on issue #1008: KYLIN-4227: add segment build callback

Posted by GitBox <gi...@apache.org>.
zhoukangcn commented on issue #1008: KYLIN-4227: add segment build callback
URL: https://github.com/apache/kylin/pull/1008#issuecomment-570980699
 
 
   @nichunen Could you help to review this? Thank you

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [kylin] hit-lacus commented on a change in pull request #1008: KYLIN-4227: add segment build callback

Posted by GitBox <gi...@apache.org>.
hit-lacus commented on a change in pull request #1008: KYLIN-4227: add segment build callback
URL: https://github.com/apache/kylin/pull/1008#discussion_r369499209
 
 

 ##########
 File path: engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java
 ##########
 @@ -257,6 +266,36 @@ void setJobType(String jobType) {
         return Pair.newPair(title, content);
     }
 
+    public void invokeCallback(ExecutableContext executableContext) {
+        try {
+            String cubeName = CubingExecutableUtil.getCubeName(getParams());
+            CubeDesc cubeDesc = CubeDescManager.getInstance(getConfig()).getCubeDesc(cubeName);
+            if (StringUtils.isBlank(cubeDesc.getCubeCallback())) {
+                logger.info("cubeName:" + cubeName + ", callback url is empty");
+                return;
+            }
+            String segmentId = CubingExecutableUtil.getSegmentId(getParams());
+            CubeSegment cubeSegment = CubingExecutableUtil.findSegment(executableContext, cubeName, segmentId);
+            StringBuilder sb = new StringBuilder(cubeDesc.getCubeCallback());
+            SegmentRange.TSRange tsRange = cubeSegment.getTSRange();
+            sb.append("?cube=").append(cubeName)
 
 Review comment:
   1. Hard code the url parm seems not like a good practice(I am not really sure), maybe it should be in more user-defined way.
   2. It is a blocking call (synchronous), will it cause build more slow when the endpoint is down?
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services