implement event based object store

This commit is contained in:
Philipp Moritz
2016-03-17 22:32:31 -07:00
parent b9d472342b
commit dd88bae487
10 changed files with 332 additions and 113 deletions
+5 -5
View File
@@ -147,11 +147,11 @@ class ObjStoreTest(unittest.TestCase):
self.assertEqual(result, data)
# pushing an object, shipping it to another worker, and pulling it shouldn't change it
for data in ["h", "h" * 10000, 0, 0.0]:
objref = orchpy.push(data, worker1)
response = objstore1_stub.DeliverObj(orchestra_pb2.DeliverObjRequest(objref=objref.val, objstore_address=address(IP_ADDRESS, objstore2_port)), TIMEOUT_SECONDS)
result = orchpy.pull(objref, worker2)
self.assertEqual(result, data)
# for data in ["h", "h" * 10000, 0, 0.0]:
# objref = worker.push(data, worker1)
# response = objstore1_stub.DeliverObj(orchestra_pb2.DeliverObjRequest(objref=objref.val, objstore_address=address(IP_ADDRESS, objstore2_port)), TIMEOUT_SECONDS)
# result = worker.pull(objref, worker2)
# self.assertEqual(result, data)
services.cleanup()
+1 -1
View File
@@ -16,7 +16,7 @@ TIMEOUT_SECONDS = 5
parser = argparse.ArgumentParser(description='Parse addresses for the worker to connect to.')
parser.add_argument("--scheduler-address", default="127.0.0.1:10001", type=str, help="the scheduler's address")
parser.add_argument("--objstore-address", default="127.0.0.1:20001", type=str, help="the objstore's address")
parser.add_argument("--worker-address", default="127.0.0.1:40001", type=str, help="the worker's address")
parser.add_argument("--worker-address", default="127.0.0.1:30001", type=str, help="the worker's address")
@orchpy.distributed([str], [str])
def print_string(string):