svn commit: r1762737 [2/3] - in /kylin/site: ./ cn/docs15/ cn/docs15/install/ cn/docs15/tutorial/ docs15/ docs15/gettingstarted/ docs15/howto/ docs15/install/ docs15/tutorial/
Added: kylin/site/docs15/howto/howto_use_beeline.html URL: http://svn.apache.org/viewvc/kylin/site/docs15/howto/howto_use_beeline.html?rev=1762737=auto == --- kylin/site/docs15/howto/howto_use_beeline.html (added) +++ kylin/site/docs15/howto/howto_use_beeline.html Thu Sep 29 05:30:54 2016 @@ -0,0 +1,2167 @@ + + + + + + + + + + + + Apache Kylin | Use Beeline for Hive Commands + + + + + + + + + + + + + + + + + + + + + + http://kylin.apache.org/docs15/howto/howto_use_beeline.html;> + http://kylin.apache.org/feed.xml; /> + + + + (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.apache.org + ga('create', 'UA-55534813-2', 'auto', {'name':'toplevel'}); + + ga('send', 'pageview'); + ga('toplevel.send', 'pageview'); + + + + + + + + + + + + + + + Apache Kylin⢠Extreme OLAP Engine for Big Data + + + + + + + + + + + +Toggle navigation + + + + + + + + + + + Home + Docs + Download + Community + Development + Blog + ä¸æç + https://twitter.com/apachekylin; target="_blank" class="fa fa-twitter fa-lg" title="Twitter: @ApacheKylin" > + https://github.com/apache/kylin; target="_blank" class="fa fa-github-alt fa-lg" title="Github: apache/kylin" > + https://www.facebook.com/kylinio; target="_blank" class="fa fa-facebook fa-lg" title="Facebook: kylin.io" > + + + + + + + + + + + + + + +Getting Started + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Overview + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Apache Kylin Release Notes + + + + + + + + + + + + + + + + + + + + + + FAQ + + + + + + + + + + + + + + + + + + + + Events and Conferences + + + + + + + + + + + + + + + + Community Best Practices + + + + + + + + + + + + + + + + + + + + + + + + Terminology + + + + + + + + + + + + + + + + + + Technical Concepts + + + + + + + + + + + + +Installation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Installation Guide + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Hadoop Environment + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deploy in cluster mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
svn commit: r1762737 [3/3] - in /kylin/site: ./ cn/docs15/ cn/docs15/install/ cn/docs15/tutorial/ docs15/ docs15/gettingstarted/ docs15/howto/ docs15/install/ docs15/tutorial/
Modified: kylin/site/docs15/tutorial/powerbi.html URL: http://svn.apache.org/viewvc/kylin/site/docs15/tutorial/powerbi.html?rev=1762737=1762736=1762737=diff == --- kylin/site/docs15/tutorial/powerbi.html (original) +++ kylin/site/docs15/tutorial/powerbi.html Thu Sep 29 05:30:54 2016 @@ -230,6 +230,8 @@ + + Overview @@ -296,6 +298,8 @@ + + Apache Kylin Release Notes @@ -472,6 +476,8 @@ + + Installation Guide @@ -526,6 +532,8 @@ + + Hadoop Environment @@ -631,6 +639,8 @@ + + @@ -689,6 +699,8 @@ + + Deploy in cluster mode @@ -741,6 +753,8 @@ + + Advance Settings of Kylin Environment @@ -803,6 +817,8 @@ + + Run Kylin with Docker @@ -905,6 +921,8 @@ + + Quick Start with Sample Cube @@ -979,6 +997,8 @@ + + Kylin Cube Creation @@ -1057,6 +1077,8 @@ + + Kylin Cube Build and Job Monitoring @@ -1127,6 +1149,8 @@ + + Kylin Cube Permission @@ -1231,6 +1255,8 @@ + + Kylin Web Interface @@ -1327,6 +1353,8 @@ + + Tableau 8 @@ -1427,6 +1455,8 @@ + + Tableau 9 @@ -1519,6 +1549,8 @@ + + MS Excel and Power BI @@ -1607,6 +1639,8 @@ + + Kylin ODBC Driver @@ -1701,6 +1735,8 @@ + + Use RESTful API in Javascript @@ -1745,6 +1781,8 @@ + + Use RESTful API @@ -1999,67 +2037,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Use Beeline for Hive Commands + Modified: kylin/site/docs15/tutorial/tableau.html URL: http://svn.apache.org/viewvc/kylin/site/docs15/tutorial/tableau.html?rev=1762737=1762736=1762737=diff == --- kylin/site/docs15/tutorial/tableau.html (original) +++ kylin/site/docs15/tutorial/tableau.html Thu Sep 29 05:30:54 2016 @@ -230,6 +230,8 @@ + + Overview @@ -296,6 +298,8 @@ + + Apache Kylin Release Notes @@ -472,6 +476,8 @@ + + Installation Guide @@ -526,6 +532,8 @@ + + Hadoop Environment @@ -631,6 +639,8 @@ + + @@ -689,6 +699,8 @@ + + Deploy in cluster mode @@ -741,6 +753,8 @@ + + Advance Settings of Kylin Environment @@ -803,6 +817,8 @@ + + Run Kylin with Docker @@ -905,6 +921,8 @@ + + Quick Start with Sample Cube @@ -979,6 +997,8 @@ + + Kylin Cube Creation @@ -1057,6 +1077,8 @@ + + Kylin Cube Build and Job Monitoring @@ -1127,6 +1149,8 @@ + + Kylin Cube Permission @@ -1231,6 +1255,8 @@ + + Kylin Web Interface @@ -1327,6 +1353,8 @@ + + Tableau 8 @@ -1427,6 +1455,8 @@ + + Tableau 9 @@ -1519,6 +1549,8 @@ + + MS Excel and Power BI @@ -1607,6 +1639,8 @@ + + Kylin ODBC Driver @@ -1701,6 +1735,8 @@ + + Use RESTful API in Javascript @@ -1745,6 +1781,8 @@ + + Use RESTful API @@ -1999,67 +2037,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Use Beeline for Hive Commands + Modified: kylin/site/docs15/tutorial/tableau_91.html URL:
kylin git commit: add beeline doc
Repository: kylin Updated Branches: refs/heads/document 1ec5aca9a -> 7a97d513c add beeline doc Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/7a97d513 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/7a97d513 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/7a97d513 Branch: refs/heads/document Commit: 7a97d513c41ba865aa9acb0872ae0cf299353439 Parents: 1ec5aca Author: Hongbin MaAuthored: Thu Sep 29 13:24:23 2016 +0800 Committer: Hongbin Ma Committed: Thu Sep 29 13:24:23 2016 +0800 -- website/_docs15/howto/howto_use_beeline.md | 14 ++ 1 file changed, 14 insertions(+) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/7a97d513/website/_docs15/howto/howto_use_beeline.md -- diff --git a/website/_docs15/howto/howto_use_beeline.md b/website/_docs15/howto/howto_use_beeline.md new file mode 100644 index 000..f0aea67 --- /dev/null +++ b/website/_docs15/howto/howto_use_beeline.md @@ -0,0 +1,14 @@ +--- +layout: docs15 +title: Use Beeline for Hive Commands +categories: howto +permalink: /docs15/howto/howto_use_beeline.html +--- + +Beeline(https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients) is recommended by many venders to replace Hive CLI. By default Kylin uses Hive CLI to synchronize Hive tables, create flatten intermediate tables, etc. By simple configuration changes you can set Kylin to use Beeline instead. + +Edit $KYLIN_HOME/conf/kylin.properties by: + + 1. change kylin.hive.client=cli to kylin.hive.client=beeline + 2. add "kylin.hive.beeline.params", this is where you can specifiy beeline commmand parameters. Like username(-n), JDBC URL(-u),etc. There's a sample kylin.hive.beeline.params included in default kylin.properties, however it's commented. You can modify the sample based on your real environment. +
svn commit: r1762736 - in /kylin/site: ./ docs15/ docs15/gettingstarted/ docs15/howto/ docs15/install/ docs15/tutorial/
Author: lidong Date: Thu Sep 29 05:19:34 2016 New Revision: 1762736 URL: http://svn.apache.org/viewvc?rev=1762736=rev Log: add beeline doc Modified: kylin/site/docs15/gettingstarted/best_practices.html kylin/site/docs15/gettingstarted/concepts.html kylin/site/docs15/gettingstarted/events.html kylin/site/docs15/gettingstarted/faq.html kylin/site/docs15/gettingstarted/terminology.html kylin/site/docs15/howto/howto_backup_hbase.html kylin/site/docs15/howto/howto_backup_metadata.html kylin/site/docs15/howto/howto_build_cube_with_restapi.html kylin/site/docs15/howto/howto_cleanup_storage.html kylin/site/docs15/howto/howto_jdbc.html kylin/site/docs15/howto/howto_ldap_and_sso.html kylin/site/docs15/howto/howto_optimize_cubes.html kylin/site/docs15/howto/howto_update_coprocessor.html kylin/site/docs15/howto/howto_upgrade.html kylin/site/docs15/howto/howto_use_restapi.html kylin/site/docs15/howto/howto_use_restapi_in_js.html kylin/site/docs15/index.html kylin/site/docs15/install/advance_settings.html kylin/site/docs15/install/hadoop_env.html kylin/site/docs15/install/index.html kylin/site/docs15/install/kylin_cluster.html kylin/site/docs15/release_notes.html kylin/site/docs15/tutorial/acl.html kylin/site/docs15/tutorial/create_cube.html kylin/site/docs15/tutorial/cube_build_job.html kylin/site/docs15/tutorial/cube_streaming.html kylin/site/docs15/tutorial/kylin_sample.html kylin/site/docs15/tutorial/odbc.html kylin/site/docs15/tutorial/powerbi.html kylin/site/docs15/tutorial/tableau.html kylin/site/docs15/tutorial/tableau_91.html kylin/site/docs15/tutorial/web.html kylin/site/feed.xml Modified: kylin/site/docs15/gettingstarted/best_practices.html URL: http://svn.apache.org/viewvc/kylin/site/docs15/gettingstarted/best_practices.html?rev=1762736=1762735=1762736=diff == --- kylin/site/docs15/gettingstarted/best_practices.html (original) +++ kylin/site/docs15/gettingstarted/best_practices.html Thu Sep 29 05:19:34 2016 @@ -1995,6 +1995,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + How to Update HBase Coprocessor Modified: kylin/site/docs15/gettingstarted/concepts.html URL: http://svn.apache.org/viewvc/kylin/site/docs15/gettingstarted/concepts.html?rev=1762736=1762735=1762736=diff == --- kylin/site/docs15/gettingstarted/concepts.html (original) +++ kylin/site/docs15/gettingstarted/concepts.html Thu Sep 29 05:19:34 2016 @@ -1995,6 +1995,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + How to Update HBase Coprocessor Modified: kylin/site/docs15/gettingstarted/events.html URL: http://svn.apache.org/viewvc/kylin/site/docs15/gettingstarted/events.html?rev=1762736=1762735=1762736=diff == --- kylin/site/docs15/gettingstarted/events.html (original) +++ kylin/site/docs15/gettingstarted/events.html Thu Sep 29 05:19:34 2016 @@ -1995,6 +1995,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + How to Update HBase Coprocessor Modified: kylin/site/docs15/gettingstarted/faq.html URL: http://svn.apache.org/viewvc/kylin/site/docs15/gettingstarted/faq.html?rev=1762736=1762735=1762736=diff == --- kylin/site/docs15/gettingstarted/faq.html (original) +++
kylin git commit: add beeline doc
Repository: kylin Updated Branches: refs/heads/document 649d382d5 -> 1ec5aca9a add beeline doc Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/1ec5aca9 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/1ec5aca9 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/1ec5aca9 Branch: refs/heads/document Commit: 1ec5aca9a3c878872c5754992fbd3f71272d83e8 Parents: 649d382 Author: Hongbin MaAuthored: Thu Sep 29 13:16:52 2016 +0800 Committer: Hongbin Ma Committed: Thu Sep 29 13:16:52 2016 +0800 -- website/_data/docs15.yml | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/1ec5aca9/website/_data/docs15.yml -- diff --git a/website/_data/docs15.yml b/website/_data/docs15.yml index 6aa78b2..25be101 100644 --- a/website/_data/docs15.yml +++ b/website/_data/docs15.yml @@ -57,4 +57,5 @@ - howto/howto_jdbc - howto/howto_upgrade - howto/howto_ldap_and_sso + - howto/howto_use_beeline - howto/howto_update_coprocessor
[kylin] Git Push Summary
Repository: kylin Updated Branches: refs/heads/yang21 [created] e10f2b922
[3/3] kylin git commit: new sample data
new sample data Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/23213c4f Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/23213c4f Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/23213c4f Branch: refs/heads/KYLIN-1971 Commit: 23213c4f258e0aa4c31b03fc4e90bed135d63f04 Parents: 01d5670 Author: Li YangAuthored: Wed Sep 28 18:16:15 2016 +0800 Committer: Li Yang Committed: Wed Sep 28 18:16:15 2016 +0800 -- examples/sample_cube/create_sample_tables.sql |15 + .../sample_cube/data/DEFAULT.KYLIN_COUNTRY.csv | 244 + .../sample_cube/data/DEFAULT.KYLIN_SALES.csv| 2 - .../template/table/DEFAULT.KYLIN_COUNTRY.json |24 + .../template/table/DEFAULT.KYLIN_SALES.json | 8 + 5 files changed, 10291 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/23213c4f/examples/sample_cube/create_sample_tables.sql -- diff --git a/examples/sample_cube/create_sample_tables.sql b/examples/sample_cube/create_sample_tables.sql index d83566c..7dda0a2 100644 --- a/examples/sample_cube/create_sample_tables.sql +++ b/examples/sample_cube/create_sample_tables.sql @@ -168,6 +168,18 @@ LEAF_CATEG_ID bigint ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE; +DROP TABLE IF EXISTS DEFAULT.KYLIN_COUNTRY; + +CREATE TABLE DEFAULT.KYLIN_COUNTRY +( +COUNTRY string +,LATITUDE double +,LONGITUDE double +,NAME string +) +ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' +STORED AS TEXTFILE; + DROP TABLE IF EXISTS DEFAULT.KYLIN_SALES; CREATE TABLE DEFAULT.KYLIN_SALES @@ -181,10 +193,13 @@ TRANS_ID bigint ,PRICE decimal(19,4) ,ITEM_COUNT bigint ,SELLER_ID bigint +,BUYER_COUNTRY string +,SELLER_COUNTRY string ) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE; LOAD DATA INPATH '/tmp/kylin/sample_cube/data/DEFAULT.KYLIN_SALES.csv' OVERWRITE INTO TABLE DEFAULT.KYLIN_SALES; +LOAD DATA INPATH '/tmp/kylin/sample_cube/data/DEFAULT.KYLIN_COUNTRY.csv' OVERWRITE INTO TABLE DEFAULT.KYLIN_COUNTRY; LOAD DATA INPATH '/tmp/kylin/sample_cube/data/DEFAULT.KYLIN_CAL_DT.csv' OVERWRITE INTO TABLE DEFAULT.KYLIN_CAL_DT; LOAD DATA INPATH '/tmp/kylin/sample_cube/data/DEFAULT.KYLIN_CATEGORY_GROUPINGS.csv' OVERWRITE INTO TABLE DEFAULT.KYLIN_CATEGORY_GROUPINGS; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/23213c4f/examples/sample_cube/data/DEFAULT.KYLIN_COUNTRY.csv -- diff --git a/examples/sample_cube/data/DEFAULT.KYLIN_COUNTRY.csv b/examples/sample_cube/data/DEFAULT.KYLIN_COUNTRY.csv new file mode 100644 index 000..aced0e3 --- /dev/null +++ b/examples/sample_cube/data/DEFAULT.KYLIN_COUNTRY.csv @@ -0,0 +1,244 @@ +AD,42.546245,1.601554,Andorra +AE,23.424076,53.847818,United Arab Emirates +AF,33.93911,67.709953,Afghanistan +AG,17.060816,-61.796428,Antigua and Barbuda +AI,18.220554,-63.068615,Anguilla +AL,41.153332,20.168331,Albania +AM,40.069099,45.038189,Armenia +AN,12.226079,-69.060087,Netherlands Antilles +AO,-11.202692,17.873887,Angola +AQ,-75.250973,-0.071389,Antarctica +AR,-38.416097,-63.616672,Argentina +AS,-14.270972,-170.132217,American Samoa +AT,47.516231,14.550072,Austria +AU,-25.274398,133.775136,Australia +AW,12.52111,-69.968338,Aruba +AZ,40.143105,47.576927,Azerbaijan +BA,43.915886,17.679076,Bosnia and Herzegovina +BB,13.193887,-59.543198,Barbados +BD,23.684994,90.356331,Bangladesh +BE,50.503887,4.469936,Belgium +BF,12.238333,-1.561593,Burkina Faso +BG,42.733883,25.48583,Bulgaria +BH,25.930414,50.637772,Bahrain +BI,-3.373056,29.918886,Burundi +BJ,9.30769,2.315834,Benin +BM,32.321384,-64.75737,Bermuda +BN,4.535277,114.727669,Brunei +BO,-16.290154,-63.588653,Bolivia +BR,-14.235004,-51.92528,Brazil +BS,25.03428,-77.39628,Bahamas +BT,27.514162,90.433601,Bhutan +BV,-54.423199,3.413194,Bouvet Island +BW,-22.328474,24.684866,Botswana +BY,53.709807,27.953389,Belarus +BZ,17.189877,-88.49765,Belize +CA,56.130366,-106.346771,Canada +CC,-12.164165,96.870956,Cocos [Keeling] Islands +CD,-4.038333,21.758664,Congo [DRC] +CF,6.61,20.939444,Central African Republic +CG,-0.228021,15.827659,Congo [Republic] +CH,46.818188,8.227512,Switzerland +CI,7.539989,-5.54708,C?te d'Ivoire +CK,-21.236736,-159.777671,Cook Islands +CL,-35.675147,-71.542969,Chile +CM,7.369722,12.354722,Cameroon +CN,35.86166,104.195397,China +CO,4.570868,-74.297333,Colombia +CR,9.748917,-83.753428,Costa Rica +CU,21.521757,-77.781167,Cuba +CV,16.002082,-24.013197,Cape Verde +CX,-10.447525,105.690449,Christmas Island +CY,35.126413,33.429859,Cyprus +CZ,49.817492,15.472962,Czech Republic +DE,51.165691,10.451526,Germany +DJ,11.825138,42.590275,Djibouti
[2/3] kylin git commit: new sample data
http://git-wip-us.apache.org/repos/asf/kylin/blob/23213c4f/examples/sample_cube/data/DEFAULT.KYLIN_SALES.csv -- diff --git a/examples/sample_cube/data/DEFAULT.KYLIN_SALES.csv b/examples/sample_cube/data/DEFAULT.KYLIN_SALES.csv index 13c7d85..b09ecce 100644 --- a/examples/sample_cube/data/DEFAULT.KYLIN_SALES.csv +++ b/examples/sample_cube/data/DEFAULT.KYLIN_SALES.csv @@ -1,1 +1,1 @@ -0,2012-12-14,Others,88750,0,11,36.2828,0,1349 -0,2012-08-28,Others,175750,0,13,23.8563,0,1927 -0,2012-02-16,ABIN,148324,15,13,88.3418,0,1005 -0,2013-10-19,FP-non GTC,37831,0,13,47.3015,0,1209 -0,2012-10-22,Others,140746,100,11,83.4540,0,1154 -0,2013-01-25,FP-GTC,16509,0,-99,22.9896,0,1372 -0,2013-04-04,Others,963,0,13,88.5907,0,1648 -0,2012-04-11,Others,15687,0,15,88.1940,0,1866 -0,2013-01-19,ABIN,60606,3,13,77.9727,0,1936 -0,2012-04-30,FP-non GTC,106246,0,14,52.2950,0,1047 -0,2013-02-03,Auction,45333,0,16,56.3584,0,1470 -0,2012-09-02,FP-GTC,25147,0,-99,15.3553,0,1203 -0,2013-07-30,Others,24760,0,16,25.0770,0,1382 -0,2012-04-17,Auction,31519,0,16,72.7384,0,1069 -0,2013-04-30,FP-GTC,51582,0,15,75.8200,0,1085 -0,2013-03-23,FP-GTC,16509,0,15,8.6653,0,1559 -0,2013-04-01,ABIN,175750,3,16,64.2802,0,1507 -0,2013-07-12,ABIN,50677,0,-99,24.5987,0,1938 -0,2012-04-23,FP-GTC,45333,0,5,72.6553,0,1863 -0,2012-12-19,ABIN,3838,0,12,87.4142,0,1612 -0,2012-08-15,FP-GTC,62179,0,16,67.4238,0,1839 -0,2013-08-22,Auction,1357,0,5,18.3600,0,1303 -0,2013-08-23,ABIN,31519,0,5,67.6344,0,1877 -0,2013-09-12,FP-GTC,223,0,14,71.7898,0,1848 -0,2012-03-14,FP-GTC,132939,0,15,26.1496,0,1815 -0,2013-07-13,Others,67703,3,16,83.9661,0,1858 -0,2013-12-15,FP-non GTC,100847,0,5,34.3451,0,1387 -0,2012-08-30,Auction,62179,0,11,21.0496,0,1393 -0,2013-01-10,FP-GTC,48027,0,13,23.4142,0,1757 -0,2013-01-25,ABIN,145970,0,5,26.7842,0,1402 -0,2012-07-05,Auction,48027,0,-99,46.7320,0,1972 -0,2012-11-07,FP-GTC,20213,0,-99,19.7270,0,1873 -0,2013-06-20,ABIN,100847,0,5,76.2783,0,1409 -0,2012-10-08,ABIN,26262,0,5,48.7447,0,1029 -0,2013-04-30,ABIN,87118,0,15,63.2187,0,1529 -0,2013-04-24,FP-non GTC,20213,0,16,39.5057,0,1329 -0,2012-05-13,Others,164261,0,13,84.1246,0,1688 -0,2013-08-02,ABIN,31519,0,5,37.1504,0,1905 -0,2012-04-03,Auction,164261,0,11,92.0974,0,1341 -0,2012-09-02,FP-GTC,31519,0,14,87.7829,0,1460 -0,2013-10-05,ABIN,13987,0,16,74.0719,0,1381 -0,2012-01-13,FP-GTC,48027,0,15,71.2637,0,1915 -0,2013-03-01,Others,13836,0,14,16.7288,0,1953 -0,2012-09-12,FP-non GTC,16509,0,5,12.2933,0,1277 -0,2012-02-07,Auction,45333,0,5,64.9770,0,1040 -0,2013-12-14,FP-non GTC,158798,0,16,72.4413,0,1500 -0,2013-10-13,Auction,31519,0,5,79.3053,0,1816 -0,2012-06-11,ABIN,4943,0,5,11.6942,0,1696 -0,2012-10-18,ABIN,80053,0,-99,54.0933,0,1604 -0,2012-11-03,Auction,20886,0,5,9.8258,0,1764 -0,2012-01-15,Auction,44079,0,14,13.0371,0,1343 -0,2012-07-03,FP-GTC,159184,0,-99,92.5314,0,1724 -0,2012-02-16,FP-GTC,314,0,13,49.1825,0,1334 -0,2012-06-17,FP-non GTC,31387,3,12,0.6677,0,1603 -0,2012-07-15,FP-non GTC,32876,0,-99,50.9634,0,1248 -0,2012-07-24,FP-GTC,150265,15,16,57.5645,0,1653 -0,2012-10-06,Auction,145970,0,5,44.3091,0,1082 -0,2013-06-14,ABIN,80053,0,5,20.2388,0,1632 -0,2013-10-10,FP-non GTC,15868,0,11,28.6290,0,1523 -0,2012-09-30,ABIN,31673,0,12,75.8658,0,1719 -0,2012-04-02,FP-GTC,63861,0,5,25.8748,0,1311 -0,2012-03-16,Others,314,0,-99,9.2733,0,1409 -0,2012-09-30,FP-non GTC,60340,0,14,74.6610,0,1790 -0,2012-03-20,Others,87118,0,5,79.3781,0,1384 -0,2012-09-12,FP-GTC,1120,3,5,61.4408,0,1645 -0,2013-12-10,FP-non GTC,20886,0,11,14.8140,0,1943 -0,2012-12-05,FP-GTC,106246,0,12,24.9380,0,1858 -0,2012-08-21,Auction,43479,0,12,22.2008,0,1310 -0,2012-11-30,FP-GTC,175750,0,15,35.1161,0,1440 -0,2013-10-10,Others,95672,0,11,82.3718,0,1128 -0,2012-10-17,Auction,80053,0,15,9.8166,0,1105 -0,2012-03-16,FP-non GTC,57784,0,5,66.2369,0,1439 -0,2012-11-14,ABIN,65,0,11,17.5513,0,1855 -0,2013-06-24,FP-GTC,16509,0,15,53.9195,0,1130 -0,2012-08-13,FP-non GTC,65,0,5,69.8447,0,1548 -0,2012-01-03,Others,38238,0,11,90.3722,0,1739 -0,2013-11-24,FP-non GTC,175750,3,13,47.3441,0,1291 -0,2013-11-08,Auction,106246,0,5,38.6729,0,1310 -0,2013-04-07,Others,73506,0,-99,69.8999,0,1235 -0,2012-10-15,FP-GTC,314,0,13,44.1598,0,1265 -0,2012-01-20,FP-GTC,80287,0,-99,85.7263,0,1704 -0,2012-08-17,ABIN,32876,0,16,21.2934,0,1163 -0,2013-07-09,Auction,37831,0,15,38.2213,0,1557 -0,2013-09-21,Others,45333,0,13,25.5384,0,1184 -0,2013-10-28,FP-non GTC,11554,0,16,89.9654,0,1940 -0,2013-04-05,Auction,11554,0,14,41.8676,0,1384 -0,2013-03-25,FP-GTC,43398,0,14,75.0110,0,1697 -0,2012-05-03,ABIN,33038,15,12,64.6735,0,1147
[1/3] kylin git commit: new sample data
Repository: kylin Updated Branches: refs/heads/KYLIN-1971 [created] 23213c4f2 http://git-wip-us.apache.org/repos/asf/kylin/blob/23213c4f/examples/sample_cube/template/table/DEFAULT.KYLIN_COUNTRY.json -- diff --git a/examples/sample_cube/template/table/DEFAULT.KYLIN_COUNTRY.json b/examples/sample_cube/template/table/DEFAULT.KYLIN_COUNTRY.json new file mode 100644 index 000..8d38810 --- /dev/null +++ b/examples/sample_cube/template/table/DEFAULT.KYLIN_COUNTRY.json @@ -0,0 +1,24 @@ +{ + "uuid" : "e286e39e-40d7-44c2-8fa2-41b365632882", + + "name" : "KYLIN_COUNTRY", + "columns" : [ { +"id" : "1", +"name" : "COUNTRY", +"datatype" : "string" + }, { +"id" : "2", +"name" : "LATITUDE", +"datatype" : "double" + }, { +"id" : "3", +"name" : "LONGITUDE", +"datatype" : "double" + }, { +"id" : "4", +"name" : "NAME", +"datatype" : "string" + } ], + "database" : "DEFAULT", + "last_modified" : 0 +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/23213c4f/examples/sample_cube/template/table/DEFAULT.KYLIN_SALES.json -- diff --git a/examples/sample_cube/template/table/DEFAULT.KYLIN_SALES.json b/examples/sample_cube/template/table/DEFAULT.KYLIN_SALES.json index 4927343..ebc7f4f 100644 --- a/examples/sample_cube/template/table/DEFAULT.KYLIN_SALES.json +++ b/examples/sample_cube/template/table/DEFAULT.KYLIN_SALES.json @@ -38,6 +38,14 @@ "id" : "9", "name" : "SELLER_ID", "datatype" : "bigint" + }, { +"id" : "10", +"name" : "BUYER_COUNTRY", +"datatype" : "string" + }, { +"id" : "11", +"name" : "SELLER_COUNTRY", +"datatype" : "string" } ], "database" : "DEFAULT", "last_modified" : 0
[kylin] Git Push Summary
Repository: kylin Updated Tags: refs/tags/kylin-1.5.4.1-cdh5.7 [created] 4ece71f2b
[2/2] kylin git commit: KYLIN-1962: Revert unsed split config feature
KYLIN-1962: Revert unsed split config feature Signed-off-by: shaofengshiProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/51b5b31b Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/51b5b31b Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/51b5b31b Branch: refs/heads/master Commit: 51b5b31bbce3aac1d3a3c0de7746334961d5ffcd Parents: 0fd4ad5 Author: Yiming Liu Authored: Tue Sep 27 07:52:52 2016 +0800 Committer: shaofengshi Committed: Wed Sep 28 17:51:49 2016 +0800 -- .../org/apache/kylin/common/KylinConfig.java| 45 --- .../apache/kylin/common/KylinConfigTest.java| 12 .../test_case_data/localmeta/kylin.properties | 33 ++- .../localmeta/kylin_account.properties | 59 .../org/apache/kylin/tool/DiagnosisInfoCLI.java | 4 +- 5 files changed, 33 insertions(+), 120 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/51b5b31b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java -- diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java index f134ad4..9543fc7 100644 --- a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java +++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java @@ -47,7 +47,6 @@ public class KylinConfig extends KylinConfigBase { /** Kylin properties file name */ public static final String KYLIN_CONF_PROPERTIES_FILE = "kylin.properties"; -public static final String KYLIN_ACCOUNT_CONF_PROPERTIES_FILE = "kylin_account.properties"; public static final String KYLIN_CONF = "KYLIN_CONF"; // static cached instances @@ -205,23 +204,6 @@ public class KylinConfig extends KylinConfigBase { return getKylinPropertiesFile(path); } -static File getKylinAccountPropertiesFile() { -String kylinConfHome = System.getProperty(KYLIN_CONF); -if (!StringUtils.isEmpty(kylinConfHome)) { -logger.info("Use KYLIN_CONF=" + kylinConfHome); -return getKylinAccountPropertiesFile(kylinConfHome); -} - -logger.warn("KYLIN_CONF property was not set, will seek KYLIN_HOME env variable"); - -String kylinHome = getKylinHome(); -if (StringUtils.isEmpty(kylinHome)) -throw new KylinConfigCannotInitException("Didn't find KYLIN_CONF or KYLIN_HOME, please set one of them"); - -String path = kylinHome + File.separator + "conf"; -return getKylinAccountPropertiesFile(path); -} - public static Properties getKylinProperties() { File propFile = getKylinPropertiesFile(); if (propFile == null || !propFile.exists()) { @@ -242,25 +224,6 @@ public class KylinConfig extends KylinConfigBase { IOUtils.closeQuietly(ois); conf.putAll(propOverride); } - -File accountPropFile = getKylinAccountPropertiesFile(); -if (accountPropFile.exists()) { -FileInputStream ois = new FileInputStream(accountPropFile); -Properties propAccount = new Properties(); -propAccount.load(ois); -IOUtils.closeQuietly(ois); -conf.putAll(propAccount); -} - -File accountPropOverrideFile = new File(accountPropFile.getParentFile(), accountPropFile.getName() + ".override"); -if (accountPropOverrideFile.exists()) { -FileInputStream ois = new FileInputStream(accountPropOverrideFile); -Properties propAccountOverride = new Properties(); -propAccountOverride.load(ois); -IOUtils.closeQuietly(ois); -conf.putAll(propAccountOverride); -} - } catch (IOException e) { throw new RuntimeException(e); } @@ -282,14 +245,6 @@ public class KylinConfig extends KylinConfigBase { return new File(path, KYLIN_CONF_PROPERTIES_FILE); } -private static File getKylinAccountPropertiesFile(String path) { -if (path == null) { -return null; -} - -return new File(path, KYLIN_ACCOUNT_CONF_PROPERTIES_FILE); -} - public static void setSandboxEnvIfPossible() { File dir1 = new File("../examples/test_case_data/sandbox"); File dir2 = new File("../../kylin/examples/test_case_data/sandbox"); http://git-wip-us.apache.org/repos/asf/kylin/blob/51b5b31b/core-common/src/test/java/org/apache/kylin/common/KylinConfigTest.java -- diff
kylin git commit: KYLIN-2054 TimedJsonStreamParser should support other time format
Repository: kylin Updated Branches: refs/heads/master 01d5670e0 -> e50072618 KYLIN-2054 TimedJsonStreamParser should support other time format Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/e5007261 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/e5007261 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/e5007261 Branch: refs/heads/master Commit: e500726184b318da2d1f503cd1b159cfe7242347 Parents: 01d5670 Author: shaofengshiAuthored: Tue Sep 27 22:21:15 2016 +0800 Committer: shaofengshi Committed: Wed Sep 28 17:00:46 2016 +0800 -- build/bin/kylin.sh | 3 +- .../org/apache/kylin/common/util/BasicTest.java | 13 +++ source-kafka/pom.xml| 6 +- .../kylin/source/kafka/AbstractTimeParser.java | 34 .../kylin/source/kafka/DateTimeParser.java | 84 .../kylin/source/kafka/DefaultTimeParser.java | 49 .../apache/kylin/source/kafka/KafkaMRInput.java | 2 +- .../kylin/source/kafka/SeekOffsetStep.java | 2 +- .../source/kafka/TimedJsonStreamParser.java | 46 --- 9 files changed, 222 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/e5007261/build/bin/kylin.sh -- diff --git a/build/bin/kylin.sh b/build/bin/kylin.sh index 7a9d2a1..e767492 100644 --- a/build/bin/kylin.sh +++ b/build/bin/kylin.sh @@ -31,7 +31,7 @@ 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 +#source ${dir}/find-kafka-dependency.sh #retrive $KYLIN_EXTRA_START_OPTS if [ -f "${dir}/setenv.sh" ] @@ -40,6 +40,7 @@ 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}:${hive_dependency}:${kafka_dependency} } # start command http://git-wip-us.apache.org/repos/asf/kylin/blob/e5007261/core-common/src/test/java/org/apache/kylin/common/util/BasicTest.java -- diff --git a/core-common/src/test/java/org/apache/kylin/common/util/BasicTest.java b/core-common/src/test/java/org/apache/kylin/common/util/BasicTest.java index ee15832..5eaa011 100644 --- a/core-common/src/test/java/org/apache/kylin/common/util/BasicTest.java +++ b/core-common/src/test/java/org/apache/kylin/common/util/BasicTest.java @@ -24,6 +24,7 @@ import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.concurrent.ExecutionException; @@ -33,6 +34,7 @@ import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import org.apache.commons.lang3.time.FastDateFormat; import org.junit.Ignore; import org.junit.Test; import org.slf4j.LoggerFactory; @@ -206,6 +208,17 @@ public class BasicTest { } } +@Test +@Ignore("for dev only") +public void test3() throws Exception { +FastDateFormat formatter = org.apache.kylin.common.util.DateFormat.getDateFormat("MMM dd, hh:mm:ss aa"); +System.out.println(formatter.format(new Date())); + +String timeStr = "Jul 20, 2016 9:59:17 AM"; + +System.out.println(formatter.parse(timeStr).getTime()); +} + private static String time(long t) { DateFormat dateFormat = new SimpleDateFormat("/MM/dd HH:mm:ss"); Calendar cal = Calendar.getInstance(); http://git-wip-us.apache.org/repos/asf/kylin/blob/e5007261/source-kafka/pom.xml -- diff --git a/source-kafka/pom.xml b/source-kafka/pom.xml index 212f4c6..f91ab8f 100644 --- a/source-kafka/pom.xml +++ b/source-kafka/pom.xml @@ -48,7 +48,11 @@ kafka_2.10 provided - + +org.apache.commons +commons-lang3 +${commons-lang3.version} + org.apache.hadoop http://git-wip-us.apache.org/repos/asf/kylin/blob/e5007261/source-kafka/src/main/java/org/apache/kylin/source/kafka/AbstractTimeParser.java -- diff --git a/source-kafka/src/main/java/org/apache/kylin/source/kafka/AbstractTimeParser.java
kylin git commit: KYLIN-2054 TimedJsonStreamParser should support other time format [Forced Update!]
Repository: kylin Updated Branches: refs/heads/KYLIN-2054 6533f9e87 -> da3f1bfc0 (forced update) KYLIN-2054 TimedJsonStreamParser should support other time format Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/da3f1bfc Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/da3f1bfc Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/da3f1bfc Branch: refs/heads/KYLIN-2054 Commit: da3f1bfc0681d054c7ee799caaa65953d4c5019b Parents: 859230d Author: shaofengshiAuthored: Tue Sep 27 22:21:15 2016 +0800 Committer: shaofengshi Committed: Wed Sep 28 16:58:01 2016 +0800 -- build/bin/kylin.sh | 3 +- .../org/apache/kylin/common/util/BasicTest.java | 13 +++ source-kafka/pom.xml| 6 +- .../kylin/source/kafka/AbstractTimeParser.java | 34 .../kylin/source/kafka/DateTimeParser.java | 84 .../kylin/source/kafka/DefaultTimeParser.java | 49 .../apache/kylin/source/kafka/KafkaMRInput.java | 2 +- .../kylin/source/kafka/SeekOffsetStep.java | 2 +- .../source/kafka/TimedJsonStreamParser.java | 46 --- 9 files changed, 222 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/da3f1bfc/build/bin/kylin.sh -- diff --git a/build/bin/kylin.sh b/build/bin/kylin.sh index 7a9d2a1..e767492 100644 --- a/build/bin/kylin.sh +++ b/build/bin/kylin.sh @@ -31,7 +31,7 @@ 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 +#source ${dir}/find-kafka-dependency.sh #retrive $KYLIN_EXTRA_START_OPTS if [ -f "${dir}/setenv.sh" ] @@ -40,6 +40,7 @@ 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}:${hive_dependency}:${kafka_dependency} } # start command http://git-wip-us.apache.org/repos/asf/kylin/blob/da3f1bfc/core-common/src/test/java/org/apache/kylin/common/util/BasicTest.java -- diff --git a/core-common/src/test/java/org/apache/kylin/common/util/BasicTest.java b/core-common/src/test/java/org/apache/kylin/common/util/BasicTest.java index ee15832..5eaa011 100644 --- a/core-common/src/test/java/org/apache/kylin/common/util/BasicTest.java +++ b/core-common/src/test/java/org/apache/kylin/common/util/BasicTest.java @@ -24,6 +24,7 @@ import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.concurrent.ExecutionException; @@ -33,6 +34,7 @@ import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import org.apache.commons.lang3.time.FastDateFormat; import org.junit.Ignore; import org.junit.Test; import org.slf4j.LoggerFactory; @@ -206,6 +208,17 @@ public class BasicTest { } } +@Test +@Ignore("for dev only") +public void test3() throws Exception { +FastDateFormat formatter = org.apache.kylin.common.util.DateFormat.getDateFormat("MMM dd, hh:mm:ss aa"); +System.out.println(formatter.format(new Date())); + +String timeStr = "Jul 20, 2016 9:59:17 AM"; + +System.out.println(formatter.parse(timeStr).getTime()); +} + private static String time(long t) { DateFormat dateFormat = new SimpleDateFormat("/MM/dd HH:mm:ss"); Calendar cal = Calendar.getInstance(); http://git-wip-us.apache.org/repos/asf/kylin/blob/da3f1bfc/source-kafka/pom.xml -- diff --git a/source-kafka/pom.xml b/source-kafka/pom.xml index 212f4c6..f91ab8f 100644 --- a/source-kafka/pom.xml +++ b/source-kafka/pom.xml @@ -48,7 +48,11 @@ kafka_2.10 provided - + +org.apache.commons +commons-lang3 +${commons-lang3.version} + org.apache.hadoop http://git-wip-us.apache.org/repos/asf/kylin/blob/da3f1bfc/source-kafka/src/main/java/org/apache/kylin/source/kafka/AbstractTimeParser.java -- diff --git
kylin git commit: KYLIN-1726 support array value in json
Repository: kylin Updated Branches: refs/heads/KYLIN-2054 65b792c84 -> 6533f9e87 KYLIN-1726 support array value in json Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/6533f9e8 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/6533f9e8 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/6533f9e8 Branch: refs/heads/KYLIN-2054 Commit: 6533f9e87f3d82864710fff57d1c259c75e6185e Parents: 65b792c Author: shaofengshiAuthored: Wed Sep 28 16:03:01 2016 +0800 Committer: shaofengshi Committed: Wed Sep 28 16:03:01 2016 +0800 -- .../apache/kylin/source/kafka/TimedJsonStreamParser.java | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/6533f9e8/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java -- diff --git a/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java b/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java index ba541be..9e2e37e 100644 --- a/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java +++ b/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java @@ -52,7 +52,7 @@ public final class TimedJsonStreamParser extends StreamingParser { private final ObjectMapper mapper; private String tsColName = "timestamp"; private String tsParser = "org.apache.kylin.source.kafka.DefaultTimeParser"; -private final JavaType mapType = MapType.construct(HashMap.class, SimpleType.construct(String.class), SimpleType.construct(String.class)); +private final JavaType mapType = MapType.construct(HashMap.class, SimpleType.construct(String.class), SimpleType.construct(Object.class)); private AbstractTimeParser streamTimeParser; @@ -103,10 +103,10 @@ public final class TimedJsonStreamParser extends StreamingParser { @Override public StreamingMessage parse(ByteBuffer buffer) { try { -Map message = mapper.readValue(new ByteBufferBackedInputStream(buffer), mapType); -Map root = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); +Map message = mapper.readValue(new ByteBufferBackedInputStream(buffer), mapType); +Map root = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); root.putAll(message); -String tsStr = root.get(tsColName); +String tsStr = String.valueOf(root.get(tsColName)); long t = streamTimeParser.parseTime(tsStr); ArrayList result = Lists.newArrayList(); @@ -114,7 +114,7 @@ public final class TimedJsonStreamParser extends StreamingParser { String columnName = column.getName().toLowerCase(); if (populateDerivedTimeColumns(columnName, result, t) == false) { -String x = root.get(columnName); +String x = String.valueOf(root.get(columnName)); result.add(x); } }
kylin git commit: KYLIN-1762 allow unrecognized json property
Repository: kylin Updated Branches: refs/heads/KYLIN-2054 26609a20e -> 65b792c84 KYLIN-1762 allow unrecognized json property Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/65b792c8 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/65b792c8 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/65b792c8 Branch: refs/heads/KYLIN-2054 Commit: 65b792c84a2625ed0f29b4858aeba40528377bf3 Parents: 26609a2 Author: shaofengshiAuthored: Wed Sep 28 15:01:17 2016 +0800 Committer: shaofengshi Committed: Wed Sep 28 15:01:17 2016 +0800 -- .../org/apache/kylin/source/kafka/TimedJsonStreamParser.java| 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/65b792c8/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java -- diff --git a/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java b/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java index 5db602d..ba541be 100644 --- a/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java +++ b/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java @@ -28,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.TreeMap; +import com.fasterxml.jackson.databind.DeserializationFeature; import org.apache.commons.lang3.StringUtils; import org.apache.kylin.common.util.StreamingMessage; import org.apache.kylin.metadata.model.TblColRef; @@ -48,7 +49,7 @@ public final class TimedJsonStreamParser extends StreamingParser { private static final Logger logger = LoggerFactory.getLogger(TimedJsonStreamParser.class); private List allColumns; -private final ObjectMapper mapper = new ObjectMapper(); +private final ObjectMapper mapper; private String tsColName = "timestamp"; private String tsParser = "org.apache.kylin.source.kafka.DefaultTimeParser"; private final JavaType mapType = MapType.construct(HashMap.class, SimpleType.construct(String.class), SimpleType.construct(String.class)); @@ -95,6 +96,8 @@ public final class TimedJsonStreamParser extends StreamingParser { } else { throw new IllegalStateException("Invalid StreamingConfig, tsParser " + tsParser + ", parserProperties " + propertiesStr + "."); } +mapper = new ObjectMapper(); +mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); } @Override
kylin git commit: KYLIN-2042 respect KylinConfig.isQueryCacheEnabled(), thanks to Tajdar Siddiqui
Repository: kylin Updated Branches: refs/heads/master 31b80905e -> 01d5670e0 KYLIN-2042 respect KylinConfig.isQueryCacheEnabled(), thanks to Tajdar Siddiqui Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/01d5670e Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/01d5670e Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/01d5670e Branch: refs/heads/master Commit: 01d5670e0ea7f1e3fe5cbb6e9decb293f8815d8f Parents: 31b8090 Author: Li YangAuthored: Wed Sep 28 14:53:26 2016 +0800 Committer: Li Yang Committed: Wed Sep 28 14:53:26 2016 +0800 -- .../kylin/rest/controller/QueryController.java | 41 +++- 1 file changed, 23 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/01d5670e/server-base/src/main/java/org/apache/kylin/rest/controller/QueryController.java -- diff --git a/server-base/src/main/java/org/apache/kylin/rest/controller/QueryController.java b/server-base/src/main/java/org/apache/kylin/rest/controller/QueryController.java index 62cb0a7..9471937 100644 --- a/server-base/src/main/java/org/apache/kylin/rest/controller/QueryController.java +++ b/server-base/src/main/java/org/apache/kylin/rest/controller/QueryController.java @@ -173,7 +173,8 @@ public class QueryController extends BasicController { logger.info("Using project: " + project); logger.info("The original query: " + sql); -String serverMode = KylinConfig.getInstanceFromEnv().getServerMode(); +KylinConfig kylinConfig = KylinConfig.getInstanceFromEnv(); +String serverMode = kylinConfig.getServerMode(); if (!(Constant.SERVER_MODE_QUERY.equals(serverMode.toLowerCase()) || Constant.SERVER_MODE_ALL.equals(serverMode.toLowerCase( { throw new InternalErrorException("Query is not allowed in " + serverMode + " mode."); } @@ -185,17 +186,23 @@ public class QueryController extends BasicController { long startTime = System.currentTimeMillis(); -SQLResponse sqlResponse = searchQueryInCache(sqlRequest); +SQLResponse sqlResponse = null; +boolean queryCacheEnabled = kylinConfig.isQueryCacheEnabled() && !BackdoorToggles.getDisableCache(); +if (queryCacheEnabled) { +sqlResponse = searchQueryInCache(sqlRequest); +} + try { if (null == sqlResponse) { sqlResponse = queryService.query(sqlRequest); -long durationThreshold = KylinConfig.getInstanceFromEnv().getQueryDurationCacheThreshold(); -long scancountThreshold = KylinConfig.getInstanceFromEnv().getQueryScanCountCacheThreshold(); +long durationThreshold = kylinConfig.getQueryDurationCacheThreshold(); +long scancountThreshold = kylinConfig.getQueryScanCountCacheThreshold(); sqlResponse.setDuration(System.currentTimeMillis() - startTime); logger.info("Stats of SQL response: isException: {}, duration: {}, total scan count {}", // String.valueOf(sqlResponse.getIsException()), String.valueOf(sqlResponse.getDuration()), String.valueOf(sqlResponse.getTotalScanCount())); -if (!sqlResponse.getIsException() && (sqlResponse.getDuration() > durationThreshold || sqlResponse.getTotalScanCount() > scancountThreshold)) { +if (queryCacheEnabled && !sqlResponse.getIsException() // +&& (sqlResponse.getDuration() > durationThreshold || sqlResponse.getTotalScanCount() > scancountThreshold)) { cacheManager.getCache(SUCCESS_QUERY_CACHE).put(new Element(sqlRequest, sqlResponse)); } } else { @@ -211,7 +218,7 @@ public class QueryController extends BasicController { sqlResponse = new SQLResponse(null, null, 0, true, errMsg); // for exception queries, only cache ScanOutOfLimitException -if (e instanceof ScanOutOfLimitException) { +if (queryCacheEnabled && e instanceof ScanOutOfLimitException) { Cache exceptionCache = cacheManager.getCache(EXCEPTION_QUERY_CACHE); exceptionCache.put(new Element(sqlRequest, sqlResponse)); } @@ -236,18 +243,16 @@ public class QueryController extends BasicController { Cache exceptionCache = cacheManager.getCache(EXCEPTION_QUERY_CACHE); Cache successCache = cacheManager.getCache(SUCCESS_QUERY_CACHE); -if