Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hpdos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SYNERG
hpdos
Commits
f3dbffa4
Commit
f3dbffa4
authored
Oct 11, 2021
by
Paras Garg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Completed version 1.0.0 of HPDOS. Need to benchmark.
parent
61493bc7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
5 deletions
+21
-5
code/hpdos_rdma_offloaded/src/main/java/hpdos_rdma_offloaded/MetadataServer.java
...ed/src/main/java/hpdos_rdma_offloaded/MetadataServer.java
+1
-1
code/hpdos_rdma_offloaded/src/main/java/hpdos_rdma_offloaded/handler/RegistrationHandler.java
...ava/hpdos_rdma_offloaded/handler/RegistrationHandler.java
+13
-1
code/hpdos_rdma_offloaded/src/main/java/hpdos_rdma_offloaded/handler/ReplicationHandler.java
...java/hpdos_rdma_offloaded/handler/ReplicationHandler.java
+1
-1
code/hpdos_rdma_offloaded/src/main/java/hpdos_rdma_offloaded/lib/Follower.java
...aded/src/main/java/hpdos_rdma_offloaded/lib/Follower.java
+4
-1
code/hpdos_rdma_offloaded/src/main/java/hpdos_rdma_offloaded/service/MasterMetadataServerService.java
...s_rdma_offloaded/service/MasterMetadataServerService.java
+2
-1
No files found.
code/hpdos_rdma_offloaded/src/main/java/hpdos_rdma_offloaded/MetadataServer.java
View file @
f3dbffa4
...
...
@@ -74,7 +74,7 @@ public class MetadataServer implements Runnable{
storageHandler
=
new
StorageHandler
(
properties
.
getProperty
(
"app.db_path"
));
networkHandler
=
new
NetworkHandler
(
isMaster
);
// metadataServerService = new MasterMetadataServerService(this.networkHandler,storageHandler);
registrationHandler
=
new
RegistrationHandler
(
isMaster
,
host
,
registrationPort
,
networkHandler
);
registrationHandler
=
new
RegistrationHandler
(
isMaster
,
host
,
registrationPort
,
networkHandler
);
if
(
isMaster
)
{
...
...
code/hpdos_rdma_offloaded/src/main/java/hpdos_rdma_offloaded/handler/RegistrationHandler.java
View file @
f3dbffa4
...
...
@@ -3,12 +3,17 @@ package hpdos_rdma_offloaded.handler;
import
java.io.IOException
;
import
java.io.ObjectInputStream
;
import
java.io.ObjectOutputStream
;
import
java.io.OutputStream
;
import
java.lang.ClassNotFoundException
;
import
java.net.InetAddress
;
import
java.net.ServerSocket
;
import
java.net.Socket
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.UUID
;
import
hpdos_rdma_offloaded.lib.Follower
;
public
class
RegistrationHandler
{
public
ServerSocket
server
;
public
int
port
=
9876
;
...
...
@@ -41,7 +46,7 @@ public class RegistrationHandler {
}
private
void
sendRegistrationRequest
(
String
message
)
throws
IOException
{
System
.
out
.
println
(
"Sending a registration request
"
);
System
.
out
.
println
(
"Sending a registration request
with message: "
+
message
);
InetAddress
host
=
InetAddress
.
getByName
(
this
.
registrationServerIp
);
Socket
socket
=
null
;
ObjectOutputStream
oos
=
null
;
...
...
@@ -97,7 +102,14 @@ public class RegistrationHandler {
while
(
true
)
{
Socket
socket
=
serverSocket
.
accept
();
ObjectInputStream
ois
=
new
ObjectInputStream
(
socket
.
getInputStream
());
OutputStream
outputStream
=
socket
.
getOutputStream
();
ObjectOutputStream
objectOutputStream
=
new
ObjectOutputStream
(
outputStream
);
String
ip
=
(
String
)
ois
.
readObject
();
String
ips
=
registrationServerIp
+
";"
;
for
(
Follower
follower
:
NetworkHandler
.
followers
)
{
ips
=
ips
+
follower
.
getIpAdress
()
+
";"
;
}
objectOutputStream
.
writeObject
(
ips
);
NetworkHandler
networkHandler
=
new
NetworkHandler
();
networkHandler
.
connectToSal
(
ip
);
// clientProcessingPool.submit(new ClientTask(clientSocket));
...
...
code/hpdos_rdma_offloaded/src/main/java/hpdos_rdma_offloaded/handler/ReplicationHandler.java
View file @
f3dbffa4
...
...
@@ -28,7 +28,7 @@ public class ReplicationHandler {
public
static
void
replicateMetadata
(
Packet
packet
)
throws
InterruptedException
,
ExecutionException
{
Set
<
Callable
<
DaRPCFuture
<
Request
,
Response
>>>
callables
=
new
HashSet
<>();
for
(
Follower
follower
:
followers
){
for
(
Follower
follower
:
NetworkHandler
.
followers
){
callables
.
add
(()->{
Request
request
=
new
Request
();
Response
response
=
new
Response
();
...
...
code/hpdos_rdma_offloaded/src/main/java/hpdos_rdma_offloaded/lib/Follower.java
View file @
f3dbffa4
package
hpdos_rdma_offloaded.lib
;
import
java.io.Serializable
;
import
com.ibm.darpc.DaRPCStream
;
import
hpdos_rdma_offloaded.protocol.*
;
public
class
Follower
{
public
class
Follower
implements
Serializable
{
private
static
final
long
serialVersionUID
=
0L
;
String
ipAddress
;
String
followerId
;
DaRPCStream
<
Request
,
Response
>
stream
;
...
...
code/hpdos_rdma_offloaded/src/main/java/hpdos_rdma_offloaded/service/MasterMetadataServerService.java
View file @
f3dbffa4
...
...
@@ -121,7 +121,8 @@ public class MasterMetadataServerService extends RpcProtocol implements DaRPCSer
@Override
public
void
close
(
DaRPCServerEndpoint
<
Request
,
Response
>
rpcClientEndpoint
)
{
System
.
out
.
println
(
"Closing Connection"
);
System
.
out
.
println
(
"Closing Connection"
);
// try
// {
// invalidationClientEpStreams.remove(rpcClientEndpoint.getDstAddr());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment