Commit e1560c9b authored by mohammad.salama's avatar mohammad.salama

All Working - No Web Interface - printing files number - text fiel added

parent 9860ac41
...@@ -12,9 +12,7 @@ ...@@ -12,9 +12,7 @@
<list default="true" id="b8bcd35c-99f3-44c8-a866-59f81c3c8bd0" name="Changes" comment="Working as Strings, no json, problem in coordinator address"> <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$/.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$/logs/app.log" beforeDir="false" afterPath="$PROJECT_DIR$/logs/app.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/WebSide/WebServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/WebSide/WebServer.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/main/java/GRPCConnection/GRPCClient/GRPCClient.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/GRPCConnection/GRPCClient/GRPCClient.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/org/AutoHealerAndClusterSearch/AutoHealerAndClusterSearch/TransientWorker.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/org/AutoHealerAndClusterSearch/AutoHealerAndClusterSearch/TransientWorker.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/org/AutoHealerAndClusterSearch/AutoHealerAndClusterSearch/TransientWorker.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/org/AutoHealerAndClusterSearch/AutoHealerAndClusterSearch/TransientWorker.class" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
...@@ -176,15 +174,7 @@ ...@@ -176,15 +174,7 @@
<MESSAGE value="Working as Strings, no json, problem in coordinator address" /> <MESSAGE value="Working as Strings, no json, problem in coordinator address" />
<option name="LAST_COMMIT_MESSAGE" value="Working as Strings, no json, problem in coordinator address" /> <option name="LAST_COMMIT_MESSAGE" value="Working as Strings, no json, problem in coordinator address" />
</component> </component>
<component name="XDebuggerManager"> <component name="com.intellij.coverage.CoverageDataManagerImpl">
<breakpoint-manager> <SUITE FILE_PATH="coverage/Distributed_Search$WebClient.ic" NAME="WebClient Coverage Results" MODIFIED="1706784197993" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
<breakpoints>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/GRPCConnection/GRPCClient/GRPCClient.java</url>
<line>37</line>
<option name="timeStamp" value="24" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component> </component>
</project> </project>
\ No newline at end of file
Gratitude is a transformative practice that shifts our focus from what is lacking to what is abundant in our lives. It is a powerful reminder to appreciate the simple joys, blessings, and acts of kindness that surround us each day. Cultivating gratitude allows us to find beauty in the ordinary, to cherish the relationships that enrich our lives, and to embrace adversity as an opportunity for growth. It fosters a positive mindset, enhances our well-being, and strengthens our connections with others. Gratitude is a gentle reminder to pause, reflect, and give thanks for the precious gift of life and all that it encompasses.
\ No newline at end of file
...@@ -1018,3 +1018,85 @@ java.lang.NullPointerException: Cannot invoke "java.util.List.isEmpty()" because ...@@ -1018,3 +1018,85 @@ java.lang.NullPointerException: Cannot invoke "java.util.List.isEmpty()" because
2024-02-01 12:32:45,356 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main-EventThread] Registered to be Coordinator and I am Master ! 2024-02-01 12:32:45,356 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main-EventThread] Registered to be Coordinator and I am Master !
2024-02-01 12:33:33,227 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1 2024-02-01 12:33:33,227 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
2024-02-01 12:33:33,227 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1 2024-02-01 12:33:33,227 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
2024-02-01 12:40:57,122 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main-EventThread] Successfully connected to Zookeeper
2024-02-01 12:40:57,149 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] My Node under Election is/election/c_0000000248
2024-02-01 12:40:57,154 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] I am LEADER
2024-02-01 12:40:57,157 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main] The cluster addresses are: []
2024-02-01 12:40:57,161 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main] Registered to be Coordinator and I am Master !
2024-02-01 12:40:57,699 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main] Starting Application using Java 17.0.5 on M-Salameh with PID 12952 (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 12:40:57,699 DEBUG org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main] Running with Spring Boot v2.6.8, Spring v5.3.20
2024-02-01 12:40:57,700 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main] No active profile set, falling back to 1 default profile: "default"
2024-02-01 12:40:59,082 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main] Started Application in 1.764 seconds (JVM running for 12.826)
2024-02-01 12:40:59,674 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main-EventThread] Successfully connected to Zookeeper
2024-02-01 12:40:59,700 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] My Node under Election is/election/c_0000000249
2024-02-01 12:40:59,706 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] I am NOT LEADER
2024-02-01 12:40:59,712 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main] Registered to service registry
2024-02-01 12:40:59,719 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Server started on port 44
2024-02-01 12:40:59,726 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main-EventThread] The cluster addresses are: [127.0.0.1:44]
2024-02-01 12:41:01,462 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main-EventThread] Successfully connected to Zookeeper
2024-02-01 12:41:01,486 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] My Node under Election is/election/c_0000000250
2024-02-01 12:41:01,491 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] I am NOT LEADER
2024-02-01 12:41:01,497 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main] Registered to service registry
2024-02-01 12:41:01,506 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Server started on port 55
2024-02-01 12:41:01,510 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main-EventThread] The cluster addresses are: [127.0.0.1:55, 127.0.0.1:44]
2024-02-01 12:41:03,202 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main-EventThread] Successfully connected to Zookeeper
2024-02-01 12:41:03,228 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] My Node under Election is/election/c_0000000251
2024-02-01 12:41:03,233 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] I am NOT LEADER
2024-02-01 12:41:03,241 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main] Registered to service registry
2024-02-01 12:41:03,250 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Server started on port 66
2024-02-01 12:41:03,259 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main-EventThread] The cluster addresses are: [127.0.0.1:55, 127.0.0.1:66, 127.0.0.1:44]
2024-02-01 12:41:18,544 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
2024-02-01 12:41:18,544 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
2024-02-01 12:41:18,544 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
2024-02-01 12:44:15,383 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main-EventThread] Successfully connected to Zookeeper
2024-02-01 12:44:15,403 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] My Node under Election is/election/c_0000000252
2024-02-01 12:44:15,408 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] I am LEADER
2024-02-01 12:44:15,411 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main] The cluster addresses are: []
2024-02-01 12:44:15,414 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main] Registered to be Coordinator and I am Master !
2024-02-01 12:44:15,936 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main] Starting Application using Java 17.0.5 on M-Salameh with PID 1360 (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 12:44:15,937 DEBUG org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main] Running with Spring Boot v2.6.8, Spring v5.3.20
2024-02-01 12:44:15,937 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main] No active profile set, falling back to 1 default profile: "default"
2024-02-01 12:44:17,440 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main] Started Application in 1.879 seconds (JVM running for 14.133)
2024-02-01 12:44:17,590 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main-EventThread] Successfully connected to Zookeeper
2024-02-01 12:44:17,617 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] My Node under Election is/election/c_0000000253
2024-02-01 12:44:17,621 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] I am NOT LEADER
2024-02-01 12:44:17,627 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main] Registered to service registry
2024-02-01 12:44:17,633 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Server started on port 44
2024-02-01 12:44:17,642 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main-EventThread] The cluster addresses are: [127.0.0.1:44]
2024-02-01 12:44:19,511 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main-EventThread] Successfully connected to Zookeeper
2024-02-01 12:44:19,535 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] My Node under Election is/election/c_0000000254
2024-02-01 12:44:19,541 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] I am NOT LEADER
2024-02-01 12:44:19,548 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main] Registered to service registry
2024-02-01 12:44:19,558 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Server started on port 55
2024-02-01 12:44:19,561 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main-EventThread] The cluster addresses are: [127.0.0.1:44, 127.0.0.1:55]
2024-02-01 12:44:32,319 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
2024-02-01 12:44:32,319 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
2024-02-01 12:47:37,669 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main-EventThread] Successfully connected to Zookeeper
2024-02-01 12:47:37,694 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] My Node under Election is/election/c_0000000255
2024-02-01 12:47:37,698 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] I am LEADER
2024-02-01 12:47:37,702 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main] The cluster addresses are: []
2024-02-01 12:47:37,706 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main] Registered to be Coordinator and I am Master !
2024-02-01 12:47:38,223 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main] Starting Application using Java 17.0.5 on M-Salameh with PID 13228 (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 12:47:38,223 DEBUG org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main] Running with Spring Boot v2.6.8, Spring v5.3.20
2024-02-01 12:47:38,223 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main] No active profile set, falling back to 1 default profile: "default"
2024-02-01 12:47:39,537 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main] Started Application in 1.689 seconds (JVM running for 9.234)
2024-02-01 12:47:40,003 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main-EventThread] Successfully connected to Zookeeper
2024-02-01 12:47:40,031 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] My Node under Election is/election/c_0000000256
2024-02-01 12:47:40,036 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] I am NOT LEADER
2024-02-01 12:47:40,042 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main] Registered to service registry
2024-02-01 12:47:40,050 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Server started on port 44
2024-02-01 12:47:40,059 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main-EventThread] The cluster addresses are: [127.0.0.1:44]
2024-02-01 12:47:46,403 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.Application [main-EventThread] Successfully connected to Zookeeper
2024-02-01 12:47:46,434 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] My Node under Election is/election/c_0000000257
2024-02-01 12:47:46,438 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.LeaderElection [main] I am NOT LEADER
2024-02-01 12:47:46,446 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main] Registered to service registry
2024-02-01 12:47:46,455 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Server started on port 55
2024-02-01 12:47:46,459 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.ServiceRegistry [main-EventThread] The cluster addresses are: [127.0.0.1:44, 127.0.0.1:55]
2024-02-01 12:48:11,450 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
2024-02-01 12:48:11,450 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
2024-02-01 12:50:06,706 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
2024-02-01 12:50:06,706 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
2024-02-01 12:55:57,853 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
2024-02-01 12:55:57,853 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
2024-02-01 12:56:06,813 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
2024-02-01 12:56:06,813 INFO org.AutoHealerAndClusterSearch.AutoHealerAndClusterSearch.TransientWorker [main] Coordinator connected: /127.0.0.1
...@@ -17,6 +17,7 @@ import org.apache.zookeeper.data.Stat; ...@@ -17,6 +17,7 @@ import org.apache.zookeeper.data.Stat;
import org.checkerframework.checker.units.qual.A; import org.checkerframework.checker.units.qual.A;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
...@@ -36,7 +37,11 @@ public class GRPCClient ...@@ -36,7 +37,11 @@ public class GRPCClient
SearchRequest request = SearchRequest.newBuilder().setQuery(query).build(); SearchRequest request = SearchRequest.newBuilder().setQuery(query).build();
SearchReply reply = stub.search(request); SearchReply reply = stub.search(request);
List<String> stringList = reply.getFilesList(); List<String> stringList = reply.getFilesList();
if(stringList == null || stringList.size()==0 )
{
stringList = new ArrayList<>();
stringList.add("NO MATCH FOUND");
}
//SearchRequest request = SearchRequest.newBuilder().setQuery("There is a file to be read be full of kindness").build(); //SearchRequest request = SearchRequest.newBuilder().setQuery("There is a file to be read be full of kindness").build();
return stringList; return stringList;
} }
......
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