This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class InputData(...) | |
val dataSchema = | |
ScalaReflection.schemaFor[InputData].dataType.asInstanceOf[StructType] | |
val dataset: Dataset[InputData] = spark | |
.read | |
.schema(dataSchema) | |
.parquet(incomingPath) | |
.as[InputData] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ThisBuild / scalaVersion := "2.12.10" | |
ThisBuild / version := "0.1" | |
ThisBuild / organization := "" | |
ThisBuild / organizationName := "" | |
lazy val root = (project in file(".")) | |
.enablePlugins(BuildInfoPlugin) | |
.settings( | |
name := "your-api", | |
fork := true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kill $(ps -ef | grep "airflow scheduler" | awk '{print $2}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################################### | |
# The purpose of this script is <-----------> | |
# | |
# Arguments: | |
# VAR_1 | |
# VAR_2 | |
######################################################### | |
if [ $# != 2 ] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log v1.0.0..v1.0.1 --oneline --graph --decorate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lazy val compileScalastyle = taskKey[Unit]("compileScalastyle") | |
// scalastyle >= 0.9.0 | |
compileScalastyle := scalastyle.in(Compile).toTask("").value | |
(compile in Compile) := ((compile in Compile) dependsOn compileScalastyle).value | |
assemblyMergeStrategy in assembly := { | |
case PathList("META-INF", xs @ _*) => MergeStrategy.discard | |
case x => MergeStrategy.first |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HdfsJobTarget(HdfsTarget): | |
def exists(self): | |
return self.fs.exists(os.path.join(self.path, '_SUCCESS')) | |
def copy(self, destination): | |
target_dir = os.path.dirname(destination) | |
if not self.fs.exists(target_dir): | |
self.fs.mkdir(target_dir) | |
self.fs.copy(self.path, target_dir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "1" | |
services: | |
influxdb: | |
image: influxdb | |
volumes: | |
- <local-mnt>:/var/lib/influxdb | |
ports: | |
- 8084:8083 | |
- 8086:8086 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: all | |
become: true | |
tasks: | |
- name: configure system settings, file descriptors and number of threads | |
pam_limits: | |
domain: <--your-username--> | |
limit_type: "{{item.limit_type}}" | |
limit_item: "{{item.limit_item}}" | |
value: "{{item.value}}" | |
with_items: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: all | |
become: true | |
tasks: | |
- name: configure system settings, file descriptors and number of threads | |
pam_limits: | |
domain: ratuser | |
limit_type: "{{item.limit_type}}" | |
limit_item: "{{item.limit_item}}" | |
value: "{{item.value}}" | |
with_items: |
NewerOlder