Commit 01a4caf3 authored by mohammad.salama's avatar mohammad.salama

Printing Scores of Files

parent 17b71b35
......@@ -11,7 +11,8 @@
<component name="ChangeListManager">
<list default="true" id="b8bcd35c-99f3-44c8-a866-59f81c3c8bd0" name="Changes" comment="Working as Strings, no json, problem in coordinator address">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/logs/app.log" beforeDir="false" afterPath="$PROJECT_DIR$/logs/app.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/WebSide/WebClient.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/WebSide/WebClient.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/org/AutoHealerAndClusterSearch/AutoHealerAndClusterSearch/Coordinator.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/org/AutoHealerAndClusterSearch/AutoHealerAndClusterSearch/Coordinator.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -125,10 +126,6 @@
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="Distributed-Search.jar" type="JarApplication" temporary="true">
<option name="JAR_PATH" value="$PROJECT_DIR$/out/artifacts/Distributed_Search_jar/Distributed-Search.jar" />
<method v="2" />
</configuration>
<list>
<item itemvalue="Application.WebServer" />
<item itemvalue="Application.WebClient" />
......@@ -136,13 +133,7 @@
<item itemvalue="Application.Node4" />
<item itemvalue="Application.Node2" />
<item itemvalue="Application.Node3" />
<item itemvalue="JAR Application.Distributed-Search.jar" />
</list>
<recent_temporary>
<list>
<item itemvalue="JAR Application.Distributed-Search.jar" />
</list>
</recent_temporary>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="SvnConfiguration">
......
......@@ -1118,3 +1118,28 @@ java.lang.NullPointerException: Cannot invoke "java.util.List.isEmpty()" because
2024-02-01 13:02:31,144 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
2024-02-01 13:02:43,220 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main-EventThread] The cluster addresses are: []
2024-02-01 13:02:44,961 WARN org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Coordinator [grpc-default-executor-0] No Nodes Are Working , Search Cannot Be Done
2024-02-01 13:58:01,328 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main-EventThread] Successfully connected to Zookeeper
2024-02-01 13:58:01,370 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] My Node under Election is/election/c_0000000260
2024-02-01 13:58:01,376 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] I am LEADER
2024-02-01 13:58:01,380 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main] The cluster addresses are: []
2024-02-01 13:58:01,383 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main] Registered to be Coordinator and I am Master !
2024-02-01 13:58:02,039 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main] Starting Application using Java 17.0.5 on M-Salameh with PID 15332 (D:\HIAST\FIY\FS\Distributed Systems\Lab\8\Distributed-Search\target\classes started by M_Salameh in D:\HIAST\FIY\FS\Distributed Systems\Lab\8\Distributed-Search)
2024-02-01 13:58:02,040 DEBUG org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main] Running with Spring Boot v2.6.8, Spring v5.3.20
2024-02-01 13:58:02,040 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main] No active profile set, falling back to 1 default profile: "default"
2024-02-01 13:58:03,768 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main] Started Application in 2.175 seconds (JVM running for 16.033)
2024-02-01 13:58:04,444 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main-EventThread] Successfully connected to Zookeeper
2024-02-01 13:58:04,469 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] My Node under Election is/election/c_0000000261
2024-02-01 13:58:04,475 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] I am NOT LEADER
2024-02-01 13:58:04,483 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main] Registered to service registry
2024-02-01 13:58:04,527 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main-EventThread] The cluster addresses are: [127.0.0.1:66]
2024-02-01 13:58:04,531 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Server started on port 66
2024-02-01 13:58:06,841 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main-EventThread] Successfully connected to Zookeeper
2024-02-01 13:58:06,868 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] My Node under Election is/election/c_0000000262
2024-02-01 13:58:06,874 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] I am NOT LEADER
2024-02-01 13:58:06,881 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main] Registered to service registry
2024-02-01 13:58:06,891 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Server started on port 77
2024-02-01 13:58:06,897 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main-EventThread] The cluster addresses are: [127.0.0.1:66, 127.0.0.1:77]
2024-02-01 13:58:32,801 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
2024-02-01 13:58:32,801 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
2024-02-01 13:59:07,950 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
2024-02-01 13:59:07,950 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
......@@ -34,10 +34,7 @@ public class WebClient {
(httpRequest ,
HttpResponse.BodyHandlers.ofString(StandardCharsets.UTF_8)).
thenApply(HttpResponse::body);
/*response = client.sendAsync
(httpRequest,
HttpResponse.BodyHandlers.
);*/
String tem = response.join();
return tem;
}
......
......@@ -147,7 +147,7 @@ public class Coordinator
if(filesScore == null)
{
files.add("No Answer !");
files.add("No Answer ! -0");
return files;
}
List<Map.Entry<String, Double>> entryList = new ArrayList<>(filesScore.entrySet());
......@@ -160,7 +160,7 @@ public class Coordinator
});
for (Map.Entry<String, Double> entry : entryList)
{
files.add(entry.getKey());
files.add(entry.getKey() + " : SCORE = "+entry.getValue());
}
return files;
......
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