<commit_before>#!/bin/bash

# run N slave containers
N=$1

if [ $# != 1  ]
then
	echo "Set first parametar as number of nodes"
	exit 1
fi

# delete old master container and start new master container
echo "start master container..."
docker run --rm -d -t --dns 127.0.0.1 -p 60010:60010 -p 50070:50070 -p 9090:9090 -p 1234:1234 -P --name master.krejcmat.com -h master.krejcmat.com -w /root krejcmat/hadoop-hbase-master&> /dev/null

# get the IP address of master container
FIRST_IP=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" master.krejcmat.com)

# delete old slave containers and start new slave containers
for i in `seq $N`
do
	echo "start slave$i container..."
	docker run --rm -d -t --dns 127.0.0.1 -P --name slave$i.krejcmat.com -h slave$i.krejcmat.com -e JOIN_IP=$FIRST_IP krejcmat/hadoop-hbase-slave &> /dev/null
done


# create a new Bash session in the master container
docker exec -it master.krejcmat.com bash<commit_msg>Unneeded port mapping.<commit_after>#!/bin/bash

# run N slave containers
N=$1

if [ $# != 1  ]
then
	echo "Set first parametar as number of nodes"
	exit 1
fi

# delete old master container and start new master container
echo "start master container..."
docker run --rm -d -t --dns 127.0.0.1 -p 60010:60010 -p 50070:50070 -p 9090:9090 -P --name master.krejcmat.com -h master.krejcmat.com -w /root krejcmat/hadoop-hbase-master&> /dev/null

# get the IP address of master container
FIRST_IP=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" master.krejcmat.com)

# delete old slave containers and start new slave containers
for i in `seq $N`
do
	echo "start slave$i container..."
	docker run --rm -d -t --dns 127.0.0.1 -P --name slave$i.krejcmat.com -h slave$i.krejcmat.com -e JOIN_IP=$FIRST_IP krejcmat/hadoop-hbase-slave &> /dev/null
done


# create a new Bash session in the master container
docker exec -it master.krejcmat.com bash
{'fraction_non_alphanumeric': 0.12552966101694915, 'fraction_numerical': 0.04978813559322034, 'mean_word_length': 3.5518072289156626, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1647587', 'n_tokens_mistral': 755, 'n_tokens_neox': 663, 'n_words': 235}