Skip to content

Instantly share code, notes, and snippets.

@tonycox
tonycox / docker-compose.yaml
Created March 24, 2024 22:03
Dockerized mulit-worker Spark
version: "3.8"
volumes:
local-workspace-fs:
name: "local-workspace-fs"
external: true
local-data-fs:
name: "local-data-fs"
external: true
@tonycox
tonycox / IgniteCfg.java
Created August 1, 2017 15:59
Ignite locking cache
import org.apache.ignite.IgniteSpringBean;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.spi.discovery.DiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
@tonycox
tonycox / mergeList.java
Created March 21, 2017 16:17
Merging two sorted lists into first one
static void merge(List<Long> first, List<Long> second) {
ListIterator<Long> firstIter = first.listIterator();
ListIterator<Long> secondIter = second.listIterator();
Long a = getNext(firstIter);
Long b = getNext(secondIter);
while (a != null && b != null) {
if (a > b) {
firstIter.previous();
@tonycox
tonycox / bigtop on ubuntu
Last active February 12, 2021 10:18
how i install bigtop 1.1.0 on ubuntu 16.04
sudo apt-get update && apt-get upgrade
# install java (homedir - /usr/lib/jvm/java-8-oracle/)
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
# or use this to set as default -> sudo apt install oracle-java8-set-default
# install maven (homedir - /usr/share/maven)