Commit 62cf7a72 authored by amir.yosef's avatar amir.yosef

Merge remote-tracking branch 'origin/master'

parents cddb4a54 f2cfa68b
......@@ -47,10 +47,10 @@ public class SendToReplica implements Closeable {
byte[] commandBytes = command.getBytes();
connectedReplicas.forEach(replica -> {
try {
try (OutputStream outputStream = replica.os()) {
OutputStream outputStream = replica.os();
outputStream.write(commandBytes);
outputStream.flush();
}
} catch (IOException e) {
logger.log(Level.SEVERE, "Failed to send command to replica ", e);
}
......@@ -67,7 +67,6 @@ public class SendToReplica implements Closeable {
}
public void addConnection(OutputStream outputStream) {
connectedReplicas.add(new ConnectedReplica(outputStream));
logger.info("SIZE CONNECTED REPLICAS = " + connectedReplicas.size());
......
......@@ -8,7 +8,7 @@ import java.util.Map;
import java.util.Optional;
public class ServerBuilder {
private int port = 16380;
private int port = 16379;
private String role;
private final String[] masterPortAndHost;
private final static ServerInfo info = ServerInfo.getInstance();
......
......@@ -51,7 +51,7 @@ public class RdbFileInfo {
}
public void setFile(Map<String, String> parameters) {
String path = "C:\\Users\\Amir\\Desktop\\Projects\\Redis\\tmp";
String path = "C:\\Users\\Amir\\Desktop\\Games\\Redis\\tmp\\";
String fileName = "rdb.rdb";
out.println(parameters);
if (parameters.containsKey("--dir")) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment