Skip to content

Instantly share code, notes, and snippets.

View jorisdevrede's full-sized avatar

Joris de Vrede jorisdevrede

  • The Netherlands
View GitHub Profile

This is a tutorial on how to setup Kafka 0.9.0.0 on CentOS 7 with Kerberos. This configuration aims to set up all services on a single host called myserver.domain.com in the Kerberos realm DOMAIN.COM for testing purposes

Install JCE

This configuration requires that you have the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files installed. You can download these from the Java Downloads page under the Additional Resources section.

Install Kerberos KDC

Ashrithr made a very helpful tutorial on how to install Kerberos. Please use these instructions to set up Kerberos.

Kopieer mij:

diamonds = sqlContext.sql("SELECT * FROM diamonds")
display(diamonds.select("*"))

Kopieer mij:

diamonds = sqlContext.sql("SELECT * FROM diamonds")
@jorisdevrede
jorisdevrede / instructions.md
Last active June 6, 2017 05:34
Spark ML workshop

Import relevant Spark classes

Spark ML and SQL classes are considered optional and therefore not loaded by default. You will need to load these before proceding with ML.

from pyspark.ml import Pipeline
from pyspark.ml.feature import *
from pyspark.ml.classification import *
from pyspark.ml.evaluation import *
from pyspark import SparkConf, SparkContext
from operator import add
def explode_coords(record):
"""Restructure record into multi (coord, value) tuples
Takes a list of [x-coord, y-coord, value] and explodes that
into inverted tuples with a key (x,y) and a value v for all
@jorisdevrede
jorisdevrede / connect.py
Last active November 16, 2017 15:36
Elasticsearch optimization
from argparse import ArgumentParser
from logbook import Logger, StreamHandler
import json
import requests
import sys
import uuid
StreamHandler(sys.stdout).push_application()
log = Logger(__name__)
@jorisdevrede
jorisdevrede / config.md
Created December 4, 2017 13:13
Development setup

Java

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default

Java Cryptography Extension (JCE) Unlimited Strength

To utilize 256 bits keys in Java, the following extensions need to be installed: Unlimited Strength Jurisdiction Policy Files (Java 8)

@jorisdevrede
jorisdevrede / install.sh
Last active December 6, 2017 20:39
development client installation
sudo apt-get install -y software-properties-common
sudo apt-add-repository -y ppa:ansible/ansible
sudo apt-get update
sudo apt-get install -y ansible
echo 'set nocompatible' > ~/.vimrc
sudo apt-get install -y maven
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
@jorisdevrede
jorisdevrede / hlogreader.py
Created December 21, 2017 13:54
log extraction
#!/usr/bin/env python
from __future__ import print_function
import argparse
import re
import os
class HlogReader:
type_principal = 1
@jorisdevrede
jorisdevrede / log.py
Last active January 10, 2018 15:29
python logger
#!/usr/bin/env python
import argparse
import logging
def main():
logging.debug('main')
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--log',
@jorisdevrede
jorisdevrede / spool.yml
Created January 11, 2018 22:05
ansible spooler
---
- name: Reboot
hosts: all
become: yes
tasks:
- name: reboot system