Author: lidong Date: Mon Jan 11 08:25:54 2016 New Revision: 1723987 URL: http://svn.apache.org/viewvc?rev=1723987&view=rev Log: Update documents on rest APIs and devs
Modified: kylin/site/development/dev_env.html kylin/site/development/howto_contribute.html kylin/site/development/howto_docs.html kylin/site/docs/howto/howto_build_cube_with_restapi.html kylin/site/docs/howto/howto_jdbc.html kylin/site/docs/howto/howto_use_restapi.html kylin/site/docs/howto/howto_use_restapi_in_js.html kylin/site/docs/index.html kylin/site/docs/install/hadoop_env.html kylin/site/feed.xml Modified: kylin/site/development/dev_env.html URL: http://svn.apache.org/viewvc/kylin/site/development/dev_env.html?rev=1723987&r1=1723986&r2=1723987&view=diff ============================================================================== --- kylin/site/development/dev_env.html (original) +++ kylin/site/development/dev_env.html Mon Jan 11 08:25:54 2016 @@ -454,7 +454,8 @@ <div class="highlight"><pre><code class="language-groff" data-lang="groff">ambari-agent start ambari-server start</code></pre></div> -<p>With both command successfully run you can go to ambari home page at <a href="http://yoursandboxip:8080">http://yoursandboxip:8080</a> (user:admin,password:admin) to check everythingâs status. By default ambari disables Hbase, youâll need manually start the <code class="highlighter-rouge">Hbase</code> service.</p> +<p>With both command successfully run you can go to ambari home page at <a href="http://yoursandboxip:8080">http://yoursandboxip:8080</a> (user:admin,password:admin) to check everythingâs status. By default ambari disables Hbase, youâll need manually start the <code class="highlighter-rouge">Hbase</code> service.<br /> +<img src="https://raw.githubusercontent.com/KylinOLAP/kylinolap.github.io/master/docs/installation/starthbase.png" alt="start hbase in ambari" /></p> <p>For other hadoop distribution, basically start the hadoop cluster, make sure HDFS, YARN, Hive, HBase are running.</p> Modified: kylin/site/development/howto_contribute.html URL: http://svn.apache.org/viewvc/kylin/site/development/howto_contribute.html?rev=1723987&r1=1723986&r2=1723987&view=diff ============================================================================== --- kylin/site/development/howto_contribute.html (original) +++ kylin/site/development/howto_contribute.html Mon Jan 11 08:25:54 2016 @@ -453,7 +453,11 @@ <ul> <li>Raise an issue on JIRA, describe the feature/enhancement/bug</li> <li>Discuss with others in mailing list or issue comments, make sure the proposed changes fit in with what others are doing and have planned for the project</li> - <li>Make changes in your fork</li> + <li>Make changes in your fork + <ul> + <li>No strict code style at the moment, but the general rule is keep consistent with existing files. E.g. use 4-space indent for java files.</li> + </ul> + </li> <li>Write unit test if no existing cover your change</li> <li>Generate patch and attach it to relative JIRA; Please use <code class="highlighter-rouge">git format-patch</code> command to generate the patch, for a detail guide you can refer to <a href="https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/">How to create and apply a patch with Git</a></li> </ul> Modified: kylin/site/development/howto_docs.html URL: http://svn.apache.org/viewvc/kylin/site/development/howto_docs.html?rev=1723987&r1=1723986&r2=1723987&view=diff ============================================================================== --- kylin/site/development/howto_docs.html (original) +++ kylin/site/development/howto_docs.html Mon Jan 11 08:25:54 2016 @@ -441,13 +441,24 @@ <article class="post-content" > <h2 id="before-your-work">Before your work</h2> -<p>Install following tools before you add or edit documentation: <br /> -1. First, make sure Ruby and Gem are works on your machine <br /> -<em>For Mac User, please refer <a href="https://github.com/sstephenson/rbenv#homebrew-on-mac-os-x">this</a> to setup ruby env.</em> <br /> -2. Then, install <a href="http://jekyllrb.com">Jekyll</a>, and plugins, for example: <br /> -<code class="highlighter-rouge">gem install jekyll jekyll-multiple-languages kramdown rouge</code> <br /> -3. <a href="http://jekyll-langs.liaohuqiu.net/cn/">Jekyll Multiple Languages Plugin</a> <br /> -4. And any markdown editor</p> +<p>Install following tools before you add or edit documentation:</p> + +<ol> + <li>First, make sure Ruby and Gem work on your machine + <ul> + <li>For Mac user, please refer <a href="https://github.com/sstephenson/rbenv#homebrew-on-mac-os-x">this</a> to setup ruby env.</li> + <li>For Windows user, use the <a href="http://rubyinstaller.org/downloads/">ruby installer</a>.</li> + <li>For China user, consider use a <a href="https://ruby.taobao.org/">local gem repository</a> in case of network issues.</li> + </ul> + </li> + <li>Then, install <a href="http://jekyllrb.com">Jekyll</a>, and required plugins + <ul> + <li><code class="highlighter-rouge">gem install jekyll jekyll-multiple-languages kramdown rouge</code></li> + <li><strong>Note</strong>: Some specific version of jekyll and jekyll-multiple-languages does not work together (I got a âundefined methodâ error with jekyll 3.0.1 and jekyll-multiple-languages 2.0.3). In that case, <code class="highlighter-rouge">jekyll 2.5.3</code> and <code class="highlighter-rouge">jekyll-multiple-languages 1.0.8</code> is the known working version.</li> + </ul> + </li> + <li>And optionally any markdown editor you prefer</li> +</ol> <h2 id="about-jekyll">About Jekyll</h2> <p>Jekyll is a Ruby script to generate a static HTML website from source text and themes, the HTML is generated before being deployed to the web server. Jekyll also happens to be the engine behind GitHub Pages.</p> @@ -543,7 +554,7 @@ The quick brown fox jump over the lazy d check this docâs source code for more detail sample.</p> <h1 id="how-to-preview-in-your-local">How to preview in your local</h1> -<p>You can preview in your markdown editor, to check exactly what it will looks like on website, please run Jekyll from âwebsiteâ folder:</p> +<p>You can preview in your markdown editor, to check exactly what it will looks like on website, please run Jekyll from <code class="highlighter-rouge">website</code> folder:</p> <div class="highlighter-rouge"><pre class="highlight"><code>jekyll server Modified: kylin/site/docs/howto/howto_build_cube_with_restapi.html URL: http://svn.apache.org/viewvc/kylin/site/docs/howto/howto_build_cube_with_restapi.html?rev=1723987&r1=1723986&r2=1723987&view=diff ============================================================================== --- kylin/site/docs/howto/howto_build_cube_with_restapi.html (original) +++ kylin/site/docs/howto/howto_build_cube_with_restapi.html Mon Jan 11 08:25:54 2016 @@ -1670,7 +1670,7 @@ <div id="pjax"> <h1 class="post-title">How to Build Cube with Restful API</h1> - <p>version: v1.0, since: v0.7.1</p> + <p>version: v1.2, since: v0.7.1</p> <article class="post-content" > <h3 id="authentication">1. Authentication</h3> @@ -1679,49 +1679,46 @@ <li>Add <code class="highlighter-rouge">Authorization</code> header to first request for authentication</li> <li>Or you can do a specific request by <code class="highlighter-rouge">POST http://localhost:7070/kylin/api/user/authentication</code></li> <li>Once authenticated, client can go subsequent requests with cookies.</li> - <li>Example</li> </ul> <div class="highlight"><pre><code class="language-groff" data-lang="groff">POST http://localhost:7070/kylin/api/user/authentication - Authorization:Basic xxxxJD124xxxGFxxxSDF - Content-Type: application/json;charset=UTF-8</code></pre></div> +Authorization:Basic xxxxJD124xxxGFxxxSDF +Content-Type: application/json;charset=UTF-8</code></pre></div> <h3 id="get-details-of-cube">2. Get details of cube.</h3> <ul> <li><code class="highlighter-rouge">GET http://localhost:7070/kylin/api/cubes?cubeName={cube_name}&limit=15&offset=0</code></li> <li>Client can find cube segment date ranges in returned cube detail.</li> - <li>Example</li> </ul> <div class="highlight"><pre><code class="language-groff" data-lang="groff">GET http://localhost:7070/kylin/api/cubes?cubeName=test_kylin_cube_with_slr&limit=15&offset=0 - Authorization:Basic xxxxJD124xxxGFxxxSDF - Content-Type: application/json;charset=UTF-8</code></pre></div> +Authorization:Basic xxxxJD124xxxGFxxxSDF +Content-Type: application/json;charset=UTF-8</code></pre></div> <h3 id="then-submit-a-build-job-of-the-cube">3. Then submit a build job of the cube.</h3> <ul> <li><code class="highlighter-rouge">PUT http://localhost:7070/kylin/api/cubes/{cube_name}/rebuild</code></li> - <li>For put request body detail please refer to <a href="rest_api.html">service doc</a>. + <li>For put request body detail please refer to <a href="howto_use_restapi.html#build-cube">Build Cube API</a>. <ul> <li><code class="highlighter-rouge">startTime</code> and <code class="highlighter-rouge">endTime</code> should be utc timestamp.</li> <li><code class="highlighter-rouge">buildType</code> can be <code class="highlighter-rouge">BUILD</code> ,<code class="highlighter-rouge">MERGE</code> or <code class="highlighter-rouge">REFRESH</code>. <code class="highlighter-rouge">BUILD</code> is for building a new segment, <code class="highlighter-rouge">REFRESH</code> for refreshing an existing segment. <code class="highlighter-rouge">MERGE</code> is for merging multiple existing segments into one bigger segment.</li> </ul> </li> - <li>This method will return a newly created job instance, in which the uuid is the identity of job to track job status.</li> - <li>Example</li> + <li>This method will return a new created job instance, whose uuid is the unique id of job to track job status.</li> </ul> <div class="highlight"><pre><code class="language-groff" data-lang="groff">PUT http://localhost:7070/kylin/api/cubes/test_kylin_cube_with_slr/rebuild - Authorization:Basic xxxxJD124xxxGFxxxSDF - Content-Type: application/json;charset=UTF-8 +Authorization:Basic xxxxJD124xxxGFxxxSDF +Content-Type: application/json;charset=UTF-8 - { - "startTime": 0, - "endTime": 1388563200000, - "buildType": "BUILD" - }</code></pre></div> +{ + "startTime": 0, + "endTime": 1388563200000, + "buildType": "BUILD" +}</code></pre></div> <h3 id="track-job-status">4. Track job status.</h3> <ul> @@ -1729,7 +1726,7 @@ <li>Returned <code class="highlighter-rouge">job_status</code> represents current status of job.</li> </ul> -<h3 id="if-the-job-failed-you-can-resume-the-job">5. If the job failed, you can resume the job.</h3> +<h3 id="if-the-job-got-errors-you-can-resume-it">5. If the job got errors, you can resume it.</h3> <ul> <li><code class="highlighter-rouge">PUT http://localhost:7070/kylin/api/jobs/{job_uuid}/resume</code></li> </ul> Modified: kylin/site/docs/howto/howto_jdbc.html URL: http://svn.apache.org/viewvc/kylin/site/docs/howto/howto_jdbc.html?rev=1723987&r1=1723986&r2=1723987&view=diff ============================================================================== --- kylin/site/docs/howto/howto_jdbc.html (original) +++ kylin/site/docs/howto/howto_jdbc.html Mon Jan 11 08:25:54 2016 @@ -1670,7 +1670,7 @@ <div id="pjax"> <h1 class="post-title">How to Use kylin Remote JDBC Driver</h1> - <p>version: v0.7.2, since: v0.7.1</p> + <p>version: v1.2, since: v0.7.1</p> <article class="post-content" > <h3 id="authentication">Authentication</h3> @@ -1696,18 +1696,18 @@ <div class="highlight"><pre><code class="language-groff" data-lang="groff">Driver driver = (Driver) Class.forName("org.apache.kylin.jdbc.Driver").newInstance(); - Properties info = new Properties(); - info.put("user", "ADMIN"); - info.put("password", "KYLIN"); - Connection conn = driver.connect("jdbc:kylin://localhost:7070/kylin_project_name", info); - Statement state = conn.createStatement(); - ResultSet resultSet = state.executeQuery("select * from test_table"); - - while (resultSet.next()) { - assertEquals("foo", resultSet.getString(1)); - assertEquals("bar", resultSet.getString(2)); - assertEquals("tool", resultSet.getString(3)); - }</code></pre></div> +Properties info = new Properties(); +info.put("user", "ADMIN"); +info.put("password", "KYLIN"); +Connection conn = driver.connect("jdbc:kylin://localhost:7070/kylin_project_name", info); +Statement state = conn.createStatement(); +ResultSet resultSet = state.executeQuery("select * from test_table"); + +while (resultSet.next()) { + assertEquals("foo", resultSet.getString(1)); + assertEquals("bar", resultSet.getString(2)); + assertEquals("tool", resultSet.getString(3)); +}</code></pre></div> <h3 id="query-with-preparedstatement">2. Query with PreparedStatement</h3> @@ -1727,38 +1727,38 @@ </ul> <div class="highlight"><pre><code class="language-groff" data-lang="groff">Driver driver = (Driver) Class.forName("org.apache.kylin.jdbc.Driver").newInstance(); - Properties info = new Properties(); - info.put("user", "ADMIN"); - info.put("password", "KYLIN"); - Connection conn = driver.connect("jdbc:kylin://localhost:7070/kylin_project_name", info); - PreparedStatement state = conn.prepareStatement("select * from test_table where id=?"); - state.setInt(1, 10); - ResultSet resultSet = state.executeQuery(); - - while (resultSet.next()) { - assertEquals("foo", resultSet.getString(1)); - assertEquals("bar", resultSet.getString(2)); - assertEquals("tool", resultSet.getString(3)); - }</code></pre></div> +Properties info = new Properties(); +info.put("user", "ADMIN"); +info.put("password", "KYLIN"); +Connection conn = driver.connect("jdbc:kylin://localhost:7070/kylin_project_name", info); +PreparedStatement state = conn.prepareStatement("select * from test_table where id=?"); +state.setInt(1, 10); +ResultSet resultSet = state.executeQuery(); + +while (resultSet.next()) { + assertEquals("foo", resultSet.getString(1)); + assertEquals("bar", resultSet.getString(2)); + assertEquals("tool", resultSet.getString(3)); +}</code></pre></div> -<h3 id="get-query-result-metadata">3. Get query result metadata</h3> +<h3 id="get-query-result-set-metadata">3. Get query result set metadata</h3> <p>Kylin jdbc driver supports metadata list methods:<br /> List catalog, schema, table and column with sql pattern filters(such as %).</p> <div class="highlight"><pre><code class="language-groff" data-lang="groff">Driver driver = (Driver) Class.forName("org.apache.kylin.jdbc.Driver").newInstance(); - Properties info = new Properties(); - info.put("user", "ADMIN"); - info.put("password", "KYLIN"); - Connection conn = driver.connect("jdbc:kylin://localhost:7070/kylin_project_name", info); - Statement state = conn.createStatement(); - ResultSet resultSet = state.executeQuery("select * from test_table"); - - ResultSet tables = conn.getMetaData().getTables(null, null, "dummy", null); - while (tables.next()) { - for (int i = 0; i < 10; i++) { - assertEquals("dummy", tables.getString(i + 1)); - } - }</code></pre></div> +Properties info = new Properties(); +info.put("user", "ADMIN"); +info.put("password", "KYLIN"); +Connection conn = driver.connect("jdbc:kylin://localhost:7070/kylin_project_name", info); +Statement state = conn.createStatement(); +ResultSet resultSet = state.executeQuery("select * from test_table"); + +ResultSet tables = conn.getMetaData().getTables(null, null, "dummy", null); +while (tables.next()) { + for (int i = 0; i < 10; i++) { + assertEquals("dummy", tables.getString(i + 1)); + } +}</code></pre></div> </article> Modified: kylin/site/docs/howto/howto_use_restapi.html URL: http://svn.apache.org/viewvc/kylin/site/docs/howto/howto_use_restapi.html?rev=1723987&r1=1723986&r2=1723987&view=diff ============================================================================== --- kylin/site/docs/howto/howto_use_restapi.html (original) +++ kylin/site/docs/howto/howto_use_restapi.html Mon Jan 11 08:25:54 2016 @@ -1670,15 +1670,15 @@ <div id="pjax"> <h1 class="post-title">How to Use Restful API</h1> - <p>version: v1.0, since: v0.7.1</p> + <p>version: v1.2, since: v0.7.1</p> <article class="post-content" > - <p>This page lists all the Restful API that provided by Kylin; The endpoint of the Rest service is started with <strong>/kylin/api</strong>, so donât forget to add it before a certain APIâs path. For example, to get all cube instances, send HTTP GET request to â/kylin/api/cubesâ.</p> + <p>This page lists all the Rest APIs provided by Kylin; The base of the URL is <code class="highlighter-rouge">/kylin/api</code>, so donât forget to add it before a certain APIâs path. For example, to get all cube instances, send HTTP GET request to â/kylin/api/cubesâ.</p> <ul> - <li>QUERY + <li>Query <ul> - <li><a href="#login">Login</a></li> + <li><a href="#authentication">Authentication</a></li> <li><a href="#query">Query</a></li> <li><a href="#list-queryable-tables">List queryable tables</a></li> </ul> @@ -1717,25 +1717,18 @@ </li> </ul> -<h2 id="login">Login</h2> +<h2 id="authentication">Authentication</h2> <p><code class="highlighter-rouge">POST /user/authentication</code></p> -<p>for example:</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>curl -c /path/to/cookiefile.txt -X POST -H "Authorization: Basic XXXXXXXXX" -H 'Content-Type: application/json' http://<host>:<port>/kylin/api/user/authentication -</code></pre> -</div> - -<p>If login successfully, the JSESSIONID will be saved into the cookie file; In the subsequent http requests, attach the cookie, for example:</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>curl -b /path/to/cookiefile.txt -X PUT -H 'Content-Type: application/json' -d '{"startTime":'1423526400000', "endTime":'1423526400', "buildType":"BUILD"}' http://<host>:<port>/kylin/api/cubes/your_cube/rebuild -</code></pre> -</div> - -<h4 id="header">Header</h4> -<p>Authorization data encoded by basic auth. Header sample:<br /> +<h4 id="request-header">Request Header</h4> +<p>Authorization data encoded by basic auth is needed in the header, such as:<br /> Authorization:Basic {data}</p> +<h4 id="response-body">Response Body</h4> +<ul> + <li>userDetails - Defined authorities and status of current user.</li> +</ul> + <h4 id="response-sample">Response Sample</h4> <div class="highlighter-rouge"><pre class="highlight"><code><span class="o">{</span> @@ -1759,6 +1752,18 @@ Authorization:Basic {data}</p> </code></pre> </div> +<p>Example with <code class="highlighter-rouge">curl</code>:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>curl -c /path/to/cookiefile.txt -X POST -H "Authorization: Basic XXXXXXXXX" -H 'Content-Type: application/json' http://<host>:<port>/kylin/api/user/authentication +</code></pre> +</div> + +<p>If login successfully, the JSESSIONID will be saved into the cookie file; In the subsequent http requests, attach the cookie, for example:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>curl -b /path/to/cookiefile.txt -X PUT -H 'Content-Type: application/json' -d '{"startTime":'1423526400000', "endTime":'1423526400', "buildType":"BUILD"}' http://<host>:<port>/kylin/api/cubes/your_cube/rebuild +</code></pre> +</div> + <hr /> <h2 id="query">Query</h2> @@ -1766,108 +1771,120 @@ Authorization:Basic {data}</p> <h4 id="request-body">Request Body</h4> <ul> - <li>sql - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> The sql query string.</li> + <li>sql - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> The text of sql statement.</li> <li>offset - <code class="highlighter-rouge">optional</code> <code class="highlighter-rouge">int</code> Query offset. If offset is set in sql, curIndex will be ignored.</li> <li>limit - <code class="highlighter-rouge">optional</code> <code class="highlighter-rouge">int</code> Query limit. If limit is set in sql, perPage will be ignored.</li> - <li>acceptPartial - <code class="highlighter-rouge">optional</code> <code class="highlighter-rouge">bool</code> Whether accept a partial result or not, default be âtrueâ to avoid a big scan on HBase. Set to âfalseâ for production use.</li> + <li>acceptPartial - <code class="highlighter-rouge">optional</code> <code class="highlighter-rouge">bool</code> Whether accept a partial result or not, default be âfalseâ. Set to âfalseâ for production use.</li> <li>project - <code class="highlighter-rouge">optional</code> <code class="highlighter-rouge">string</code> Project to perform query. Default value is âDEFAULTâ.</li> </ul> -<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w"> - </span><span class="nt">"sql"</span><span class="p">:</span><span class="s2">"select * from TEST_KYLIN_FACT"</span><span class="p">,</span><span class="w"> - </span><span class="nt">"offset"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span><span class="w"> - </span><span class="nt">"limit"</span><span class="p">:</span><span class="mi">50000</span><span class="p">,</span><span class="w"> - </span><span class="nt">"acceptPartial"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span><span class="w"> - </span><span class="nt">"project"</span><span class="p">:</span><span class="s2">"DEFAULT"</span><span class="w"> -</span><span class="p">}</span><span class="w"> -</span></code></pre> +<h4 id="request-sample">Request Sample</h4> + +<div class="highlighter-rouge"><pre class="highlight"><code><span class="o">{</span> + <span class="s2">"sql"</span>:<span class="s2">"select * from TEST_KYLIN_FACT"</span>, + <span class="s2">"offset"</span>:0, + <span class="s2">"limit"</span>:50000, + <span class="s2">"acceptPartial"</span>:false, + <span class="s2">"project"</span>:<span class="s2">"DEFAULT"</span> +<span class="o">}</span> +</code></pre> </div> +<h4 id="response-body-1">Response Body</h4> +<ul> + <li>columnMetas - Column metadata information of result set.</li> + <li>results - Data set of result.</li> + <li>cube - Cube used for this query.</li> + <li>affectedRowCount - Count of affected row by this sql statement.</li> + <li>isException - Whether this response is an exception.</li> + <li>ExceptionMessage - Message content of the exception.</li> + <li>Duration - Time cost of this query</li> + <li>Partial - Whether the response is a partial result or not. Decided by <code class="highlighter-rouge">acceptPartial</code> of request.</li> +</ul> + <h4 id="response-sample-1">Response Sample</h4> -<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w"> - </span><span class="nt">"columnMetas"</span><span class="p">:[</span><span class="w"> - </span><span class="p">{</span><span class="w"> - </span><span class="nt">"isNullable"</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w"> - </span><span class="nt">"displaySize"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span><span class="w"> - </span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"CAL_DT"</span><span class="p">,</span><span class="w"> - </span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"CAL_DT"</span><span class="p">,</span><span class="w"> - </span><span class="nt">"schemaName"</span><span class="p">:</span><span class="kc">null</span><span class="p">,</span><span class="w"> - </span><span class="nt">"catelogName"</span><span class="p">:</span><span class="kc">null</span><span class="p">,</span><span class="w"> - </span><span class="nt">"tableName"</span><span class="p">:</span><span class="kc">null</span><span class="p">,</span><span class="w"> - </span><span class="nt">"precision"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span><span class="w"> - </span><span class="nt">"scale"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span><span class="w"> - </span><span class="nt">"columnType"</span><span class="p">:</span><span class="mi">91</span><span class="p">,</span><span class="w"> - </span><span class="nt">"columnTypeName"</span><span class="p">:</span><span class="s2">"DATE"</span><span class="p">,</span><span class="w"> - </span><span class="nt">"readOnly"</span><span class="p">:</span><span class="kc">true</span><span class="p">,</span><span class="w"> - </span><span class="nt">"writable"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span><span class="w"> - </span><span class="nt">"caseSensitive"</span><span class="p">:</span><span class="kc">true</span><span class="p">,</span><span class="w"> - </span><span class="nt">"searchable"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span><span class="w"> - </span><span class="nt">"currency"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span><span class="w"> - </span><span class="nt">"signed"</span><span class="p">:</span><span class="kc">true</span><span class="p">,</span><span class="w"> - </span><span class="nt">"autoIncrement"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span><span class="w"> - </span><span class="nt">"definitelyWritable"</span><span class="p">:</span><span class="kc">false</span><span class="w"> - </span><span class="p">},</span><span class="w"> - </span><span class="p">{</span><span class="w"> - </span><span class="nt">"isNullable"</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w"> - </span><span class="nt">"displaySize"</span><span class="p">:</span><span class="mi">10</span><span class="p">,</span><span class="w"> - </span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"LEAF_CATEG_ID"</span><span class="p">,</span><span class="w"> - </span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"LEAF_CATEG_ID"</span><span class="p">,</span><span class="w"> - </span><span class="nt">"schemaName"</span><span class="p">:</span><span class="kc">null</span><span class="p">,</span><span class="w"> - </span><span class="nt">"catelogName"</span><span class="p">:</span><span class="kc">null</span><span class="p">,</span><span class="w"> - </span><span class="nt">"tableName"</span><span class="p">:</span><span class="kc">null</span><span class="p">,</span><span class="w"> - </span><span class="nt">"precision"</span><span class="p">:</span><span class="mi">10</span><span class="p">,</span><span class="w"> - </span><span class="nt">"scale"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span><span class="w"> - </span><span class="nt">"columnType"</span><span class="p">:</span><span class="mi">4</span><span class="p">,</span><span class="w"> - </span><span class="nt">"columnTypeName"</span><span class="p">:</span><span class="s2">"INTEGER"</span><span class="p">,</span><span class="w"> - </span><span class="nt">"readOnly"</span><span class="p">:</span><span class="kc">true</span><span class="p">,</span><span class="w"> - </span><span class="nt">"writable"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span><span class="w"> - </span><span class="nt">"caseSensitive"</span><span class="p">:</span><span class="kc">true</span><span class="p">,</span><span class="w"> - </span><span class="nt">"searchable"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span><span class="w"> - </span><span class="nt">"currency"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span><span class="w"> - </span><span class="nt">"signed"</span><span class="p">:</span><span class="kc">true</span><span class="p">,</span><span class="w"> - </span><span class="nt">"autoIncrement"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span><span class="w"> - </span><span class="nt">"definitelyWritable"</span><span class="p">:</span><span class="kc">false</span><span class="w"> - </span><span class="p">}</span><span class="w"> - </span><span class="p">],</span><span class="w"> - </span><span class="nt">"results"</span><span class="p">:[</span><span class="w"> - </span><span class="p">[</span><span class="w"> - </span><span class="s2">"2013-08-07"</span><span class="p">,</span><span class="w"> - </span><span class="s2">"32996"</span><span class="p">,</span><span class="w"> - </span><span class="s2">"15"</span><span class="p">,</span><span class="w"> - </span><span class="s2">"15"</span><span class="p">,</span><span class="w"> - </span><span class="s2">"Auction"</span><span class="p">,</span><span class="w"> - </span><span class="s2">"10000000"</span><span class="p">,</span><span class="w"> - </span><span class="s2">"49.048952730908745"</span><span class="p">,</span><span class="w"> - </span><span class="s2">"49.048952730908745"</span><span class="p">,</span><span class="w"> - </span><span class="s2">"49.048952730908745"</span><span class="p">,</span><span class="w"> - </span><span class="s2">"1"</span><span class="w"> - </span><span class="p">],</span><span class="w"> - </span><span class="p">[</span><span class="w"> - </span><span class="s2">"2013-08-07"</span><span class="p">,</span><span class="w"> - </span><span class="s2">"43398"</span><span class="p">,</span><span class="w"> - </span><span class="s2">"0"</span><span class="p">,</span><span class="w"> - </span><span class="s2">"14"</span><span class="p">,</span><span class="w"> - </span><span class="s2">"ABIN"</span><span class="p">,</span><span class="w"> - </span><span class="s2">"10000633"</span><span class="p">,</span><span class="w"> - </span><span class="s2">"85.78317064220418"</span><span class="p">,</span><span class="w"> - </span><span class="s2">"85.78317064220418"</span><span class="p">,</span><span class="w"> - </span><span class="s2">"85.78317064220418"</span><span class="p">,</span><span class="w"> - </span><span class="s2">"1"</span><span class="w"> - </span><span class="p">]</span><span class="w"> - </span><span class="p">],</span><span class="w"> - </span><span class="nt">"cube"</span><span class="p">:</span><span class="s2">"test_kylin_cube_with_slr_desc"</span><span class="p">,</span><span class="w"> - </span><span class="nt">"affectedRowCount"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span><span class="w"> - </span><span class="nt">"isException"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span><span class="w"> - </span><span class="nt">"exceptionMessage"</span><span class="p">:</span><span class="kc">null</span><span class="p">,</span><span class="w"> - </span><span class="nt">"duration"</span><span class="p">:</span><span class="mi">3451</span><span class="p">,</span><span class="w"> - </span><span class="nt">"partial"</span><span class="p">:</span><span class="kc">false</span><span class="w"> -</span><span class="p">}</span><span class="w"> -</span></code></pre> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="o">{</span> + <span class="s2">"columnMetas"</span>:[ + <span class="o">{</span> + <span class="s2">"isNullable"</span>:1, + <span class="s2">"displaySize"</span>:0, + <span class="s2">"label"</span>:<span class="s2">"CAL_DT"</span>, + <span class="s2">"name"</span>:<span class="s2">"CAL_DT"</span>, + <span class="s2">"schemaName"</span>:null, + <span class="s2">"catelogName"</span>:null, + <span class="s2">"tableName"</span>:null, + <span class="s2">"precision"</span>:0, + <span class="s2">"scale"</span>:0, + <span class="s2">"columnType"</span>:91, + <span class="s2">"columnTypeName"</span>:<span class="s2">"DATE"</span>, + <span class="s2">"readOnly"</span>:true, + <span class="s2">"writable"</span>:false, + <span class="s2">"caseSensitive"</span>:true, + <span class="s2">"searchable"</span>:false, + <span class="s2">"currency"</span>:false, + <span class="s2">"signed"</span>:true, + <span class="s2">"autoIncrement"</span>:false, + <span class="s2">"definitelyWritable"</span>:false + <span class="o">}</span>, + <span class="o">{</span> + <span class="s2">"isNullable"</span>:1, + <span class="s2">"displaySize"</span>:10, + <span class="s2">"label"</span>:<span class="s2">"LEAF_CATEG_ID"</span>, + <span class="s2">"name"</span>:<span class="s2">"LEAF_CATEG_ID"</span>, + <span class="s2">"schemaName"</span>:null, + <span class="s2">"catelogName"</span>:null, + <span class="s2">"tableName"</span>:null, + <span class="s2">"precision"</span>:10, + <span class="s2">"scale"</span>:0, + <span class="s2">"columnType"</span>:4, + <span class="s2">"columnTypeName"</span>:<span class="s2">"INTEGER"</span>, + <span class="s2">"readOnly"</span>:true, + <span class="s2">"writable"</span>:false, + <span class="s2">"caseSensitive"</span>:true, + <span class="s2">"searchable"</span>:false, + <span class="s2">"currency"</span>:false, + <span class="s2">"signed"</span>:true, + <span class="s2">"autoIncrement"</span>:false, + <span class="s2">"definitelyWritable"</span>:false + <span class="o">}</span> + <span class="o">]</span>, + <span class="s2">"results"</span>:[ + <span class="o">[</span> + <span class="s2">"2013-08-07"</span>, + <span class="s2">"32996"</span>, + <span class="s2">"15"</span>, + <span class="s2">"15"</span>, + <span class="s2">"Auction"</span>, + <span class="s2">"10000000"</span>, + <span class="s2">"49.048952730908745"</span>, + <span class="s2">"49.048952730908745"</span>, + <span class="s2">"49.048952730908745"</span>, + <span class="s2">"1"</span> + <span class="o">]</span>, + <span class="o">[</span> + <span class="s2">"2013-08-07"</span>, + <span class="s2">"43398"</span>, + <span class="s2">"0"</span>, + <span class="s2">"14"</span>, + <span class="s2">"ABIN"</span>, + <span class="s2">"10000633"</span>, + <span class="s2">"85.78317064220418"</span>, + <span class="s2">"85.78317064220418"</span>, + <span class="s2">"85.78317064220418"</span>, + <span class="s2">"1"</span> + <span class="o">]</span> + <span class="o">]</span>, + <span class="s2">"cube"</span>:<span class="s2">"test_kylin_cube_with_slr_desc"</span>, + <span class="s2">"affectedRowCount"</span>:0, + <span class="s2">"isException"</span>:false, + <span class="s2">"exceptionMessage"</span>:null, + <span class="s2">"duration"</span>:3451, + <span class="s2">"partial"</span>:false +<span class="o">}</span> +</code></pre> </div> -<hr /> - <h2 id="list-queryable-tables">List queryable tables</h2> <p><code class="highlighter-rouge">GET /tables_and_columns</code></p> @@ -1953,10 +1970,10 @@ Authorization:Basic {data}</p> <h4 id="request-parameters-1">Request Parameters</h4> <ul> - <li>cubeName - <code class="highlighter-rouge">optional</code> <code class="highlighter-rouge">string</code> Cube name to find.</li> - <li>projectName - <code class="highlighter-rouge">optional</code> <code class="highlighter-rouge">string</code> project name.</li> <li>offset - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">int</code> Offset used by pagination</li> <li>limit - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">int </code> Cubes per page.</li> + <li>cubeName - <code class="highlighter-rouge">optional</code> <code class="highlighter-rouge">string</code> Keyword for cube names. To find cubes whose name contains this keyword.</li> + <li>projectName - <code class="highlighter-rouge">optional</code> <code class="highlighter-rouge">string</code> Project name.</li> </ul> <h4 id="response-sample-3">Response Sample</h4> @@ -1990,7 +2007,8 @@ Authorization:Basic {data}</p> </ul> <h2 id="get-cube-descriptor">Get cube descriptor</h2> -<p><code class="highlighter-rouge">GET /cube_desc/{cubeName}</code></p> +<p><code class="highlighter-rouge">GET /cube_desc/{cubeName}</code><br /> +Get descriptor for specified cube instance.</p> <h4 id="path-variable-1">Path Variable</h4> <ul> @@ -2256,7 +2274,7 @@ Authorization:Basic {data}</p> <h4 id="path-variable-2">Path Variable</h4> <ul> - <li>modelName - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> Data model name, by default it should be the same as cube name.</li> + <li>modelName - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> Data model name, by default it should be the same with cube name.</li> </ul> <h4 id="response-sample-5">Response Sample</h4> @@ -2383,37 +2401,15 @@ Authorization:Basic {data}</p> </span></code></pre> </div> -<h2 id="disable-cube">Disable Cube</h2> -<p><code class="highlighter-rouge">PUT /cubes/{cubeName}/disable</code></p> - -<h4 id="path-variable-4">Path variable</h4> -<ul> - <li>cubeName - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> Cube name.</li> -</ul> - -<h4 id="response-sample-7">Response Sample</h4> -<p>(Same as âEnable Cubeâ)</p> - -<h2 id="purge-cube">Purge Cube</h2> -<p><code class="highlighter-rouge">PUT /cubes/{cubeName}/purge</code></p> - -<h4 id="path-variable-5">Path variable</h4> -<ul> - <li>cubeName - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> Cube name.</li> -</ul> - -<h4 id="response-sample-8">Response Sample</h4> -<p>(Same as âEnable Cubeâ)</p> - <h2 id="enable-cube">Enable Cube</h2> <p><code class="highlighter-rouge">PUT /cubes/{cubeName}/enable</code></p> -<h4 id="path-variable-6">Path variable</h4> +<h4 id="path-variable-4">Path variable</h4> <ul> <li>cubeName - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> Cube name.</li> </ul> -<h4 id="response-sample-9">Response Sample</h4> +<h4 id="response-sample-7">Response Sample</h4> <div class="highlighter-rouge"><pre class="highlight"><code><span class="o">{</span> <span class="s2">"uuid"</span>:<span class="s2">"1eaca32a-a33e-4b69-83dd-0bb8b1f8c53b"</span>, <span class="s2">"last_modified"</span>:1407909046305, @@ -2461,12 +2457,36 @@ Authorization:Basic {data}</p> </code></pre> </div> +<h2 id="disable-cube">Disable Cube</h2> +<p><code class="highlighter-rouge">PUT /cubes/{cubeName}/disable</code></p> + +<h4 id="path-variable-5">Path variable</h4> +<ul> + <li>cubeName - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> Cube name.</li> +</ul> + +<h4 id="response-sample-8">Response Sample</h4> +<p>(Same as âEnable Cubeâ)</p> + +<h2 id="purge-cube">Purge Cube</h2> +<p><code class="highlighter-rouge">PUT /cubes/{cubeName}/purge</code></p> + +<h4 id="path-variable-6">Path variable</h4> +<ul> + <li>cubeName - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> Cube name.</li> +</ul> + +<h4 id="response-sample-9">Response Sample</h4> +<p>(Same as âEnable Cubeâ)</p> + +<hr /> + <h2 id="resume-job">Resume Job</h2> <p><code class="highlighter-rouge">PUT /jobs/{jobId}/resume</code></p> <h4 id="path-variable-7">Path variable</h4> <ul> - <li>jobId- <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> Job id.</li> + <li>jobId - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> Job id.</li> </ul> <h4 id="response-sample-10">Response Sample</h4> @@ -2536,7 +2556,7 @@ Authorization:Basic {data}</p> <h4 id="path-variable-8">Path variable</h4> <ul> - <li>jobId- <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> Job id.</li> + <li>jobId - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> Job id.</li> </ul> <h4 id="response-sample-11">Response Sample</h4> @@ -2558,6 +2578,8 @@ Authorization:Basic {data}</p> </span></code></pre> </div> +<hr /> + <h2 id="get-hive-table">Get Hive Table</h2> <p><code class="highlighter-rouge">GET /tables/{tableName}</code></p> @@ -2673,7 +2695,7 @@ Authorization:Basic {data}</p> totalFileSize: <span class="s2">"46069"</span>, outputformat: <span class="s2">"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat"</span> <span class="o">}</span> -<span class="o">}</span> + <span class="o">}</span> <span class="o">]</span> </code></pre> </div> @@ -2683,8 +2705,8 @@ Authorization:Basic {data}</p> <h4 id="request-parameters-5">Request Parameters</h4> <ul> - <li>tables- <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> table names you want to load from hive, separated with comma.</li> - <li>project- <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">String</code> the project which the tables will be loaded into.</li> + <li>tables - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> table names you want to load from hive, separated with comma.</li> + <li>project - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">String</code> the project which the tables will be loaded into.</li> </ul> <h4 id="response-sample-16">Response Sample</h4> @@ -2695,6 +2717,8 @@ Authorization:Basic {data}</p> </span></code></pre> </div> +<hr /> + <h2 id="wipe-cache">Wipe cache</h2> <p><code class="highlighter-rouge">GET /cache/{type}/{name}/{action}</code></p> Modified: kylin/site/docs/howto/howto_use_restapi_in_js.html URL: http://svn.apache.org/viewvc/kylin/site/docs/howto/howto_use_restapi_in_js.html?rev=1723987&r1=1723986&r2=1723987&view=diff ============================================================================== --- kylin/site/docs/howto/howto_use_restapi_in_js.html (original) +++ kylin/site/docs/howto/howto_use_restapi_in_js.html Mon Jan 11 08:25:54 2016 @@ -1670,12 +1670,12 @@ <div id="pjax"> <h1 class="post-title">How to Use Restful API in Javascript</h1> - <p>version: v1.0, since: v0.7.1</p> + <p>version: v1.2, since: v0.7.1</p> <article class="post-content" > - <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> + <p>Kylin security is based on basic access authorization, if you want to use API in your javascript, you need to add 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> +<h2 id="example-on-query-api">Example on 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 }); @@ -1695,15 +1695,15 @@ </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> +<h2 id="keypoints">Keypoints</h2> <ol> - <li>add basic access authorization info in heders.</li> - <li>use right ajax type and right data synax</li> + <li>add basic access authorization info in http headers.</li> + <li>use right ajax type and 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> +<h2 id="basic-access-authorization">Basic access authorization</h2> +<p>For what is basic access authorization, refer to <a href="http://en.wikipedia.org/wiki/Basic_access_authentication">Wikipedia Page</a>.<br /> +How to generate your authorization code (download and import âjquery.base64.jsâ from <a href="https://github.com/yckart/jquery.base64.js">https://github.com/yckart/jquery.base64.js</a>).</p> <div class="highlighter-rouge"><pre class="highlight"><code>var authorizationCode = $.base64('encode', 'NT_USERNAME' + ":" + 'NT_PASSWORD'); Modified: kylin/site/docs/index.html URL: http://svn.apache.org/viewvc/kylin/site/docs/index.html?rev=1723987&r1=1723986&r2=1723987&view=diff ============================================================================== --- kylin/site/docs/index.html (original) +++ kylin/site/docs/index.html Mon Jan 11 08:25:54 2016 @@ -1694,7 +1694,7 @@ <hr /> -<h4 id="rest-api">REST API</h4> +<h4 id="rest-apis">REST APIs</h4> <ol> <li><a href="howto/howto_use_restapi.html">Kylin Restful API list</a></li> Modified: kylin/site/docs/install/hadoop_env.html URL: http://svn.apache.org/viewvc/kylin/site/docs/install/hadoop_env.html?rev=1723987&r1=1723986&r2=1723987&view=diff ============================================================================== --- kylin/site/docs/install/hadoop_env.html (original) +++ kylin/site/docs/install/hadoop_env.html Mon Jan 11 08:25:54 2016 @@ -1688,10 +1688,8 @@ If you donât know how, hereâs <p>Use ambari helps to launch hadoop:</p> -<div class="highlighter-rouge"><pre class="highlight"><code>ambari-agent start -ambari-server start -</code></pre> -</div> +<p>ambari-agent start<br /> +ambari-server start</p> <p>With both command successfully run you can go to ambari homepage at <a href="http://your_sandbox_ip:8080">http://your_sandbox_ip:8080</a> (user:admin,password:admin) to check everythingâs status. <strong>By default hortonworks ambari disables Hbase, youâll need manually start the <code class="highlighter-rouge">Hbase</code> service at ambari homepage.</strong></p> Modified: kylin/site/feed.xml URL: http://svn.apache.org/viewvc/kylin/site/feed.xml?rev=1723987&r1=1723986&r2=1723987&view=diff ============================================================================== --- kylin/site/feed.xml (original) +++ kylin/site/feed.xml Mon Jan 11 08:25:54 2016 @@ -19,8 +19,8 @@ <description>Apache Kylin Home</description> <link>http://kylin.apache.org/</link> <atom:link href="http://kylin.apache.org/feed.xml" rel="self" type="application/rss+xml"/> - <pubDate>Thu, 07 Jan 2016 19:54:46 -0800</pubDate> - <lastBuildDate>Thu, 07 Jan 2016 19:54:46 -0800</lastBuildDate> + <pubDate>Mon, 11 Jan 2016 00:22:27 -0800</pubDate> + <lastBuildDate>Mon, 11 Jan 2016 00:22:27 -0800</lastBuildDate> <generator>Jekyll v2.5.3</generator> <item>