Skip to content

Commit

Permalink
[CARBONDATA-1598] Remove all spark 1.x info(CI, readme, documents)
Browse files Browse the repository at this point in the history
[CARBONDATA-1598] Remove all spark 1.x info(CI, readme, documents)
  • Loading branch information
chenliang613 authored and ravipesala committed Oct 22, 2017
1 parent 7036696 commit 1d8e982
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 114 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ You can find the latest CarbonData document and learn more at:
## Status
Spark2.1:
[![Build Status](https://builds.apache.org/buildStatus/icon?job=carbondata-master-spark-2.1)](https://builds.apache.org/view/CarbonData/job/carbondata-master-spark-2.1/)
Spark1.6:
[![Build Status](https://builds.apache.org/buildStatus/icon?job=carbondata-master-spark-1.6)](https://builds.apache.org/view/CarbonData/job/carbondata-master-spark-1.6/)

## Features
CarbonData file format is a columnar store in HDFS, it has many features that a modern columnar format has, such as splittable, compression schema ,complex data type etc, and CarbonData has following unique features:
Expand Down
21 changes: 0 additions & 21 deletions assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,28 +124,7 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>spark-1.5</id>
<dependencies>
<dependency>
<groupId>org.apache.carbondata</groupId>
<artifactId>carbondata-spark</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</profile>
<profile>
<id>spark-1.6</id>
<dependencies>
<dependency>
<groupId>org.apache.carbondata</groupId>
<artifactId>carbondata-spark</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</profile>
<profile>
<id>spark-2.1</id>
<!-- default -->
Expand Down
15 changes: 8 additions & 7 deletions build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,17 @@
* [Apache Thrift 0.9.3](http://archive.apache.org/dist/thrift/0.9.3/)

## Build command
Build without test,by default carbondata takes Spark 1.6.2 to build the project
From 1.3.0 onwards, CarbonData supports spark 2.x, build without test,by default carbondata takes Spark 2.1.0 to build the project
```
mvn -DskipTests clean package
```

Build with different supported versions of Spark.
Build with test
```
mvn clean package
```

Before 1.3.0, build with different supported versions of Spark
```
mvn -DskipTests -Pspark-1.5 -Dspark.version=1.5.1 clean package
mvn -DskipTests -Pspark-1.5 -Dspark.version=1.5.2 clean package
Expand All @@ -44,13 +49,9 @@ mvn -DskipTests -Pspark-1.6 -Dspark.version=1.6.3 clean package
mvn -DskipTests -Pspark-2.1 -Dspark.version=2.1.0 clean package
```

Build with test
```
mvn clean package
```

## For contributors : To build the format code after any changes, please follow the below command.
Note:Need install Apache Thrift 0.9.3
```
mvn clean -DskipTests -Pbuild-with-format -Pspark-1.6 package
mvn clean -DskipTests -Pbuild-with-format -Pspark-2.1 package
```
62 changes: 0 additions & 62 deletions docs/quick-start-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,65 +98,3 @@ scala>carbon.sql("SELECT city, avg(age), sum(age)
FROM test_table
GROUP BY city").show()
```

## Interactive Analysis with Spark Shell Version 1.6

#### Basics

Start Spark shell by running the following command in the Spark directory:

```
./bin/spark-shell --jars <carbondata assembly jar path>
```
**NOTE**: Assembly jar will be available after [building CarbonData](https://github.com/apache/carbondata/blob/master/build/README.md) and can be copied from `./assembly/target/scala-2.1x/carbondata_xxx.jar`

**NOTE**: In this shell, SparkContext is readily available as `sc`.

* In order to execute the Queries we need to import CarbonContext:

```
import org.apache.spark.sql.CarbonContext
```

* Create an instance of CarbonContext in the following manner :

```
val cc = new CarbonContext(sc, "<hdfs store path>")
```
**NOTE**: If running on local machine without hdfs, configure the local machine's store path instead of hdfs store path

#### Executing Queries

###### Creating a Table

```
scala>cc.sql("CREATE TABLE
IF NOT EXISTS test_table (
id string,
name string,
city string,
age Int)
STORED BY 'carbondata'")
```
To see the table created :

```
scala>cc.sql("SHOW TABLES").show()
```

###### Loading Data to a Table

```
scala>cc.sql("LOAD DATA INPATH 'sample.csv file path'
INTO TABLE test_table")
```
**NOTE**: Please provide the real file path of `sample.csv` for the above script.

###### Querying Data from a Table

```
scala>cc.sql("SELECT * FROM test_table").show()
scala>cc.sql("SELECT city, avg(age), sum(age)
FROM test_table
GROUP BY city").show()
```
22 changes: 0 additions & 22 deletions integration/spark-common-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -327,28 +327,6 @@
</plugins>
</build>
<profiles>
<profile>
<id>spark-1.5</id>
<dependencies>
<dependency>
<groupId>org.apache.carbondata</groupId>
<artifactId>carbondata-spark</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>spark-1.6</id>
<dependencies>
<dependency>
<groupId>org.apache.carbondata</groupId>
<artifactId>carbondata-spark</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>spark-2.1</id>
<activation>
Expand Down

0 comments on commit 1d8e982

Please sign in to comment.