Refactor code about ray.ObjectID. (#3674)

* Refactor code about ray.ObjectID.

* remove from_random and use nil_id instead of constructor

* remove id() in hash

* Lint and fix

* Change driver id to ObjectID

* Replace binary_to_hex(ObjectID.id()) to ObjectID.hex()
This commit is contained in:
Yuhong Guo
2019-01-13 17:47:29 +08:00
committed by Philipp Moritz
parent c4b058739b
commit d2cf8561f2
14 changed files with 191 additions and 169 deletions
-4
View File
@@ -5,8 +5,6 @@ from __future__ import print_function
import os
from ray.raylet import ObjectID
def env_integer(key, default):
if key in os.environ:
@@ -15,8 +13,6 @@ def env_integer(key, default):
ID_SIZE = 20
NIL_JOB_ID = ObjectID(ID_SIZE * b"\xff")
NIL_FUNCTION_ID = NIL_JOB_ID
# The default maximum number of bytes to allocate to the object store unless
# overridden by the user.