From 5999e7b298fcf8304561f42126e7c0bdcfa85ea6 Mon Sep 17 00:00:00 2001 From: Daniel Lucas <dl3g19@soton.ac.uk> Date: Tue, 11 May 2021 12:58:32 +0100 Subject: [PATCH] Minor changes made to adapt to new spec points and failures found --- Controller.java | 97 ++++++----- DeadStoreException.java | 15 ++ Dstore.java | 3 +- DstoreConnection.java | 40 ++--- error.txt | 283 ++++++++++++++++++++++--------- loggers/ControllerLogger.class | Bin 1638 -> 0 bytes loggers/DstoreLogger.class | Bin 1492 -> 0 bytes loggers/Logger$LoggingType.class | Bin 1041 -> 0 bytes loggers/Logger.class | Bin 2112 -> 0 bytes 9 files changed, 284 insertions(+), 154 deletions(-) create mode 100644 DeadStoreException.java delete mode 100644 loggers/ControllerLogger.class delete mode 100644 loggers/DstoreLogger.class delete mode 100644 loggers/Logger$LoggingType.class delete mode 100644 loggers/Logger.class diff --git a/Controller.java b/Controller.java index d3fe6ff..cbfe8fc 100644 --- a/Controller.java +++ b/Controller.java @@ -192,19 +192,13 @@ public class Controller { protected class RebalanceThread implements Runnable { public void run() { while(true) { - if(rebalanceLock.waitToRebalance()) { - //Another dstore joined, it requested a rebalance - try {runRebalance();} catch(Exception e) {e.printStackTrace();} - } - else { - //Timeout occured, i.e. rebalancePeriod has passed since the last rebalance - try { - if(dstores.size() >= rFactor) { - runRebalance(); - } + rebalanceLock.waitToRebalance(); + try { + if(dstores.size() >= rFactor) { + runRebalance(); } - catch(Exception e) {e.printStackTrace();} } + catch(Exception e) {e.printStackTrace();} } } @@ -312,12 +306,13 @@ public class Controller { String message = Protocol.STORE_TO_TOKEN; for(Integer thisStore : storesToStore) { message = message + " " + thisStore.intValue(); + IndexEntry entryf = entry; new Thread(() -> { try { - String[] receivedMessage = dstores.get(thisStore).receive(Protocol.STORE_ACK_TOKEN).split(" "); + String[] receivedMessage = dstores.get(thisStore).receive(Protocol.STORE_ACK_TOKEN + " " + filename).split(" "); if(receivedMessage[0].equals(Protocol.STORE_ACK_TOKEN)) { try { - storeAck(thisStore, receivedMessage[1], latch); + storeAck(thisStore, entryf, latch); } catch(Exception e) { //Log error @@ -334,6 +329,9 @@ public class Controller { e.printStackTrace(); removeDstore(e); } + catch(DeadStoreException e) { + System.err.println("Store for " + filename + " failed due to dead dstore"); + } }).start(); } out.println(message); @@ -365,14 +363,8 @@ public class Controller { } } - void storeAck(Integer port, String filename, CountDownLatch latch) throws Exception { - if(!index.containsKey(filename)) { - //Throw logging exception - throw new Exception("Index does not contain " + filename); - } - - IndexEntry thisEntry = index.get(filename); - thisEntry.addStoredBy(port); + void storeAck(Integer port, IndexEntry entry, CountDownLatch latch) throws Exception { + entry.addStoredBy(port); latch.countDown(); } @@ -409,16 +401,21 @@ public class Controller { void sendLoadFrom(Socket client, String filename) { try { PrintWriter out = new PrintWriter(client.getOutputStream()); - Reloader storedBy = loadRequests.get(client); - System.out.println("Load requested for file " + filename + ", there are " + storedBy.size() + " dstores to select from"); String message; - if(storedBy.isEmpty()) { - message = Protocol.ERROR_LOAD_TOKEN; + if(!index.containsKey(filename) || index.get(filename).getStatus() != IndexEntry.Status.STORE_COMPLETE) { + message = Protocol.ERROR_FILE_DOES_NOT_EXIST_TOKEN; } else { - Integer thisStore = storedBy.get(0); - storedBy.remove(thisStore); - message = Protocol.LOAD_FROM_TOKEN + thisStore + " " + storedBy.filesize; + Reloader storedBy = loadRequests.get(client); + System.out.println("Load requested for file " + filename + ", there are " + storedBy.size() + " dstores to select from"); + if(storedBy.isEmpty()) { + message = Protocol.ERROR_LOAD_TOKEN; + } + else { + Integer thisStore = storedBy.get(0); + storedBy.remove(thisStore); + message = Protocol.LOAD_FROM_TOKEN + thisStore + " " + storedBy.filesize; + } } out.println(message); out.flush(); @@ -464,7 +461,7 @@ public class Controller { Integer dstore = it.next(); new Thread(() -> { try { - String[] message = dstores.get(dstore).sendAndReceive(Protocol.REMOVE_TOKEN + " " + filename, Protocol.REMOVE_ACK_TOKEN, Protocol.ERROR_FILE_DOES_NOT_EXIST_TOKEN).split(" "); + String[] message = dstores.get(dstore).sendAndReceive(Protocol.REMOVE_TOKEN + " " + filename, Protocol.REMOVE_ACK_TOKEN + " " + filename, Protocol.ERROR_FILE_DOES_NOT_EXIST_TOKEN).split(" "); if((message[0].equals(Protocol.REMOVE_ACK_TOKEN) && message[1].equals(filename)) || message[0].equals(Protocol.ERROR_FILE_DOES_NOT_EXIST_TOKEN)) { entry.removeStoredBy(dstore.intValue()); latch.countDown(); @@ -478,26 +475,30 @@ public class Controller { e.printStackTrace(); removeDstore(e); } + catch(DeadStoreException e) { + System.err.println("Remove for " + filename + " failed due to dead dstore"); + } }).start(); } //Wait for REMOVE_ACKs from all Dstores which were sent the REMOVE message - if(!latch.await(timeout, TimeUnit.MILLISECONDS)) { + if(latch.await(timeout, TimeUnit.MILLISECONDS)) { + //Update index to "remove complete" + entry.setStatus(IndexEntry.Status.REMOVE_COMPLETE); + synchronized(index) { + if(index.get(filename) == entry) index.remove(filename); + } + + //Send REMOVE_COMPLETE to client + PrintWriter clientOut = new PrintWriter(client.getOutputStream()); + clientOut.println(Protocol.REMOVE_COMPLETE_TOKEN); + clientOut.flush(); + messageSent(client, Protocol.REMOVE_COMPLETE_TOKEN); + } + else { //Log error System.err.println("Not all REMOVE_ACKs have been received"); } - - //Update index to "remove complete" - entry.setStatus(IndexEntry.Status.REMOVE_COMPLETE); - synchronized(index) { - if(index.get(filename) == entry) index.remove(filename); - } - - //Send REMOVE_COMPLETE to client - PrintWriter clientOut = new PrintWriter(client.getOutputStream()); - clientOut.println(Protocol.REMOVE_COMPLETE_TOKEN); - clientOut.flush(); - messageSent(client, Protocol.REMOVE_COMPLETE_TOKEN); } catch(IOException e) { e.printStackTrace(); @@ -549,6 +550,7 @@ public class Controller { removeDstore(e); listLatch.countDown(); } + catch(DeadStoreException e) {} }); thisThread.start(); activeThreads.add(thisThread); @@ -572,7 +574,7 @@ public class Controller { } catch(Exception e) {e.printStackTrace();} - if(dstoreFiles.isEmpty()) throw new Exception("All dstores have been disconnected!"); + if(dstoreFiles.size() < rFactor) throw new Exception("Less than R dstores connected; connections may be faulty or timeout may be too strict"); Map<Integer,List<String>> newAlloc = allocate(dstoreFiles); Map<Integer,String> sendIndex = composeRebalanceMessages(dstoreFiles, newAlloc); @@ -644,7 +646,14 @@ public class Controller { for(Integer i : oldDstoreFiles.keySet()) { List<String> files = new ArrayList<String>(); for(String s : oldDstoreFiles.get(i)) { - if(index.containsKey(s)) files.add(s); + if(index.containsKey(s)) { + if(index.get(s).getStatus() == IndexEntry.Status.STORE_COMPLETE) { + files.add(s); + } + else { + index.remove(s); + } + } if(!availableFiles.contains(s)) availableFiles.add(s); } dstoreFiles.put(i, files); diff --git a/DeadStoreException.java b/DeadStoreException.java new file mode 100644 index 0000000..7520f89 --- /dev/null +++ b/DeadStoreException.java @@ -0,0 +1,15 @@ +import java.lang.Throwable; +import java.net.Socket; + +public class DeadStoreException extends Exception { + DstoreConnection connection; + + public DeadStoreException(DstoreConnection connection) { + super("Dstore at port " + connection.getPort() + " is unavailable"); + this.connection = connection; + } + + public DstoreConnection getConnection() { + return connection; + } +} diff --git a/Dstore.java b/Dstore.java index 5a86d15..44a1bbc 100644 --- a/Dstore.java +++ b/Dstore.java @@ -335,7 +335,7 @@ public class Dstore { messageReceived(socket, receivedMessage); if(!receivedMessage.equals(Protocol.ACK_TOKEN)) { //Log error - System.out.println("Dstore " + dstore + " should have sent ACK but " + port + " received " + receivedMessage); + System.err.println("Dstore " + dstore + " should have sent ACK but " + port + " received " + receivedMessage); } byte[] content = new byte[BUFFER_SIZE]; @@ -378,7 +378,6 @@ public class Dstore { controllerOut.println(Protocol.REBALANCE_COMPLETE_TOKEN); messageSent(controllerSocket, Protocol.REBALANCE_COMPLETE_TOKEN); } - System.out.println("Sent message REBALANCE_COMPLETE"); }).start(); } diff --git a/DstoreConnection.java b/DstoreConnection.java index c8550c1..134280e 100644 --- a/DstoreConnection.java +++ b/DstoreConnection.java @@ -52,12 +52,16 @@ public class DstoreConnection { return new DstoreDisconnectException(this); } - public String sendAndReceive(String message, String... expectedMessages) throws DstoreDisconnectException { + public void checkAvailable() throws DeadStoreException { + if(!available) throw new DeadStoreException(this); + } + + public String sendAndReceive(String message, String... expectedMessages) throws DstoreDisconnectException, DeadStoreException { System.out.println("Getting lock..."); synchronized(this) { try { System.out.println("Lock acquired"); - if(!available) throw getDisconnectData(); + checkAvailable(); writer.println(message); writer.flush(); //System.out.println("Controller sent " + message + " to port " + port); @@ -72,7 +76,7 @@ public class DstoreConnection { } } - public String receive(String... expectedMessages) throws DstoreDisconnectException { + public String receive(String... expectedMessages) throws DstoreDisconnectException, DeadStoreException { String findMessage = checkQueue(expectedMessages); if(findMessage != null) { return findMessage; @@ -81,7 +85,7 @@ public class DstoreConnection { System.out.println("Getting lock..."); synchronized(this) { System.out.println("Lock acquired"); - if(!available) throw getDisconnectData(); + checkAvailable(); //Check the queue twice: once incase the receiver is busy, twice incase the message was added by the last thread findMessage = checkQueue(expectedMessages); @@ -129,37 +133,13 @@ public class DstoreConnection { catch(InterruptedException e) { e.printStackTrace(); } - - /* - String returnMessage = null; - do { - returnMessage = reader.readLine(); - if(returnMessage == null) { - System.out.println("Dstore disconnected"); - available = false; - throw new DstoreDisconnectException(); - } - if(expectedMessage != null && !expectedMessage.equals(returnMessage.split(" ")[0])) { - queue.add(returnMessage); - if(queue.size() > MAX_QUEUE_SIZE) queue.remove(0); - returnMessage = null; - } - } - while(returnMessage == null); - System.out.println("Controller received " + returnMessage); - return returnMessage; - } - catch(IOException e) { - e.printStackTrace(); - return ""; - } - */ + return ""; } protected boolean isExpected(String message, String[] expectedMessages) { for(String s : expectedMessages) { - if(s.equals(message.split(" ")[0])) return true; + if(s.equals(message)) return true; } return false; } diff --git a/error.txt b/error.txt index 308020f..c0e41ea 100644 --- a/error.txt +++ b/error.txt @@ -1,52 +1,52 @@ -FileAlreadyExistsException: Error trying to store file Grandad.txt - file already exists +FileAlreadyExistsException: Error trying to store file Look_Away.mp3 - file already exists at Client.a(SourceFile:277) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file SnowHalation.txt - file already exists +FileAlreadyExistsException: Error trying to store file Look_Away.mp3 - file already exists at Client.a(SourceFile:277) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file Grandad.txt - file already exists +FileAlreadyExistsException: Error trying to store file rap.mp3 - file already exists at Client.a(SourceFile:277) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file Grandad.txt - file already exists +FileAlreadyExistsException: Error trying to store file AllStar.txt - file already exists at Client.a(SourceFile:277) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file Look_Away.mp3 - file already exists +FileAlreadyExistsException: Error trying to store file rap.mp3 - file already exists at Client.a(SourceFile:277) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file Unknown.txt - file already exists +FileAlreadyExistsException: Error trying to store file PumpkinHill.txt - file already exists at Client.a(SourceFile:277) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file GameDotCom.jpg - file already exists +FileAlreadyExistsException: Error trying to store file Look_Away.mp3 - file already exists at Client.a(SourceFile:277) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file Grandad.txt - file already exists +FileAlreadyExistsException: Error trying to store file PumpkinHill.txt - file already exists at Client.a(SourceFile:277) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file Look_Away.mp3 - file already exists +FileAlreadyExistsException: Error trying to store file PumpkinHill.txt - file already exists at Client.a(SourceFile:277) at Client.store(SourceFile:183) at Client.store(SourceFile:156) @@ -58,49 +58,82 @@ FileAlreadyExistsException: Error trying to store file GameDotCom.jpg - file alr at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) +FileAlreadyExistsException: Error trying to store file PumpkinHill.txt - file already exists + at Client.a(SourceFile:277) + at Client.store(SourceFile:183) + at Client.store(SourceFile:156) + at ClientMain.test2Client(ClientMain.java:44) + at ClientMain$1.run(ClientMain.java:26) FileAlreadyExistsException: Error trying to store file rap.mp3 - file already exists at Client.a(SourceFile:277) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) +FileAlreadyExistsException: Error trying to store file rap.mp3 - file already exists + at Client.a(SourceFile:277) + at Client.store(SourceFile:183) + at Client.store(SourceFile:156) + at ClientMain.test2Client(ClientMain.java:44) + at ClientMain$1.run(ClientMain.java:26) +FileAlreadyExistsException: Error trying to store file PumpkinHill.txt - file already exists + at Client.a(SourceFile:277) + at Client.store(SourceFile:183) + at Client.store(SourceFile:156) + at ClientMain.test2Client(ClientMain.java:44) + at ClientMain$1.run(ClientMain.java:26) DstoreDisconnectException: Dstore at port 8081 has been disconnected at DstoreConnection.getDisconnectData(DstoreConnection.java:52) - at DstoreConnection.localReceive(DstoreConnection.java:121) - at DstoreConnection.receive(DstoreConnection.java:92) - at Controller.lambda$store$1(Controller.java:317) - at java.base/java.lang.Thread.run(Thread.java:832) -DstoreDisconnectException: Dstore at port 8081 has been disconnected - at DstoreConnection.getDisconnectData(DstoreConnection.java:52) - at DstoreConnection.receive(DstoreConnection.java:84) - at Controller.lambda$store$1(Controller.java:317) - at java.base/java.lang.Thread.run(Thread.java:832) -DstoreDisconnectException: Dstore at port 8081 has been disconnected - at DstoreConnection.getDisconnectData(DstoreConnection.java:52) - at DstoreConnection.receive(DstoreConnection.java:84) - at Controller.lambda$store$1(Controller.java:317) - at java.base/java.lang.Thread.run(Thread.java:832) -DstoreDisconnectException: Dstore at port 8081 has been disconnected - at DstoreConnection.getDisconnectData(DstoreConnection.java:52) - at DstoreConnection.receive(DstoreConnection.java:84) - at Controller.lambda$store$1(Controller.java:317) - at java.base/java.lang.Thread.run(Thread.java:832) -DstoreDisconnectException: Dstore at port 8081 has been disconnected - at DstoreConnection.getDisconnectData(DstoreConnection.java:52) - at DstoreConnection.receive(DstoreConnection.java:84) - at Controller.lambda$store$1(Controller.java:317) + at DstoreConnection.localReceive(DstoreConnection.java:125) + at DstoreConnection.receive(DstoreConnection.java:96) + at Controller.lambda$store$1(Controller.java:312) at java.base/java.lang.Thread.run(Thread.java:832) +Store for Unknown.txt failed due to dead dstore +Store for rap.mp3 failed due to dead dstore +Store for GameDotCom.jpg failed due to dead dstore +Store for PumpkinHill.txt failed due to dead dstore +Store for SnowHalation.txt failed due to dead dstore +Store for AllStar.txt failed due to dead dstore +Store for Grandad.txt failed due to dead dstore Not all STORE_ACKs have been received Not all STORE_ACKs have been received Not all STORE_ACKs have been received Not all STORE_ACKs have been received Not all STORE_ACKs have been received -FileAlreadyExistsException: Error trying to store file Look_Away.mp3 - file already exists - at Client.a(SourceFile:277) +Not all STORE_ACKs have been received +Not all STORE_ACKs have been received +Not all STORE_ACKs have been received +java.net.SocketTimeoutException: Read timed out + at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:283) + at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:309) + at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:350) + at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:803) + at java.base/java.net.Socket$SocketInputStream.read(Socket.java:982) + at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:297) + at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339) + at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:188) + at java.base/java.io.InputStreamReader.read(InputStreamReader.java:181) + at java.base/java.io.BufferedReader.fill(BufferedReader.java:161) + at java.base/java.io.BufferedReader.readLine(BufferedReader.java:326) + at java.base/java.io.BufferedReader.readLine(BufferedReader.java:392) + at Client.store(SourceFile:239) + at Client.store(SourceFile:156) + at ClientMain.test2Client(ClientMain.java:44) + at ClientMain$1.run(ClientMain.java:26) +NotEnoughDstoresException + at Client.a(SourceFile:280) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) +NotEnoughDstoresException + at Client.list(SourceFile:107) + at ClientMain.list(ClientMain.java:113) + at ClientMain.test2Client(ClientMain.java:52) + at ClientMain$1.run(ClientMain.java:26) +Exception in thread "Thread-0" java.lang.NullPointerException + at ClientMain.test2Client(ClientMain.java:54) + at ClientMain$1.run(ClientMain.java:26) java.net.SocketTimeoutException: Read timed out at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:283) at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:309) @@ -118,24 +151,69 @@ java.net.SocketTimeoutException: Read timed out at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file PumpkinHill.txt - file already exists - at Client.a(SourceFile:277) +NotEnoughDstoresException + at Client.a(SourceFile:280) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file spurk.jpg - file already exists - at Client.a(SourceFile:277) +NotEnoughDstoresException + at Client.a(SourceFile:280) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file SnowHalation.txt - file already exists - at Client.a(SourceFile:277) +NotEnoughDstoresException + at Client.list(SourceFile:107) + at ClientMain.list(ClientMain.java:113) + at ClientMain.test2Client(ClientMain.java:52) + at ClientMain$1.run(ClientMain.java:26) +Exception in thread "Thread-2" java.lang.NullPointerException + at ClientMain.test2Client(ClientMain.java:54) + at ClientMain$1.run(ClientMain.java:26) +java.net.SocketTimeoutException: Read timed out + at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:283) + at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:309) + at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:350) + at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:803) + at java.base/java.net.Socket$SocketInputStream.read(Socket.java:982) + at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:297) + at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339) + at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:188) + at java.base/java.io.InputStreamReader.read(InputStreamReader.java:181) + at java.base/java.io.BufferedReader.fill(BufferedReader.java:161) + at java.base/java.io.BufferedReader.readLine(BufferedReader.java:326) + at java.base/java.io.BufferedReader.readLine(BufferedReader.java:392) + at Client.store(SourceFile:239) + at Client.store(SourceFile:156) + at ClientMain.test2Client(ClientMain.java:44) + at ClientMain$1.run(ClientMain.java:26) +NotEnoughDstoresException + at Client.a(SourceFile:280) + at Client.store(SourceFile:183) + at Client.store(SourceFile:156) + at ClientMain.test2Client(ClientMain.java:44) + at ClientMain$1.run(ClientMain.java:26) +NotEnoughDstoresException + at Client.a(SourceFile:280) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) +NotEnoughDstoresException + at Client.a(SourceFile:280) + at Client.store(SourceFile:183) + at Client.store(SourceFile:156) + at ClientMain.test2Client(ClientMain.java:44) + at ClientMain$1.run(ClientMain.java:26) +NotEnoughDstoresException + at Client.list(SourceFile:107) + at ClientMain.list(ClientMain.java:113) + at ClientMain.test2Client(ClientMain.java:52) + at ClientMain$1.run(ClientMain.java:26) +Exception in thread "Thread-9" java.lang.NullPointerException + at ClientMain.test2Client(ClientMain.java:54) + at ClientMain$1.run(ClientMain.java:26) java.net.SocketTimeoutException: Read timed out at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:283) at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:309) @@ -170,29 +248,31 @@ java.net.SocketTimeoutException: Read timed out at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file Grandad.txt - file already exists - at Client.a(SourceFile:277) +NotEnoughDstoresException + at Client.a(SourceFile:280) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file Unknown.txt - file already exists - at Client.a(SourceFile:277) +NotEnoughDstoresException + at Client.a(SourceFile:280) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file Grandad.txt - file already exists - at Client.a(SourceFile:277) +NotEnoughDstoresException + at Client.a(SourceFile:280) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file Unknown.txt - file already exists - at Client.a(SourceFile:277) - at Client.store(SourceFile:183) - at Client.store(SourceFile:156) - at ClientMain.test2Client(ClientMain.java:44) +NotEnoughDstoresException + at Client.list(SourceFile:107) + at ClientMain.list(ClientMain.java:113) + at ClientMain.test2Client(ClientMain.java:52) + at ClientMain$1.run(ClientMain.java:26) +Exception in thread "Thread-3" java.lang.NullPointerException + at ClientMain.test2Client(ClientMain.java:54) at ClientMain$1.run(ClientMain.java:26) java.net.SocketTimeoutException: Read timed out at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:283) @@ -211,12 +291,46 @@ java.net.SocketTimeoutException: Read timed out at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file SnowHalation.txt - file already exists - at Client.a(SourceFile:277) +NotEnoughDstoresException + at Client.a(SourceFile:280) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) +NotEnoughDstoresException + at Client.list(SourceFile:107) + at ClientMain.list(ClientMain.java:113) + at ClientMain.test2Client(ClientMain.java:52) + at ClientMain$1.run(ClientMain.java:26) +Exception in thread "Thread-6" java.lang.NullPointerException + at ClientMain.test2Client(ClientMain.java:54) + at ClientMain$1.run(ClientMain.java:26) +NotEnoughDstoresException + at Client.a(SourceFile:280) + at Client.store(SourceFile:183) + at Client.store(SourceFile:156) + at ClientMain.test2Client(ClientMain.java:44) + at ClientMain$1.run(ClientMain.java:26) +NotEnoughDstoresException + at Client.a(SourceFile:280) + at Client.store(SourceFile:183) + at Client.store(SourceFile:156) + at ClientMain.test2Client(ClientMain.java:44) + at ClientMain$1.run(ClientMain.java:26) +NotEnoughDstoresException + at Client.a(SourceFile:280) + at Client.store(SourceFile:183) + at Client.store(SourceFile:156) + at ClientMain.test2Client(ClientMain.java:44) + at ClientMain$1.run(ClientMain.java:26) +NotEnoughDstoresException + at Client.list(SourceFile:107) + at ClientMain.list(ClientMain.java:113) + at ClientMain.test2Client(ClientMain.java:52) + at ClientMain$1.run(ClientMain.java:26) +Exception in thread "Thread-4" java.lang.NullPointerException + at ClientMain.test2Client(ClientMain.java:54) + at ClientMain$1.run(ClientMain.java:26) java.net.SocketTimeoutException: Read timed out at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:283) at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:309) @@ -234,53 +348,66 @@ java.net.SocketTimeoutException: Read timed out at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file PumpkinHill.txt - file already exists - at Client.a(SourceFile:277) +NotEnoughDstoresException + at Client.a(SourceFile:280) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file Unknown.txt - file already exists - at Client.a(SourceFile:277) - at Client.store(SourceFile:183) - at Client.store(SourceFile:156) - at ClientMain.test2Client(ClientMain.java:44) - at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file Unknown.txt - file already exists - at Client.a(SourceFile:277) - at Client.store(SourceFile:183) +java.net.SocketTimeoutException: Read timed out + at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:283) + at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:309) + at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:350) + at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:803) + at java.base/java.net.Socket$SocketInputStream.read(Socket.java:982) + at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:297) + at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339) + at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:188) + at java.base/java.io.InputStreamReader.read(InputStreamReader.java:181) + at java.base/java.io.BufferedReader.fill(BufferedReader.java:161) + at java.base/java.io.BufferedReader.readLine(BufferedReader.java:326) + at java.base/java.io.BufferedReader.readLine(BufferedReader.java:392) + at Client.store(SourceFile:239) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file Grandad.txt - file already exists - at Client.a(SourceFile:277) +NotEnoughDstoresException + at Client.a(SourceFile:280) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file SnowHalation.txt - file already exists - at Client.a(SourceFile:277) +NotEnoughDstoresException + at Client.a(SourceFile:280) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileDoesNotExistException: Error trying to load or remove file spurk.jpg - file does not exist - at Client.remove(SourceFile:505) - at ClientMain.test2Client(ClientMain.java:57) +NotEnoughDstoresException + at Client.list(SourceFile:107) + at ClientMain.list(ClientMain.java:113) + at ClientMain.test2Client(ClientMain.java:52) at ClientMain$1.run(ClientMain.java:26) -FileDoesNotExistException: Error trying to load or remove file Look_Away.mp3 - file does not exist - at Client.remove(SourceFile:505) - at ClientMain.test2Client(ClientMain.java:57) +Exception in thread "Thread-5" java.lang.NullPointerException + at ClientMain.test2Client(ClientMain.java:54) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file AllStar.txt - file already exists - at Client.a(SourceFile:277) +NotEnoughDstoresException + at Client.a(SourceFile:280) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) -FileAlreadyExistsException: Error trying to store file GameDotCom.jpg - file already exists - at Client.a(SourceFile:277) +NotEnoughDstoresException + at Client.a(SourceFile:280) at Client.store(SourceFile:183) at Client.store(SourceFile:156) at ClientMain.test2Client(ClientMain.java:44) at ClientMain$1.run(ClientMain.java:26) +NotEnoughDstoresException + at Client.list(SourceFile:107) + at ClientMain.list(ClientMain.java:113) + at ClientMain.test2Client(ClientMain.java:52) + at ClientMain$1.run(ClientMain.java:26) +Exception in thread "Thread-7" java.lang.NullPointerException + at ClientMain.test2Client(ClientMain.java:54) + at ClientMain$1.run(ClientMain.java:26) diff --git a/loggers/ControllerLogger.class b/loggers/ControllerLogger.class deleted file mode 100644 index d1501ec440c94f5a395d546f4a803efe8e9d29ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1638 zcmX^0Z`VEs1_mpJ08R!b24;2!79Ivx1~x_p0q6X@lA`>aoYW$p{PgtHB1Q&|%)H`~ z#JuEGMg}1tbZKiY1||j$9tKVZE=C46o6Nk-5<5l)aSb1cZWR!fnU@|?S&(Y28OF}Q z!^j|<l~|UjpP8@k>F-*RoLW$lnV-kOz{kj-f^N7%Vop(NVoId~$k@!poXq0X6fOpC z1_6+Lf{YBJ8a`mNauV~>^@B@_GV{{GmIyO4NFgMGO7luGb5oJ*5@lr2#jq<Qu~;E5 zzeFJ^H8l^}LWRoI5-tWI1_3Sx2?h>!21!N+HjuAUi#Qmh85y{e;Q_|QAj=@f&LGdj zpunKW$iNSFLSAZ#esF$rc4`SD15bKtiBEoVVopGQQ3)dhvxcT8NRKiPg9=CkdwOaK zNJfZ(fkBOjL7hQ^kwH8+F+0^cKQB44Bs{Yu!#N)u7bV4@F!uEH)Wi$`P=sjlFlaLf zGBPmd<fk(-@ca0?$Gds@xW)&Ey198qfZ`GCHso+)WZ;Dv9+sF>n##z)0t$6T1{UZ1 zlvI!*nR%&xrMXF|MInhvIjM{cyul@j$=SY%1yDX0JcNrG8MxC^OFY4D1*IDi4Nc6H z!^j{24v%!V%$(HV(zLY93PuKyN-S>UNhvPLFG}^w&&*3rK}0+vaIHNx!x$MjY?5<8 zuC@aQZWtp2S8#r5QF1EC21W)^^f=c8*~G{o;FO<VQe0A$Sm2vll98WM%+JQ)z{TLm z;Ka`042lOAMg|p-QhjiMW#*OTXQx8b8zgGn5|c~viz*ozW+10Xs6vRL9*KD=IjO}e zKKc3Cr3KcQ@rERVq7j^RkR+k$JQ_*JKPf9Uxx^YdF+h!QPRz*(&MZl_=3sDRWDt(_ zOD$J$0SBc5qXMIiE@Lbs1CM83UTTqZPGWI!YB4*5Cn$M<vp#a>Wn|z6C3<L9W@qqW zWKhKj5^O$YXYgZWki)MOoTEU&!l1~~@Iz`(>H#h}BW%fQH>2jy{r$|nW}1~vvx z27LxlA~#@QVDM#NW?*DsV36O$z<8WNa5n=}q}Fx@_RS28%NclgGjK-=@os0}-@g%T zh#><5gAfA?0|Ns$0~-Smg9rm3gB$}tgAoG*0}BI_2q%Lvn8nDz&A`cE!eGk4$N;j$ zmVuc81Vq4=@a|?1iWCyr&LFmb69eN0xXFBARYDAG48jZo3?g7tnHd-b7+64sBLfrI zC?y6a1}2a%w6wP~h=ZKP$N+K{$Uh7W5)7;il1PqVVK8GbhdM%<ff4LeW+5q%oe*to zU?EusMg|K8OQ=G91{SbOgtcU}w=saQ(k=#728L}6n&|c^G6*p!F>o+gF<3)2gNy=s zm6dTb10zB?#2yX?W(FIue{C7;7#J8h7#JDs85kK{8Qj4k%f#TpAi?0}Aj#m(;LG68 GAPE4YWP+^# diff --git a/loggers/DstoreLogger.class b/loggers/DstoreLogger.class deleted file mode 100644 index ac67d99e6bd1c551748d3b73a4e7891edbc42419..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1492 zcmX^0Z`VEs1_mnzcTNT-24;2!79Ivx1~x_p9+%>h{GwE!{PgtHB1Q&|%)H`~#JuEG zMg~3~WGQPd1||j$9tKVZE=C46o6Nk-5<5l)2@M~JP8AT9nU@|?S&(Y&sTs!3z{AKO zoRwIXsGpgy@9FPak(^pkl9`{!!NAAJpnz<$LSjx)YGO*I0?5qF#GK6H)D$iTZUzC6 zWrB<hq8dJ6b8-^%()EK&iZb)ktw9zDGcrgaB!WuwN-}d(k?av=WY9#hCnK>~Auqo~ zAt^OA57{z>%G44r1|bFkE(Qq(Np=P)kj2uB3~V4jfdWMwt1mUfgcukYWO*3m7~~ll z#B&p~Q=Rkkk`qh9GfOg@^TFX*QVepxrzWNkK+&Mc!=S{V%*eo-lb`OEnUfk^nwFMX z!N?$lshp94-^brQ-p$j;H9k1h&CN4{k%1RxNmyb|X(|VUIwJ#H3OF_y8CXDp$;iOs zoS%{k(wmu=>Q|bZlv)&$n3R*s$iN$1l9-(Bn^*wlbHM|yn2~`yJ+;IW?0!%>5YW&> zO$m$)0_mwGKB#UM(ZJ$KMg|U><Q$Mw>=+rCH8jH*8MuP;ON)|ILEdF#5JZk2Jy2va zG6*>3=a&?h6eSk;rj}&nrxf$EF_?2PSTI<!GgyHF+nSL<1*B9ToFFpu%JQ>Qq3Hq= z{%(oMCHX~_j0`i7Qw~%i#88jKyp){OVilkK{Or;KYs~OQ5<$@jPTxq9(DWFMB;=oz zm6}{)jT{_MBb*a+a)L8UQmr`{Y#A9iAaNDX$jHFsnU|MZ<eZaOT%20W&fow_0^kgZ zoUIrcxIqaLn#tH1oEaHZF~R|x_t+U+85!j8D+Q-^P*^Z1GB7bnFfcGMGe|M0Feo!H zGN>{zFfcKwF>rxO3<d@UAyBGiU|?Wn;AGHX0F?`x3=9l@3@i*x3=9kkn;006GYIWw zV2ad|-p;_jnSpUR1MhAI?noit?F{_;H-b&m0-M9az`(%6z{bGKAj-hcAkQGcpv}Ml zGDnn?K?lrYWZ-7tWYA^MV_;+e*<#DU%m4x+U|V>1GYCZriEL*O+rNo{aRc0BKCmib z1~vu}1_1_9u&K-pi~<ZSpz@1>32c-Bs32ruU=YyK-p(MdC9{h`hJj%#g96Bbj0_+L zLX44QU}cbE;AfCVauN%JK7#?&NwN%#42+=Q(AvVF0CEFFGaFb?o`HkGkiiH^DaiG# zjGGx45%xfovNJF<7=yiF!eGk4z`()4$Y936$Y8@@2M#PI273kx21f@;1}6p=1~&#t E0FMA*(EtDd diff --git a/loggers/Logger$LoggingType.class b/loggers/Logger$LoggingType.class deleted file mode 100644 index a62bda1d6229f4047dd872fda4e641c5170aa594..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1041 zcmX^0Z`VEs1_mnz3r+?m24;2!79Ivx1~x_pA)oy8^wc615S5vi9#UD5%E-X366WX= z>Ke?*AR6rhl0j8q&BegMz{$?Q#>2qHz|F|Onw*oLm&(W>qM_-Nl~|UjpOcuEuJ50e zm6}{)&BegWz{k$O&%+?VAjrtThfv^}SDMSnz+RS^Q=00Z#>il*fu!3xC$YHL8c86y zq$o2l-5S{jkO5%xg?Si67(^Kv*laTMGE3|j8N`r{g6j0t4C7!BXJlaW^N;uOcjsbY zVh{!eh7=EjID<4Jg9tXCaxlm;G6?wl#fP{C`Fi>}`o#PD`9y-W$@4JCGDveUC^9ne z`1{4XdHT4*<&=3C6hU&Tj0_?$IY&PixFI0@>O2gpAZyvc{x4=^5ZBPe8rX~sEYA5U zsf-N#KACx`ex<odsYM})Nja&E3>sLxsfo=Sj0~K?ndy0nC8b5Fj10^gnqiC#95%^0 z(BM)-3TIHD+F&!o&YF>dD>%QjC^^+F6J$F#BxUG<Vw91A!!NbC#3R4Bgq^{Zk%0{& z$H>6rnU|MZ1dh$rVnznA9%wpqFl1n2;ALQ7V0DlLMF9hYgCr<S!L%ZSG?-Qe(E?JS z#LB?Hz{0@EpuwQYz{sG*z`&ryz{mgsT$>mew=u9EVBpxmz`(%Bpv}O*zy_9MXW(QI zV9<f9X9A0I2{CEyVBk5xz=Wxu36zo;n84=CGcYqSGcYi)YiY}DXAs(mVYn^>0|OI- z9s>u1K7$_Ak{SjUkee7nb~7+V3W+gqXOP&;APMHkuz)#oV2%PSn4<*dsIY-KYV3O% zm?D`sF-QhSvTS0I3yx&n#Gn)$$+n3>EqF5nBf<q@46F<c3>*x+44e#73|tKA4BQMR m4D1Xn3=lUNFc^Z}X2f6&rcD^k7#JA17#JCt7)%(<9V7w0gVDeM diff --git a/loggers/Logger.class b/loggers/Logger.class deleted file mode 100644 index 642bbf6cfdb1489289c40fc83829f40627162802..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2112 zcmX^0Z`VEs1_mpJGA;%t24;2!79Ivx1~x_pfvm)`ME#t^ymWp4q^#8B5=I6#o6Nk- z5<5l)W)00SP6iGJPId+^9tLg(9!3T>pZxUn)FMU(?wtJe^vt~UkjjEoMg|cdh`0)f zf{I#$wDR#V@G}T7GB6bsGct(!fGx|+*AFPl%qs~lDN0SuwPt4!Vq_4;BE!YN!63rJ zAj%-d$RLoOTH=$R?v|O88eE!|mRZ5bAfllOF%Rtc;F6-uymV_W1_=g9b_OXP25ANv z6yF6`7MG;vGBOAzmlhSJ=9PqG=BD~)=Hz4+gFWgc#K6EH$HO4cpuor=o|~AR>YSgK zoLCZ`S(4$LpI2Oxm{(HF$e^x)X{Q%fcL*{lfr40>kwFxT9#FulGN`dLsPiyrfC5$s z6mqFW$N|X6z~k>1@8;>_8t?Dt6UoV-%Am!=pbb(j0+Vp`bBPae4f6H$bMyfz(B)y! z11S*j_k)Xrb%O%afQP}5!HAK8GbcYiBp(!(V6R7k<V<)NOc~4=8TisuOORrRkwF|5 z%xKZZ#URLF!NXw5pv=g?UI2>EoIG|0Ygkl*BgM5MIkli9Ge3`u!HU6_hrte%;`qUe zgG&;VvqOp!lT$&qJMb_#f?UQ6c3DVjQEp~lVh$&R1cNgVg9|7DG3S?-a51<sxU(~O z@Gy8Xcrh~YgVRi2YKeYuesXqd2_pj!IF%$P<^<#ym4N-`3DV=k!{7_jzz*_Teo=`K z10#b!D5?V(88kFJJu#ycYm9O*1o1EggZ#^!lb<fcz{KDW3Lb1pUo(u6fyFsLC6$qZ z-zPIK)vq)+DYYmhF)1gNk%1TNci+SUD4z=+OvUUB(Xar_%-8qyhs!WBaOb8L7bm8t z2B+qgFfyn?(-gw@)>wQI#>l`A)fSYRoSIpdn!?Dy6`WsMl$;8Qer`yz(*p%1BLlZz zYH^8gD#)$Hj0^%!`S~TqB}It^zNsY{`6<QxYz!$}45<uh><sCk;LBiSPyuO#6d##+ zW%=2u`jCtW$vkd}$tC$km5dBCpw0!S3aCPep&p5ODLJXdDn9x7*`)<oJb~mb6pf&Q z2aED(B=wL2%^Eo}p+-0-=HvutmZVy9Fk~?@urtOp>gD98b1>vEGH^sQ>e?~JDll>| z<bioMx*#4S1CM83UTTqZPGWI!YB3`NIOL#39Xmr2BZDeNP+;>RJ3|R0gB*UP;9?dO z94v|q91Khh3=B*RBB1h@fq{VqRGu<0FmN!iFt9R&GB7fPF)%P_F))GEacOO5VARsy z%D}#nfq{XMA)JAMfscWifq_AgfrUYcfs;X)g#}ciGB7ZxfHFJ-6Ij0w0~-S)0|SGy z))ofd;|x+-yBP!{wYD(`?_dz$#URVTu$@71D+4b`b_3Ws2!kaU*cl`l<QSwFA{ZDL zm>C%57$U*$WMqh9U;!04P&e8!FoErm(%QnnzKKC)DcC&rO$?gL7}!~sGq5nPfg25R zjU3oWHU?%9W(P(F7Elp^-7Fo#W+|bW70jRvH7f;FAu=#9sA+9u(4Wa5thJ57SbH0T z`EmvhU!83XHd@;l>}N7?ZDMc&iEd<IWMF6DXAokrVqgM?uNVU>NH+sJgF1sag9d{f zgC?k?2HVHMz#PQRV8z1Az{n885DT?YpMeD&C&F6V+ZbH6w=sC@>|*d^VA#eGh=?{& zJ<Y(N%OJ#{$H2%ChhK9DR?UVCLJUR>EDZ7Ba7|!HgvN_1LlOf6g9rmNLox#+LnfHa e29voA`3wvUprTEcfrFvIL6V`6p_rkRK@tE&dD@i# -- GitLab