Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
tapir
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
syslab
tapir
Commits
c111bf53
Commit
c111bf53
authored
9 years ago
by
Irene Zhang
Browse files
Options
Downloads
Patches
Plain Diff
fixing broken include links
parent
519c2dbf
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
store/qwstore/server.cc
+7
-7
7 additions, 7 deletions
store/qwstore/server.cc
store/qwstore/server.h
+2
-2
2 additions, 2 deletions
store/qwstore/server.h
with
9 additions
and
9 deletions
store/qwstore/server.cc
+
7
−
7
View file @
c111bf53
...
...
@@ -12,7 +12,7 @@ namespace qwstore {
using
namespace
proto
;
Server
::
Server
(
const
specpaxos
::
Configuration
&
configuration
,
int
myIdx
,
Server
::
Server
(
const
transport
::
Configuration
&
configuration
,
int
myIdx
,
Transport
*
transport
,
QWStore
*
store
)
:
store
(
store
),
configuration
(
configuration
),
myIdx
(
myIdx
),
transport
(
transport
)
{
...
...
@@ -80,6 +80,8 @@ Server::Load(const string &key, const string &value)
store
->
Load
(
key
,
value
);
}
}
// namespace qwstore
static
void
Usage
(
const
char
*
progName
)
{
fprintf
(
stderr
,
"usage: %s -c conf-file -i replica-index
\n
"
,
...
...
@@ -141,7 +143,7 @@ main(int argc, char **argv)
configPath
);
Usage
(
argv
[
0
]);
}
specpaxos
::
Configuration
config
(
configStream
);
transport
::
Configuration
config
(
configStream
);
if
(
index
>=
config
.
n
)
{
fprintf
(
stderr
,
"replica index %d is out of bounds; "
...
...
@@ -150,13 +152,13 @@ main(int argc, char **argv)
}
UDPTransport
transport
(
0.0
,
0.0
,
0
);
Server
*
server
;
qwstore
::
Server
*
server
;
server
=
new
Server
(
config
,
index
,
&
transport
,
new
QWStore
());
server
=
new
qwstore
::
Server
(
config
,
index
,
&
transport
,
new
qwstore
::
QWStore
());
if
(
keyPath
)
{
string
key
;
ifstream
in
;
std
::
ifstream
in
;
in
.
open
(
keyPath
);
if
(
!
in
)
{
fprintf
(
stderr
,
"Could not read keys from: %s
\n
"
,
keyPath
);
...
...
@@ -173,5 +175,3 @@ main(int argc, char **argv)
return
0
;
}
}
// namespace qwstore
This diff is collapsed.
Click to expand it.
store/qwstore/server.h
+
2
−
2
View file @
c111bf53
...
...
@@ -28,14 +28,14 @@ private:
QWStore
*
store
;
// Configuration of replicas.
specpaxos
::
Configuration
configuration
;
transport
::
Configuration
configuration
;
// Index of 'this' replica, and handle to transport layer.
int
myIdx
;
Transport
*
transport
;
public:
Server
(
const
specpaxos
::
Configuration
&
configuration
,
int
myIdx
,
Server
(
const
transport
::
Configuration
&
configuration
,
int
myIdx
,
Transport
*
transport
,
QWStore
*
store
);
~
Server
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment