Skip to content

Commit

Permalink
fix physical memory detection on OSX (apache#15405)
Browse files Browse the repository at this point in the history
* fix physical memory detection on OSX

* typo
  • Loading branch information
vogievetsky authored and ythorat2 committed Dec 1, 2023
1 parent b9bdc9e commit ab3f439
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/bin/start-druid-main.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def get_physical_memory_linux():

def get_physical_memory_osx():
p1 = subprocess.Popen(['sysctl', '-a'], stdout=subprocess.PIPE)
p2 = subprocess.check_output(['grep', 'hw.memsize'], stdin=p1.stdout)
p2 = subprocess.check_output(['grep', 'hw.memsize:'], stdin=p1.stdout)
p2 = p2.decode('utf-8')
fields = p2.split(':')

Expand Down Expand Up @@ -394,7 +394,7 @@ def convert_total_memory_string(memory):
physical_memory = get_physical_memory()

if physical_memory is None:
raise ValueError('Please specify memory argument')
raise ValueError('Could not automatically determine memory size. Please explicitly specify the memory argument as --memory=<integer_value><m/g>')

return physical_memory
elif memory.endswith(MEM_MB_SUFFIX):
Expand Down

0 comments on commit ab3f439

Please sign in to comment.