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
--- | |
apiVersion: flink.apache.org/v1beta1 | |
kind: FlinkDeployment | |
metadata: | |
name: demo-flink | |
namespace: flink | |
spec: | |
image: container.repository.cloudera.com/cloudera/flink:1.18.1-csaop1.0.0-b317 | |
flinkVersion: v1_18 | |
flinkConfiguration: |
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
#!/bin/bash | |
set -u | |
set -e | |
export CDP_PROFILE=<CDP_PROFILE> | |
CLUSTER_NAME=<DATAHUB_NAME> | |
WORKLOAD_USR=<WORKLOAD_USER_NAME> | |
WORKLOAD_PWD=<WORKLOAD_PASSWORD> |
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
#!/bin/bash | |
set -u | |
set -e | |
# The following should be set if not already exported at the shell level | |
#export CDP_PROFILE=<cdp_profile_name> | |
#export AWS_PROFILE=<aws_profile_name> | |
ENV_NAME=$1 |
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
{ | |
"type": "record", | |
"name": "FinTransactions", | |
"fields": [ | |
{ "name": "ts", "type": "string" }, | |
{ "name": "account_id", "type": "string" }, | |
{ "name": "transaction_id", "type": "string" }, | |
{ "name": "amount", "type": "int" }, | |
{ "name": "lat", "type": "double" }, | |
{ "name": "lon", "type": "double" }, |
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
import os | |
import re | |
import sys | |
import subprocess | |
import time | |
from subprocess import Popen, PIPE | |
def ps(pid): | |
p = Popen('ps -ef | grep {}'.format(pid), shell=True, stdout=PIPE, stderr=PIPE) | |
stdout, _ = p.communicate() |
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
# Requirements: kafka-python gssapi krbticket | |
import os | |
import time | |
from kafka import KafkaConsumer, KafkaProducer | |
from krbticket import KrbConfig, KrbCommand | |
try: | |
os.environ['KRB5CCNAME'] = '/tmp/krb5cc_<myusername>' | |
kconfig = KrbConfig(principal='araujo', keytab='/path/to/<myusername>.keytab') | |
KrbCommand.kinit(kconfig) |
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
import avro.schema | |
import io | |
import os | |
import requests | |
from avro.io import DatumReader, BinaryDecoder | |
from cachetools import TTLCache | |
from kafka import KafkaConsumer | |
# Kafka broker | |
BROKERS = ['cdp.52.33.201.179.nip.io:9092'] |
This file has been truncated, but you can view the full file.
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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><template encoding-version="1.3"> | |
<description/> | |
<groupId>7ba01444-0178-1000-0000-000065162889</groupId> | |
<name>collect-cloud-data-gcp</name> | |
<snippet> | |
<controllerServices> | |
<id>83014ebc-1df0-37b8-0000-000000000000</id> | |
<parentGroupId>c51c7c51-9f9b-3235-0000-000000000000</parentGroupId> | |
<bundle> | |
<artifact>nifi-gcp-nar</artifact> |
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
import java.net.InetAddress; | |
import java.net.InetSocketAddress; | |
import java.net.UnknownHostException; | |
public class ResolverHelper { | |
public static void main(String[] args) throws UnknownHostException { | |
InetAddress ia = InetAddress.getByName(args[0]); | |
InetSocketAddress isa = new InetSocketAddress(args[0], 12345); | |
System.out.println(ia.getCanonicalHostName()); | |
System.out.println(isa.getAddress().getCanonicalHostName()); | |
} |
NewerOlder