Skip to content

Commit

Permalink
Create Flint project folder (#1573)
Browse files Browse the repository at this point in the history
* Create scala project folder for Flint

Signed-off-by: Chen Dai <[email protected]>

* Ignore .bsp folder

Signed-off-by: Chen Dai <[email protected]>

* Add README

Signed-off-by: Chen Dai <[email protected]>

---------

Signed-off-by: Chen Dai <[email protected]>
  • Loading branch information
dai-chen authored Apr 25, 2023
1 parent aa5b3e0 commit 0aed575
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 0 deletions.
21 changes: 21 additions & 0 deletions flint/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# IDE files
.idea/
*.iml

# Compiled output
target/
project/target/

# Log files
logs/

# sbt-specific files
.sbtserver
.sbt/
.bsp/

# Miscellaneous
.DS_Store
*.class
*.log
*.zip
43 changes: 43 additions & 0 deletions flint/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# OpenSearch Flint

OpenSearch Flint is ... It consists of two modules:

- `flint-core`: a module that contains Flint specification and client.
- `flint-spark-integration`: a module that provides Spark integration for Flint and derived dataset based on it.

## Prerequisites

+ Spark 3.3.1
+ Scala 2.12.14

## Usage

To use this application, you can run Spark with Flint extension:

```
spark-sql --conf "spark.sql.extensions=org.opensearch.flint.FlintSparkExtensions"
```

## Build

To build and run this application with Spark, you can run:

```
sbt clean publishLocal
```

## Code of Conduct

This project has adopted an [Open Source Code of Conduct](../CODE_OF_CONDUCT.md).

## Security

If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public GitHub issue.

## License

See the [LICENSE](../LICENSE.txt) file for our project's licensing. We will ask you to confirm the licensing of your contribution.

## Copyright

Copyright OpenSearch Contributors. See [NOTICE](../NOTICE) for details.
34 changes: 34 additions & 0 deletions flint/build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

lazy val scala212 = "2.12.14"
lazy val sparkVersion = "3.3.1"

ThisBuild / version := "0.1.0-SNAPSHOT"

ThisBuild / scalaVersion := scala212

lazy val root = (project in file("."))
.aggregate(flintCore, flintSparkIntegration)
.settings(
name := "flint"
)

lazy val flintCore = (project in file("flint-core"))
.settings(
name := "flint-core",
scalaVersion := scala212
)

lazy val flintSparkIntegration = (project in file("flint-spark-integration"))
.dependsOn(flintCore)
.settings(
name := "flint-spark-integration",
scalaVersion := scala212,
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % sparkVersion,
"org.apache.spark" %% "spark-sql" % sparkVersion
)
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.flint.core

class FlintIndex {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.flint.spark

import org.apache.spark.sql.SparkSessionExtensions

class FlintSparkExtensions extends (SparkSessionExtensions => Unit) {

override def apply(v1: SparkSessionExtensions): Unit = {
}
}
1 change: 1 addition & 0 deletions flint/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version = 1.8.2

0 comments on commit 0aed575

Please sign in to comment.