Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes several issue #47 #48

Merged
merged 3 commits into from Sep 4, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions api/utils/eggroll_serdes.py
Expand Up @@ -64,11 +64,11 @@ def deserialize(_bytes):


deserialize_blacklist = [b'eval', b'execfile', b'compile', b'open', b'file', b'system', b'popen', b'popen2', b'popen3',
b'popen4', b'fdopen', b'tmpfile', b'fchmod', b'fchown', b'open', b'openpty', b'read', b'pipe',
b'popen4', b'fdopen', b'tmpfile', b'fchmod', b'fchown', b'open', b'openpty', b'pipe',
b'chdir', b'fchdir', b'chroot', b'chmod', b'chown', b'link', b'lchown', b'listdir', b'lstat',
b'mkfifo', b'mknod', b'access', b'mkdir', b'makedirs', b'readlink', b'remove', b'removedirs',
b'rename', b'renames', b'rmdir', b'tempnam', b'tmpnam', b'unlink', b'walk', b'execl',
b'execle', b'execlp', b'execv', b'execve', b'dup', b'dup2', b'execvp', b'execvpe', b'fork',
b'rename', b'renames', b'rmdir', b'tempnam', b'tmpnam', b'unlink', b'execl',
b'execle', b'execlp', b'execv', b'execve', b'dup2', b'execvp', b'execvpe',
b'forkpty', b'kill', b'spawnl', b'spawnle', b'spawnlp', b'spawnlpe', b'spawnv', b'spawnve',
b'spawnvp', b'spawnvpe', b'load', b'loads', b'load', b'loads', b'call', b'check_call',
b'check_output', b'Popen', b'getstatusoutput', b'getoutput', b'getstatus',
Expand All @@ -77,6 +77,8 @@ def deserialize(_bytes):
b'call_tracing', b'interact', b'compile_command', b'compile_command', b'spawn', b'open',
b'fileopen', b'popen']

future_blacklist = [b'read', b'dup', b'fork', b'walk']

serdes_cache = {}
for cls in ABCSerdes.__subclasses__():
cls_name = ".".join([cls.__module__, cls.__qualname__])
Expand Down
Expand Up @@ -115,15 +115,14 @@ public Server createServer(ProxyServerConf proxyServerConf) {
.maxConnectionAge(24, TimeUnit.HOURS)
.maxConnectionAgeGrace(24, TimeUnit.HOURS);

if (proxyServerConf.isCompatibleEnabled()) {
AccessRedirector accessRedirector = new AccessRedirector();

serverBuilder.addService(accessRedirector.redirect(dataTransferPipedServer,
"com.webank.ai.eggroll.api.networking.proxy.DataTransferService",
"com.webank.ai.fate.api.networking.proxy.DataTransferService"))
.addService(accessRedirector.redirect(routeServer, "com.webank.ai.eggroll.api.networking.proxy.RouteService",
"com.webank.ai.fate.api.networking.proxy.RouteService"));
}
AccessRedirector accessRedirector = new AccessRedirector();

serverBuilder.addService(accessRedirector.redirect(dataTransferPipedServer,
"com.webank.ai.eggroll.api.networking.proxy.DataTransferService",
"com.webank.ai.fate.api.networking.proxy.DataTransferService"))
.addService(accessRedirector.redirect(routeServer, "com.webank.ai.eggroll.api.networking.proxy.RouteService",
"com.webank.ai.fate.api.networking.proxy.RouteService"));


if (proxyServerConf.isSecureServer()) {
String serverCrtPath = proxyServerConf.getServerCrtPath().replaceAll("\\.\\./", "");
Expand Down
2 changes: 1 addition & 1 deletion storage/storage-service-cxx/src/SKVServicer.cc
Expand Up @@ -133,7 +133,7 @@ Status SKVServicer::get(ServerContext *context, const Operand *request, Operand
string_view result = skvStore->get(request, value);

response->set_key(request->key());
response->set_value(value.data(), value.size());
response->set_value(result.data(), result.size());

LOG(INFO) << "get finished" << endl;
cout << "get finished" << ", value: " << value << endl;
Expand Down