You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2016/10/26 04:00:25 UTC

[1/3] kylin git commit: minor, remove unused entry in kylin.properties

Repository: kylin
Updated Branches:
  refs/heads/v1.6.0-rc1 43d66a1d3 -> 772fa541a


minor, remove unused entry in kylin.properties


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/772fa541
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/772fa541
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/772fa541

Branch: refs/heads/v1.6.0-rc1
Commit: 772fa541adcda01e624f15b42381bcee6886d59f
Parents: e901cf2
Author: shaofengshi <sh...@apache.org>
Authored: Wed Oct 26 11:59:44 2016 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Wed Oct 26 12:00:13 2016 +0800

----------------------------------------------------------------------
 build/conf/kylin.properties | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/772fa541/build/conf/kylin.properties
----------------------------------------------------------------------
diff --git a/build/conf/kylin.properties b/build/conf/kylin.properties
index ed86bdb..33a4e76 100644
--- a/build/conf/kylin.properties
+++ b/build/conf/kylin.properties
@@ -48,9 +48,6 @@ kylin.metadata.url=kylin_metadata@hbase
 # The storage for final cube file in hbase
 kylin.storage.url=hbase
 
-# In seconds (2 days)
-kylin.storage.cleanup.time.threshold=172800000
-
 # Working folder in HDFS, make sure user has the right access to the hdfs directory
 kylin.hdfs.working.dir=/kylin
 


[2/3] kylin git commit: KYLIN-2070 UI changes for allowing concurrent build/refresh/merge

Posted by sh...@apache.org.
KYLIN-2070 UI changes for allowing concurrent build/refresh/merge

Signed-off-by: shaofengshi <sh...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/e901cf28
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/e901cf28
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/e901cf28

Branch: refs/heads/v1.6.0-rc1
Commit: e901cf282f9ba7617628526eceac3e61938d5d08
Parents: 7830f83
Author: luguosheng <55...@qq.com>
Authored: Fri Oct 21 11:40:19 2016 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Wed Oct 26 12:00:13 2016 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/cubes.js | 40 ++++++++++++++++++++++++++++-----
 webapp/app/js/services/cubes.js    |  1 +
 2 files changed, 36 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/e901cf28/webapp/app/js/controllers/cubes.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubes.js b/webapp/app/js/controllers/cubes.js
index 499e93c..f735fb8 100644
--- a/webapp/app/js/controllers/cubes.js
+++ b/webapp/app/js/controllers/cubes.js
@@ -334,12 +334,42 @@ KylinApp.controller('CubesCtrl', function ($scope, $q, $routeParams, $location,
       $scope.loadDetail(cube);
       // for streaming cube build tip
       if(cube.streaming){
-        $modal.open({
-          templateUrl: 'streamingBuild.html',
-          controller: streamingBuildCtrl,
-          resolve: {
+
+        SweetAlert.swal({
+          title: '',
+          text: "Are you sure to start the build?",
+          type: '',
+          showCancelButton: true,
+          confirmButtonColor: '#DD6B55',
+          confirmButtonText: "Yes",
+          closeOnConfirm: true
+        }, function(isConfirm) {
+          if(isConfirm){
+            loadingRequest.show();
+            CubeService.rebuildStreamingCube(
+              {
+                cubeId: cube.name
+              },
+              {
+                sourceOffsetStart:0,
+                sourceOffsetEnd:'9223372036854775807',
+                buildType:'BUILD'
+              }, function (job) {
+                loadingRequest.hide();
+                SweetAlert.swal('Success!', 'Rebuild job was submitted successfully', 'success');
+              },function(e){
+
+                loadingRequest.hide();
+                if(e.data&& e.data.exception){
+                  var message =e.data.exception;
+                  var msg = !!(message) ? message : 'Failed to take action.';
+                  SweetAlert.swal('Oops...', msg, 'error');
+                }else{
+                  SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+                }
+            });
           }
-        });
+        })
         return;
       }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/e901cf28/webapp/app/js/services/cubes.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/cubes.js b/webapp/app/js/services/cubes.js
index 953f157..de60f55 100644
--- a/webapp/app/js/services/cubes.js
+++ b/webapp/app/js/services/cubes.js
@@ -26,6 +26,7 @@ KylinApp.factory('CubeService', ['$resource', function ($resource, config) {
     cost: {method: 'PUT', params: {action: 'cost'}, isArray: false},
     rebuildLookUp: {method: 'PUT', params: {propName: 'segs', action: 'refresh_lookup'}, isArray: false},
     rebuildCube: {method: 'PUT', params: {action: 'rebuild'}, isArray: false},
+    rebuildStreamingCube: {method: 'PUT', params: {action: 'build2'}, isArray: false},
     disable: {method: 'PUT', params: {action: 'disable'}, isArray: false},
     enable: {method: 'PUT', params: {action: 'enable'}, isArray: false},
     purge: {method: 'PUT', params: {action: 'purge'}, isArray: false},


[3/3] kylin git commit: KYLIN-1726 update sampleProducer and kylin.sh

Posted by sh...@apache.org.
KYLIN-1726 update sampleProducer and kylin.sh

Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/7830f837
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/7830f837
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/7830f837

Branch: refs/heads/v1.6.0-rc1
Commit: 7830f837f7dc7f2e13e86155d408517ffbc4fa87
Parents: 43d66a1
Author: shaofengshi <sh...@apache.org>
Authored: Tue Oct 25 18:19:40 2016 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Wed Oct 26 12:00:13 2016 +0800

----------------------------------------------------------------------
 build/bin/kylin.sh                              |  7 +++--
 .../source/kafka/util/KafkaSampleProducer.java  | 29 ++++++++++++--------
 2 files changed, 22 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/7830f837/build/bin/kylin.sh
----------------------------------------------------------------------
diff --git a/build/bin/kylin.sh b/build/bin/kylin.sh
index 9286055e..ad3a952 100644
--- a/build/bin/kylin.sh
+++ b/build/bin/kylin.sh
@@ -32,7 +32,6 @@ function retrieveDependency() {
     #retrive $hive_dependency and $hbase_dependency
     source ${dir}/find-hive-dependency.sh
     source ${dir}/find-hbase-dependency.sh
-    #source ${dir}/find-kafka-dependency.sh
 
     #retrive $KYLIN_EXTRA_START_OPTS
     if [ -f "${dir}/setenv.sh" ]
@@ -41,7 +40,11 @@ function retrieveDependency() {
 
     export HBASE_CLASSPATH_PREFIX=${KYLIN_HOME}/conf:${KYLIN_HOME}/lib/*:${KYLIN_HOME}/tool/*:${KYLIN_HOME}/ext/*:${HBASE_CLASSPATH_PREFIX}
     export HBASE_CLASSPATH=${HBASE_CLASSPATH}:${hive_dependency}
-    #export HBASE_CLASSPATH=${HBASE_CLASSPATH}:${kafka_dependency}
+    if [ -n "$KAFKA_HOME" ]
+    then
+        source ${dir}/find-kafka-dependency.sh
+        export HBASE_CLASSPATH=${HBASE_CLASSPATH}:${kafka_dependency}
+    fi
 }
 
 # start command

http://git-wip-us.apache.org/repos/asf/kylin/blob/7830f837/source-kafka/src/main/java/org/apache/kylin/source/kafka/util/KafkaSampleProducer.java
----------------------------------------------------------------------
diff --git a/source-kafka/src/main/java/org/apache/kylin/source/kafka/util/KafkaSampleProducer.java b/source-kafka/src/main/java/org/apache/kylin/source/kafka/util/KafkaSampleProducer.java
index 3d26d3d..b8f98aa 100644
--- a/source-kafka/src/main/java/org/apache/kylin/source/kafka/util/KafkaSampleProducer.java
+++ b/source-kafka/src/main/java/org/apache/kylin/source/kafka/util/KafkaSampleProducer.java
@@ -26,6 +26,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Random;
+import java.util.UUID;
 
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.OptionBuilder;
@@ -48,7 +49,6 @@ public class KafkaSampleProducer {
     @SuppressWarnings("static-access")
     private static final Option OPTION_TOPIC = OptionBuilder.withArgName("topic").hasArg().isRequired(true).withDescription("Kafka topic").create("topic");
     private static final Option OPTION_BROKER = OptionBuilder.withArgName("broker").hasArg().isRequired(true).withDescription("Kafka broker").create("broker");
-    private static final Option OPTION_DELAY = OptionBuilder.withArgName("delay").hasArg().isRequired(false).withDescription("Simulated message delay in mili-seconds, default 0").create("delay");
     private static final Option OPTION_INTERVAL = OptionBuilder.withArgName("interval").hasArg().isRequired(false).withDescription("Simulated message interval in mili-seconds, default 1000").create("interval");
 
     private static final ObjectMapper mapper = new ObjectMapper();
@@ -60,21 +60,14 @@ public class KafkaSampleProducer {
         String topic, broker;
         options.addOption(OPTION_TOPIC);
         options.addOption(OPTION_BROKER);
-        options.addOption(OPTION_DELAY);
-        options.addOption(OPTION_INTERVAL);
         optionsHelper.parseOptions(options, args);
 
         logger.info("options: '" + optionsHelper.getOptionsAsString() + "'");
 
         topic = optionsHelper.getOptionValue(OPTION_TOPIC);
         broker = optionsHelper.getOptionValue(OPTION_BROKER);
-        long delay = 0;
-        String delayString = optionsHelper.getOptionValue(OPTION_DELAY);
-        if (delayString != null) {
-            delay = Long.parseLong(delayString);
-        }
 
-        long interval = 1000;
+        long interval = 10;
         String intervalString = optionsHelper.getOptionValue(OPTION_INTERVAL);
         if (intervalString != null) {
             interval = Long.parseLong(intervalString);
@@ -101,6 +94,10 @@ public class KafkaSampleProducer {
         devices.add("Andriod");
         devices.add("Other");
 
+        List<String> genders = new ArrayList();
+        genders.add("Male");
+        genders.add("Female");
+
         Properties props = new Properties();
         props.put("bootstrap.servers", broker);
         props.put("acks", "all");
@@ -117,15 +114,23 @@ public class KafkaSampleProducer {
         Random rnd = new Random();
         Map<String, Object> record = new HashMap();
         while (alive == true) {
-            record.put("order_time", (new Date().getTime() - delay));
+            //add normal record
+            record.put("order_time", (new Date().getTime()));
             record.put("country", countries.get(rnd.nextInt(countries.size())));
             record.put("category", category.get(rnd.nextInt(category.size())));
             record.put("device", devices.get(rnd.nextInt(devices.size())));
             record.put("qty", rnd.nextInt(10));
             record.put("currency", "USD");
             record.put("amount", rnd.nextDouble() * 100);
-            ProducerRecord<String, String> data = new ProducerRecord<String, String>(topic, System.currentTimeMillis() + "", mapper.writeValueAsString(record));
-            System.out.println("Sending 1 message");
+            //add embedded record
+            Map<String, Object> user = new HashMap();
+            user.put("id", UUID.randomUUID().toString());
+            user.put("gender", genders.get(rnd.nextInt(2)));
+            user.put("age", rnd.nextInt(20) + 10);
+            record.put("user", user);
+            //send message
+            ProducerRecord<String, String> data = new ProducerRecord<>(topic, System.currentTimeMillis() + "", mapper.writeValueAsString(record));
+            System.out.println("Sending 1 message: " + record.toString());
             producer.send(data);
             Thread.sleep(interval);
         }