added regex to handle external links

Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/commit/6e0e8995
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/tree/6e0e8995
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/diff/6e0e8995

Branch: refs/heads/asf-site
Commit: 6e0e8995197d4a939de57e4a05d1f7d3f33c6d0b
Parents: ebda97d
Author: PallaviSingh1992 <[email protected]>
Authored: Thu Apr 6 16:33:14 2017 +0530
Committer: PallaviSingh1992 <[email protected]>
Committed: Thu Apr 6 16:33:14 2017 +0530

----------------------------------------------------------------------
 src/main/scala/MdFilehandler.scala              |   6 +-
 src/main/webapp/configuration-parameters.html   |   5 -
 .../webapp/dml-operation-on-carbondata.html     |   2 +-
 src/main/webapp/installation-guide.html         |  33 +-
 src/main/webapp/mainpage.html                   |   2 +-
 src/main/webapp/quick-start-guide.html          | 322 +++++++++++++++++++
 src/main/webapp/troubleshooting.html            |   2 +-
 7 files changed, 331 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/6e0e8995/src/main/scala/MdFilehandler.scala
----------------------------------------------------------------------
diff --git a/src/main/scala/MdFilehandler.scala 
b/src/main/scala/MdFilehandler.scala
index 7522ab3..72eedd6 100644
--- a/src/main/scala/MdFilehandler.scala
+++ b/src/main/scala/MdFilehandler.scala
@@ -22,11 +22,13 @@ class MdFilehandler {
     val modifyContentPattern = new Regex("id=\"user-content-")
     val modifyMdPattern = new Regex(".md")
     val modifyImagePattern=new Regex("<img src=\"../docs")
-    val modifyFileLink="""(<a href=\"https)://([a-zA-Z0-9-/.]+)(\")""".r
+    val modifyHttpsFileLink="""(<a href=\"https)://([a-zA-Z0-9-/.]+)(\")""".r
+    val modifyHttpFileLink="""(<a href=\"http)://([a-zA-Z0-9-/.]+)(\")""".r
     val contentAfterRemovingUserContent: String = modifyContentPattern 
replaceAllIn(input, "id=\"")
     val contentAfterReplacingId: String = modifyMdPattern 
replaceAllIn(contentAfterRemovingUserContent, ".html")
     val contentAfterReplacingImage: String = modifyImagePattern 
replaceAllIn(contentAfterReplacingId, "<img 
src=\"https://github.com/apache/incubator-carbondata/blob/master/docs";)
-    val contentAfterReplacingFileLink: String = modifyFileLink 
replaceAllIn(contentAfterReplacingImage, "$1://$2$3 target=_blank")
+    val contentAfterReplacingHttpsFileLink: String = modifyHttpsFileLink 
replaceAllIn(contentAfterReplacingImage, "$1://$2$3 target=_blank")
+    val contentAfterReplacingFileLink: String = modifyHttpFileLink 
replaceAllIn(contentAfterReplacingHttpsFileLink, "$1://$2$3 target=_blank")
     contentAfterReplacingFileLink
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/6e0e8995/src/main/webapp/configuration-parameters.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/configuration-parameters.html 
b/src/main/webapp/configuration-parameters.html
index 84eba9a..a9274d5 100644
--- a/src/main/webapp/configuration-parameters.html
+++ b/src/main/webapp/configuration-parameters.html
@@ -201,11 +201,6 @@
 <td>Path where the bad records are stored.</td>
 </tr>
 <tr>
-<td>carbon.kettle.home</td>
-<td>$SPARK_HOME/carbonlib/carbonplugins</td>
-<td>Configuration for loading the data with kettle.</td>
-</tr>
-<tr>
 <td>carbon.data.file.version</td>
 <td>2</td>
 <td>If this parameter value is set to 1, then CarbonData will support the data 
load which is in old format(0.x version). If the value is set to 2(1.x onwards 
version), then CarbonData will support the data load of new format only.</td>

http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/6e0e8995/src/main/webapp/dml-operation-on-carbondata.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/dml-operation-on-carbondata.html 
b/src/main/webapp/dml-operation-on-carbondata.html
index cd1688d..c53811f 100644
--- a/src/main/webapp/dml-operation-on-carbondata.html
+++ b/src/main/webapp/dml-operation-on-carbondata.html
@@ -305,7 +305,7 @@ column2:dictionaryFilePath2')
 <pre><code>OPTIONS('DATEFORMAT'='column1:dateFormat1, column2:dateFormat2')
 </code></pre>
 
-<p>NOTE: Date formats are specified by date pattern strings. The date pattern 
letters in CarbonData are same as in JAVA. Refer to <a 
href="http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html";>SimpleDateFormat</a>.</p>
+<p>NOTE: Date formats are specified by date pattern strings. The date pattern 
letters in CarbonData are same as in JAVA. Refer to <a 
href="http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html"; 
target=_blank>SimpleDateFormat</a>.</p>
 </li>
 <li>
 <p><strong>USE_KETTLE:</strong> This option is used to specify whether to use 
kettle for loading data or not. By default kettle is not used for data 
loading.</p>

http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/6e0e8995/src/main/webapp/installation-guide.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/installation-guide.html 
b/src/main/webapp/installation-guide.html
index dd12916..e98ce82 100644
--- a/src/main/webapp/installation-guide.html
+++ b/src/main/webapp/installation-guide.html
@@ -189,7 +189,7 @@
 <a id="procedure" class="anchor" href="#procedure" aria-hidden="true"><span 
aria-hidden="true" class="octicon octicon-link"></span></a>Procedure</h3>
 
 <ol>
-<li><p><a 
href="https://github.com/apache/incubator-carbondata/blob/master/build/README.html";>Build
 the CarbonData</a> project and get the assembly jar from 
<code>./assembly/target/scala-2.1x/carbondata_xxx.jar</code>. </p></li>
+<li><p><a 
href="https://github.com/apache/incubator-carbondata/blob/master/build/README.html";
 target=_blank>Build the CarbonData</a> project and get the assembly jar from 
<code>./assembly/target/scala-2.1x/carbondata_xxx.jar</code>. </p></li>
 <li>
 <p>Copy <code>./assembly/target/scala-2.1x/carbondata_xxx.jar</code> to 
<code>$SPARK_HOME/carbonlib</code> folder.</p>
 
@@ -197,11 +197,6 @@
 </li>
 <li><p>Add the carbonlib folder path in the Spark classpath. (Edit 
<code>$SPARK_HOME/conf/spark-env.sh</code> file and modify the value of 
<code>SPARK_CLASSPATH</code> by appending <code>$SPARK_HOME/carbonlib/*</code> 
to the existing value)</p></li>
 <li><p>Copy the <code>./conf/carbon.properties.template</code> file from 
CarbonData repository to <code>$SPARK_HOME/conf/</code> folder and rename the 
file to <code>carbon.properties</code>.</p></li>
-<li>
-<p>Copy the <code>./processing/carbonplugins</code> folder from CarbonData 
repository to <code>$SPARK_HOME/carbonlib/</code> folder.</p>
-
-<p><strong>NOTE</strong>: carbonplugins will contain .kettle folder.</p>
-</li>
 <li><p>Repeat Step 2 to Step 5 in all the nodes of the cluster.</p></li>
 <li>
 <p>In Spark node[master], configure the properties mentioned in the following 
table in <code>$SPARK_HOME/conf/spark-defaults.conf</code> file.</p>
@@ -216,11 +211,6 @@
 </thead>
 <tbody>
 <tr>
-<td>carbon.kettle.home</td>
-<td><code>$SPARK_HOME/carbonlib/carbonplugins</code></td>
-<td>Path that will be used by CarbonData internally to create graph for 
loading the data</td>
-</tr>
-<tr>
 <td>spark.driver.extraJavaOptions</td>
 
<td><code>-Dcarbon.properties.filepath=$SPARK_HOME/conf/carbon.properties</code></td>
 <td>A string of extra JVM options to pass to the driver. For instance, GC 
settings or other logging.</td>
@@ -254,13 +244,6 @@
 <td>hdfs://HOSTNAME:PORT/Opt/CarbonStore</td>
 <td>Propose to set HDFS directory</td>
 </tr>
-<tr>
-<td>carbon.kettle.home</td>
-<td>YES</td>
-<td>Path that will be used by CarbonData internally to create graph for 
loading the data.</td>
-<td><code>$SPARK_HOME/carbonlib/carbonplugins</code></td>
-<td></td>
-</tr>
 </tbody>
 </table>
 </li>
@@ -298,15 +281,10 @@
 
 <ol>
 <li>
-<p><a 
href="https://github.com/apache/incubator-carbondata/blob/master/build/README.html";>Build
 the CarbonData</a> project and get the assembly jar from 
<code>./assembly/target/scala-2.1x/carbondata_xxx.jar</code> and copy to 
<code>$SPARK_HOME/carbonlib</code> folder.</p>
+<p><a 
href="https://github.com/apache/incubator-carbondata/blob/master/build/README.html";
 target=_blank>Build the CarbonData</a> project and get the assembly jar from 
<code>./assembly/target/scala-2.1x/carbondata_xxx.jar</code> and copy to 
<code>$SPARK_HOME/carbonlib</code> folder.</p>
 
 <p><strong>NOTE</strong>: Create the carbonlib folder if it does not exists 
inside <code>$SPARK_HOME</code> path.</p>
 </li>
-<li>
-<p>Copy the <code>./processing/carbonplugins</code> folder from CarbonData 
repository to <code>$SPARK_HOME/carbonlib/</code> folder.</p>
-
-<p><strong>NOTE</strong>: carbonplugins will contain .kettle folder.</p>
-</li>
 <li><p>Copy the <code>./conf/carbon.properties.template</code> file from 
CarbonData repository to <code>$SPARK_HOME/conf/</code> folder and rename the 
file to <code>carbon.properties</code>.</p></li>
 <li>
 <p>Create <code>tar,gz</code> file of carbonlib folder and move it inside the 
carbonlib folder.</p>
@@ -387,13 +365,6 @@ mv carbondata.tar.gz carbonlib/
 <td>hdfs://HOSTNAME:PORT/Opt/CarbonStore</td>
 <td>Propose to set HDFS directory</td>
 </tr>
-<tr>
-<td>carbon.kettle.home</td>
-<td>YES</td>
-<td>Path that will be used by CarbonData internally to create graph for 
loading the data.</td>
-<td>carbondata.tar.gz/carbonlib/carbonplugins</td>
-<td></td>
-</tr>
 </tbody>
 </table>
 </li>

http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/6e0e8995/src/main/webapp/mainpage.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/mainpage.html b/src/main/webapp/mainpage.html
index 05151f2..68d5329 100644
--- a/src/main/webapp/mainpage.html
+++ b/src/main/webapp/mainpage.html
@@ -172,7 +172,7 @@
                                     <ul class="sub-nav">
                                         <li><a 
href="quick-start-guide.html">Quick
                                             Start</a></li>
-                                        <li><a 
href="https://cwiki.apache.org/confluence/display/CARBONDATA/CarbonData+Introduction";>Introduction
+                                        <li><a 
href="https://cwiki.apache.org/confluence/display/CARBONDATA/CarbonData+Introduction";
 target="_blank">Introduction
                                             and Features</a></li>
                                         <li><a 
href="supported-data-types-in-carbondata.html">Data
                                             Types</a></li>

http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/6e0e8995/src/main/webapp/quick-start-guide.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/quick-start-guide.html 
b/src/main/webapp/quick-start-guide.html
new file mode 100644
index 0000000..e4be074
--- /dev/null
+++ b/src/main/webapp/quick-start-guide.html
@@ -0,0 +1,322 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <link href='images/favicon.ico' rel='shortcut icon' type='image/x-icon'>
+    <!-- The above 3 meta tags *must* come first in the head; any other head 
content must come *after* these tags -->
+    <title>CarbonData</title>
+    <style>
+
+    </style>
+    <!-- Bootstrap -->
+
+    <link rel="stylesheet" href="css/bootstrap.min.css">
+    <link href="css/style.css" rel="stylesheet">
+    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media 
queries -->
+    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
+    <!--[if lt IE 9]>
+    <script 
src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js";></script>
+    <script 
src="https://oss.maxcdn.scom/respond/1.4.2/respond.min.js";></script>
+    <![endif]-->
+    <script src="js/jquery.min.js"></script>
+    <script src="js/bootstrap.min.js"></script>
+
+
+</head>
+<body>
+<header>
+    <nav class="navbar navbar-default navbar-custom cd-navbar-wrapper">
+        <div class="container">
+            <div class="navbar-header">
+                <button aria-controls="navbar" aria-expanded="false" 
data-target="#navbar" data-toggle="collapse"
+                        class="navbar-toggle collapsed" type="button">
+                    <span class="sr-only">Toggle navigation</span>
+                    <span class="icon-bar"></span>
+                    <span class="icon-bar"></span>
+                    <span class="icon-bar"></span>
+                </button>
+                <a href="index.html" class="logo">
+                    <img src="images/CarbonDataLogo.png" alt="CarbonData logo" 
title="CarbocnData logo"/>
+                </a>
+            </div>
+            <div class="navbar-collapse collapse cd_navcontnt" id="navbar">
+                <ul class="nav navbar-nav navbar-right navlist-custom">
+                    <li><a href="index.html" class="hidden-xs"><i class="fa 
fa-home" aria-hidden="true"></i> </a>
+                    </li>
+                    <li><a href="index.html" class="hidden-lg hidden-md 
hidden-sm">Home</a></li>
+                    <li class="dropdown">
+                        <a href="#" class="dropdown-toggle " 
data-toggle="dropdown" role="button" aria-haspopup="true"
+                           aria-expanded="false"> Download <span 
class="caret"></span></a>
+                        <ul class="dropdown-menu">
+                            <li>
+                                <a 
href="https://www.apache.org/dyn/closer.lua/incubator/carbondata/1.0.0-incubating";
+                                   target="_blank">Apache CarbonData 
1.0.0</a></li>
+                            <li>
+                                <a 
href="https://www.apache.org/dyn/closer.lua/incubator/carbondata/0.2.0-incubating";
+                                   target="_blank">Apache CarbonData 
0.2.0</a></li>
+                            <li>
+                                <a 
href="https://www.apache.org/dyn/closer.lua/incubator/carbondata/0.1.1-incubating";
+                                   target="_blank">Apache CarbonData 
0.1.1</a></li>
+                            <li>
+                                <a 
href="https://www.apache.org/dyn/closer.lua/incubator/carbondata/0.1.0-incubating";
+                                   target="_blank">Apache CarbonData 
0.1.0</a></li>
+                            <li>
+                                <a 
href="https://cwiki.apache.org/confluence/display/CARBONDATA/Releases";
+                                   target="_blank">Release Archive</a></li>
+                        </ul>
+                    </li>
+                    <li><a href="mainpage.html" class="">Documentation</a></li>
+                    <li class="dropdown">
+                        <a href="#" class="dropdown-toggle" 
data-toggle="dropdown" role="button" aria-haspopup="true"
+                           aria-expanded="false">Community <span 
class="caret"></span></a>
+                        <ul class="dropdown-menu">
+                            <li>
+                                <a 
href="https://github.com/apache/incubator-carbondata/blob/master/docs/How-to-contribute-to-Apache-CarbonData.md";
+                                   target="_blank">Contributing to 
CarbonData</a></li>
+                            <li>
+                                <a 
href="https://cwiki.apache.org/confluence/display/CARBONDATA/PPMC+and+Committers+member+list";
+                                   target="_blank">Project PPMC and 
Committers</a></li>
+                            <li>
+                                <a 
href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=66850609";
+                                   target="_blank">CarbonData Meetups</a></li>
+                            <li><a href="security.html">Apache CarbonData 
Security</a></li>
+                            <li><a 
href="https://issues.apache.org/jira/browse/CARBONDATA"; target="_blank">Apache
+                                Jira</a></li>
+                            <li><a href="videogallery.html">CarbonData Videos 
</a></li>
+                        </ul>
+                    </li>
+                    <li class="dropdown">
+                        <a href="http://www.apache.org/"; class="apache_link 
hidden-xs dropdown-toggle"
+                           data-toggle="dropdown" role="button" 
aria-haspopup="true" aria-expanded="false">Apache</a>
+                        <ul class="dropdown-menu">
+                            <li><a href="http://www.apache.org/"; 
target="_blank">Apache Homepage</a></li>
+                            <li><a href="http://www.apache.org/licenses/"; 
target="_blank">License</a></li>
+                            <li><a 
href="http://www.apache.org/foundation/sponsorship.html";
+                                   target="_blank">Sponsorship</a></li>
+                            <li><a 
href="http://www.apache.org/foundation/thanks.html"; 
target="_blank">Thanks</a></li>
+                        </ul>
+                    </li>
+
+                    <li class="dropdown">
+                        <a href="http://www.apache.org/"; class="hidden-lg 
hidden-md hidden-sm dropdown-toggle"
+                           data-toggle="dropdown" role="button" 
aria-haspopup="true" aria-expanded="false">Apache</a>
+                        <ul class="dropdown-menu">
+                            <li><a href="http://www.apache.org/"; 
target="_blank">Apache Homepage</a></li>
+                            <li><a href="http://www.apache.org/licenses/"; 
target="_blank">License</a></li>
+                            <li><a 
href="http://www.apache.org/foundation/sponsorship.html";
+                                   target="_blank">Sponsorship</a></li>
+                            <li><a 
href="http://www.apache.org/foundation/thanks.html"; 
target="_blank">Thanks</a></li>
+                        </ul>
+                    </li>
+
+                    <li>
+                        <a href="#" id="search-icon"><i class="fa fa-search" 
aria-hidden="true"></i></a>
+
+                    </li>
+
+                </ul>
+            </div><!--/.nav-collapse -->
+            <div id="search-box">
+                <form method="get" action="http://www.google.com/search";>
+                    <div class="search-block">
+                        <table border="0" cellpadding="0" width="100%">
+                            <tr>
+                                <td style="width:80%">
+                                    <input type="text" name="q" size=" 5" 
maxlength="255" value=""
+                                           class="search-input"/>
+                                </td>
+                                <td style="width:20%">
+                                    <input type="submit" value="Search"/></td>
+                            </tr>
+                            <tr>
+                                <td align="left" style="font-size:75%" 
colspan="2">
+                                    <input type="checkbox" name="sitesearch" 
value="carbondata.apache.org" checked/>
+                                    Only search for CarbonData
+                                </td>
+                            </tr>
+                        </table>
+                    </div>
+                </form>
+            </div>
+        </div>
+    </nav>
+</header> <!-- end Header part -->
+
+<div class="fixed-padding"></div> <!--  top padding with fixde header  -->
+
+<section><!-- Dashboard nav -->
+    <div class="container-fluid q">
+        <div class="col-sm-12  col-md-12 maindashboard">
+            <div class="row">
+                <section>
+                    <div style="padding:10px 15px;">
+                        <div id="viewpage" name="viewpage">
+                            <div class="row">
+                                <div class="col-sm-12  col-md-12">
+                                    <div>
+
+<h1>
+<a id="quick-start" class="anchor" href="#quick-start" 
aria-hidden="true"><span aria-hidden="true" class="octicon 
octicon-link"></span></a>Quick Start</h1>
+
+<p>This tutorial provides a quick introduction to using CarbonData.</p>
+
+<h2>
+<a id="prerequisites" class="anchor" href="#prerequisites" 
aria-hidden="true"><span aria-hidden="true" class="octicon 
octicon-link"></span></a>Prerequisites</h2>
+
+<ul>
+<li>
+<a href="https://github.com/apache/incubator-carbondata/blob/master/build"; 
target=_blank>Installation and building CarbonData</a>.</li>
+<li>
+<p>Create a sample.csv file using the following commands. The CSV file is 
required for loading data into CarbonData.</p>
+
+<pre><code>cd carbondata
+cat &gt; sample.csv &lt;&lt; EOF
+id,name,city,age
+1,david,shenzhen,31
+2,eason,shenzhen,27
+3,jarry,wuhan,35
+EOF
+</code></pre>
+</li>
+</ul>
+
+<h2>
+<a id="interactive-analysis-with-spark-shell" class="anchor" 
href="#interactive-analysis-with-spark-shell" aria-hidden="true"><span 
aria-hidden="true" class="octicon octicon-link"></span></a>Interactive Analysis 
with Spark Shell</h2>
+
+<h2>
+<a id="version-21" class="anchor" href="#version-21" aria-hidden="true"><span 
aria-hidden="true" class="octicon octicon-link"></span></a>Version 2.1</h2>
+
+<p>Apache Spark Shell provides a simple way to learn the API, as well as a 
powerful tool to analyze data interactively. Please visit <a 
href="http://spark.apache.org/docs/latest/"; target=_blank>Apache Spark 
Documentation</a> for more details on Spark shell.</p>
+
+<h4>
+<a id="basics" class="anchor" href="#basics" aria-hidden="true"><span 
aria-hidden="true" class="octicon octicon-link"></span></a>Basics</h4>
+
+<p>Start Spark shell by running the following command in the Spark 
directory:</p>
+
+<pre><code>./bin/spark-shell --jars &lt;carbondata assembly jar path&gt;
+</code></pre>
+
+<p>In this shell, SparkSession is readily available as <code>spark</code> and 
Spark context is readily available as <code>sc</code>.</p>
+
+<p>In order to create a CarbonSession we will have to configure it explicitly 
in the following manner :</p>
+
+<ul>
+<li>Import the following :</li>
+</ul>
+
+<pre><code>import org.apache.spark.sql.SparkSession
+import org.apache.spark.sql.CarbonSession._
+</code></pre>
+
+<ul>
+<li>Create a CarbonSession :</li>
+</ul>
+
+<pre><code>val carbon = 
SparkSession.builder().config(sc.getConf).getOrCreateCarbonSession("&lt;hdfs 
store path&gt;")
+</code></pre>
+
+<p><strong>NOTE</strong>: By default metastore location is pointed to 
<code>../carbon.metastore</code>, user can provide own metastore location to 
CarbonSession like 
<code>SparkSession.builder().config(sc.getConf).getOrCreateCarbonSession("&lt;hdfs
 store path&gt;", "&lt;local metastore path&gt;")</code></p>
+
+<h4>
+<a id="executing-queries" class="anchor" href="#executing-queries" 
aria-hidden="true"><span aria-hidden="true" class="octicon 
octicon-link"></span></a>Executing Queries</h4>
+
+<h5>
+<a id="creating-a-table" class="anchor" href="#creating-a-table" 
aria-hidden="true"><span aria-hidden="true" class="octicon 
octicon-link"></span></a>Creating a Table</h5>
+
+<pre><code>scala&gt;carbon.sql("CREATE TABLE IF NOT EXISTS test_table(id 
string, name string, city string, age Int) STORED BY 'carbondata'")
+</code></pre>
+
+<h5>
+<a id="loading-data-to-a-table" class="anchor" href="#loading-data-to-a-table" 
aria-hidden="true"><span aria-hidden="true" class="octicon 
octicon-link"></span></a>Loading Data to a Table</h5>
+
+<pre><code>scala&gt;carbon.sql("LOAD DATA INPATH 'sample.csv file path' INTO 
TABLE test_table")
+</code></pre>
+
+<p><strong>NOTE</strong>: Please provide the real file path of 
<code>sample.csv</code> for the above script.</p>
+
+<h6>
+<a id="query-data-from-a-table" class="anchor" href="#query-data-from-a-table" 
aria-hidden="true"><span aria-hidden="true" class="octicon 
octicon-link"></span></a>Query Data from a Table</h6>
+
+<pre><code>scala&gt;carbon.sql("SELECT * FROM test_table").show()
+
+scala&gt;carbon.sql("SELECT city, avg(age), sum(age) FROM test_table GROUP BY 
city").show()
+</code></pre>
+
+<h2>
+<a id="interactive-analysis-with-spark-shell-1" class="anchor" 
href="#interactive-analysis-with-spark-shell-1" aria-hidden="true"><span 
aria-hidden="true" class="octicon octicon-link"></span></a>Interactive Analysis 
with Spark Shell</h2>
+
+<h2>
+<a id="version-16" class="anchor" href="#version-16" aria-hidden="true"><span 
aria-hidden="true" class="octicon octicon-link"></span></a>Version 1.6</h2>
+
+<h4>
+<a id="basics-1" class="anchor" href="#basics-1" aria-hidden="true"><span 
aria-hidden="true" class="octicon octicon-link"></span></a>Basics</h4>
+
+<p>Start Spark shell by running the following command in the Spark 
directory:</p>
+
+<pre><code>./bin/spark-shell --jars &lt;carbondata assembly jar path&gt;
+</code></pre>
+
+<p><strong>NOTE</strong>: In this shell, SparkContext is readily available as 
<code>sc</code>.</p>
+
+<ul>
+<li>In order to execute the Queries we need to import CarbonContext:</li>
+</ul>
+
+<pre><code>import org.apache.spark.sql.CarbonContext
+</code></pre>
+
+<ul>
+<li>Create an instance of CarbonContext in the following manner :</li>
+</ul>
+
+<pre><code>val cc = new CarbonContext(sc, "&lt;hdfs store path&gt;")
+</code></pre>
+
+<p><strong>NOTE</strong>: If running on local machine without hdfs, configure 
the local machine's store path instead of hdfs store path</p>
+
+<h4>
+<a id="executing-queries-1" class="anchor" href="#executing-queries-1" 
aria-hidden="true"><span aria-hidden="true" class="octicon 
octicon-link"></span></a>Executing Queries</h4>
+
+<h5>
+<a id="creating-a-table-1" class="anchor" href="#creating-a-table-1" 
aria-hidden="true"><span aria-hidden="true" class="octicon 
octicon-link"></span></a>Creating a Table</h5>
+
+<pre><code>scala&gt;cc.sql("CREATE TABLE IF NOT EXISTS test_table (id string, 
name string, city string, age Int) STORED BY 'carbondata'")
+</code></pre>
+
+<p>To see the table created :</p>
+
+<pre><code>scala&gt;cc.sql("SHOW TABLES").show()
+</code></pre>
+
+<h5>
+<a id="loading-data-to-a-table-1" class="anchor" 
href="#loading-data-to-a-table-1" aria-hidden="true"><span aria-hidden="true" 
class="octicon octicon-link"></span></a>Loading Data to a Table</h5>
+
+<pre><code>scala&gt;cc.sql("LOAD DATA INPATH 'sample.csv file path' INTO TABLE 
test_table")
+</code></pre>
+
+<p><strong>NOTE</strong>: Please provide the real file path of 
<code>sample.csv</code> for the above script.</p>
+
+<h5>
+<a id="query-data-from-a-table-1" class="anchor" 
href="#query-data-from-a-table-1" aria-hidden="true"><span aria-hidden="true" 
class="octicon octicon-link"></span></a>Query Data from a Table</h5>
+
+<pre><code>scala&gt;cc.sql("SELECT * FROM test_table").show()
+scala&gt;cc.sql("SELECT city, avg(age), sum(age) FROM test_table GROUP BY 
city").show()
+</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="doc-footer">
+    <a href="#top" class="scroll-top">Top</a>
+</div>
+</div>
+</section>
+</div>
+</div>
+</div>
+</section><!-- End systemblock part -->
+<script src="js/custom.js"></script>
+</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/6e0e8995/src/main/webapp/troubleshooting.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/troubleshooting.html 
b/src/main/webapp/troubleshooting.html
index 2a1297f..58d7d76 100644
--- a/src/main/webapp/troubleshooting.html
+++ b/src/main/webapp/troubleshooting.html
@@ -180,7 +180,7 @@ who are building, deploying, and using CarbonData.</p>
 
 <p><strong>Procedure</strong></p>
 
-<p>Follow the Apache thrift docs at <a 
href="https://thrift.apache.org/docs/install";>https://thrift.apache.org/docs/install</a>
 to install thrift correctly.</p>
+<p>Follow the Apache thrift docs at <a 
href="https://thrift.apache.org/docs/install"; 
target=_blank>https://thrift.apache.org/docs/install</a> to install thrift 
correctly.</p>
 
 <h2>
 <a id="failed-to-launch-the-spark-shell" class="anchor" 
href="#failed-to-launch-the-spark-shell" aria-hidden="true"><span 
aria-hidden="true" class="octicon octicon-link"></span></a>Failed to launch the 
Spark Shell</h2>

Reply via email to