Easiest HDFS cluster in the world with kubernetes.
Inspiration from kimoonkim/kubernetes-HDFS
kubectl create -f namenode.yaml
kubectl create -f datanode.yaml
Setup a port-forward to so you can see it is alive:
# Install Java 1.8 in CentOS/RHEL 6.X | |
sudo yum remove -y java-1.6.0-openjdk | |
wget --no-cookies \ | |
--no-check-certificate \ | |
--header "Cookie: oraclelicense=accept-securebackup-cookie" \ | |
"http://download.oracle.com/otn-pub/java/jdk/8-b132/jdk-8-linux-x64.rpm" \ | |
-O jdk-8-linux-x64.rpm | |
sudo rpm -Uvh jdk-8-linux-x64.rpm | |
sudo alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 20000 | |
sudo alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 20000 |
# check if job exists | |
curl -XGET 'http://jenkins/checkJobName?value=yourJobFolderName' --user user.name:YourAPIToken | |
# with folder plugin | |
curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken | |
# without folder plugin | |
curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken | |
# create folder |
Easiest HDFS cluster in the world with kubernetes.
Inspiration from kimoonkim/kubernetes-HDFS
kubectl create -f namenode.yaml
kubectl create -f datanode.yaml
Setup a port-forward to so you can see it is alive:
package main | |
import ( | |
"encoding/json" | |
"encoding/xml" | |
"fmt" | |
"net/http" | |
"strings" | |
) |
{ | |
"cap": [ | |
{ "app": "__default", "s2s": "friday_alert", "cpu": 250, "mem": 2147483648 }, | |
{ "app": "music-mobsrv", "s2s": "mobsrv", "cpu": 850, "mem": 2147483648 }, | |
{ "app": "music-entsrv", "s2s": "entsrv", "cpu": 850, "mem": 2147483648 }, | |
{ "app": "music-guild-service", "s2s": "guildservice", "cpu": 850, "mem": 2147483648 }, | |
{ "app": "music-entms", "s2s": "entms", "cpu": 850, "mem": 2147483648 }, | |
{ "app": "docker-registry-web", "s2s": "friday_alert", "cpu": 850, "mem": 2147483648 }, | |
{ "app": "music-mobflwapp", "s2s": "mobFlwApp", "cpu": 1000, "mem": 2147483648 }, |
package gziphandler | |
import ( | |
"compress/gzip" | |
"log" | |
"net/http" | |
"strings" | |
"sync" | |
) |
/* | |
* Copyright (c) 1983, 1988, 1993 | |
* The Regents of the University of California. All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: | |
* 1. Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. | |
* 2. Redistributions in binary form must reproduce the above copyright |
#!/bin/bash | |
if [[ $# -ne 2 ]]; then | |
echo "Need parameters: PROCESS_NAME showpid|showport|showhost|showconn" | |
exit 1 | |
fi | |
PROCESS_NAME=$1 | |
ACTION=$2 |
The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.
However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as expect | |
from selenium.webdriver.common.keys import Keys | |
import time | |
from random import randint | |
def delay(n): |