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 2015/08/19 09:09:29 UTC
svn commit: r1696524 [4/4] - in /incubator/kylin/site: ./ blog/
blog/2015/08/ blog/2015/08/13/ blog/2015/08/13/kylin-dictionary/
blog/2015/08/15/ blog/2015/08/15/fast-cubing/ cn/docs/install/ development/
docs/ docs/gettingstarted/ docs/howto/ docs/ins...
Added: incubator/kylin/site/docs/howto/howto_use_restapi_in_js.html
URL: http://svn.apache.org/viewvc/incubator/kylin/site/docs/howto/howto_use_restapi_in_js.html?rev=1696524&view=auto
==============================================================================
--- incubator/kylin/site/docs/howto/howto_use_restapi_in_js.html (added)
+++ incubator/kylin/site/docs/howto/howto_use_restapi_in_js.html Wed Aug 19 07:09:28 2015
@@ -0,0 +1,1480 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
+<!doctype html>
+<html>
+ <!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+
+ <title>Apache Kylin | How to Use Restful API in Javascript</title>
+ <meta name="description" content="Apache Kylin Home">
+ <meta name="author" content="Apache Kylin">
+ <link rel="shortcut icon" href="fav.png" type="image/png">
+
+
+
+<link rel="stylesheet" href="/assets/css/animate.css">
+<!-- Bootstrap -->
+<link rel="stylesheet" href="/assets/css/bootstrap.min.css">
+
+<!-- Fonts -->
+<!-- <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Alice|Open+Sans:400,300,700"> -->
+
+<!-- Icons -->
+<link rel="stylesheet" href="/assets/css/font-awesome.min.css">
+
+ <!-- Custom styles -->
+ <link rel="stylesheet" href="/assets/css/styles.css">
+ <link rel="stylesheet" href="/assets/css/docs.css">
+ <link rel="stylesheet" href="/assets/css/pygments.css">
+
+ <link rel="canonical" href="http://kylin.incubator.apache.org/docs/howto/howto_use_restapi_in_js.html">
+ <link rel="alternate" type="application/rss+xml" title="Apache Kylin" href="http://kylin.incubator.apache.org/feed.xml" />
+
+<!--[if lt IE 9]> <script src="assets/js/html5shiv.js"></script> <![endif]-->
+<script>
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ //oringal tracker for kylin.io
+ ga('create', 'UA-55534813-1', 'auto');
+ //new tracker for kylin.incubator.apache.org
+ ga('create', 'UA-55534813-2', 'auto', {'name':'incubator'});
+
+ ga('send', 'pageview');
+ ga('incubator.send', 'pageview');
+
+
+</script>
+<script type="text/javascript" src="/assets/js/jquery-1.9.1.min.js"></script>
+<script type="text/javascript" src="/assets/js/nside.js"></script> </script>
+<script type="text/javascript" src="/assets/js/nnav.js"></script> </script>
+</head>
+
+ <body>
+ <!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
+<header id="header" >
+
+ <div id="head" class="parallax" parallax-speed="3" >
+ <div id="logo" class="text-center"> <img class="img-circle" id="circlelogo" src="/assets/images/kylin_logo.jpg"> <span class="title" >Apache Kylin</span> <span class="tagline">Extreme OLAP Engine for Big Data</span>
+ </div>
+ </div>
+
+
+ <!-- Main Menu -->
+ <nav class="navbar navbar-default" role="navigation" id="nav-wrapper">
+ <div class="container-fluid" id="nav">
+ <!--
+ <img class="img-circle" width="40px" height="40px" id="circlelogo" src="/assets/images/kylin_logo.jpg">
+ -->
+ <!-- Brand and toggle get grouped for better mobile display -->
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+
+ </div>
+
+ <!-- Collect the nav links, forms, and other content for toggling -->
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
+ <ul class="nav navbar-nav">
+ <li><a href="/">Home</a></li>
+ <li><a href="/docs" >Docs</a></li>
+ <li><a href="/download">Download</li>
+ <li><a href="/community" >Community</a></li>
+ <li><a href="/development" >Development</a></li>
+ <li><a href="/blog">Blog</li>
+ <li><a href="/cn" >䏿ç</a></li>
+ <li><a href="https://twitter.com/apachekylin" target="_blank" class="fa fa-twitter fa-lg" title="Twitter: @ApacheKylin" ></a></li>
+ <li><a href="https://github.com/apache/incubator-kylin" target="_blank" class="fa fa-github-alt fa-lg" title="Github: apache/incubator-kylin" ></a></li>
+ <li><a href="https://www.facebook.com/kylinio" target="_blank" class="fa fa-facebook fa-lg" title="Facebook: kylin.io" ></a></li>
+ </ul>
+ </div><!-- /.navbar-collapse -->
+ </div><!-- /.container-fluid -->
+</nav>
+ </header>
+
+
+ <div class="container">
+ <div class="row">
+ <!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
+<div class="col-md-3 col-lg-3 col-xs-4 aside1 visible-md visible-lg" id="nside1" style=" padding-top: 2em">
+ <ul class="nav nav-pills nav-stacked">
+
+ <li><a href="#titleGetting Started" data-toggle="collapse" id="navtitle">Getting Started</a></li>
+ <div class="collapse in">
+ <div class="list-group" id="list1">
+ <ul style="list-style-type:disc">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/index.html" class="list-group-item-lay pjaxlink">Overview</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/release_notes.html" class="list-group-item-lay pjaxlink">Release Notes</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/gettingstarted/faq.html" class="list-group-item-lay pjaxlink">FAQ</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/gettingstarted/events.html" class="list-group-item-lay pjaxlink">Events and Conferences</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/gettingstarted/terminology.html" class="list-group-item-lay pjaxlink">Terminology</a></li>
+
+
+
+
+
+
+
+
+ <ul>
+ </div>
+</div>
+
+ <li><a href="#titleInstallation" data-toggle="collapse" id="navtitle">Installation</a></li>
+ <div class="collapse in">
+ <div class="list-group" id="list1">
+ <ul style="list-style-type:disc">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/install/index.html" class="list-group-item-lay pjaxlink">Installation Guide</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/install/hadoop_env.html" class="list-group-item-lay pjaxlink">Hadoop Environment</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/install/manual_install_guide.html" class="list-group-item-lay pjaxlink">Manual Installation Guide</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/install/kylin_cluster.html" class="list-group-item-lay pjaxlink">Multiple Kylin REST servers</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance Settings of Kylin Environment</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/install/kylin_docker.html" class="list-group-item-lay pjaxlink">On Hadoop Kylin installation using Docker</a></li>
+
+
+
+
+
+
+
+
+ <ul>
+ </div>
+</div>
+
+ <li><a href="#titleTutorial" data-toggle="collapse" id="navtitle">Tutorial</a></li>
+ <div class="collapse in">
+ <div class="list-group" id="list1">
+ <ul style="list-style-type:disc">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/tutorial/kylin_sample.html" class="list-group-item-lay pjaxlink">Quick Start with Sample Cube</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/tutorial/create_cube.html" class="list-group-item-lay pjaxlink">Kylin Cube Creation Tutorial</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/tutorial/cube_build_job.html" class="list-group-item-lay pjaxlink">Kylin Cube Build and Job Monitoring Tutorial</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/tutorial/acl.html" class="list-group-item-lay pjaxlink">Kylin Cube Permission Grant Tutorial</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/tutorial/web.html" class="list-group-item-lay pjaxlink">Kylin Web Tutorial</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/tutorial/tableau.html" class="list-group-item-lay pjaxlink">Kylin and Tableau Tutorial</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/tutorial/odbc.html" class="list-group-item-lay pjaxlink">Kylin ODBC Driver Tutorial</a></li>
+
+
+
+
+
+
+
+
+ <ul>
+ </div>
+</div>
+
+ <li><a href="#titleHow To" data-toggle="collapse" id="navtitle">How To</a></li>
+ <div class="collapse in">
+ <div class="list-group" id="list1">
+ <ul style="list-style-type:disc">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/howto/howto_build_cube_with_restapi.html" class="list-group-item-lay pjaxlink">How to Build Cube with Restful API</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to Use Restful API in Javascript</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/howto/howto_use_restapi.html" class="list-group-item-lay pjaxlink">How to Use Restful API</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/howto/howto_backup_metadata.html" class="list-group-item-lay pjaxlink">How to Backup Metadata</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/howto/howto_backup_hbase.html" class="list-group-item-lay pjaxlink">How to Backup HBase Tables</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to Use kylin Remote JDBC Driver</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li><a href="/docs/howto/howto_upgrade.html" class="list-group-item-lay pjaxlink">How to Upgrade</a></li>
+
+
+
+
+
+
+
+
+ <ul>
+ </div>
+</div>
+
+
+ </ul>
+</div>
+ <div class="col-md-9 col-lg-9 col-xs-14 aside2">
+ <div id="container">
+ <div id="pjax">
+ <h1 class="post-title">How to Use Restful API in Javascript</h1>
+
+ <p>version: v0.8, since: v0.7.1</p>
+
+
+ <p>Kypin securicty authorization is based on basic access authorization, so when you want to use API in your javascript,you need to involve the authorization info in http headers.</p>
+
+<h2 id="here-is-a-demo-show-how-to-use-kylin-query-api">Here is a demo show how to use Kylin Query API.</h2>
+<div class="highlighter-rouge"><pre class="highlight"><code>$.ajaxSetup({
+ headers: { 'Authorization': "Basic eWFu**********X***ZA==", 'Content-Type': 'application/json;charset=utf-8' } // use your own authorization code here
+ });
+ var request = $.ajax({
+ url: "http://hostname/kylin/api/query",
+ type: "POST",
+ data: '{"sql":"select count(*) from SUMMARY;","offset":0,"limit":50000,"partial":true,"project":"test"}',
+ dataType: "json"
+ });
+ request.done(function( msg ) {
+ alert(msg);
+ });
+ request.fail(function( jqXHR, textStatus ) {
+ alert( "Request failed: " + textStatus );
+ });
+
+</code></pre>
+</div>
+
+<p>For what is basic access authorization ,click here http://en.wikipedia.org/wiki/Basic_access_authentication</p>
+
+<h2 id="keypoint">Keypoint:</h2>
+<ol>
+ <li>add basic access authorization info in heders.</li>
+ <li>use right ajax type and right data synax</li>
+</ol>
+
+<p>How to generate your authorization code (download and import âjquery.base64.jsâ from https://github.com/yckart/jquery.base64.js)</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>var authorizationCode = $.base64('encode', 'NT_USERNAME' + ":" + 'NT_PASSWORD');
+
+$.ajaxSetup({
+ headers: {
+ 'Authorization': "Basic " + authorizationCode,
+ 'Content-Type': 'application/json;charset=utf-8'
+ }
+});
+</code></pre>
+</div>
+
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
+<footer id="underfooter">
+ <div class="container">
+ <div class="row">
+ <div class="col-md-12 widget" >
+ <div class="widget-body" style="text-align:center">
+ <div>
+ Apache Kylin is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
+ </div>
+ <a href="http://www.apache.org">
+ <img id="asf-logo" alt="Apache Software Foundation" src="/assets/images/feather-small.gif">
+ </a>
+ <a href="http://incubator.apache.org/">
+ <img id="incubator-logo" alt="Apache Incubator" src="/assets/images/egg-logo.png">
+ </a>
+
+ <div id="copyright">
+ <p>Copyright © 2014 The Apache Software Foundation, Licensed under the <a
+ href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>Apache, the
+ Apache feather logo, and the Apache Incubator project logo are trademarks of The Apache Software
+ Foundation.</p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <!-- /row of widgets -->
+
+ </div>
+ <div></div>
+
+</footer>
+
+ <script src="/assets/js/jquery-1.9.1.min.js"></script>
+ <script src="/assets/js/bootstrap.min.js"></script>
+ <script src="/assets/js/main.js"></script>
+ </body>
+</html>
Modified: incubator/kylin/site/docs/index.html
URL: http://svn.apache.org/viewvc/incubator/kylin/site/docs/index.html?rev=1696524&r1=1696523&r2=1696524&view=diff
==============================================================================
--- incubator/kylin/site/docs/index.html (original)
+++ incubator/kylin/site/docs/index.html Wed Aug 19 07:09:28 2015
@@ -574,7 +574,7 @@
- <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance settings of Kylin environment</a></li>
+ <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance Settings of Kylin Environment</a></li>
@@ -1216,7 +1216,7 @@
- <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to use Restful API in Javascript</a></li>
+ <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to Use Restful API in Javascript</a></li>
@@ -1322,7 +1322,7 @@
- <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to use kylin remote jdbc driver</a></li>
+ <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to Use kylin Remote JDBC Driver</a></li>
Modified: incubator/kylin/site/docs/install/advance_settings.html
URL: http://svn.apache.org/viewvc/incubator/kylin/site/docs/install/advance_settings.html?rev=1696524&r1=1696523&r2=1696524&view=diff
==============================================================================
--- incubator/kylin/site/docs/install/advance_settings.html (original)
+++ incubator/kylin/site/docs/install/advance_settings.html Wed Aug 19 07:09:28 2015
@@ -41,7 +41,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
- <title>Apache Kylin | Advance settings of Kylin environment</title>
+ <title>Apache Kylin | Advance Settings of Kylin Environment</title>
<meta name="description" content="Apache Kylin Home">
<meta name="author" content="Apache Kylin">
<link rel="shortcut icon" href="fav.png" type="image/png">
@@ -574,7 +574,7 @@
- <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance settings of Kylin environment</a></li>
+ <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance Settings of Kylin Environment</a></li>
@@ -1216,7 +1216,7 @@
- <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to use Restful API in Javascript</a></li>
+ <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to Use Restful API in Javascript</a></li>
@@ -1322,7 +1322,7 @@
- <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to use kylin remote jdbc driver</a></li>
+ <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to Use kylin Remote JDBC Driver</a></li>
@@ -1371,7 +1371,7 @@
<div class="col-md-9 col-lg-9 col-xs-14 aside2">
<div id="container">
<div id="pjax">
- <h1 class="post-title">Advance settings of Kylin environment</h1>
+ <h1 class="post-title">Advance Settings of Kylin Environment</h1>
<p>version: v0.7.2, since: v0.7.1</p>
Modified: incubator/kylin/site/docs/install/hadoop_env.html
URL: http://svn.apache.org/viewvc/incubator/kylin/site/docs/install/hadoop_env.html?rev=1696524&r1=1696523&r2=1696524&view=diff
==============================================================================
--- incubator/kylin/site/docs/install/hadoop_env.html (original)
+++ incubator/kylin/site/docs/install/hadoop_env.html Wed Aug 19 07:09:28 2015
@@ -574,7 +574,7 @@
- <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance settings of Kylin environment</a></li>
+ <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance Settings of Kylin Environment</a></li>
@@ -1216,7 +1216,7 @@
- <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to use Restful API in Javascript</a></li>
+ <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to Use Restful API in Javascript</a></li>
@@ -1322,7 +1322,7 @@
- <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to use kylin remote jdbc driver</a></li>
+ <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to Use kylin Remote JDBC Driver</a></li>
Modified: incubator/kylin/site/docs/install/index.html
URL: http://svn.apache.org/viewvc/incubator/kylin/site/docs/install/index.html?rev=1696524&r1=1696523&r2=1696524&view=diff
==============================================================================
--- incubator/kylin/site/docs/install/index.html (original)
+++ incubator/kylin/site/docs/install/index.html Wed Aug 19 07:09:28 2015
@@ -574,7 +574,7 @@
- <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance settings of Kylin environment</a></li>
+ <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance Settings of Kylin Environment</a></li>
@@ -1216,7 +1216,7 @@
- <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to use Restful API in Javascript</a></li>
+ <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to Use Restful API in Javascript</a></li>
@@ -1322,7 +1322,7 @@
- <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to use kylin remote jdbc driver</a></li>
+ <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to Use kylin Remote JDBC Driver</a></li>
Modified: incubator/kylin/site/docs/install/kylin_cluster.html
URL: http://svn.apache.org/viewvc/incubator/kylin/site/docs/install/kylin_cluster.html?rev=1696524&r1=1696523&r2=1696524&view=diff
==============================================================================
--- incubator/kylin/site/docs/install/kylin_cluster.html (original)
+++ incubator/kylin/site/docs/install/kylin_cluster.html Wed Aug 19 07:09:28 2015
@@ -574,7 +574,7 @@
- <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance settings of Kylin environment</a></li>
+ <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance Settings of Kylin Environment</a></li>
@@ -1216,7 +1216,7 @@
- <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to use Restful API in Javascript</a></li>
+ <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to Use Restful API in Javascript</a></li>
@@ -1322,7 +1322,7 @@
- <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to use kylin remote jdbc driver</a></li>
+ <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to Use kylin Remote JDBC Driver</a></li>
Modified: incubator/kylin/site/docs/install/kylin_docker.html
URL: http://svn.apache.org/viewvc/incubator/kylin/site/docs/install/kylin_docker.html?rev=1696524&r1=1696523&r2=1696524&view=diff
==============================================================================
--- incubator/kylin/site/docs/install/kylin_docker.html (original)
+++ incubator/kylin/site/docs/install/kylin_docker.html Wed Aug 19 07:09:28 2015
@@ -574,7 +574,7 @@
- <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance settings of Kylin environment</a></li>
+ <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance Settings of Kylin Environment</a></li>
@@ -1216,7 +1216,7 @@
- <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to use Restful API in Javascript</a></li>
+ <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to Use Restful API in Javascript</a></li>
@@ -1322,7 +1322,7 @@
- <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to use kylin remote jdbc driver</a></li>
+ <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to Use kylin Remote JDBC Driver</a></li>
Modified: incubator/kylin/site/docs/install/manual_install_guide.html
URL: http://svn.apache.org/viewvc/incubator/kylin/site/docs/install/manual_install_guide.html?rev=1696524&r1=1696523&r2=1696524&view=diff
==============================================================================
--- incubator/kylin/site/docs/install/manual_install_guide.html (original)
+++ incubator/kylin/site/docs/install/manual_install_guide.html Wed Aug 19 07:09:28 2015
@@ -574,7 +574,7 @@
- <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance settings of Kylin environment</a></li>
+ <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance Settings of Kylin Environment</a></li>
@@ -1216,7 +1216,7 @@
- <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to use Restful API in Javascript</a></li>
+ <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to Use Restful API in Javascript</a></li>
@@ -1322,7 +1322,7 @@
- <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to use kylin remote jdbc driver</a></li>
+ <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to Use kylin Remote JDBC Driver</a></li>
Modified: incubator/kylin/site/docs/release_notes.html
URL: http://svn.apache.org/viewvc/incubator/kylin/site/docs/release_notes.html?rev=1696524&r1=1696523&r2=1696524&view=diff
==============================================================================
--- incubator/kylin/site/docs/release_notes.html (original)
+++ incubator/kylin/site/docs/release_notes.html Wed Aug 19 07:09:28 2015
@@ -574,7 +574,7 @@
- <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance settings of Kylin environment</a></li>
+ <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance Settings of Kylin Environment</a></li>
@@ -1216,7 +1216,7 @@
- <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to use Restful API in Javascript</a></li>
+ <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to Use Restful API in Javascript</a></li>
@@ -1322,7 +1322,7 @@
- <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to use kylin remote jdbc driver</a></li>
+ <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to Use kylin Remote JDBC Driver</a></li>
Modified: incubator/kylin/site/docs/tutorial/acl.html
URL: http://svn.apache.org/viewvc/incubator/kylin/site/docs/tutorial/acl.html?rev=1696524&r1=1696523&r2=1696524&view=diff
==============================================================================
--- incubator/kylin/site/docs/tutorial/acl.html (original)
+++ incubator/kylin/site/docs/tutorial/acl.html Wed Aug 19 07:09:28 2015
@@ -574,7 +574,7 @@
- <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance settings of Kylin environment</a></li>
+ <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance Settings of Kylin Environment</a></li>
@@ -1216,7 +1216,7 @@
- <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to use Restful API in Javascript</a></li>
+ <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to Use Restful API in Javascript</a></li>
@@ -1322,7 +1322,7 @@
- <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to use kylin remote jdbc driver</a></li>
+ <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to Use kylin Remote JDBC Driver</a></li>
Modified: incubator/kylin/site/docs/tutorial/create_cube.html
URL: http://svn.apache.org/viewvc/incubator/kylin/site/docs/tutorial/create_cube.html?rev=1696524&r1=1696523&r2=1696524&view=diff
==============================================================================
--- incubator/kylin/site/docs/tutorial/create_cube.html (original)
+++ incubator/kylin/site/docs/tutorial/create_cube.html Wed Aug 19 07:09:28 2015
@@ -574,7 +574,7 @@
- <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance settings of Kylin environment</a></li>
+ <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance Settings of Kylin Environment</a></li>
@@ -1216,7 +1216,7 @@
- <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to use Restful API in Javascript</a></li>
+ <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to Use Restful API in Javascript</a></li>
@@ -1322,7 +1322,7 @@
- <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to use kylin remote jdbc driver</a></li>
+ <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to Use kylin Remote JDBC Driver</a></li>
Modified: incubator/kylin/site/docs/tutorial/cube_build_job.html
URL: http://svn.apache.org/viewvc/incubator/kylin/site/docs/tutorial/cube_build_job.html?rev=1696524&r1=1696523&r2=1696524&view=diff
==============================================================================
--- incubator/kylin/site/docs/tutorial/cube_build_job.html (original)
+++ incubator/kylin/site/docs/tutorial/cube_build_job.html Wed Aug 19 07:09:28 2015
@@ -574,7 +574,7 @@
- <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance settings of Kylin environment</a></li>
+ <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance Settings of Kylin Environment</a></li>
@@ -1216,7 +1216,7 @@
- <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to use Restful API in Javascript</a></li>
+ <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to Use Restful API in Javascript</a></li>
@@ -1322,7 +1322,7 @@
- <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to use kylin remote jdbc driver</a></li>
+ <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to Use kylin Remote JDBC Driver</a></li>
Modified: incubator/kylin/site/docs/tutorial/kylin_sample.html
URL: http://svn.apache.org/viewvc/incubator/kylin/site/docs/tutorial/kylin_sample.html?rev=1696524&r1=1696523&r2=1696524&view=diff
==============================================================================
--- incubator/kylin/site/docs/tutorial/kylin_sample.html (original)
+++ incubator/kylin/site/docs/tutorial/kylin_sample.html Wed Aug 19 07:09:28 2015
@@ -574,7 +574,7 @@
- <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance settings of Kylin environment</a></li>
+ <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance Settings of Kylin Environment</a></li>
@@ -1216,7 +1216,7 @@
- <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to use Restful API in Javascript</a></li>
+ <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to Use Restful API in Javascript</a></li>
@@ -1322,7 +1322,7 @@
- <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to use kylin remote jdbc driver</a></li>
+ <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to Use kylin Remote JDBC Driver</a></li>
Modified: incubator/kylin/site/docs/tutorial/odbc.html
URL: http://svn.apache.org/viewvc/incubator/kylin/site/docs/tutorial/odbc.html?rev=1696524&r1=1696523&r2=1696524&view=diff
==============================================================================
--- incubator/kylin/site/docs/tutorial/odbc.html (original)
+++ incubator/kylin/site/docs/tutorial/odbc.html Wed Aug 19 07:09:28 2015
@@ -574,7 +574,7 @@
- <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance settings of Kylin environment</a></li>
+ <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance Settings of Kylin Environment</a></li>
@@ -1216,7 +1216,7 @@
- <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to use Restful API in Javascript</a></li>
+ <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to Use Restful API in Javascript</a></li>
@@ -1322,7 +1322,7 @@
- <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to use kylin remote jdbc driver</a></li>
+ <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to Use kylin Remote JDBC Driver</a></li>
Modified: incubator/kylin/site/docs/tutorial/tableau.html
URL: http://svn.apache.org/viewvc/incubator/kylin/site/docs/tutorial/tableau.html?rev=1696524&r1=1696523&r2=1696524&view=diff
==============================================================================
--- incubator/kylin/site/docs/tutorial/tableau.html (original)
+++ incubator/kylin/site/docs/tutorial/tableau.html Wed Aug 19 07:09:28 2015
@@ -574,7 +574,7 @@
- <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance settings of Kylin environment</a></li>
+ <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance Settings of Kylin Environment</a></li>
@@ -1216,7 +1216,7 @@
- <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to use Restful API in Javascript</a></li>
+ <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to Use Restful API in Javascript</a></li>
@@ -1322,7 +1322,7 @@
- <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to use kylin remote jdbc driver</a></li>
+ <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to Use kylin Remote JDBC Driver</a></li>
Modified: incubator/kylin/site/docs/tutorial/web.html
URL: http://svn.apache.org/viewvc/incubator/kylin/site/docs/tutorial/web.html?rev=1696524&r1=1696523&r2=1696524&view=diff
==============================================================================
--- incubator/kylin/site/docs/tutorial/web.html (original)
+++ incubator/kylin/site/docs/tutorial/web.html Wed Aug 19 07:09:28 2015
@@ -574,7 +574,7 @@
- <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance settings of Kylin environment</a></li>
+ <li><a href="/docs/install/advance_settings.html" class="list-group-item-lay pjaxlink">Advance Settings of Kylin Environment</a></li>
@@ -1216,7 +1216,7 @@
- <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to use Restful API in Javascript</a></li>
+ <li><a href="/docs/howto/howto_use_restapi_in_js.html" class="list-group-item-lay pjaxlink">How to Use Restful API in Javascript</a></li>
@@ -1322,7 +1322,7 @@
- <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to use kylin remote jdbc driver</a></li>
+ <li><a href="/docs/howto/howto_jdbc.html" class="list-group-item-lay pjaxlink">How to Use kylin Remote JDBC Driver</a></li>
Modified: incubator/kylin/site/download/index.html
URL: http://svn.apache.org/viewvc/incubator/kylin/site/download/index.html?rev=1696524&r1=1696523&r2=1696524&view=diff
==============================================================================
--- incubator/kylin/site/download/index.html (original)
+++ incubator/kylin/site/download/index.html Wed Aug 19 07:09:28 2015
@@ -198,9 +198,9 @@ And ODBC Driver could be find here:</p>
Hereâs latest development version binary package:</p>
<ul>
- <li><a href="kylin-1.0-incubating-SNAPSHOT-bin.tar.gz">kylin-v1.0-incubating-SNAPSHOT</a></li>
- <li>Updated Date: 2015-08-14</li>
- <li>Commit ID: b449590cc5c6aaa3eea9d19f922473bff6fce4b0</li>
+ <li><a href="kylin-0.7.3-incubating-SNAPSHOT.tar.gz">kylin-v0.7.3-incubating-SNAPSHOT</a></li>
+ <li>Updated Date: 2015-08-04</li>
+ <li>Commit ID: a880dd4fb6e4443d2bcad0d57db3ae09bac65c4d</li>
</ul>
Modified: incubator/kylin/site/feed.xml
URL: http://svn.apache.org/viewvc/incubator/kylin/site/feed.xml?rev=1696524&r1=1696523&r2=1696524&view=diff
==============================================================================
--- incubator/kylin/site/feed.xml (original)
+++ incubator/kylin/site/feed.xml Wed Aug 19 07:09:28 2015
@@ -19,11 +19,288 @@
<description>Apache Kylin Home</description>
<link>http://kylin.incubator.apache.org/</link>
<atom:link href="http://kylin.incubator.apache.org/feed.xml" rel="self" type="application/rss+xml"/>
- <pubDate>Fri, 14 Aug 2015 01:12:24 -0700</pubDate>
- <lastBuildDate>Fri, 14 Aug 2015 01:12:24 -0700</lastBuildDate>
+ <pubDate>Mon, 17 Aug 2015 00:19:38 -0700</pubDate>
+ <lastBuildDate>Mon, 17 Aug 2015 00:19:38 -0700</lastBuildDate>
<generator>Jekyll v2.5.3</generator>
<item>
+ <title>Fast Cubing Algorithm in Apache Kylin: Concept</title>
+ <description><p>This article is the first post of a series document that introducing the fast cubing algorithm in Apache Kylin; The new algorithm will be released in the near future (v1.1 or later); Now it is under internal testing and pilot; All the source code has been published in Kylinâs Git repository <a href="https://github.com/apache/incubator-kylin/">https://github.com/apache/incubator-kylin/</a> on 0.8 branch.</p>
+
+<h2 id="by-layer-cubing-algorithm">By Layer Cubing Algorithm</h2>
+<p>Before introduce the fast cubing, Iâd like to make a brief introduction on the as-is cubing algorithm, which is called âby layer cubingâ;</p>
+
+<p>As its name indicates, a full cube is calculated by layer: N-dimension, N-1 dimension, N-2 dimension, ⦠until 0 dimension; Each layerâs calculation is based on its parent layer (except the first, which base on source data); So this algorithm need N rounds of MapReduce running in sequence;</p>
+
+<p>In the MapReduce, the key is the composite of the dimensions, the value is the composite of the measures; When the mapper reads a key-value pair, it calculates its possible child cuboids; for each child cuboid, remove 1 dimension from the key, and then output the new key and value to the reducer;</p>
+
+<p>The reducer gets the values grouped by key; it aggregates the measures, and then output to HDFS; one layerâs MR is finished;</p>
+
+<p>When all layers are finished, the cube is calculated;</p>
+
+<p>Figure 1 describes the flow:</p>
+
+<p><img src="/images/blog/by-layer-cubing.png" alt="" /><br />
+Figure 1: By layer cubing</p>
+
+<p><strong>Advantage</strong></p>
+
+<ul>
+ <li>This algorithm is clear as it mostly leverage the capability of Hadoop; The sorting, grouping and shuffling are all taken care by Hadoop, developer just focus on the cubing logic;</li>
+ <li>Benefiting from Hadoopâs maturity, this algorithm is very stable; In our experience there is seldom case that the mapper or reducer could fail; Even if your Hadoop cluster is small or is busy, it can finish in the end;</li>
+</ul>
+
+<p><strong>Disadvantage</strong></p>
+
+<ul>
+ <li>If the cube has many dimensions, it need the same number of MR jobs; As each Hadoop job scheduling need extra resource, the overhead cost to Hadoop is considerable;</li>
+ <li>This algorithm causes too much shuffling to Hadoop; The mapper doesnât do aggregation, all the records that having same dimension values in next layer will be omitted to Hadoop, and then sent to reducer for aggregation;</li>
+ <li>Many writes to HDFS: each layerâs cubing need write its output to HDFS for next layer MR to consume; In the end, Kylin need another round MR to convert these output files to HBase HFile for bulk load; These jobs generates many intermediate files in HDFS;</li>
+ <li>All in all: the performance is not good, especially when the cube has many dimensions (&gt;10);</li>
+</ul>
+
+<h2 id="fast-cubing-algorithm">Fast Cubing Algorithm</h2>
+<p>The fast cubing algorithm is also called âby segment cubingâ; The core idea is, each mapper calculates the feed data block into a small cube segment (with all cuboids), and then output all key/values to reducer; The reducer aggregates them into one big cube segment, finishing the cubing; Figure 2 illustrates the flow;</p>
+
+<p><img src="/images/blog/by-segment-cubing.png" alt="" /><br />
+Figure 2: By segment cubing</p>
+
+<h3 id="pre-aggregation-in-mapper">Pre-aggregation in Mapper</h3>
+<p>Compared with the origin algorithm, the fast cubing has two main differences:</p>
+
+<ul>
+ <li>The mapper will do pre-aggregation, this will reduce the number of records that the mapper output to Hadoop, and also reduce the number that reducer need to aggregate;</li>
+ <li>One round MR can calculate all cuboids;</li>
+</ul>
+
+<p>Let take an example: a cube has 4 dimensions: A, B, C, D; Each mapper has 1 million source records to process; The column cardinality in the mapper is Car(A), Car(B), Car(C) and Car(D);</p>
+
+<ul>
+ <li>
+ <p>When aggregate the source records to base cuboid (1111), with the old âby layerâ algorithm, the mapper will output 1 million records to Hadoop; With the fast cubing algorithm, after the pre-aggregation, it only outputs the number of [distinct A, B, C, D] records to Hadoop, which is certainly smaller than source data; In a normal case, it can be 1/10 to 1/1000 of the source records size;</p>
+ </li>
+ <li>
+ <p>When aggregate from parent to a child cuboid, say from base cuboid (1111) to 3-dimension cuboid 0111, the dimension A will be aggregated; We assume the dimension A is independent with other dimensions, after aggregation, the cuboid 0111âs size will be about 1/Card(A) of the base cuboid; So the output will be reduced to 1/Card(A) of the original one in this step;</p>
+ </li>
+</ul>
+
+<p>Totally, assume the average cardinality of the dimensions is Card(N), the records that written from mapper to reducer can be reduced to 1/Card(N) of origin size; The less output to Hadoop, the less I/O and computing, the better performance;</p>
+
+<h3 id="cuboid-spanning-tree">Cuboid spanning tree</h3>
+<p>Inner the mapper, there is another change in the cuboid spanning tree visiting order; In origin cubing, Kylin calculates the cuboids with Broad First Search order; In the fast cubing, it uses Depth First Search order, to reduce the cuboids that need be cached in memory;</p>
+
+<p>Letâs look at the figure 3, which is a full spanning tree of a 4-dimension cube: before 0-Dimenson cuboid â*â be aggregated, cuboid âABCDâ, âBCDâ, âCDâ and âDâ will be cached in memory; As â*â has no child, it will be outputted once be calculated, then comes âDâ; After âCâ be outputted, âCDâ will be outputted as all of its children has finished; The memory for a cuboid can be released once it be outputted; The base cuboid ABCD will be the last one to finish;</p>
+
+<p><img src="/images/blog/cube-spanning-tree.png" alt="" /><br />
+Figure 3: Cuboid spanning tree</p>
+
+<p>With the DFS visiting order, the output from a mapper is almost fully sorted, as the cuboid ID is at the beginning position of row key, and inner a cuboid the rows are already sorted:</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>0000
+0001[D0]
+0001[D1]
+....
+0010[C0]
+0010[C1]
+....
+0011[C0][D0]
+0011[C0][D1]
+....
+....
+1111[A0][B0][C0][D0]
+....
+</code></pre>
+</div>
+<p>Since the outputs from mapper are already sorted, Hadoopâs shuffle and sort would be faster;</p>
+
+<p>Besides, mapperâs pre-aggregation happens in memory, this avoids unnecessary disk and network I/O, and the overhead to Hadoop is considerable reduced;</p>
+
+<p>###OutOfMemory error<br />
+During the development phase, we encountered the OutOfMemory error in mappers; this could happen when:</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>a) The mapper's JVM heap size is small;
+b) "Distinct count" measure is used (HyperLogLog is space consuming)
+c) The spanning tree is too deep (too many dimensions);
+</code></pre>
+</div>
+
+<p>We realized that Kylin couldnât assume the mappers always have enough memory; The cubing algorithm need be self-adapting to various situations; A lot of efforts were put on optimizing the memory use and spilling data to disk when proactively detects an OutOfMemory error; The result is promising, the OOM error is rare to occur now;</p>
+
+<p>Here letâs do a summary on the fast cubing algorithm;</p>
+
+<p><strong>Advantage</strong></p>
+
+<ul>
+ <li>It is faster than the old method; can reduce 30% to 50% overall building time from our comparison test;</li>
+ <li>It produces less work load on Hadoop, and leaves less intermediate files on HDFS;</li>
+ <li>The cubing code can be easily reused by other cubing engines like Streaming and Spark;</li>
+</ul>
+
+<p><strong>Disadvantage</strong></p>
+
+<ul>
+ <li>The algorithm is a little complicated; This adds the maintenance effort;</li>
+ <li>Although the algorithm can spill data to disk automatically, it still wish the mapper has enough memory to gain best performance; User need more knowledge to tune the cubing; (this can be discussed in detail later)</li>
+</ul>
+
+<h2 id="other-enhancements-in-fast-cubing">Other Enhancements in Fast Cubing</h2>
+
+<p>Together with the fast cubing algorithm, we also introduced several other enhancements in the cube build flow; Iâs like to elaborate in next articles, please keep posted here; If you have interest on Apache Kylin, welcome to visit our home page <a href="http://kylin.incubator.apache.org/">http://kylin.incubator.apache.org/</a> and subscribe our development mailing list at <a href="&#109;&#097;&#105;&#108;&#116;&#111;:&#100;&#101;&#118;&#045;&#115;&#117;&#098;&#115;&#099;&#114;&#105;&#098;&#101;&#064;&#107;&#121;&#108;&#105;&#110;&#046;&#105;&#110;&#099;&#117;&#098;&#097;&#116;&#111;&#114;&#046;&#097;&#112;&#097;&#099;&#104;&#101;&#046;&#111;&#114;&#103;">&#100;&#101;&#118;&#045;&#115;&#117;&#098;&#115;&#099;&#11
4;&#105;&#098;&#101;&#064;&#107;&#121;&#108;&#105;&#110;&#046;&#105;&#110;&#099;&#117;&#098;&#097;&#116;&#111;&#114;&#046;&#097;&#112;&#097;&#099;&#104;&#101;&#046;&#111;&#114;&#103;</a></p>
+</description>
+ <pubDate>Sat, 15 Aug 2015 05:28:00 -0700</pubDate>
+ <link>http://kylin.incubator.apache.org/blog/2015/08/15/fast-cubing/</link>
+ <guid isPermaLink="true">http://kylin.incubator.apache.org/blog/2015/08/15/fast-cubing/</guid>
+
+
+ <category>blog</category>
+
+ </item>
+
+ <item>
+ <title>Dictionary in Kylin</title>
+ <description><h3 id="purpose-of-dictionary">Purpose of Dictionary</h3>
+
+<p>Dictionary is a <a href="https://en.wikipedia.org/wiki/Dictionary_coder">classic compression technique</a> that can greatly reduce the size of data. Kylin apply dictionary to all dimension values stored in cube.</p>
+
+<p>Kylinâs requirement to dictionary:</p>
+
+<ul>
+ <li>Compress cube size by storing IDs instead of real values</li>
+ <li>Bi-way mapping of dimension values from/to IDs</li>
+ <li>Preserving order to facilitate range query</li>
+ <li>Minimal memory &amp; storage footprint</li>
+</ul>
+
+<h3 id="dictionary-design">Dictionary Design</h3>
+
+<p>Dictionary is implemented as a <a href="https://en.wikipedia.org/wiki/Trie">trie</a> data structure. Dictionary ID (or âseq. noâ below) is chosen in a way to preserve value order. Then at query time, predicate filters can be pushed down to storage and be evaluated on the IDs.</p>
+
+<ul>
+ <li>Trie node are labeled by 1) number of values underneath; 2) is end of value or not</li>
+ <li>Bi-way lookup between âvalueâ &lt;==&gt; âseq. noâ by top-down navigate</li>
+ <li>The âseq. noâ preserves value order and is a minimal integer for space advantage</li>
+ <li>O(L) lookup time, where L=max(value length)</li>
+</ul>
+
+<p>An example of a trie dictionary.</p>
+
+<p><img src="/images/develop/dictionary-trie-sample.png" alt="" /></p>
+
+<h3 id="memory-structure">Memory structure</h3>
+
+<p>Once built, the dictionary is serialized into a chunk of bytes. This is how it stays in memory and also in file.</p>
+
+<ul>
+ <li>Head
+ <ul>
+ <li>magic, head len, body len, child_offset size, seq_no size, base ID, max value len, bytes converter</li>
+ </ul>
+ </li>
+ <li>Body
+ <ul>
+ <li>a flattened trie, where each node is
+ <ul>
+ <li>child offset (size specified in head)
+ <ul>
+ <li>1st MSB: isLastChild</li>
+ <li>2nd MSB: isEndOfValue</li>
+ </ul>
+ </li>
+ <li>no. values beneath (size specified in head)</li>
+ <li>value len (1 byte unsigned)</li>
+ <li>value bytes</li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+</ul>
+
+<p><img src="/images/develop/dictionary-bytes-format.png" alt="" /></p>
+
+<h3 id="benchmark-result">Benchmark result</h3>
+
+<p>We compared dictionaryâs size and performance with HashMap and ID Based Array. Itâs memory footprint is an order less and the throughput is very stable accross scales.</p>
+
+<table>
+ <thead>
+ <tr>
+ <th>Â </th>
+ <th>HashMap (value=&gt;id)</th>
+ <th>Dictionary (value=&gt;id)</th>
+ <th>IdArray (id=&gt;value)</th>
+ <th>Dictionary (id=&gt;value)</th>
+ <th>Â </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>150K eng words footprint (bytes)</td>
+ <td>18.8M</td>
+ <td><em>1.7M</em></td>
+ <td>11.1M</td>
+ <td><em>1.7M</em></td>
+ <td>1.4M raw size</td>
+ </tr>
+ <tr>
+ <td>150K eng words throughput (acc/s)</td>
+ <td>13M</td>
+ <td>1.9M</td>
+ <td>150M</td>
+ <td>1.96M</td>
+ <td>31 max value len</td>
+ </tr>
+ <tr>
+ <td>6.6K categories footprint (bytes)</td>
+ <td>0.94M</td>
+ <td>0.13M</td>
+ <td>0.58M</td>
+ <td>0.12M</td>
+ <td>0.1M raw size</td>
+ </tr>
+ <tr>
+ <td>6.6K categories throughput (acc/s)</td>
+ <td>26M</td>
+ <td>2.0M</td>
+ <td>98M</td>
+ <td>2.0M</td>
+ <td>30 max value len</td>
+ </tr>
+ <tr>
+ <td>6 words footprint (bytes)</td>
+ <td>792B</td>
+ <td>168B</td>
+ <td>416B</td>
+ <td>168B</td>
+ <td>33B raw size</td>
+ </tr>
+ <tr>
+ <td>6 works throughput (acc/s)</td>
+ <td>68.5M</td>
+ <td>14.7M</td>
+ <td>714M</td>
+ <td>11.1M</td>
+ <td>9 max value len</td>
+ </tr>
+ </tbody>
+</table>
+
+<h3 id="cache-layer">Cache layer</h3>
+
+<p>To achieve maximum lookup throughput, a cache layer (HashMap or IdArray) sits on top of dictionary using weak reference. The cache could be gone when memory runs short, then dictionary will be hit directly.</p>
+
+<p><img src="/images/develop/dictionary-cache-layer.png" alt="" /></p>
+
+</description>
+ <pubDate>Thu, 13 Aug 2015 07:37:00 -0700</pubDate>
+ <link>http://kylin.incubator.apache.org/blog/2015/08/13/kylin-dictionary/</link>
+ <guid isPermaLink="true">http://kylin.incubator.apache.org/blog/2015/08/13/kylin-dictionary/</guid>
+
+
+ <category>blog</category>
+
+ </item>
+
+ <item>
<title>Release v0.7.1-incubating</title>
<description><p>Apache Kylin v0.7.1-incubating has rolled out on June 10, 2015. This is also the first Apache release after join incubating.</p>
Added: incubator/kylin/site/images/blog/by-layer-cubing.png
URL: http://svn.apache.org/viewvc/incubator/kylin/site/images/blog/by-layer-cubing.png?rev=1696524&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/kylin/site/images/blog/by-layer-cubing.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/kylin/site/images/blog/by-segment-cubing.png
URL: http://svn.apache.org/viewvc/incubator/kylin/site/images/blog/by-segment-cubing.png?rev=1696524&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/kylin/site/images/blog/by-segment-cubing.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/kylin/site/images/blog/cube-spanning-tree.png
URL: http://svn.apache.org/viewvc/incubator/kylin/site/images/blog/cube-spanning-tree.png?rev=1696524&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/kylin/site/images/blog/cube-spanning-tree.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/kylin/site/images/develop/dictionary-bytes-format.png
URL: http://svn.apache.org/viewvc/incubator/kylin/site/images/develop/dictionary-bytes-format.png?rev=1696524&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/kylin/site/images/develop/dictionary-bytes-format.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/kylin/site/images/develop/dictionary-cache-layer.png
URL: http://svn.apache.org/viewvc/incubator/kylin/site/images/develop/dictionary-cache-layer.png?rev=1696524&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/kylin/site/images/develop/dictionary-cache-layer.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/kylin/site/images/develop/dictionary-trie-sample.png
URL: http://svn.apache.org/viewvc/incubator/kylin/site/images/develop/dictionary-trie-sample.png?rev=1696524&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/kylin/site/images/develop/dictionary-trie-sample.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream