Skip to content

Instantly share code, notes, and snippets.

View tzolov's full-sized avatar

Christian Tzolov tzolov

View GitHub Profile
@tzolov
tzolov / Download Pivotal Sample Data .sh
Last active December 22, 2015 05:09
Testing the multi-VMs Pivotal HD cluster
# Within your vagrant project folder:
git clone https://github.com/gopivotal/pivotal-samples.git
mv pivotal-samples/sample-data ./retail_demo
rm -Rf ./pivotal-samples
# login to the PHD master (and client) node. The ssh password: gpadmin
# phd1 = 10.211.55.101
@tzolov
tzolov / Vagrantfile
Last active December 22, 2015 04:18
Vagrantfile for Pivotal HD 1.0.1 CE + HAWQ 1.1.0-8 Defines the type of VMs required and how to configure and provision those machines * pcc_provision.sh - Provisioning is applied only to the pcc VM. It follows the PHD_10_Guid.pdf instruction to install PCC on the pcc VM and PHD on the phd[1..3] VMs. Annotations in the script can provide addition…
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
# Embedded provisioning script common for all cluster hosts and PCC.
$phd_provision_script = <<SCRIPT
#!/bin/bash
@tzolov
tzolov / 5_steps_installation.sh
Last active December 21, 2015 07:18
* Vagrantfile for Pivotal HD 1.0.1 CE - Defines the type of VMs required and how to configure and provision those machines * pcc_provision.sh - Provisioning is applied only to the pcc VM. It follows the PHD_10_Guid.pdf instruction to install PCC on the pcc VM and PHD on the phd[1..3] VMs. Annotations in the script can provide additional informat…
#!/bin/bash
# Make sure you have the latest Vagrant and VirtualBox installed.
# 1. Add CentOS-6.2-x86_64 box to your Vagrant configuration.
vagrant box add CentOS-6.2-x86_64 https://s3.amazonaws.com/Vagrant_BaseBoxes/centos-6.2-x86_64-201306301713.box
# 2. Download and uncompress the PHD 1.0.1.
wget "http://bitcast-a.v1.o1.sjc1.bitgravity.com/greenplum/pivotal-sw/phd_1.0.1.0-19_community.tar.gz"
tar -xzf ./phd_1.0.1.0-19_community.tar.gz
@tzolov
tzolov / ESCrunch.java
Last active December 16, 2015 11:39
Example ElasticSerach Crunch Integration (using ElasticSearch-Hadoop) Application reads a sample 'twitter' index from ES, counts the messages per user and writes the result counts to different ES index. This example uses {@link Map} as a mean to represent the data read-from and written-to ES. Prerequisite: latest Crunch:0.6.0-SNAPSHOT and latest…
/*
* Copyright 2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@tzolov
tzolov / gist:1638197
Created January 19, 2012 05:36
Test Java Snippet
public interface Oauth2ClientOperations {
String SECURITY_FILTER_NAME = "springSecurityFilterChain";
boolean isOAuthClientInstallationPossible();
void installOAuthClient(String authorizationServerUri, String protectedResourceUri);
}