Skip to content

Instantly share code, notes, and snippets.

{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"spClientId": {
"type": "string",
"defaultValue": "YOUR Client appId",
"metadata": {
"description": "Service Principal Client ID used by Jenkins and Azure Container Service (AKS)."
}
import org.apache.spark.eventhubs._
import org.apache.spark.sql.types._
import org.apache.spark.sql.functions._
// Build connection string with the above information
val connectionString = ConnectionStringBuilder("Endpoint.....").setEventHubName("twitterhub").build
val customEventhubParameters =
EventHubsConf(connectionString)
.setMaxEventsPerTrigger(5)
import org.apache.spark.eventhubs._
// Build connection string with the above information
val connectionString = ConnectionStringBuilder("<EVENT HUBS CONNECTION STRING>")
.setEventHubName("<EVENT HUB NAME>")
.build
val customEventhubParameters =
EventHubsConf(connectionString)
.setMaxEventsPerTrigger(5)
import scala.collection.JavaConverters._
import com.microsoft.azure.eventhubs._
import java.util.concurrent._
val namespaceName = "<EVENT HUBS NAMESPACE>"
val eventHubName = "<EVENT HUB NAME>"
val sasKeyName = "<POLICY NAME>"
val sasKey = "<POLICY KEY>"
val connStr = new ConnectionStringBuilder()
.setNamespaceName(namespaceName)
version: "3.3"
services:
traefik:
image: traefik
command: --web --docker --docker.swarmmode --docker.watch --docker.domain=cirrus.io --logLevel=DEBUG
ports:
- "80:80"
- "8080:8080"
- "443:443"
[OSEv3:children]
masters
etcd
nodes
[OSEv3:vars]
openshift_master_default_subdomain=apps.cirrus.io
ansible_ssh_user=root
ansible_become=yes
openshift_master_cluster_method=native
FROM alpine:latest
MAINTAINER Adilson Cesar <adilsonbna@gmail.com>
# Expose Web Port
EXPOSE 8080
# Set environment
ENV JAVA_HOME /opt/jdk
ENV PATH ${PATH}:${JAVA_HOME}/bin
ENV JAVA_PACKAGE server-jre