decentriq_util 0.1.0.dev0__tar.gz → 0.1.0.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {decentriq_util-0.1.0.dev0 → decentriq_util-0.1.0.dev2}/PKG-INFO +1 -1
- {decentriq_util-0.1.0.dev0 → decentriq_util-0.1.0.dev2}/decentriq_util/spark/__init__.py +7 -3
- {decentriq_util-0.1.0.dev0 → decentriq_util-0.1.0.dev2}/pyproject.toml +1 -1
- {decentriq_util-0.1.0.dev0 → decentriq_util-0.1.0.dev2}/decentriq_util/__init__.py +0 -0
- {decentriq_util-0.1.0.dev0 → decentriq_util-0.1.0.dev2}/decentriq_util/error.py +0 -0
- {decentriq_util-0.1.0.dev0 → decentriq_util-0.1.0.dev2}/decentriq_util/proto/__init__.py +0 -0
- {decentriq_util-0.1.0.dev0 → decentriq_util-0.1.0.dev2}/decentriq_util/python/__init__.py +0 -0
- {decentriq_util-0.1.0.dev0 → decentriq_util-0.1.0.dev2}/decentriq_util/sql/__init__.py +0 -0
- {decentriq_util-0.1.0.dev0 → decentriq_util-0.1.0.dev2}/decentriq_util/sql/proto/__init__.py +0 -0
- {decentriq_util-0.1.0.dev0 → decentriq_util-0.1.0.dev2}/decentriq_util/sql/proto/compute_sql_pb2.py +0 -0
- {decentriq_util-0.1.0.dev0 → decentriq_util-0.1.0.dev2}/decentriq_util/sql/proto/compute_sql_pb2.pyi +0 -0
|
@@ -19,17 +19,21 @@ def _get_cgroup_memory() -> int:
|
|
|
19
19
|
with open("/sys/fs/cgroup/memory/memory.limit_in_bytes", "r") as f:
|
|
20
20
|
max_memory_str = f.read().strip()
|
|
21
21
|
|
|
22
|
+
max_memory = None
|
|
22
23
|
if max_memory_str == "max":
|
|
23
24
|
# Fallback to available virtual memory size
|
|
24
25
|
max_memory = psutil.virtual_memory().available
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
elif max_memory_str is not None:
|
|
27
|
+
try:
|
|
28
|
+
max_memory = int(max_memory_str)
|
|
29
|
+
except ValueError:
|
|
30
|
+
pass
|
|
27
31
|
|
|
28
32
|
if max_memory is not None:
|
|
29
33
|
return max_memory
|
|
30
34
|
else:
|
|
31
35
|
print("Unable to determine available memory from cgroup, assuming 4G")
|
|
32
|
-
return 4 * 1024 * 1024
|
|
36
|
+
return 4 * 1024 * 1024 * 1024
|
|
33
37
|
|
|
34
38
|
|
|
35
39
|
def _get_num_partitions(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{decentriq_util-0.1.0.dev0 → decentriq_util-0.1.0.dev2}/decentriq_util/sql/proto/__init__.py
RENAMED
|
File without changes
|
{decentriq_util-0.1.0.dev0 → decentriq_util-0.1.0.dev2}/decentriq_util/sql/proto/compute_sql_pb2.py
RENAMED
|
File without changes
|
{decentriq_util-0.1.0.dev0 → decentriq_util-0.1.0.dev2}/decentriq_util/sql/proto/compute_sql_pb2.pyi
RENAMED
|
File without changes
|