From 14269f01491fcaf9baff80ac3e5d6a95f418ed76 Mon Sep 17 00:00:00 2001
From: Theodora-Mara Pislar <tmp1u19@soton.ac.uk>
Date: Tue, 11 May 2021 00:54:04 +0100
Subject: [PATCH] Add some new stuff to the rebalancing operation.

---
 src/ClientMain.java | 2 +-
 src/Dstore.java     | 2 --
 src/Server.java     | 1 +
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/ClientMain.java b/src/ClientMain.java
index 6079050..dc61bdb 100644
--- a/src/ClientMain.java
+++ b/src/ClientMain.java
@@ -17,7 +17,7 @@ public class ClientMain {
 		if (!uploadFolder.exists())
 			throw new RuntimeException("to_store folder does not exist");
 		
-		// testClient(cport, timeout, downloadFolder);
+		testClient(cport, timeout, downloadFolder);
 		
 		// example to launch a number of concurrent clients, each doing the same operations
 		for (int i = 0; i < 10; i++) {
diff --git a/src/Dstore.java b/src/Dstore.java
index b930b89..fce2b56 100644
--- a/src/Dstore.java
+++ b/src/Dstore.java
@@ -184,8 +184,6 @@ public class Dstore {
         PrintWriter res = new PrintWriter(new OutputStreamWriter(out));
         String line;
 
-        System.out.println("Entered controller req");
-
         while((line = req.readLine()) != null) {
             String[] tokens = line.split(" ");
             String command = tokens[0];
diff --git a/src/Server.java b/src/Server.java
index 3d573bf..4e7c1a1 100644
--- a/src/Server.java
+++ b/src/Server.java
@@ -193,6 +193,7 @@ public class Server {
                 res.println("ERROR_FILE_DOES_NOT_EXIST");
             } else {
                 // select a Dstore from there and give an appropriate error if all Dstores fail
+                // #TODO fix NullPointerException from here
                 res.println("LOAD_FROM " + fileSystem.getStore().get(filename).get(pos).getPublicPort() +
                         " " + fileSystem.getFileSizes().get(filename));
             }
-- 
GitLab