Skip to content

Commit 13d6df7

Browse files
committed
quick fixes in the scripts
1 parent 3726c39 commit 13d6df7

File tree

6 files changed

+23
-17
lines changed

6 files changed

+23
-17
lines changed

docker-stack-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ services:
4848
- "15672:15672"
4949
- "5672:5672"
5050
volumes:
51-
- $RABBITMQ_VAR:/data/mnesia
51+
- $RABBIT_VAR:/data/mnesia
5252
environment:
53-
- RABBITMQ_NODENAME: node@rabbitmq
53+
RABBITMQ_NODENAME: node@rabbitmq
5454
deploy:
5555
placement:
5656
constraints: [node.role == manager]

maven-miner-parent/maven-miner-indexer/src/main/java/fr/inria/diverse/maven/indexer/CentralIndex.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,13 @@ public void shutdownCompleted(ShutdownSignalException cause)
264264
// myQueue = channel.queueDeclarePassive(ARTIFACT_QUEUE_NAME);
265265

266266
}
267-
if (cmd.hasOption("f")) {
268-
fromFile = true;
269-
path = cmd.getOptionValue("f");
270-
}
271-
index.init().publish(path);
267+
if (cmd.hasOption("f")) {
268+
fromFile = true;
269+
path = cmd.getOptionValue("f");
270+
index.publish(path);
271+
} else {
272+
index.init().publish(path);
273+
}
272274
} else if (cmd.hasOption("t")) {
273275
path = cmd.getOptionValue("t");
274276
index.init().dumpAtFile(path);
@@ -329,7 +331,7 @@ public void transferStarted( TransferEvent transferEvent )
329331

330332
public void transferProgress( TransferEvent transferEvent, byte[] buffer, int length )
331333
{
332-
LOGGER.info( " Transfer in progress " + transferEvent.getResource().getName());
334+
//LOGGER.info( " Transfer in progress " + transferEvent.getResource().getName());
333335

334336
}
335337

maven-miner-parent/usefulCommands

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ docker run -d \
99
rabbitmq:3-management
1010

1111
// running neo4j passwordless
12-
docker run \
12+
docker run -d \
1313
--hostname neo4j \
1414
--name neo4j \
1515
--publish=7474:7474 --publish=7687:7687 \
1616
--volume=$HOME/neo4j-server/data:/data \
1717
--volume=$HOME/neo4j-server/logs:/logs \
1818
--env=NEO4J_AUTH=none \
1919
neo4j:3.0
20+
21+
//SSH forward tunneling
22+
ssh -nNT -L 7474:localhost:7474 -L 15672:localhost:15672 ubuntu@10.0.0.1

miner/maven-indexer/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ MAINTAINER Amine BENELALLAM
44
ADD miner-indexer.jar /dist/
55
ADD run-producer.sh /dist/
66
ADD artifacts/ /dist/artifacts
7+
ADD run-producer-file.sh /dist/

miner/maven-indexer/run-producer-file.sh

100644100755
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ SCRIPT_NAME=$0
33
function print_usage_and_exit {
44
echo "Usage: ./run-prducer.sh"
55
echo "--file <arg>: path to artifacts info version. Optional!"
6-
echo "--queue <arg>: hostname and prot number of rabbitMQ server"
7-
echo "--index"
6+
echo "--queue <arg>: hostname and port number of rabbitMQ server"
7+
echo "--index <arg>: file index to be provided"
88
exit 1
99
}
1010
sleep 30s
1111
echo "Setting up default variables"
1212

13-
ARTIFACT_PATH="/dist/artifacts/artifact-0"
13+
ARTIFACT_PATH="/dist/artifacts/artifacts-0"
1414
INDEX=0
1515
while [[ $# > 1 ]]
1616
do
@@ -25,13 +25,13 @@ case $key in
2525
QUEUE="$1"
2626
shift
2727
;;
28-
*)
29-
print_usage_and_exit
30-
;;
3128
--index)
3229
INDEX="$1"
3330
shift
3431
;;
32+
*)
33+
print_usage_and_exit
34+
;;
3535
esac
3636
done
3737

@@ -43,4 +43,4 @@ if [ -z "$QUEUE" ]; then
4343
echo "hostname and port number of rabbitMQ server is not provided 'host:number'"
4444
print_usage_and_exit
4545
fi
46-
./run-producer --queue $QUEUE --file $ARTIFACT_PATH$INDEX
46+
/dist/run-producer.sh --queue $QUEUE --file $ARTIFACT_PATH$INDEX

run-swarm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function print_usage_and_exit {
99
exit 1
1010
}
1111
NEO4J_DUMP=$HOME/neo4j-server
12-
RABBIT_DUMP=$HOME/rabbitMQ/
12+
RABBIT_DUMP=$HOME/rabbitMQ
1313
CONSUMERS=2
1414
VERSION=0.3.0
1515
while [[ $# > 1 ]]

0 commit comments

Comments
 (0)